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.Modifier and Type | Class and Description |
---|---|
static interface |
DimensionalReporter.DimensionHandler |
Constructor and Description |
---|
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)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
report() |
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) |
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)
Constructor.
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.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)
report
in class com.codahale.metrics.ScheduledReporter
public void report()
report
in class com.codahale.metrics.ScheduledReporter
Copyright © 2022 The Apache Software Foundation. All rights reserved.