public class InfluxDbReporter
extends io.dropwizard.metrics5.ScheduledReporter
Metrics are reported according to the InfluxDB Line Protocol. Brief line protocol syntax as follows:
measurement(,tag_key=tag_val)* field_key=field_val(,field_key_n=field_value_n)* (nanoseconds-timestamp)?
This InfluxDB reporter is "garbage free" in steady state. This means objects and buffers are reused and no temporary objects are allocated as much as possible.
| Modifier and Type | Class and Description |
|---|---|
static class |
InfluxDbReporter.Builder
A builder for
InfluxDbReporter instances. |
| Constructor and Description |
|---|
InfluxDbReporter(io.dropwizard.metrics5.MetricRegistry registry,
InfluxDbSender sender,
io.dropwizard.metrics5.Clock clock,
io.dropwizard.metrics5.MetricName prefix,
TimeUnit rateUnit,
TimeUnit durationUnit,
io.dropwizard.metrics5.MetricFilter filter,
ScheduledExecutorService executor,
boolean shutdownExecutorOnStop,
Set<io.dropwizard.metrics5.MetricAttribute> disabledMetricAttributes)
Creates a new InfluxDbReporter instance.
|
| Modifier and Type | Method and Description |
|---|---|
static InfluxDbReporter.Builder |
forRegistry(io.dropwizard.metrics5.MetricRegistry registry)
Returns a new Builder for
InfluxDbReporter. |
void |
report() |
void |
report(SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Gauge> gauges,
SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Counter> counters,
SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Histogram> histograms,
SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Meter> meters,
SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Timer> timers) |
void |
stop() |
public InfluxDbReporter(io.dropwizard.metrics5.MetricRegistry registry,
InfluxDbSender sender,
io.dropwizard.metrics5.Clock clock,
io.dropwizard.metrics5.MetricName prefix,
TimeUnit rateUnit,
TimeUnit durationUnit,
io.dropwizard.metrics5.MetricFilter filter,
ScheduledExecutorService executor,
boolean shutdownExecutorOnStop,
Set<io.dropwizard.metrics5.MetricAttribute> disabledMetricAttributes)
registry - the MetricRegistry containing the metrics this reporter will reportsender - the InfluxDbSender which is responsible for sending metrics to a influxdb
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 reporterdisabledMetricAttributes - the disable metric attributespublic static InfluxDbReporter.Builder forRegistry(io.dropwizard.metrics5.MetricRegistry registry)
InfluxDbReporter.registry - the registry to reportInfluxDbReporterpublic void report(SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Gauge> gauges, SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Counter> counters, SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Histogram> histograms, SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Meter> meters, SortedMap<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Timer> timers)
report in class io.dropwizard.metrics5.ScheduledReporterpublic void stop()
public void report()
report in class io.dropwizard.metrics5.ScheduledReporterCopyright © 2018. All Rights Reserved.