Skip to content

Commit 7e95bec

Browse files
committed
Automatic AOT training detection can be turned off with DD_AOT_TRAINING=false
1 parent c234bb3 commit 7e95bec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dd-java-agent/src/main/java/datadog/trace/bootstrap/AgentBootstrap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ private static boolean isAotTraining(String agentArgs, Instrumentation inst) {
436436
return false; // agent doesn't support training mode before Java 25
437437
} else if ("aot_training".equalsIgnoreCase(agentArgs)) {
438438
return true; // training mode explicitly enabled via -javaagent
439+
} else if ("false".equalsIgnoreCase(EnvironmentVariables.get("DD_AOT_TRAINING"))) {
440+
return false; // training mode explicitly disabled via DD_AOT_TRAINING=false
439441
} else {
440442
return AdvancedAgentChecks.isAotTraining(inst); // check JVM status
441443
}

0 commit comments

Comments
 (0)