Remove destroy methods from auto-configured MeterRegistry beans

Closes gh-12121
pull/12124/head
Jon Schneider 7 years ago committed by Andy Wilkinson
parent 73460a5b25
commit 9934285bca

@ -57,7 +57,7 @@ public class AtlasMetricsExportAutoConfiguration {
return new AtlasPropertiesConfigAdapter(atlasProperties);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public AtlasMeterRegistry atlasMeterRegistry(AtlasConfig atlasConfig, Clock clock) {
return new AtlasMeterRegistry(atlasConfig, clock);

@ -56,7 +56,7 @@ public class DatadogMetricsExportAutoConfiguration {
return new DatadogPropertiesConfigAdapter(datadogProperties);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public DatadogMeterRegistry datadogMeterRegistry(DatadogConfig datadogConfig,
Clock clock) {

@ -57,7 +57,7 @@ public class GangliaMetricsExportAutoConfiguration {
return new GangliaPropertiesConfigAdapter(gangliaProperties);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public GangliaMeterRegistry gangliaMeterRegistry(GangliaConfig gangliaConfig,
HierarchicalNameMapper nameMapper, Clock clock) {

@ -57,7 +57,7 @@ public class GraphiteMetricsExportAutoConfiguration {
return new GraphitePropertiesConfigAdapter(graphiteProperties);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public GraphiteMeterRegistry graphiteMeterRegistry(GraphiteConfig graphiteConfig,
HierarchicalNameMapper nameMapper, Clock clock) {

@ -56,7 +56,7 @@ public class InfluxMetricsExportAutoConfiguration {
return new InfluxPropertiesConfigAdapter(influxProperties);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public InfluxMeterRegistry influxMeterRegistry(InfluxConfig influxConfig,
Clock clock) {

@ -57,7 +57,7 @@ public class JmxMetricsExportAutoConfiguration {
return new JmxPropertiesConfigAdapter(jmxProperties);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public JmxMeterRegistry jmxMeterRegistry(JmxConfig config,
HierarchicalNameMapper nameMapper, Clock clock) {

@ -57,7 +57,7 @@ public class NewRelicMetricsExportAutoConfiguration {
return new NewRelicPropertiesConfigAdapter(props);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public NewRelicMeterRegistry newRelicMeterRegistry(NewRelicConfig config,
Clock clock) {

@ -57,7 +57,7 @@ public class SignalFxMetricsExportAutoConfiguration {
return new SignalFxPropertiesConfigAdapter(props);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public SignalFxMeterRegistry signalFxMeterRegistry(SignalFxConfig config,
Clock clock) {

@ -57,7 +57,7 @@ public class StatsdMetricsExportAutoConfiguration {
return new StatsdPropertiesConfigAdapter(statsdProperties);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public StatsdMeterRegistry statsdMeterRegistry(StatsdConfig statsdConfig,
HierarchicalNameMapper hierarchicalNameMapper, Clock clock) {

@ -56,7 +56,7 @@ public class WavefrontMetricsExportAutoConfiguration {
return new WavefrontPropertiesConfigAdapter(props);
}
@Bean(destroyMethod = "stop")
@Bean
@ConditionalOnMissingBean
public WavefrontMeterRegistry wavefrontMeterRegistry(WavefrontConfig config,
Clock clock) {

Loading…
Cancel
Save