public class Slf4jReporter extends ScheduledReporter
Logger
periodically, similar to
ConsoleReporter
or CsvReporter
, but using the SLF4J framework instead. It also
supports specifying a Marker
instance that can be used by custom appenders and filters
for the bound logging toolkit to further process metrics reports.Modifier and Type | Class and Description |
---|---|
static class |
Slf4jReporter.Builder
A builder for
CsvReporter instances. |
static class |
Slf4jReporter.LoggingLevel |
Modifier and Type | Method and Description |
---|---|
static Slf4jReporter.Builder |
forRegistry(MetricRegistry registry)
Returns a new
Slf4jReporter.Builder for Slf4jReporter . |
protected String |
getRateUnit() |
void |
report(SortedMap<String,Gauge> gauges,
SortedMap<String,Counter> counters,
SortedMap<String,Histogram> histograms,
SortedMap<String,Meter> meters,
SortedMap<String,Timer> timers)
Called periodically by the polling thread.
|
close, convertDuration, convertRate, getDurationUnit, report, start, stop
public static Slf4jReporter.Builder forRegistry(MetricRegistry registry)
Slf4jReporter.Builder
for Slf4jReporter
.registry
- the registry to reportSlf4jReporter.Builder
instance for a Slf4jReporter
public void report(SortedMap<String,Gauge> gauges, SortedMap<String,Counter> counters, SortedMap<String,Histogram> histograms, SortedMap<String,Meter> meters, SortedMap<String,Timer> timers)
ScheduledReporter
report
in class ScheduledReporter
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 registryprotected String getRateUnit()
getRateUnit
in class ScheduledReporter
Copyright © 2014. All Rights Reserved.