public class MetricsFactory extends Object
reporters
with a
default frequency
.
Configuration Parameters:
Name | Default | Description |
frequency | 1 minute | The frequency to report metrics. Overridable per-reporter. |
reporters | No reporters. | A list of reporters to report metrics. |
Constructor and Description |
---|
MetricsFactory() |
Modifier and Type | Method and Description |
---|---|
void |
configure(LifecycleEnvironment environment,
com.codahale.metrics.MetricRegistry registry)
Configures the given lifecycle with the
reporters configured for the given registry. |
io.dropwizard.util.Duration |
getFrequency() |
com.google.common.collect.ImmutableList<ReporterFactory> |
getReporters() |
void |
setFrequency(io.dropwizard.util.Duration frequency) |
void |
setReporters(com.google.common.collect.ImmutableList<ReporterFactory> reporters) |
String |
toString() |
public com.google.common.collect.ImmutableList<ReporterFactory> getReporters()
public void setReporters(com.google.common.collect.ImmutableList<ReporterFactory> reporters)
public io.dropwizard.util.Duration getFrequency()
public void setFrequency(io.dropwizard.util.Duration frequency)
public void configure(LifecycleEnvironment environment, com.codahale.metrics.MetricRegistry registry)
reporters
configured for the given registry.
The reporters are tied in to the given lifecycle, such that their frequency
for reporting metrics begins when the lifecycle starts
, and stops when the lifecycle
stops
.environment
- the lifecycle to manage the reporters.registry
- the metric registry to report metrics from.Copyright © 2016. All rights reserved.