Package io.dropwizard.metrics.common
Interface ReporterFactory
- All Superinterfaces:
io.dropwizard.jackson.Discoverable
- All Known Implementing Classes:
BaseFormattedReporterFactory,BaseReporterFactory,ConsoleReporterFactory,CsvReporterFactory,Slf4jReporterFactory
public interface ReporterFactory
extends io.dropwizard.jackson.Discoverable
A service provider interface for creating metrics
reporters.
To create your own, just:
- Create a class which implements
ReporterFactory. - Annotate it with
@JsonTypeNameand give it a unique type name. - Add a
META-INF/services/io.dropwizard.metrics.common.ReporterFactoryfile with your implementation's full class name to the class path.
-
Method Summary
-
Method Details
-
getFrequency
Optional<io.dropwizard.util.Duration> getFrequency()Returns the frequency for reporting metrics.- Returns:
- the frequency for reporting metrics.
-
build
com.codahale.metrics.ScheduledReporter build(com.codahale.metrics.MetricRegistry registry) Configures and builds aScheduledReporterinstance for the given registry.- Parameters:
registry- the metrics registry to report metrics from.- Returns:
- a reporter configured for the given metrics registry.
-