Package org.apache.storm.metrics.prometheus

# 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

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `PrometheusReporterClient(com.codahale.metrics.MetricRegistry registry, io.prometheus.metrics.exporter.pushgateway.PushGateway prometheus)`
  Creates a new `PrometheusReporterClient` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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)`

  ### Methods inherited from class com.codahale.metrics.ScheduledReporter

  `close, convertDuration, convertRate, getDisabledMetricAttributes, getDurationUnit, getRateUnit, getScheduledFuture, getScheduledFuture, isShutdownExecutorOnStop, report, start, start, stop`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PrometheusReporterClient

    protected PrometheusReporterClient(com.codahale.metrics.MetricRegistry registry, io.prometheus.metrics.exporter.pushgateway.PushGateway prometheus)
    Creates a new `PrometheusReporterClient` instance.
    Parameters:
      `registry` - the `MetricRegistry` containing the metrics this reporter will report
      `prometheus` - the `PushGateway` 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 class `com.codahale.metrics.ScheduledReporter`