public class PrometheusMetricsProvider extends Object implements MetricsProvider
| Constructor and Description |
|---|
PrometheusMetricsProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Properties configuration) |
void |
dump(BiConsumer<String,Object> sink)
Dump all values to the 4lw interface and to the Admin server.
|
MetricsContext |
getRootContext() |
void |
resetAllValues() |
void |
start() |
void |
stop() |
public void configure(Properties configuration) throws MetricsProviderLifeCycleException
configure in interface MetricsProviderMetricsProviderLifeCycleExceptionpublic void start()
throws MetricsProviderLifeCycleException
start in interface MetricsProviderMetricsProviderLifeCycleExceptionpublic MetricsContext getRootContext()
getRootContext in interface MetricsProviderpublic void stop()
stop in interface MetricsProviderpublic void dump(BiConsumer<String,Object> sink)
This method is not expected to be used to serve metrics to Prometheus. We are using the MetricsServlet provided by Prometheus for that, leaving the real representation to the Prometheus Java client.
dump in interface MetricsProvidersink - the receiver of data (4lw interface, Admin server or tests)public void resetAllValues()
resetAllValues in interface MetricsProviderCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.