@NotThreadSafe public class PrometheusMetricsServlet extends Object implements Sink
Constructor and Description |
---|
PrometheusMetricsServlet(com.codahale.metrics.MetricRegistry registry)
Creates a new
PrometheusMetricsServlet with a
MetricRegistry . |
PrometheusMetricsServlet(Properties properties,
com.codahale.metrics.MetricRegistry registry)
Creates a new
PrometheusMetricsServlet with a
MetricRegistry . |
Modifier and Type | Method and Description |
---|---|
org.eclipse.jetty.servlet.ServletContextHandler |
getHandler()
Gets the
ServletContextHandler of the metrics servlet. |
void |
report()
Reports the current values of all metrics.
|
void |
start()
Starts the reporter polling.
|
void |
stop()
Stops the reporter.
|
public PrometheusMetricsServlet(com.codahale.metrics.MetricRegistry registry)
PrometheusMetricsServlet
with a
MetricRegistry
.registry
- the metric registry to registerpublic PrometheusMetricsServlet(Properties properties, com.codahale.metrics.MetricRegistry registry)
PrometheusMetricsServlet
with a
MetricRegistry
.properties
- the properties, not used for nowregistry
- the metric registry to registerpublic org.eclipse.jetty.servlet.ServletContextHandler getHandler()
ServletContextHandler
of the metrics servlet.ServletContextHandler
objectpublic void start()
Sink
public void stop()
Sink
Copyright © 2023. All Rights Reserved.