Updated on 2025-06-27 GMT+08:00

Tracing

When the calling between enterprise microservices is complex, the Agent samples some requests based on the preset sampling rate (see Application Management) and intercepts the corresponding requests and subsequent calling information. For example, in the scenario where service A calls service B and then calls service C, after service A receives a request, APM determines whether to trace the request based on the intelligent sampling algorithm.

Traces in this section refer to those collected using open tracing Agents.

Searching for traces

This function is used to search for span information, that is, the root span of a node. A trace can be found in multiple environments. For example, in the scenario where service A calls service B and then calls service C, the same trace may be found from services A, B, and C.

  1. Log in to the management console.
  2. Click on the left and choose Management & Governance > Application Performance Management.
  3. In the navigation pane, choose Link Trace > Tracing.
  4. Specify criteria to filter traces.
Table 1 Search criteria of traces

Search Criterion

Description

Mandatory

Application

Application to which the trace belongs.

Yes

Region

Region where the trace is located.

Yes

Component

Component to which the trace belongs.

No

Environment

Environment to which the trace belongs.

No

Instance

Instance to which the trace belongs.

No

URL

URL of the trace.

No

Call Method

HTTP method of the trace.

No

Response Time

Response time range of the trace. You can specify the minimum and maximum response time to search for the trace or leave them empty.

No

Exception or Not

Whether to filter the traces that are regarded as exceptions.

No

Trace ID

If you specify this parameter, other search criteria become invalid and the search will be performed based on the trace ID you specify.

No

Custom Parameter

  • Search for traces by call parameter. The format is key=value. Example: thread.id=23.

  • Configure required parameters before you search for traces by custom parameter. If you have configured Key for Header Value Interception, Key for Parameter Value Interception, and Key for Cookie Value Interception for URL monitoring, you can set key=value to search.
  • Custom parameters are supported only for OpenTelemetry applications.
  • On the span details page, the fixed display items do not support search by custom parameter.

  • If the value is too long, only the first line is used. Example: exception.stacktrace=java.lang.IndexOutOfBoundsException: Index: 1, Size: 0.

No

Checking trace details

Check basic information about the trace filtered based on the search criteria.

In the trace list, click the down arrow next to the target trace to check the basic information about the trace, as shown in the following figure.

Figure 1 Basic information about a trace

Parameter description:

  1. HTTP method of the trace
  2. URL of the trace
  3. Start time of the trace
  4. Response time of the trace
  5. Trace ID
  6. Component to which the trace belongs
  7. Environment to which the trace belongs
  8. Instance to which the trace belongs
  9. IP address of the instance to which the trace belongs
  10. URL of the trace
  11. Only the traces of successful or failed requests can be displayed. The following uses Successful Request as an example.
    • Click the green button next to Successful Request, only the traces of successful requests are displayed. The red button next to Failed Request becomes grayed.
    • If you click the green button again, both the traces of successful and failed requests are displayed. The red button is no longer grayed.
    • The green and red buttons cannot be grayed at the same time.
  12. View logs.
    1. On the LTS console, configure the collection. For details, see Ingesting ECS Text Logs to LTS.
    2. Click View Logs to go to the LTS page based on the trace ID. For details, see Searching Logs.
    3. If the function of associating trace IDs with logs is not enabled, a warning dialog box is displayed. Click Associate Now to go to the log association settings page.

You can also click a specific URL on the monitoring item view page, for example, the table view of the URL monitoring item. In this way, you can quickly search for required trace information based on preset search criteria.

Checking the complete trace information on the trace details page

Click the name of a trace to view its details, as shown in the following figure.

Figure 2 Call details