Class PrometheusService

java.lang.Object
org.jpos.q2.QBeanSupport
org.jpos.metrics.PrometheusService
All Implemented Interfaces:
Configurable, QBean, QBeanSupportMBean, QPersist

public class PrometheusService extends QBeanSupport
QBean that exposes the Q2 Prometheus meter registry over an embedded HTTP server, optionally serving a status-path probe used by orchestrators.
  • Constructor Details

    • PrometheusService

      Default constructor; no instance state to initialise.
  • Method Details

    • initService

      protected void initService() throws ConfigurationException
      Description copied from class: QBeanSupport
      Called during the init lifecycle phase; subclasses may override.
      Overrides:
      initService in class QBeanSupport
      Throws:
      ConfigurationException
    • stopService

      protected void stopService()
      Description copied from class: QBeanSupport
      Called during the stop lifecycle phase; subclasses may override.
      Overrides:
      stopService in class QBeanSupport
    • createDescriptor

      public static org.jdom2.Element createDescriptor(int port, String path, String statusPath)
      Builds a <prometheus> bean descriptor with the given configuration.
      Parameters:
      port - HTTP port to bind
      path - path that serves the Prometheus scrape
      statusPath - path that serves the status probe, or null to disable
      Returns:
      populated descriptor element