TraceQL: unequal span attribute filter filters traces that do not contain the span attribute #2618
Labels
enhancement
New feature or request
keepalive
Label to exempt Issues / PRs from stale workflow
traceql
Describe the bug
A typical usecase of TraceQL is to find all traces for an app that do not match specific span attributes, e.g. all traces that do not contain the http path /my/uri. Such a TraceQL could be
{resource.app = "my-app" && span.http.target != "/my/uri"}
This works if all traces of the app 'my-app' contain a span.attribute 'http.target'. Unfortunately, traces that do not contain that span.attribute are also filtered out and aren't searchable anymore without a workaround like
{resource.app = "my-app" && (span.http.target !="/my/uri" || span.existing.attribute != "")}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
From my perspective, filtering should not filter traces that do not have the span.attribute.
Alternatively, TraceQL should provide a way to exclude traces from the result that match a condition. I am not aware of this functionality.
Environment:
Additional Context
The text was updated successfully, but these errors were encountered: