Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Open source

TraceQL query editor

With Tempo 2.0, you can use the TraceQL viewer and query editor in the Tempo data source to build queries and drill-down into result sets. The editor is available in Grafana’s Explore interface.

NOTE: To use the TraceQL query editor, you need to enable the traceqlEditor feature flag. This feature is available starting in Grafana 9.3.2.

Query editor showing request for http.method

Using the query editor, you can use the editor’s autocomplete suggestions to write queries. The editor detects span sets to provide relevant autocomplete options. It uses regular expressions (regex) to detect where it is inside a spanset and provide attribute names, scopes, intrinsic names, logic operators, or attribute values from Tempo’s API, depending on what is expected for the current situation.

Query editor showing the auto-complete feature

Query results are returned in a table. Selecting the Trace ID or Span ID provides more detailed information.

Query editor showing span results

Selecting the trace ID from the returned results will open a trace diagram. Selecting a span from the returned results opens a trace diagram and reveals the relevant span in the trace diagram (above, the highlighted blue line).