docs/sources/datasources/tempo/query-editor/traceql-search.md
The Search query builder lets you create TraceQL queries using drop-down lists and text fields instead of writing syntax directly. Each selection you make generates a TraceQL query behind the scenes. You can view the generated query and copy it to the TraceQL editor at any time.
Use Search when you're exploring data or learning TraceQL patterns. For complex queries involving structural operators, aggregations, or features that Search doesn't support, use the TraceQL editor. To learn the full query syntax, refer to Construct a TraceQL query.
If queries return no results, check that your Tempo data source is configured and connected.
This feature is automatically available in Grafana 10 (and newer) and Grafana Cloud.
To enable the TraceQL query builder in self-managed Grafana through version 10.1, enable the traceqlSearch feature toggle.
{{< docs/shared source="grafana" lookup="datasources/tempo-search-traceql.md" leveloffset="+1" version="<GRAFANA_VERSION>" >}}
The following examples show what to select in the Search builder and the TraceQL query each selection generates. Adjust service names and values to match your environment.
Find error spans for a service:
frontend).error.Generated query:
{ resource.service.name = "frontend" && status = error }
Find slow API calls:
POST /api/orders).> 500ms.Generated query:
{ name = "POST /api/orders" && duration > 500ms }
Filter by HTTP status code:
http.response.status_code.>= and the value to 500.Generated query:
{ span.http.response.status_code >= 500 }
For more query examples, refer to TraceQL query examples.