Menu

This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

Enterprise Open source

Tempo query editor

The Tempo data source’s query editor helps you query and display traces from Tempo in Explore.

This topic explains configuration and queries specific to the Tempo data source. For general documentation on querying data sources in Grafana, see Query and transform data.

Use this to search for traces by service name, span name, duration range, or process-level attributes that are included in your application’s instrumentation, such as HTTP status code and customer ID.

To configure Tempo and the Tempo data source for search, refer to Configure the data source.

To search for traces:

  1. Select Search from the Query type selector.
  2. Fill out the search form:
NameDescription
Service NameReturns a list of services.
Span NameReturns a list of span names.
TagsSets tags with values in the logfmt format, such as error=true db.statement="select * from User".
Min DurationFilters all traces with a duration higher than the set value. Possible values are 1.2s, 100ms, 500us.
Max DurationFilters all traces with a duration lower than the set value. Possible values are 1.2s, 100ms, 500us.
LimitLimits the number of traces returned.
Screenshot of the Tempo search feature with a trace rendered in the right panel
Screenshot of the Tempo search feature with a trace rendered in the right panel

Search recent traces

You can search recent traces held in Tempo’s ingesters. By default, ingesters store the last 15 minutes of tracing data.

To configure your Tempo data source to use this feature, refer to the Tempo documentation.

Search the backend datastore

Tempo includes the ability to search the entire backend datastore.

To configure your Tempo data source to use this feature, refer to the Tempo documentation.

Query by TraceID

To query a particular trace:

  1. Select the TraceID query type.
  2. Enter the trace’s ID into the Trace ID field.
Screenshot of the Tempo TraceID query type
Screenshot of the Tempo TraceID query type

Query by TraceQL

To learn more about how to query by TraceQL, refer to the TraceQL documentation.

Query Loki for traces

To find traces to visualize, you can use the Loki query editor. For results, you must configure derived fields in the Loki data source that point to this data source.

Screenshot of the Tempo query editor showing the Loki Search tab
Screenshot of the Tempo query editor showing the Loki Search tab