public static class RiemannReporter.Builder extends Object
RiemannReporter 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 |
|---|---|
RiemannReporter |
build(Riemann riemann)
Builds a
RiemannReporter with the given properties, sending metrics using the
given Riemann client. |
RiemannReporter.Builder |
convertDurationsTo(TimeUnit durationUnit)
Convert durations to the given time unit.
|
RiemannReporter.Builder |
convertRatesTo(TimeUnit rateUnit)
Convert rates to the given time unit.
|
RiemannReporter.Builder |
filter(com.codahale.metrics.MetricFilter filter)
Only report metrics which match the given filter.
|
RiemannReporter.Builder |
localHost(String localHost)
Event source host
|
RiemannReporter.Builder |
prefixedWith(String prefix)
Prefix all metric names with the given string.
|
RiemannReporter.Builder |
tags(Collection<String> tags)
Tags to attach to events.
|
RiemannReporter.Builder |
useSeparator(String separator)
Separator between metric name components
|
RiemannReporter.Builder |
withClock(com.codahale.metrics.Clock clock)
Use the given
Clock instance for the time. |
RiemannReporter.Builder |
withTtl(Float ttl)
Default time to live of Riemann event.
|
public RiemannReporter.Builder withClock(com.codahale.metrics.Clock clock)
Clock instance for the time.clock - a Clock instancethispublic RiemannReporter.Builder prefixedWith(String prefix)
prefix - the prefix for all metric namesthispublic RiemannReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit - a unit of timethispublic RiemannReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit - a unit of timethispublic RiemannReporter.Builder filter(com.codahale.metrics.MetricFilter filter)
filter - a MetricFilterthispublic RiemannReporter.Builder withTtl(Float ttl)
ttl - a Floatthispublic RiemannReporter.Builder useSeparator(String separator)
separator - a Stringthispublic RiemannReporter.Builder localHost(String localHost)
localHost - a Stringthispublic RiemannReporter.Builder tags(Collection<String> tags)
tags - a Collection<String>thispublic RiemannReporter build(Riemann riemann)
RiemannReporter with the given properties, sending metrics using the
given Riemann client.riemann - a Riemann client.RiemannReporterCopyright © 2018. All rights reserved.