Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

don't implement MetricsConfigurer in DelegatingMetricsConfiguration #192

Open
wants to merge 1 commit into
base: v3.1-maintenance
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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