public static class GraphiteReporter.Builder extends Object
GraphiteReporter instances. Defaults to not using a prefix, using the
default clock, converting rates to events/second, converting durations to milliseconds, and
not filtering metrics.| Modifier and Type | Method and Description |
|---|---|
GraphiteReporter |
build(Graphite graphite)
Builds a
GraphiteReporter with the given properties, sending metrics using the
given GraphiteSender. |
GraphiteReporter |
build(GraphiteSender graphite)
Builds a
GraphiteReporter with the given properties, sending metrics using the
given GraphiteSender. |
GraphiteReporter.Builder |
convertDurationsTo(TimeUnit durationUnit)
Convert durations to the given time unit.
|
GraphiteReporter.Builder |
convertRatesTo(TimeUnit rateUnit)
Convert rates to the given time unit.
|
GraphiteReporter.Builder |
disabledMetricAttributes(Set<com.codahale.metrics.MetricAttribute> disabledMetricAttributes)
Don't report the passed metric attributes for all metrics (e.g.
|
GraphiteReporter.Builder |
filter(com.codahale.metrics.MetricFilter filter)
Only report metrics which match the given filter.
|
GraphiteReporter.Builder |
prefixedWith(String prefix)
Prefix all metric names with the given string.
|
GraphiteReporter.Builder |
scheduleOn(ScheduledExecutorService executor)
Specifies the executor to use while scheduling reporting of metrics.
|
GraphiteReporter.Builder |
shutdownExecutorOnStop(boolean shutdownExecutorOnStop)
Specifies whether or not, the executor (used for reporting) will be stopped with same time with reporter.
|
GraphiteReporter.Builder |
withClock(com.codahale.metrics.Clock clock)
Use the given
Clock instance for the time. |
public GraphiteReporter.Builder shutdownExecutorOnStop(boolean shutdownExecutorOnStop)
scheduleOn(ScheduledExecutorService).shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporterthispublic GraphiteReporter.Builder scheduleOn(ScheduledExecutorService executor)
executor - the executor to use while scheduling reporting of metrics.thispublic GraphiteReporter.Builder withClock(com.codahale.metrics.Clock clock)
Clock instance for the time.clock - a Clock instancethispublic GraphiteReporter.Builder prefixedWith(String prefix)
prefix - the prefix for all metric namesthispublic GraphiteReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit - a unit of timethispublic GraphiteReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit - a unit of timethispublic GraphiteReporter.Builder filter(com.codahale.metrics.MetricFilter filter)
filter - a MetricFilterthispublic GraphiteReporter.Builder disabledMetricAttributes(Set<com.codahale.metrics.MetricAttribute> disabledMetricAttributes)
MetricAttribute.disabledMetricAttributes - a set of MetricAttributethispublic GraphiteReporter build(Graphite graphite)
GraphiteReporter with the given properties, sending metrics using the
given GraphiteSender.
Present for binary compatibility
graphite - a GraphiteGraphiteReporterpublic GraphiteReporter build(GraphiteSender graphite)
GraphiteReporter with the given properties, sending metrics using the
given GraphiteSender.graphite - a GraphiteSenderGraphiteReporterCopyright © 2019. All rights reserved.