Rename defaultEnabled property to default-enabled
MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/InstrumentationModule.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/InstrumentationModule.java
@@ -329,6 +329,6 @@ public abstract class InstrumentationModule {
}
protected boolean defaultEnabled() {
- return Config.get().getBooleanProperty("otel.instrumentation.defaultEnabled", true);
+ return Config.get().getBooleanProperty("otel.instrumentation.default-enabled", true);
}
}

MODIFY
javaagent-tooling/src/test/groovy/io/opentelemetry/javaagent/tooling/InstrumentationModuleTest.groovy
javaagent-tooling/src/test/groovy/io/opentelemetry/javaagent/tooling/InstrumentationModuleTest.groovy
@@ -85,7 +85,7 @@ class InstrumentationModuleTest extends Specification {
def "configure default sys prop as #value"() {
setup:
def previousConfig = ConfigUtils.updateConfig {
- it.setProperty("otel.instrumentation.defaultEnabled", value)
+ it.setProperty("otel.instrumentation.default-enabled", value)
}
def target = new TestInstrumentationModule(["test"])
target.instrument(new AgentBuilder.Default())
@@ -107,7 +107,7 @@ class InstrumentationModuleTest extends Specification {
def "configure sys prop enabled for #value when default is disabled"() {
setup:
def previousConfig = ConfigUtils.updateConfig {
- it.setProperty("otel.instrumentation.defaultEnabled", "false")
+ it.setProperty("otel.instrumentation.default-enabled", "false")
it.setProperty("otel.instrumentation.${value}.enabled", "true")
}
def target = new TestInstrumentationModule([name, altName])

Rename defaultEnabled property to default-enabled (#1788)