Menu
Open source

How TraceQL works

The TraceQL engine connects the Tempo API handler with the storage layer. The TraceQL engine:

  • Parses incoming requests and extract flattened conditions the storage layer can work with
  • Pulls spansets from the storage layer and revalidates that the query matches each span
  • Returns the search response

The default Tempo search reviews the whole trace. TraceQL provides a method for formulating precise queries so you can zoom in to the data you need. Query results are returned faster because the queries limit what is searched.

For an indepth look at TraceQL, read the TraceQL: A first-of-its-kind query language to accelerate trace analysis in Tempo 2.0" blog post by Trevor Jones.

For examples of query syntax, refer to Construct a TraceQL query.

Active development and limitations

TraceQL will be implemented in phases. The initial iteration of the TraceQL engine includes spanset selection and pipelines.

For more information about TraceQL’s design, refer to the TraceQL Concepts design proposal.

Future work

  • Increase OTEL support: Events, Lists, ILS Scope, etc.
  • Ancestor and parent structural queries
  • Metrics
  • Pipeline comparisons