Class PrometheusReporterClient
java.lang.Object
com.codahale.metrics.ScheduledReporter
org.apache.storm.metrics.prometheus.PrometheusReporterClient
- All Implemented Interfaces:
com.codahale.metrics.Reporter
,Closeable
,AutoCloseable
public class PrometheusReporterClient
extends com.codahale.metrics.ScheduledReporter
This reporter pushes common cluster metrics towards a Prometheus Pushgateway.
-
Constructor Summary
ModifierConstructorDescriptionprotected
PrometheusReporterClient
(com.codahale.metrics.MetricRegistry registry, io.prometheus.metrics.exporter.pushgateway.PushGateway prometheus) Creates a newPrometheusReporterClient
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
report
(SortedMap<String, com.codahale.metrics.Gauge> gauges, SortedMap<String, com.codahale.metrics.Counter> counters, SortedMap<String, com.codahale.metrics.Histogram> histograms, SortedMap<String, com.codahale.metrics.Meter> meters, SortedMap<String, com.codahale.metrics.Timer> timers) Methods inherited from class com.codahale.metrics.ScheduledReporter
close, convertDuration, convertRate, getDisabledMetricAttributes, getDurationUnit, getRateUnit, getScheduledFuture, getScheduledFuture, isShutdownExecutorOnStop, report, start, start, stop
-
Constructor Details
-
PrometheusReporterClient
protected PrometheusReporterClient(com.codahale.metrics.MetricRegistry registry, io.prometheus.metrics.exporter.pushgateway.PushGateway prometheus) Creates a newPrometheusReporterClient
instance.- Parameters:
registry
- theMetricRegistry
containing the metrics this reporter will reportprometheus
- thePushGateway
which is responsible for sending metrics via a transport protocol
-
-
Method Details
-
report
public void report(SortedMap<String, com.codahale.metrics.Gauge> gauges, SortedMap<String, com.codahale.metrics.Counter> counters, SortedMap<String, com.codahale.metrics.Histogram> histograms, SortedMap<String, com.codahale.metrics.Meter> meters, SortedMap<String, com.codahale.metrics.Timer> timers) - Specified by:
report
in classcom.codahale.metrics.ScheduledReporter
-