Skip to content

Commit 5a315c3

Browse files
committed
fix
1 parent 17c57ed commit 5a315c3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/instrumentation/logging/LoggingExporterAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* any time.
2525
*/
2626
@Conditional(SdkEnabled.class)
27-
// for forwards compatibility with declarative configuration
28-
@ConditionalOnProperty(name = "otel.debug", havingValue = "true")
27+
// to match "otel.javaagent.debug" system property
28+
@ConditionalOnProperty(name = "otel.spring-starter.debug", havingValue = "true")
2929
@ConditionalOnClass(LoggingSpanExporter.class)
3030
@Configuration
3131
public class LoggingExporterAutoConfiguration {

instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/instrumentation/logging/LoggingExporterAutoConfigurationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class LoggingExporterAutoConfigurationTest {
2929
@Test
3030
void instrumentationEnabled() {
3131
runner
32-
.withPropertyValues("otel.debug=true", "otel.traces.exporter=none")
32+
.withPropertyValues("otel.spring-starter.debug=true", "otel.traces.exporter=none")
3333
.run(
3434
context ->
3535
assertThat(context.getBean(OpenTelemetry.class).toString())
@@ -39,7 +39,7 @@ void instrumentationEnabled() {
3939
@Test
4040
void alreadyAdded() {
4141
runner
42-
.withPropertyValues("otel.debug=true", "otel.traces.exporter=logging")
42+
.withPropertyValues("otel.spring-starter.debug=true", "otel.traces.exporter=logging")
4343
.run(
4444
context ->
4545
assertThat(context.getBean(OpenTelemetry.class).toString())

0 commit comments

Comments
 (0)