You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfiguration.java
+14-19Lines changed: 14 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -57,18 +57,25 @@ public class OpenTelemetryAutoConfiguration {
57
57
58
58
publicOpenTelemetryAutoConfiguration() {}
59
59
60
+
@Bean
61
+
@ConfigurationPropertiesBinding
62
+
publicOtelMapConverterotelMapConverter() {
63
+
// This is needed for otlp exporter headers and OtelResourceProperties.
64
+
65
+
// We need this converter, even if the SDK is disabled,
66
+
// because the properties are parsed before the SDK is disabled.
67
+
68
+
// We also need this converter if the OpenTelemetry bean is user supplied,
69
+
// because the environment variables may still contain a value that needs to be converted,
70
+
// even if the SDK is disabled (and the value thus ignored).
71
+
returnnewOtelMapConverter();
72
+
}
73
+
60
74
@Configuration
61
75
@Conditional(SdkEnabled.class)
62
76
@ConditionalOnMissingBean(OpenTelemetry.class)
63
77
staticclassOpenTelemetrySdkConfig {
64
78
65
-
@Bean
66
-
@ConfigurationPropertiesBinding
67
-
publicOtelMapConverterotelMapConverter() {
68
-
// needed for otlp exporter headers and OtelResourceProperties
Copy file name to clipboardExpand all lines: instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/SpringConfigPropertiesTest.java
0 commit comments