Polish ObservationAutoConfiguration

- Use a better name for the "only metrics, no tracing" case
- Use more concrete return types
pull/31481/head
Moritz Halbritter 2 years ago
parent 7e169727d9
commit 06cdc91c85

@ -75,10 +75,10 @@ public class ObservationAutoConfiguration {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnMissingClass("io.micrometer.tracing.handler.TracingObservationHandler") @ConditionalOnMissingClass("io.micrometer.tracing.handler.TracingObservationHandler")
static class NoTracingConfiguration { static class OnlyMetricsTracingConfiguration {
@Bean @Bean
ObservationHandlerGrouping noTracingObservationHandlerGrouping() { OnlyMetricsObservationHandlerGrouping onlyMetricsObservationHandlerGrouping() {
return new OnlyMetricsObservationHandlerGrouping(); return new OnlyMetricsObservationHandlerGrouping();
} }
@ -89,7 +89,7 @@ public class ObservationAutoConfiguration {
static class TracingConfiguration { static class TracingConfiguration {
@Bean @Bean
ObservationHandlerGrouping tracingObservationHandlerGrouping() { TracingObservationHandlerGrouping tracingObservationHandlerGrouping() {
return new TracingObservationHandlerGrouping(); return new TracingObservationHandlerGrouping();
} }

Loading…
Cancel
Save