TraceQL search by the boolean values not working

Hi Team,

I trying to get all the errors and searching by the traceql.

I have tried to use the span.error attribute, however I was not able to figure out the proper query. Below are the queries I have tried.

{“”} && {span.error!=“”}
{“”} && {span.error=“true”}
{“” && span.error!=“”}

But we do have multiple error spans during the time. Could you please confirm if I am doing something incorrect?

Hi, I think this explains the behavior you are seeing: TraceView: Represent OTLP Span Intrinsics correctly · Issue #59607 · grafana/grafana · GitHub The Grafana UI shows error = true but it is not really a boolean attribute, but the span status code. In TraceQL this is supported with the status keyword. Try a query like { status = error } This will find any trace with an error.

1 Like

Thanks a lot for the quick response. I see the status=error works.
Also as a side note, few errors have the error message populated for spans however few are just tagged error=true without error message. Any open issues for such behavior or is it expected.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.