Check for both regular and lowercase names with decorator enabled flags.
MODIFY
dd-trace-api/src/main/java/datadog/trace/api/Config.java
dd-trace-api/src/main/java/datadog/trace/api/Config.java
@@ -591,7 +591,8 @@ public class Config {
}
public boolean isDecoratorEnabled(final String name) {
- return getBooleanSettingFromEnvironment("trace." + name.toLowerCase() + ".enabled", true);
+ return getBooleanSettingFromEnvironment("trace." + name + ".enabled", true)
+ && getBooleanSettingFromEnvironment("trace." + name.toLowerCase() + ".enabled", true);
}
/**

MODIFY
dd-trace-ot/src/test/groovy/datadog/opentracing/decorators/SpanDecoratorTest.groovy
dd-trace-ot/src/test/groovy/datadog/opentracing/decorators/SpanDecoratorTest.groovy
@@ -457,7 +457,7 @@ class SpanDecoratorTest extends DDSpecification {
def "disable decorator via config"() {
setup:
ConfigUtils.updateConfig {
- System.setProperty("dd.trace." + PeerServiceDecorator.getSimpleName().toLowerCase() + ".enabled", "false")
+ System.setProperty("dd.trace.${decorator}.enabled", "false")
}
tracer = DDTracer.builder()
@@ -475,8 +475,13 @@ class SpanDecoratorTest extends DDSpecification {
cleanup:
ConfigUtils.updateConfig {
- System.clearProperty("dd.trace." + PeerServiceDecorator.getSimpleName().toLowerCase() + ".enabled")
+ System.clearProperty("dd.trace.${decorator}.enabled")
}
+
+ where:
+ decorator | _
+ PeerServiceDecorator.getSimpleName().toLowerCase() | _
+ PeerServiceDecorator.getSimpleName() | _
}
def "disabling service decorator does not disable split by tags"() {

Check for both regular and lowercase names with decorator enabled flags.