All Products
Search
Document Center

Microservices Engine:Integrate tracing analysis with scheduled jobs

Last Updated:Mar 11, 2026

Scheduled jobs in distributed microservices often have longer execution paths than real-time services. Tracing analysis captures the full execution path of each job run, so you can measure step durations, pinpoint failures, and visualize the end-to-end flow in the SchedulerX console.

Prerequisites

Before you begin, make sure that you have:

  • An agent running version 1.7.0 or later

  • The Trace plug-in dependency added to your agent (see Add tracing dependencies)

  • An application upgraded to Professional Edition

Add tracing dependencies

Add the following dependencies to the pom.xml file of your Spring Boot application.

SchedulerX starter with logging exclusions:

<dependency>
  <groupId>com.aliyun.schedulerx</groupId>
  <artifactId>schedulerx2-spring-boot-starter</artifactId>
  <version>{Latest version}</version>
  <!-- If you use Logback, you must 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>

Trace plug-in -- choose one:

Tracing backendArtifact IDWhen to use
OpenTelemetry (default)schedulerx-plugin-trace-opentelemetryUse with EDAS or ARMS
SkyWalkingschedulerx-plugin-trace-skywalkingUse with a self-built SkyWalking platform

OpenTelemetry plug-in:

<dependency>
  <groupId>com.aliyun.schedulerx</groupId>
  <artifactId>schedulerx-plugin-trace-opentelemetry</artifactId>
  <version>{Latest version}</version>
</dependency>

SkyWalking plug-in:

<dependency>
  <groupId>com.aliyun.schedulerx</groupId>
  <artifactId>schedulerx-plugin-trace-skywalking</artifactId>
  <version>{Latest version}</version>
</dependency>

Deploy your application

Connect your application to a tracing backend using one of the following methods.

Deploy in EDAS (recommended)

Enterprise Distributed Application Service (EDAS) has built-in tracing support. If your application already runs in EDAS, tracing analysis works with no extra configuration.

To get started with EDAS, activate the service and deploy your application from the EDAS console. For detailed steps, see Get started with EDAS.

Integrate Application Real-Time Monitoring Service (ARMS)

  1. Download the ARMS agent JAR package.

  2. Configure your application information.

  3. Add the arms javaagent parameter to your startup script.

For detailed steps, see Manually install an ARMS agent.

Integrate a self-built tracing platform

If you run a self-built tracing platform such as SkyWalking:

  1. Download and configure the SkyWalking agent package.

  2. Add the following JVM parameter to your Java application startup script:

       -javaagent:{agent.path}/skywalking-agent.jar
  3. Switch the SchedulerX trace plug-in dependency to the SkyWalking artifact:

       <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 job executions end to end. The following job types are supported:

Job typeTracing scope
Standalone jobs (including HTTP jobs)Full end-to-end trace
Broadcast jobsPer-worker traces
Visual MapReduce jobsPer-subtask traces
Note

A default sampling rate applies to trace data collection. Not every execution is captured. Adjust the sampling rate based on your requirements.

To view traces:

  1. Log on to the Distributed Task scheduling platform.

  2. Log on to the EDAS console.

  3. In the left-side navigation pane, click Task Scheduling (SchedulerX).

  4. In the top navigation bar, select a region.

  5. In the left-side navigation pane, click Execution List.

  6. On the Task instance List tab, locate the job instance and use the Operation column to view traces.

Standalone jobs

Click tracing in the Operation column. Alternatively, click Details, then click the ID next to TraceId to open the Traces page.

Because the application to which the standalone job belongs supports end-to-end tracing analysis, this method also applies to standalone HTTP jobs.

Broadcast jobs

  1. Click Details in the Operation column.

  2. On the Task instance details page, click the Current execution details tab.

  3. Click a worker ID in the TraceId column to open the Traces page.

Visual MapReduce jobs

  1. Click Details in the Operation column.

  2. On the Task instance details page, click the Subtask list tab.

  3. Review subtask execution status in the list. Click a subtask ID in the TraceId column to open the Traces page.