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.
Prerequisite
The data of the application that you want to monitor is reported to Managed Service for OpenTelemetry. For more information, see Integration guide.
Filter traces
Log on to the Managed Service for OpenTelemetry console. In the left-side navigation pane, click Applications.
On the Applications page, select a region in the top navigation bar and click the name of the application.
In the top navigation bar, click the Trace Explorer tab.
In the upper-right corner of the Trace Explorer tab, specify the time range to filter traces.
Specify filter conditions.
In the Quick Filter section, query traces by status, duration, application name, span name, or host address.
The specified filter conditions are displayed in the search bar.
Click the search bar. In the drop-down filter panel, configure the existing filter conditions or add custom filter conditions.
In the search bar, enter a query statement. For information about the syntax, see Usage methods of Trace Explorer.
NoteClick the
icon to the right of the Aggregation Dimension drop-down list to save the specified filter conditions in a view.
Click Saved View to view all the saved views, or click a view to view the corresponding trace data.
Aggregate the queried data based on specific 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.
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.
Trace aggregation details
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 specified conditions and query the corresponding spans based on the trace IDs. Then, you can aggregate the queried spans to obtain the results. The integrity of the aggregated traces is guaranteed in this process.
When you use the trace aggregation feature, note that aggregate queries are performed on the trace data based on the specified conditions. If you specify multiple query conditions, the calculation may not be completed in real time. We recommend that you wait patiently.
Parameter | Description |
spanName | The name of the span. |
serviceName | The name of the application that corresponds to the span. |
Number of requests/percentage of requests | 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% of requests call the current span. Formula: Request ratio = Number of requests that call the current span/Total number of requests × 100% |
span/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. Formula: Request multiple = Number of spans/Number of requests |
Average self-consumption/proportion | The self-time of a span excludes the time spent in its child spans. For example, if Span A takes 10 milliseconds and its child span (Span B) takes 8 milliseconds, the average self-time of Span A is 2 milliseconds. Formula: Average self-time of a span = Total time of the span - Time spent in all child spans Important For asynchronous calls, the self-time of a span is equal to the total time of the span. |
Average Duration | The average duration of the span. |
Number of exceptions/percentage of exceptions | 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. 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: Span A calls Span B and Span C. The following table shows the parameters.
spanName | serviceName | Number of requests/percentage of requests | span/Request Multiple | Average self-consumption/proportion | Average Duration | Number of exceptions/percentage of exceptions | |
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/percentage of requests parameter of Span A indicates that the total number of requests is 10 and the request ratio is 100%. The Number of requests/percentage of requests 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 span/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 self-consumption/proportion parameter of Span A is 5.00 ms/25.00%, which indicates that the average self-time of Span A (except Span B and Span C) is 5 milliseconds. The average self-time of Span A accounts for only 25% of the overall average time. However, the average self-time of Span B and Span C is equal to their overall average time 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/percentage of exceptions parameter of Span B is 2/50.00%. Given that each request calls Span B twice, the total number of requests is 4, and the exception ratio is 50%, two requests have exceptions. Therefore, the distribution of exceptions in Span B may be: 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.
To view the details of a specific trace, move the pointer over the blue span name. You can click the recommended trace ID to view the details.
Trace topology
The Full Link Topology tab displays the inter-application topology of aggregated traces. The following figure shows that the two applications have call relationships. The following information is displayed for each application: the number of requests, the number of errors, and the response time.
Trace details
Component tags (section marked with the number 1 in the preceding figure)
The tags show the call types and the number of spans.
The call types are defined by the attributes.component.name field.
Click a tag to hide or show the spans related to the call type.
Horizontal bar chart of the trace (section marked with the number 2 in the preceding figure)
The bar chart shows the entire trace and the distribution of spans.
Each bar represents a span. Only spans whose duration is greater than 1% of the total duration are displayed.
Different colors represent different applications. As shown in the preceding figure, the color blue represents the opentelemetry-demo-adservice application.
The length of a black line in the chart represents the self-time of a span, which is the total time of the span minus the time spent in its child spans. Assume Span A calls Span B. Span A takes 10 milliseconds and Span B takes 8 milliseconds. In this case, Span A takes 2 milliseconds.
The timeline represents the time range of the trace.
Trace focus and filtering (section marked with the number 3 in the preceding figure)
Each row in this section represents a span and shows the hierarchical relationship between the parent span and the child span. Each parent span is preceded by a number, which indicates the number of child spans owned by the parent span. In this section, you can perform the following operations:
Collapse: Click the
icon to collapse or expand a span.
Focus: Select a span and click the
icon. The system displays only the data of the span and the downstream data.
Defocus: Click the
icon to defocus a span.
Filter: Enter the information of a span in the search box, such as the span name, application name, or attributes to view the trace data ranging from the span to the entry span. To cancel the filtering, delete the input information from the search box and click the Search icon.
Zoom in and out: Click the
icon to zoom in the trace and hide the bar chart. Click the
icon to show the bar chart.
Span details (section marked with the number 4 in the preceding figure)
The Span Details section provides the details of the current span, and the relevant metric data, logs, and exception information. You can also manage custom interaction events and configure triggering for interaction events.
Additional Information: displays the attributes, resources, details, and events of the span. The additional information is grouped by type. For information about the fields in the span details, see Trace Explorer parameters.
Metrics: displays the metrics related to the span. For traces of Java applications monitored in ARMS, metrics about JVMs and hosts are displayed. For traces reported by an open source agent, metrics defined by the RED Method, including rate, errors, and duration, are displayed.
Logs: displays the business logs related to the trace. If you have configured a Simple log Service (SLS) Logstore for the application, you can go to the Logstore and query the business logs based on the trace ID.
Exceptions: displays exception information related to the span, if any.
Event Config: allows you to configure interaction events for one or more attributes of the trace. This way, you can query more details about the trace or view the logs and metrics related to the trace. For information about how to configure custom interaction events, see Configure a custom interaction event for a trace.
Next steps
To prevent certain errors from being diagnosed, you can use the alerting feature to create alert rules for certain operations. When the specified errors occur, the system automatically notifies your O&M team. For more information about how to create an alert rule, see Create an alert rule.