@@ -221,6 +221,15 @@ public static void start(
221221
222222 boolean dataJobsEnabled = isFeatureEnabled (AgentFeature .DATA_JOBS );
223223 if (dataJobsEnabled ) {
224+ log .info ("Data Jobs Monitoring enabled, enabling spark integrations" );
225+
226+ setSystemPropertyDefault (
227+ propertyNameToSystemPropertyName (TracerConfig .TRACE_LONG_RUNNING_ENABLED ), "true" );
228+ setSystemPropertyDefault (
229+ propertyNameToSystemPropertyName ("integration.spark.enabled" ), "true" );
230+ setSystemPropertyDefault (
231+ propertyNameToSystemPropertyName ("integration.spark-executor.enabled" ), "true" );
232+
224233 String javaCommand = System .getProperty ("sun.java.command" );
225234 String dataJobsCommandPattern = Config .get ().getDataJobsCommandPattern ();
226235 if (!isDataJobsSupported (javaCommand , dataJobsCommandPattern )) {
@@ -230,15 +239,6 @@ public static void start(
230239 dataJobsCommandPattern );
231240 return ;
232241 }
233-
234- log .info ("Data Jobs Monitoring enabled, enabling spark integrations" );
235-
236- setSystemPropertyDefault (
237- propertyNameToSystemPropertyName (TracerConfig .TRACE_LONG_RUNNING_ENABLED ), "true" );
238- setSystemPropertyDefault (
239- propertyNameToSystemPropertyName ("integration.spark.enabled" ), "true" );
240- setSystemPropertyDefault (
241- propertyNameToSystemPropertyName ("integration.spark-executor.enabled" ), "true" );
242242 }
243243
244244 if (!isSupportedAppSecArch ()) {
0 commit comments