code: public void configure(LifecycleEnvironment environment, MetricRegistry registry) {
          for (ReporterFactory reporter : reporters) {
              try {
                  final ScheduledReporterManager manager =
                          new ScheduledReporterManager(reporter.build(registry),
                                                       reporter.getFrequency().orElseGet(this::getFrequency),
                                                       reportOnStop);
                  environment.manage(manager);
              } catch (Exception e) {
                  LOGGER.warn("Failed to create reporter, metrics may not be properly reported.", e);
              }
          }
      }
docs: Configures the given lifecycle with the {@link com.codahale.metrics.ScheduledReporter
  reporters} configured for the given registry.
  <p />
  The reporters are tied in to the given lifecycle, such that their {@link #getFrequency()
  frequency} for reporting metrics begins when the lifecycle {@link
  io.dropwizard.lifecycle.Managed#start() starts}, and stops when the lifecycle
  {@link io.dropwizard.lifecycle.Managed#stop() stops}.
  
  @param environment the lifecycle to manage the reporters.
  @param registry the metric registry to report metrics from.