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:

  1. Create a class which implements ReporterFactory.
  2. Annotate it with @JsonTypeName and give it a unique type name.
  3. Add a META-INF/services/io.dropwizard.metrics.common.ReporterFactory file with your implementation's full class name to the class path.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    com.codahale.metrics.ScheduledReporter
    build(com.codahale.metrics.MetricRegistry registry)
    Configures and builds a ScheduledReporter instance for the given registry.
    Optional<io.dropwizard.util.Duration>
    Returns the frequency for reporting metrics.
  • 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 a ScheduledReporter instance for the given registry.
      Parameters:
      registry - the metrics registry to report metrics from.
      Returns:
      a reporter configured for the given metrics registry.