Class DimensionalReporter

All Implemented Interfaces:
com.codahale.metrics.Reporter, Closeable, AutoCloseable

public class DimensionalReporter extends com.codahale.metrics.ScheduledReporter
Class that allows using a ScheduledReporter to report V2 task metrics with support for dimensions.

This reporter will be started and scheduled with the MetricRegistry. Once it is called on to report, it will query the StormMetricRegistry for various sets of task metrics with unique dimensions. The underlying ScheduledReporter will perform the actual reporting with the help of a DimensionHandler to deal with the dimensions.
  • Constructor Details

    • DimensionalReporter

      public DimensionalReporter(MetricRegistryProvider metricRegistryProvider, com.codahale.metrics.ScheduledReporter unstartedReporter, DimensionalReporter.DimensionHandler dimensionHandler, String name, com.codahale.metrics.MetricFilter filter, TimeUnit rateUnit, TimeUnit durationUnit, ScheduledExecutorService executor, boolean shutdownExecutorOnStop)
      metricRegistryProvider - MetricRegistryProvider tracking task-specific metrics.
      unstartedReporter - ScheduledReporter to perform the actual reporting. It should NOT be started.
      dimensionHandler - class to handle setting dimensions before reporting a set of metrics.
      name - the reporter's name.
      filter - the filter for which metrics to report.
      rateUnit - rate unit for the reporter.
      durationUnit - duration unit for the reporter.
      executor - the executor to use while scheduling reporting of metrics.
      shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporter.
  • 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
    • report

      public void report()
      report in class com.codahale.metrics.ScheduledReporter