Back to Grafana

Write TraceQL queries with the editor

docs/sources/datasources/tempo/query-editor/traceql-editor.md

13.0.11.7 KB
Original Source

Write TraceQL queries with the editor

Use the TraceQL editor when you need structural queries across parent and child spans, aggregations, or other features that the Search query builder doesn't support. TraceQL queries follow the pattern { conditions } | pipeline. Refer to Construct a TraceQL query for the full syntax.

To get started, paste this query into the editor and select Run query:

traceql
{ resource.service.name = "frontend" && span:status = error }

This returns all error spans from the frontend service. Replace frontend with your service name. For more examples, refer to TraceQL query examples.

If queries return no results, check that your Tempo data source is configured and connected.

{{< docs/shared source="grafana" lookup="datasources/tempo-editor-traceql.md" version="<GRAFANA_VERSION>" >}}

Next steps