Viewing the Call Relationships Between Microservices Through Tracing
When the calls between enterprise microservices are complex, APM Agents sample some requests, and intercept corresponding requests and subsequent call information.
Viewing Basic Information About Traces
- Log in to the APM console.
- Click
on the left and choose Management & Governance > Application Performance Management. - In the navigation pane, choose Performance Monitoring > Tracing.
- Select a time range in the upper right corner of the page. Default: Last 20 minutes.
Options: Last 3 minutes, Last 5 minutes, Last 10 minutes, Last 20 minutes, Last 1 hour, Last 3 hours, Last 6 hours, Last day, Today, Yesterday, and Custom.
- Specify the following search criteria or add custom criteria to query 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
Trace URL, which can be a REST URL 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 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
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, for example, httpMethod=POST.
For details about how to configure the URL monitoring item, see Configuring the URL Monitoring Item.
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 application codes. Generally, the value of Application Code is the same as the value of Normal Service Code. For details about how to configure the URL monitoring item, see Configuring the URL Monitoring Item.
No
- Click Search Trace to filter the traces that meet search criteria.
- 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.
- Response Time: response time of a trace. Click Response Time. Traces are sorted by response time in descending order, and
is displayed. Click Response Time again. Traces are sorted by response time in ascending order, and
is displayed. Click Response Time for the third time. The trace list is restored to the initial state and
is displayed. - Generated: start time of a trace. Traces can be sorted by generation time. For details, see Response Time.
- You can click Clear to clear the search criteria and results.
- Only the traces of successful or failed requests can be displayed. The following uses Successful Request as an example.
- In the displayed trace list, click
next to the target trace to view its basic information. Figure 1 Basic information about a trace
Parameter description:
- HTTP method of the trace.
- REST URL of the trace. A REST URL contains a variable name, for example, /apm/get/{id}. You can click the URL to go to the trace details page.
- HTTP status code returned by the trace.
- Trace ID.
- Component to which the trace belongs.
- Environment to which the trace belongs.
- Host of the instance to which the trace belongs.
- IP address of the instance to which the trace belongs.
- Actual URL of the trace.
- Hover the pointer over a trace name. The trace name turns blue. Click the trace name to view the trace details. Figure 2 Trace name
On the trace details page, you can view the trace's complete information, including the local method stack and remote call relationships.
Figure 3 Call relationship
Parameter description:
- Component and environment to which the called API belongs
- Response time (unit: ms) of the client. You can hover the pointer over the line between components to view the client and server information.
- Response time (unit: ms) of the server.
- Key parameter of the method in the trace method stack. For example, for a Tomcat entry method, a real URL is displayed. For a MySQL call method, an executed SQL statement is displayed.
- Number of components that are involved.
- Traces are displayed in a tree. Depth indicates the number of layers in the tree.
- Click Collapse if required.
The content displayed in positions 1 and 2 in the sequence diagram of a trace varies depending on the Agent type or connected website/app.
Figure 4 Sequence diagram
Agent Type or Connected Website/App
Display Content
Web
WEB
WeChat
WE_CHAT
Baidu
BAIDU
Alipay
ALIPAY
DingTalk
DING_TALK
Mobile app (Android)
ANDROID-APP
Mobile app (iOS)
IOS-APP
Mobile app (HarmonyOS)
HARMONY-APP
Others
user
- Click
to download the sequence diagram. 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.
Figure 5 Redirecting from the URL page to the trace page
- Duration, that is, the total time of a trace request.
- Click a resource in the resource list. The trace information, exceptions, logs, infrastructure, and Profiler analysis of the resource will then be displayed.
- The Trace Info tab page displays the instance, class, and status code of the resource.
- The Exceptions tab page displays the exception information of the resource. If the resource has no exception, the Exceptions tab page will not be displayed.
- For details about the Logs tab page, see Viewing the Log Monitoring Item of a Component.
- For details about the Infrastructure tab page, see Viewing the Infrastructure of a Component.
- If the Agent version is 2.4.9-profiler or later, you can view the Profiler performance analysis data on the trace page.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
