Package org.restheart.metrics
Class RHDropwizardExports
java.lang.Object
io.prometheus.client.Collector
org.restheart.metrics.RHDropwizardExports
- All Implemented Interfaces:
io.prometheus.client.Collector.Describable
public class RHDropwizardExports
extends io.prometheus.client.Collector
implements io.prometheus.client.Collector.Describable
Collect Dropwizard metrics from a MetricRegistry.
Modified from https://github.com/prometheus/client_java/blob/main/simpleclient_dropwizard/src/main/java/io/prometheus/client/dropwizard/DropwizardExports.java
to track additional timer metrics and to handle metric name as MetricNameAndLabels
-
Nested Class Summary
Nested classes/interfaces inherited from class io.prometheus.client.Collector
io.prometheus.client.Collector.Describable, io.prometheus.client.Collector.MetricFamilySamples, io.prometheus.client.Collector.Type -
Field Summary
Fields inherited from class io.prometheus.client.Collector
MILLISECONDS_PER_SECOND, NANOSECONDS_PER_SECOND -
Constructor Summary
ConstructorsConstructorDescriptionRHDropwizardExports(com.codahale.metrics.MetricRegistry registry) Creates a new DropwizardExports with aDefaultSampleBuilderandMetricFilter.ALL.RHDropwizardExports(String registryName) Creates a new DropwizardExports with aDefaultSampleBuilderandMetricFilter.ALL. -
Method Summary
Methods inherited from class io.prometheus.client.Collector
checkMetricLabelName, checkMetricName, collect, doubleToGoString, register, register, sanitizeMetricName
-
Constructor Details
-
RHDropwizardExports
Creates a new DropwizardExports with aDefaultSampleBuilderandMetricFilter.ALL.- Parameters:
registry- a metric registry to export in prometheus.
-
RHDropwizardExports
public RHDropwizardExports(com.codahale.metrics.MetricRegistry registry) Creates a new DropwizardExports with aDefaultSampleBuilderandMetricFilter.ALL.- Parameters:
registry- a metric registry to export in prometheus.
-
-
Method Details
-
collect
- Specified by:
collectin classio.prometheus.client.Collector
-
describe
- Specified by:
describein interfaceio.prometheus.client.Collector.Describable
-