-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TraceQL: Error when searching for span attributes that start with resource.
#2605
Comments
Thanks for the report. This is also failing with a similar issue:
This seems to work but it is not as performant:
|
The below diff fixes the issue as stated but still fails on weird constructions like:
I think this is just going to require some better attribute scope parsing.
|
This issue has been automatically marked as stale because it has not had any activity in the past 60 days. |
I am working on it. |
To confirm my understanding: span.xxx.yyy represents a span attribute xxx.yyy, and when we have a span attribute starting with resource. (like, span.resource.foo), this problem arises. |
I pulled latest code, and it seems code has undergone changes since this set of change. |
Exactly this, yes! |
parent.resource.xxx. We can have following though: Correct me if I am wrong. |
technically |
I think we don't need check for resource scope, |
What is expected for: PARENT_DOT, SPAN_DOT, IDENTIFIER, END_ATTRIBUTE |
According to the spec this would be most correct:
|
Describe the bug
When executing this query:
We get this error:
To Reproduce
Steps to reproduce the behavior:
grafana/tempo:2.1.1
; other versions may be affected.resource.id
. The value of the attribute (probably) doesn't matter.{ span.resource.id = "" }
Expected behavior
No error is emitted.
Observed behaviour
An error is emitted:
Environment:
Additional Context
I believe this issue is isolated to span attributes prefixed with
resource.
. I'm guessing this kind of span attribute name tricks the TraceQL parser into believing that we are trying to search for a resource attribute.This query works:
This query fails:
Our application only emits a
resource.id
span attribute, so I've not tested with otherresource.*
attributes, but I would assume that the error is the same.This bug is not critical to us; we are likely going to rename the span attribute to resolve the issue. In hindsight, naming a span attribute
resource.id
was asking for trouble and not my brighest move 😅.The text was updated successfully, but these errors were encountered: