public static class InfluxdbReporter.Builder
extends java.lang.Object
InfluxdbReporter 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 |
|---|---|
com.codahale.metrics.ScheduledReporter |
build()
Builds a
ScheduledReporter with the given properties, sending
metrics using the given InfluxDB. |
InfluxdbReporter.Builder |
convertDurationsTo(java.util.concurrent.TimeUnit durationUnit)
Convert durations to the given time unit.
|
InfluxdbReporter.Builder |
convertRatesTo(java.util.concurrent.TimeUnit rateUnit)
Convert rates to the given time unit.
|
InfluxdbReporter.Builder |
filter(com.codahale.metrics.MetricFilter filter)
Only report metrics which match the given filter.
|
InfluxdbReporter.Builder |
prefixedWith(java.lang.String prefix)
Prefix all metric names with the given string.
|
InfluxdbReporter.Builder |
protocol(InfluxdbProtocol protocol)
Override the protocol to use.
|
InfluxdbReporter.Builder |
skipIdleMetrics(boolean skipIdleMetrics)
Only report metrics that have changed.
|
InfluxdbReporter.Builder |
tag(java.lang.String tagKey,
java.lang.String tagValue)
Registers the given key/value as a default tag for the generated measurements.
|
InfluxdbReporter.Builder |
transformer(MetricMeasurementTransformer transformer)
Sets the metric2measurement transformer to be used.
|
InfluxdbReporter.Builder |
v08()
Operates with influxdb version less or equal than 08.
|
InfluxdbReporter.Builder |
withAutoCreateDB(boolean autocreate)
Automatically create the database if it does not exist.
|
InfluxdbReporter.Builder |
withClock(com.codahale.metrics.Clock clock)
Use the given
Clock instance for the time. |
InfluxdbReporter.Builder |
withScheduler(java.util.concurrent.ScheduledExecutorService executor) |
public InfluxdbReporter.Builder withClock(com.codahale.metrics.Clock clock)
Clock instance for the time.clock - a Clock instancethispublic InfluxdbReporter.Builder withAutoCreateDB(boolean autocreate)
autocreate - a booleanthispublic InfluxdbReporter.Builder withScheduler(java.util.concurrent.ScheduledExecutorService executor)
public InfluxdbReporter.Builder prefixedWith(java.lang.String prefix)
prefix - the prefix for all metric namesthispublic InfluxdbReporter.Builder convertRatesTo(java.util.concurrent.TimeUnit rateUnit)
rateUnit - a unit of timethispublic InfluxdbReporter.Builder convertDurationsTo(java.util.concurrent.TimeUnit durationUnit)
durationUnit - a unit of timethispublic InfluxdbReporter.Builder filter(com.codahale.metrics.MetricFilter filter)
filter - a MetricFilterthispublic InfluxdbReporter.Builder skipIdleMetrics(boolean skipIdleMetrics)
skipIdleMetrics - thispublic com.codahale.metrics.ScheduledReporter build()
ScheduledReporter with the given properties, sending
metrics using the given InfluxDB.ScheduledReporterpublic InfluxdbReporter.Builder v08()
public InfluxdbReporter.Builder protocol(InfluxdbProtocol protocol)
protocol - a non null protocolpublic InfluxdbReporter.Builder transformer(MetricMeasurementTransformer transformer)
transformer - a non null transformerpublic InfluxdbReporter.Builder tag(java.lang.String tagKey, java.lang.String tagValue)
tagKey - the key to register, cannot be null or emptytagValue - the value to register against the given key, cannot be null or empty