Package io.dropwizard.metrics5
Class CsvReporter
- java.lang.Object
-
- io.dropwizard.metrics5.ScheduledReporter
-
- io.dropwizard.metrics5.CsvReporter
-
- All Implemented Interfaces:
Reporter
,Closeable
,AutoCloseable
public class CsvReporter extends ScheduledReporter
A reporter which creates a comma-separated values file of the measurements for each metric.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CsvReporter.Builder
A builder forCsvReporter
instances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CsvReporter.Builder
forRegistry(MetricRegistry registry)
Returns a newCsvReporter.Builder
forCsvReporter
.void
report(SortedMap<MetricName,Gauge<?>> gauges, SortedMap<MetricName,Counter> counters, SortedMap<MetricName,Histogram> histograms, SortedMap<MetricName,Meter> meters, SortedMap<MetricName,Timer> timers)
Called periodically by the polling thread.protected String
sanitize(MetricName name)
-
Methods inherited from class io.dropwizard.metrics5.ScheduledReporter
close, convertDuration, convertRate, getDisabledMetricAttributes, getDurationUnit, getRateUnit, isShutdownExecutorOnStop, report, start, start, stop
-
-
-
-
Method Detail
-
forRegistry
public static CsvReporter.Builder forRegistry(MetricRegistry registry)
Returns a newCsvReporter.Builder
forCsvReporter
.- Parameters:
registry
- the registry to report- Returns:
- a
CsvReporter.Builder
instance for aCsvReporter
-
report
public void report(SortedMap<MetricName,Gauge<?>> gauges, SortedMap<MetricName,Counter> counters, SortedMap<MetricName,Histogram> histograms, SortedMap<MetricName,Meter> meters, SortedMap<MetricName,Timer> timers)
Description copied from class:ScheduledReporter
Called periodically by the polling thread. Subclasses should report all the given metrics.- Specified by:
report
in classScheduledReporter
- Parameters:
gauges
- all of the gauges in the registrycounters
- all of the counters in the registryhistograms
- all of the histograms in the registrymeters
- all of the meters in the registrytimers
- all of the timers in the registry
-
sanitize
protected String sanitize(MetricName name)
-
-