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 |
filter(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 |
withClock(Clock clock)
Use the given
Clock instance for the time. |
public GraphiteReporter.Builder withClock(Clock clock)
Clock
instance for the time.clock
- a Clock
instancethis
public GraphiteReporter.Builder prefixedWith(String prefix)
prefix
- the prefix for all metric namesthis
public GraphiteReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit
- a unit of timethis
public GraphiteReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit
- a unit of timethis
public GraphiteReporter.Builder filter(MetricFilter filter)
filter
- a MetricFilter
this
public GraphiteReporter build(Graphite graphite)
GraphiteReporter
with the given properties, sending metrics using the
given GraphiteSender
.
Present for binary compatibilitygraphite
- a Graphite
GraphiteReporter
public GraphiteReporter build(GraphiteSender graphite)
GraphiteReporter
with the given properties, sending metrics using the
given GraphiteSender
.graphite
- a GraphiteSender
GraphiteReporter
Copyright © 2023. All rights reserved.