Skip to content
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] Arbitrary math with static values and attributes does not work #3491

Open
joe-elliott opened this issue Mar 14, 2024 · 0 comments
Open
Labels
area/query keepalive Label to exempt Issues / PRs from stale workflow traceql type/bug Something isn't working

Comments

@joe-elliott
Copy link
Member

Describe the bug

Queries like the following will fail:

{span.http.status_code + 100 > 3}

with an error like:

unknown operation. condition: {Attribute:span.http.status_code Op:+ Operands:[100]}

The issue is that the engine creates the bad condition here:

request.appendCondition(Condition{

and the fetch layer rejects it here while trying to build a predicate:

return fmt.Errorf("unknown operation. condition: %+v", cond)

There are a couple of fixes, but the most straightforward one would be to produce an OpNone condition in the engine asking for the span.http.status_code field.

@joe-elliott joe-elliott added type/bug Something isn't working keepalive Label to exempt Issues / PRs from stale workflow traceql area/query labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/query keepalive Label to exempt Issues / PRs from stale workflow traceql type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant