Skip to content

Commit

Permalink
Fix default value for long-running spans with DJM (#7810)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-laffon-dd authored Oct 18, 2024
1 parent 501bcb9 commit a4e2819
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,15 @@ public static void start(

boolean dataJobsEnabled = isFeatureEnabled(AgentFeature.DATA_JOBS);
if (dataJobsEnabled) {
log.info("Data Jobs Monitoring enabled, enabling spark integrations");

setSystemPropertyDefault(
propertyNameToSystemPropertyName(TracerConfig.TRACE_LONG_RUNNING_ENABLED), "true");
setSystemPropertyDefault(
propertyNameToSystemPropertyName("integration.spark.enabled"), "true");
setSystemPropertyDefault(
propertyNameToSystemPropertyName("integration.spark-executor.enabled"), "true");

String javaCommand = System.getProperty("sun.java.command");
String dataJobsCommandPattern = Config.get().getDataJobsCommandPattern();
if (!isDataJobsSupported(javaCommand, dataJobsCommandPattern)) {
Expand All @@ -230,15 +239,6 @@ public static void start(
dataJobsCommandPattern);
return;
}

log.info("Data Jobs Monitoring enabled, enabling spark integrations");

setSystemPropertyDefault(
propertyNameToSystemPropertyName(TracerConfig.TRACE_LONG_RUNNING_ENABLED), "true");
setSystemPropertyDefault(
propertyNameToSystemPropertyName("integration.spark.enabled"), "true");
setSystemPropertyDefault(
propertyNameToSystemPropertyName("integration.spark-executor.enabled"), "true");
}

if (!isSupportedAppSecArch()) {
Expand Down

0 comments on commit a4e2819

Please sign in to comment.