From 3b542a0e6127a873f9a8d17e8d5ba05da087a115 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Thu, 15 Feb 2024 07:35:56 +0800 Subject: [PATCH] feedback Signed-off-by: Adrian Cole --- .../autoconfigure/tracing/zipkin/ZipkinConfigurations.java | 2 -- .../tracing/zipkin/DefaultEncodingConfiguration.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations.java index 8c0eab2c3dc6..dc7d93cd2644 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurations.java @@ -149,7 +149,6 @@ static class BraveConfiguration { @Bean @ConditionalOnMissingBean(value = MutableSpan.class, parameterizedContainer = BytesEncoder.class) - @ConditionalOnEnabledTracing BytesEncoder braveSpanEncoder(Encoding encoding, ObjectProvider> throwableTagProvider) { Tag throwableTag = throwableTagProvider.getIfAvailable(() -> Tags.ERROR); @@ -173,7 +172,6 @@ static class OpenTelemetryConfiguration { @Bean @ConditionalOnMissingBean(value = Span.class, parameterizedContainer = BytesEncoder.class) - @ConditionalOnEnabledTracing BytesEncoder zipkinSpanEncoder(Encoding encoding) { return SpanBytesEncoder.forEncoding(encoding); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/DefaultEncodingConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/DefaultEncodingConfiguration.java index d774df5bdaf9..7cf98ccd8c6e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/DefaultEncodingConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/DefaultEncodingConfiguration.java @@ -19,13 +19,13 @@ import zipkin2.reporter.Encoding; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.test.context.TestConfiguration; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; /** * Configures the bean {@linkplain ZipkinAutoConfiguration} would from properties. */ -@Configuration(proxyBeanMethods = false) +@TestConfiguration(proxyBeanMethods = false) class DefaultEncodingConfiguration { @Bean