Skip to content

Commit

Permalink
don't implement MetricsConfigurer in DelegatingMetricsConfiguration (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
sfussenegger committed Nov 29, 2016
1 parent 4daa5ed commit e98631f
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @since 3.0
*/
@Configuration
public class DelegatingMetricsConfiguration extends MetricsConfigurationSupport implements MetricsConfigurer {
public class DelegatingMetricsConfiguration extends MetricsConfigurationSupport {

private MetricsConfigurerComposite delegates = new MetricsConfigurerComposite();

Expand All @@ -47,17 +47,12 @@ public void setMetricsConfigurers(final List<MetricsConfigurer> configurers) {
}
}

@Override
public void configureReporters(final MetricRegistry metricRegistry) {
this.delegates.configureReporters(metricRegistry);
}

@Bean
@Override
public MetricRegistry getMetricRegistry() {
if (this.metricRegistry == null) {
this.metricRegistry = this.delegates.getMetricRegistry();
this.configureReporters(this.metricRegistry);
this.delegates.configureReporters(this.metricRegistry);
}
return this.metricRegistry;
}
Expand Down

0 comments on commit e98631f

Please sign in to comment.