Disable async instrumentation by default.
MODIFY
dd-java-agent-ittests/dd-java-agent-ittests.gradle
dd-java-agent-ittests/dd-java-agent-ittests.gradle
@@ -51,6 +51,7 @@ test {
doFirst {
// Defining here to allow jacoco to be first on the command line.
jvmArgs "-javaagent:${project(':dd-java-agent').tasks.shadowJar.archivePath}"
+ jvmArgs "-Ddd.integration.java_concurrent.enabled=true"
}
testLogging {

MODIFY
dd-java-agent/instrumentation/java-concurrent/src/main/java/datadog/trace/instrumentation/java/concurrent/ExecutorInstrumentation.java
dd-java-agent/instrumentation/java-concurrent/src/main/java/datadog/trace/instrumentation/java/concurrent/ExecutorInstrumentation.java
@@ -85,6 +85,11 @@ public final class ExecutorInstrumentation extends Instrumenter.Configurable {
super(EXEC_NAME);
}
+ @Override
+ protected boolean defaultEnabled() {
+ return false;
+ }
+
@Override
public AgentBuilder apply(final AgentBuilder agentBuilder) {
return agentBuilder

MODIFY
dd-java-agent/instrumentation/java-concurrent/src/main/java/datadog/trace/instrumentation/java/concurrent/FutureInstrumentation.java
dd-java-agent/instrumentation/java-concurrent/src/main/java/datadog/trace/instrumentation/java/concurrent/FutureInstrumentation.java
@@ -26,10 +26,6 @@ import net.bytebuddy.matcher.ElementMatcher;
@AutoService(Instrumenter.class)
public final class FutureInstrumentation extends Instrumenter.Configurable {
- public FutureInstrumentation() {
- super(ExecutorInstrumentation.EXEC_NAME);
- }
-
/**
* Only apply executor instrumentation to whitelisted executors. In the future, this restriction
* may be lifted to include all executors.
@@ -70,6 +66,15 @@ public final class FutureInstrumentation extends Instrumenter.Configurable {
Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(whitelist)));
}
+ public FutureInstrumentation() {
+ super(ExecutorInstrumentation.EXEC_NAME);
+ }
+
+ @Override
+ protected boolean defaultEnabled() {
+ return false;
+ }
+
@Override
public AgentBuilder apply(final AgentBuilder agentBuilder) {
return agentBuilder

Disable async instrumentation by default.