Skip to content

Commit 286fa56

Browse files
committed
Temporarily set DD_RUNTIME_CONTEXT_FIELD_INJECTION=false for testing
1 parent e0b1c43 commit 286fa56

4 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎dd-java-agent/instrumentation-testing/src/test/groovy/context/FieldInjectionForkedTest.groovy‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class FieldInjectionForkedTest extends InstrumentationSpecification {
3838
super.configurePreAgent()
3939
// Opt out of strict config validation - test module loads test instrumentations with fake names
4040
ConfigHelper.get().setConfigInversionStrict(ConfigHelper.StrictnessPolicy.TEST)
41+
42+
injectSysConfig("dd.trace.runtime.context.field.injection", "true")
4143
}
4244

4345
@Override

‎dd-smoke-tests/field-injection/src/test/groovy/datadog/smoketest/FieldInjectionSmokeTest.groovy‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class FieldInjectionSmokeTest extends Specification {
5858
command.add("${getMaxMemoryArgumentForFork()}" as String)
5959
command.add("${getMinMemoryArgumentForFork()}" as String)
6060
command.add("-javaagent:${shadowJarPath}" as String)
61+
command.add("-Ddd.trace.runtime.context.field.injection=true")
6162
command.add("-XX:ErrorFile=/tmp/hs_err_pid%p.log")
6263
// turn off these features as their debug output can break up our expected logging lines on IBM JVMs
6364
// causing random test failures (we are not testing these features here so they don't need to be on)

‎dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public final class ConfigDefaults {
5858
public static final boolean DEFAULT_TRACE_OTEL_ENABLED = false;
5959
static final boolean DEFAULT_INTEGRATIONS_ENABLED = true;
6060

61-
static final boolean DEFAULT_RUNTIME_CONTEXT_FIELD_INJECTION = true;
61+
static final boolean DEFAULT_RUNTIME_CONTEXT_FIELD_INJECTION = false;
6262
static final boolean DEFAULT_SERIALVERSIONUID_FIELD_INJECTION = true;
6363
static final boolean DEFAULT_RUNTIME_CONTEXT_MAP_PER_STORE = false;
6464

‎metadata/supported-configurations.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9776,7 +9776,7 @@
97769776
{
97779777
"version": "A",
97789778
"type": "boolean",
9779-
"default": "true",
9779+
"default": "false",
97809780
"aliases": []
97819781
}
97829782
],

0 commit comments

Comments
 (0)