Updated on 2024-03-12 GMT+08:00

Searching for Span Information

Background

In the distributed architecture, the calls between microservices are complex. If it takes much time to respond to external requests or some requests become abnormal, you can specify a trace ID or set other criteria on the Tracing page to view trace details.

Procedure

  1. Log in to the APM console.
  2. In the navigation pane, choose Application Monitoring > Tracing.
  3. Enter the following search criteria and click Search Trace.

    Figure 1 Tracing search result
    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

    Trace URL, which can be a REST or real URL. A REST URL contains a variable name, for example, /apm/get/{id}. A real URL indicates an actual URL.

    No

    Exact Search

    Whether to perform exact match on URLs. If this option is selected, exact match is performed. If this option is not selected, fuzzy match is performed.

    No

    Call Method

    HTTP method of the trace.

    No

    Status Code

    HTTP status code returned by the trace.

    No

    Response Time

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

    No

    Exception or Not

    Whether to filter the traces that are regarded as exceptions.

    No

    Trace ID

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

    No

  4. Click Other search criteria. Custom Parameter, Global Trace ID, and Application Code are displayed.

    Figure 2 Other search criteria
    Table 2 Search criteria of traces

    Search Criterion

    Description

    Mandatory

    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.

    No

    Global Trace ID

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

    No

    Application Code

    If you have configured Service Code Length, Key for Service Code Interception, and Normal Service Code, corresponding application codes will be collected. You can search information based on the application codes.

    No

    • Custom Parameter
      Usage Instructions
      1. Configure Key for Header Value Interception, Key for Parameter Value Interception, and Key for Cookie Value Interception for URL monitoring. For details, see Configuring the URL Monitoring Item.
      2. In the Custom Parameter text box, set the parameters and values.
      3. Click Search Trace. The results are displayed on the right.
        Figure 3 Results of querying traces based on the custom parameters
    • Global Trace ID
      Usage Instructions
      1. Click next to the target trace to view the global trace ID.
        Figure 4 Obtaining the global trace ID
      2. In the Global Trace ID text box, enter the global trace ID.
      3. Click Search Trace. The results are displayed on the right.
        Figure 5 Results of querying traces based on the global trace ID
    • Application Code
      Usage Instructions
      1. Configure Service Code Length, Key for Service Code Interception, and Normal Service Code for URL monitoring. For details, see Configuring the URL Monitoring Item.
        Figure 6 URL monitoring
      2. In the navigation pane, choose Application Monitoring > Tracing.
      3. Click to view the value of the service code, which corresponds to the application code.
        Figure 7 Viewing the service code
      4. In the Application Code text box, enter the application code.
        Figure 8 Searching for the traces corresponding to the code
      5. Click Search Trace. The results are displayed on the right.