public class GraphiteReporter
extends com.codahale.metrics.ScheduledReporter
Modifier and Type | Class and Description |
---|---|
static class |
GraphiteReporter.Builder
A builder for
GraphiteReporter instances. |
Modifier | Constructor and Description |
---|---|
protected |
GraphiteReporter(com.codahale.metrics.MetricRegistry registry,
GraphiteSender graphite,
com.codahale.metrics.Clock clock,
String prefix,
TimeUnit rateUnit,
TimeUnit durationUnit,
com.codahale.metrics.MetricFilter filter,
ScheduledExecutorService executor,
boolean shutdownExecutorOnStop,
Set<com.codahale.metrics.MetricAttribute> disabledMetricAttributes)
Creates a new
GraphiteReporter instance. |
Modifier and Type | Method and Description |
---|---|
protected String |
format(double v) |
static GraphiteReporter.Builder |
forRegistry(com.codahale.metrics.MetricRegistry registry)
Returns a new
GraphiteReporter.Builder for GraphiteReporter . |
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) |
void |
stop() |
protected GraphiteReporter(com.codahale.metrics.MetricRegistry registry, GraphiteSender graphite, com.codahale.metrics.Clock clock, String prefix, TimeUnit rateUnit, TimeUnit durationUnit, com.codahale.metrics.MetricFilter filter, ScheduledExecutorService executor, boolean shutdownExecutorOnStop, Set<com.codahale.metrics.MetricAttribute> disabledMetricAttributes)
GraphiteReporter
instance.registry
- the MetricRegistry
containing the metrics this
reporter will reportgraphite
- the GraphiteSender
which is responsible for sending metrics to a Carbon server
via a transport protocolclock
- the instance of the time. Use Clock.defaultClock()
for the defaultprefix
- the prefix of all metric names (may be null)rateUnit
- the time unit of in which rates will be converteddurationUnit
- the time unit of in which durations will be convertedfilter
- the filter for which metrics to reportexecutor
- the executor to use while scheduling reporting of metrics (may be null).shutdownExecutorOnStop
- if true, then executor will be stopped in same time with this reporterpublic static GraphiteReporter.Builder forRegistry(com.codahale.metrics.MetricRegistry registry)
GraphiteReporter.Builder
for GraphiteReporter
.registry
- the registry to reportGraphiteReporter.Builder
instance for a GraphiteReporter
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 stop()
stop
in class com.codahale.metrics.ScheduledReporter
protected String format(double v)
Copyright © 2017. All Rights Reserved.