Package io.dropwizard.metrics.common
Interface ReporterFactory
-
- All Superinterfaces:
Discoverable
- All Known Implementing Classes:
BaseFormattedReporterFactory,BaseReporterFactory,ConsoleReporterFactory,CsvReporterFactory,GraphiteReporterFactory,Slf4jReporterFactory
public interface ReporterFactory extends Discoverable
A service provider interface for creating metricsreporters. 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.codahale.metrics.ScheduledReporterbuild(com.codahale.metrics.MetricRegistry registry)Configures and builds aScheduledReporterinstance for the given registry.Optional<Duration>getFrequency()Returns the frequency for reporting metrics.
-
-
-
Method Detail
-
getFrequency
Optional<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.
-
-