All Products
Search
Document Center

Managed Service for OpenTelemetry:Trace Explorer

Last Updated:May 11, 2024

After you report the data of an application to Managed Service for OpenTelemetry, Managed Service for OpenTelemetry can monitor the application. The Trace Explorer feature of Managed Service for OpenTelemetry allows you to analyze the trace details by combining filter conditions and aggregation dimensions in real time. This allows you to customize diagnostics requirements in different scenarios.

Prerequisites

The data of the application that you want to monitor is reported to Managed Service for OpenTelemetry. For more information, see Connection Description.

Filter traces

  1. Log on to the Managed Service for OpenTelemetry console. In the left-side navigation pane, click Applications.

  2. On the Applications page, select a region in the top navigation bar and click the name of the application that you want to manage.

  3. In the top navigation bar, click the Trace Explorer tab.

  4. In the upper-right corner of the Trace Explorer tab, specify the time range to filter traces.

  5. Specify filter conditions.

    • In the Quick Filter section, filter traces by status, duration, operation name, or host address.

      The filter conditions that you specify are displayed in the search box.

    • Click the search box and modify the specified filter conditions in the dialog box that appears. You can also specify other filter conditions.自定义筛选

    • Enter a query statement in the search box. For more information about the syntax of a query statement, see Use Trace Explorer to query traces.

      Note
      • You can click the保存 icon next to the search box to save the current filter conditions.

      • You can click Saved View to view the saved filter conditions and click a filter condition to view the corresponding trace data.

      • You can aggregate the queried data based on the specified dimensions.

Trace list

After you specify filter conditions, the matched trace data is displayed on the Trace Explorer tab. The trace data includes the column charts of spans and HTTP errors, the time series curves of response time, and a span list.

Span数据信息

In the span list, you can perform the following operations:

  • Find a span and click Details in the Actions column to view complete trace information. For more information, see the Trace details section of this topic.

  • Find a span and click Logs in the Actions column to view the logs of the trace.

  • Click the 设置 icon in the upper-right corner to add or hide the fields of the list.

  • Move the pointer over a span and click the 过滤 icon to add the current parameter values as a filter condition.添加筛选条件

Scatter chart

On the Scatter plot tab, time points are distributed along the X axis and the response time is distributed along the Y axis. You can move the pointer over a point to view the basic information about the corresponding trace. You can click a point to view the call details of the corresponding trace. For more information, see the Trace details section of this topic.

image.png

Trace aggregation

Trace Explorer allows you to analyze a queried span based on various dimensions. However, you may need to analyze traces that consist of a large number of spans. The trace aggregation feature allows you to query up to 5,000 distributed traces by using the specified conditions and query the corresponding spans based on the trace IDs. Then, you can aggregate the queried spans to obtain the results. During this process, the integrity of the aggregated traces is guaranteed.

Note

When you use the trace aggregation feature, the aggregate queries are performed on the trace data based on the specified conditions. Multiple query conditions may lead to a calculation delay. Wait until the calculation is complete.

全链路聚合

Parameter

Description

spanName

The name of the span.

serviceName

The name of the application on which the span is called.

Number of Requests / Request Ratio

The request ratio indicates the ratio of the requests that call the current span to the total number of requests.

For example, 10% indicates that 10% requests call the current span.

Calculation formula: Request ratio = Number of requests that call the current span / Total number of requests × 100%

Number of Spans / Request Multiple

The request multiple indicates the average number of times that the current span is called by each request.

For example, 1.5 indicates that the current span is called 1.5 times by each request.

Calculation formula: Request multiple = Number of spans / Number of requests

Average Duration / Ratio

The average duration of a span excludes the duration of its child spans.

For example, if Span A takes 10 milliseconds and its child span (Span B) takes 8 milliseconds, the average duration of Span A is 2 milliseconds.

Calculation formula: Average duration of a span = Duration of the span - Duration of all child spans

Important

For asynchronous calls, the average duration of a span includes the duration of its child spans.

Average Duration

The average duration of the span.

Number of Exceptions / Exception Ratio

The exception ratio indicates the ratio of requests with exceptions to the total number of requests.

For example, 3% indicates that exceptions occur in 3% of requests.

Calculation formula: Number of requests with exceptions / Total number of requests

Important

The number of requests with exceptions is not equal to the number of exceptions. If the request multiple is greater than 1, a request may have multiple exceptions.

Example: The following table describes the parameters when Span A calls Span B and Span C.

spanName

serviceName

Number of Requests / Request Ratio

Number of Spans / Request Multiple

Average Duration / Ratio

Average Duration

Number of Exceptions / Exception Ratio

A

-

demo

10 / 100.00%

10 / 1.00

5.00ms / 25.00%

20ms

2 / 20.00%

-

B

demo

4 / 40.00%

8 / 2.00

16.00ms / 100.00%

16ms

2 / 50.00%

-

C

demo

1 / 10.00%

1 / 1.00

4.00ms / 100.00%

4ms

1 / 100.00%

The Number of Requests / Request Ratio parameter of Span A indicates that the total number of requests is 10 and the request ratio is 100%. The Number of Requests / Request Ratio parameter of Span B indicates that only 4 requests call Span B. Similarly, only one request calls Span C. The request ratio of Span B is 40% and request ratio of Span C is 10%. Other requests do not call Span B and Span C due to logical judgments or exceptions. This reflects the distribution of requests.

The Number of Spans / Request Multiple parameter of Span A is 10 / 1.00, which indicates that Span A is called only once by each request. However, for Span B, eight spans are called by four requests. Therefore, Span B is called twice by each request. This reflects the distribution of spans in each request.

The Average Duration / Ratio parameter of Span A is 5.00ms / 25.00%, which indicates that the average duration of Span A is 5 milliseconds. This duration excludes the average duration of Span B and Span C. The average duration of Span A accounts for only 25% of the overall average duration. The average duration of Span B and Span C is equal to their overall average duration because Span B and Span C do not have child spans. This reflects the distribution of average duration.

The Number of Exceptions / Exception Ratio parameter of Span A is 2 / 20.00%, which indicates that Span A has two exceptions, accounting for 20% of the total number of requests. The Number of Exceptions / Exception Ratio parameter of Span B is 2 / 50.00%. Two requests have exceptions because each request calls Span B twice, the total number of requests is 4, and the exception ratio is 50%. Therefore, the exceptions in Span B may be distributed in the following method: Among the total four requests, two requests are successful. Among the remaining two requests, an exception occurs in the first call of each request whereas the second call is successful.

Note

To view the details of a specific trace, move the pointer over the span name and click the recommended trace ID.

Full-link Topology

The Full Link Topology tab displays the inter-application topology of aggregated traces. The following figure shows that the two applications have call relationship. The following information is displayed for each application: the number of requests, number of errors, and response time.

全链路拓扑

Trace details

In the details panel of a trace, you can view all the spans, start time, errors, total duration of the trace, and the duration of each span.

调用链详情

In the trace details panel, you can perform the following operations:

  • Move the pointer over the name of a span to view the span name, application, IP address, and start time.

  • Click the放大镜图标 icon next to a span to view the method stacks and analysis overview.

    Method Stack

    接口方法栈

    Analysis Overview

    image.png

  • Click the name of a span to view the additional information, metric details, and logs on the right of the panel. For more information, see Trace Explorer parameters.

References

To prevent errors from being diagnosed after the errors occur, you can use the alerting feature to create alert rules for one or all operations. This way, the system sends notifications to the O&M team when the errors occur. For more information about how to create an alert rule, see Create an alert rule.