Query Tracing

Feature Overview

The distributed tracing query feature provides full-link tracing capabilities for microservices architecture by collecting metadata information of inter-service calls, helping users quickly locate cross-service call issues. This feature mainly addresses the following problems:

  • Request Link Tracing: Restoring the complete request path in complex distributed systems.
  • Performance Bottleneck Analysis: Identifying abnormal call nodes in terms of time consumption within the link.
  • Fault Root Cause Location: Quickly locating the point of issue occurrence through error marking.

Applicable scenarios include:

  • Rapidly locating abnormal services during production environment fault troubleshooting.
  • Identifying high-latency call links during performance tuning.
  • Validating inter-service call relationships after a new version release.

Core values:

  • Enhancing observability of distributed systems.
  • Reducing Mean Time to Recovery (MTTR).
  • Optimizing inter-service call performance.

Main Features

  • Multi-dimensional Querying: Supports 6 combinations of query conditions such as TraceID, service name, labels, etc.
  • Visual Analysis: Intuitively displays call hierarchy and time distribution through time-series waterfall charts.
  • Precise Location: Supports error Span filtering and secondary searches with labels.

Feature Advantages

  • Quick Problem Identification: Narrowing down the inspection range through multi-dimensional query conditions accelerates problem location.
  • Visual Presentation: Using time-series waterfall charts to intuitively display call relationships reduces complexity and enhances fault analysis efficiency.
  • Flexibility and Variety: Supports both simple queries and complex combinations, adapting to various operation and development scenarios.

Tracing Query

Step 1: Combine Query Conditions

Tip: Query conditions can be combined for use. You can refine your query by adding multiple query conditions.

Query ConditionDescription
TraceIDThe unique identifier for the complete link, which can be used to query the specified tracing.
ServiceThe service that initiates/receives the call request (needs to be selected or input).
LabelYou can filter the query results by entering labels (Tag), supported Tags include those in the Span details.
Span Duration Greater ThanSpans that have a duration greater than or equal to input value (ms).
Only Search Error SpansError Spans refer to Spans whose Tag value of error is true.
Span TypeRoot Span: Searches for root Spans initiated by the configured service. This search mode is used when the configured service is the initiator of the entire call request.
Service Entry Span: Searches for the first Span generated when the configured service is called as a server.
Maximum Query CountThe maximum number of Spans that can be queried, with a default of 200.
Tip: For performance reasons, the platform can display a maximum of 1000 Spans at a time. If the number of Spans that meet the query conditions exceeds the maximum query count, you can refine the query conditions or narrow the time range for phased queries.

Step 2: Execute Query

  • Once you select the query conditions and enter the respective values, click the Add to Query Conditions button, and the current conditions will be displayed in the Query Conditions result area, triggering the query.
  • You can also expand Common Query Conditions to quickly add recently used search conditions.

Query Result Analysis

After entering the query conditions and searching, a query results area will be generated on the page.

Span List

The left side of the query results area displays a list of Spans that meet the conditions along with basic information about the Spans, including: service name, called interface or request processing method, duration, and start time.

Time-Series Waterfall Chart

The time-series waterfall chart on the right side of the query results area clearly displays the call relationships between Spans in a single tracing. The main features of using time-series waterfall charts in tracing analysis are as follows:

  1. Top-to-bottom expansion: In the time-series waterfall chart, various call events (Spans) typically expand downwards from the top of the chart, with each horizontal bar representing a service call or process. The position generally reflects the logical calling order of operations.
  2. Time axis alignment: The horizontal axis of the time-series waterfall chart represents time. The length of each bar indicates the duration of that call, allowing for an intuitive comparison of the time relationships between different calls.
  3. Indentation description: Indentation indicates the hierarchical relationship of calls, with deeper indentation denoting greater call depth within that link.
  4. Interactivity and detailed data display: Clicking on the bars in the time-series waterfall chart can display more detailed information about that call.

Span Details

By clicking on the row of the Span in the time-series waterfall chart, you can expand and view detailed information about the Span, including:

  • Service: The service within the Span.
  • Span Duration (ms): The duration of the Span.
  • URL: The URL accessed by the service, corresponding to http.url in Span Tags.
  • Tag: The label information of the Span composed of key-value pairs, which can be used for advanced search tag query conditions. By clicking the button next to the tag, you can add the current Tag condition to the query conditions for more precise query results.
  • JSON: The original JSON structure of the Span, allowing for further inspection of its internal information.