Class PrometheusMetricsServlet

Object
GenericServlet
HttpServlet
PrometheusMetricsServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class PrometheusMetricsServlet extends HttpServlet
This class extends HttpServlet to create a servlet for exporting Prometheus metrics. It uses a PrometheusScrapeHandler to handle HTTP GET requests and export metrics. The servlet can be configured with custom PrometheusProperties and a PrometheusRegistry.
See Also:
  • Constructor Details

    • PrometheusMetricsServlet

      Default constructor. Uses the default PrometheusProperties and PrometheusRegistry.
    • PrometheusMetricsServlet

      Constructor with a custom PrometheusRegistry. Uses the default PrometheusProperties.
      Parameters:
      registry - the PrometheusRegistry to use
    • PrometheusMetricsServlet

      Constructor with custom PrometheusProperties. Uses the default PrometheusRegistry.
      Parameters:
      config - the PrometheusProperties to use
    • PrometheusMetricsServlet

      Constructor with custom PrometheusProperties and PrometheusRegistry.
      Parameters:
      config - the PrometheusProperties to use
      registry - the PrometheusRegistry to use