Distributed scheduled jobs often span multiple services and run longer than typical real-time requests. SchedulerX tracing analysis provides end-to-end visibility into job execution paths, helping you measure execution durations and pinpoint failures across services.
Prerequisites
Before you begin, ensure that you have:
Agent version 1.7.0 or later
An application upgraded to Professional Edition
Add the trace plug-in dependency
Add the following dependencies to the pom.xml file of your Spring Boot application:
<dependency>
<groupId>com.aliyun.schedulerx</groupId>
<artifactId>schedulerx2-spring-boot-starter</artifactId>
<version>{Latest version}</version>
<!-- If you use Logback, exclude Log4J and Log4J2. -->
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- OpenTelemetry trace plug-in -->
<dependency>
<groupId>com.aliyun.schedulerx</groupId>
<artifactId>schedulerx-plugin-trace-opentelemetry</artifactId>
<version>{Latest version}</version>
</dependency>
<!-- Alternative: SkyWalking trace plug-in -->
<!--
<dependency>
<groupId>com.aliyun.schedulerx</groupId>
<artifactId>schedulerx-plugin-trace-skywalking</artifactId>
<version>{Latest version}</version>
</dependency>
-->Deploy the application
Choose one of the following deployment methods.
Deploy in Enterprise Distributed Application Service (EDAS) (recommended)
If your application is already deployed in EDAS, tracing analysis works automatically. No additional configuration is required.
If you are new to EDAS, activate the service and deploy your application from the EDAS console. Tracing analysis is enabled by default. For more information, see Get started with EDAS.
Integrate Application Real-Time Monitoring Service (ARMS)
Download the ARMS agent JAR package.
Configure your application information.
Add the ARMS javaagent to your startup script.
For step-by-step instructions, see Manually install an ARMS agent for a Java application.
Integrate a self-managed tracing platform
If you use a self-managed tracing platform such as Apache SkyWalking, follow these steps:
Download the SkyWalking agent package and complete the agent configuration.
Add the following JVM parameter to your Java application startup script:
-javaagent:{agent.path}/skywalking-agent.jarSwitch the SchedulerX Trace plug-in dependency to the SkyWalking type:
<dependency> <groupId>com.aliyun.schedulerx</groupId> <artifactId>schedulerx-plugin-trace-skywalking</artifactId> <version>{Latest version}</version> </dependency>
View tracing analysis results
After you complete the integration and deployment, SchedulerX traces scheduled job executions end to end. The following table lists the supported job types and how to access trace data for each type.
Job type | Supported | How to access traces |
Standalone (including HTTP) | Yes | Click tracing in the Operation column. Alternatively, click Details, then click the ID next to TraceId to open the Traces page. |
Broadcast | Yes | Click Details > Current execution details tab > click a worker ID in the TraceId column. |
Visual MapReduce | Yes | Click Details > Subtask list tab > click a subtask ID in the TraceId column. |
To view trace results:
Log on to the Distributed Task Scheduling Platform.
In the top navigation bar, select a region.
In the left-side navigation pane, click Execution List. On the Task instance List tab, locate the target job instance.
In the Operation column, access trace data based on the job type described in the preceding table.
A default sampling rate controls how much trace data is collected. Not every execution path is sampled. Adjust the sampling rate based on your workload requirements.