Can I return the trace status from a query?

When I construct a query in TraceQL on a Tempo data source, can I make the query return the status for the trace? I know I can query the status using eg {status=error} but there doesn’t seem to be a way to return the status to use in a transformation or a visualisation. Isn’t that quite an obvious thing to want to do? Even being able to return the result of {} >> {status=error} would do, though I guess it would be slower.

Hi, you should be able to use select() to get the attributes you want.

example: {status=error} | select(status, .service_name) will pull in status and service name and you should be able to use these from the results.

TraceQL Docs: Construct a TraceQL query | Grafana Tempo documentation