[Feature Request] Trace-level AND search across spans
@brandon-pereira is already working on this.
Since Sep 18, 2026.
- Dominant language
- TypeScript
- Stars
- 9.9k
- Forks
- 471
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 117
Description
Summary
The search bar evaluates AND at the span/row level. There is no way to express a trace-level filter: return traces where property A appears on some span and property B appears on a (possibly different) span in the same trace.
That is a common query when correlation IDs are stamped once at the edge and service name (or other attributes) live on downstream spans.
Problem
A query like:
SpanAttributes.tuid:"abc123" AND ServiceName:checkout-service
Expected (Jaeger / Haystack / many APM UIs): traces that contain both predicates, even if they sit on different spans.
Actual: 0 results unless a single span has both fields.
This is easy to misread as a bug. The search bar is doing what it was built to do — filtering rows. The gap is that trace-level, cross-span AND is not expressible there.
Why this happens
Typical OpenTelemetry instrumentation stamps a correlation ID (request ID, tenant ID, user ID, etc.) on the gateway/entry span. Downstream services appear as separate spans in the same trace and often do not copy that ID onto every child.
So a real trace can look like:
| Span | ServiceName | tuid |
|---|---|---|
| entry | gateway-service | abc123 |
| child | checkout-service | (unset) |
- Trace-level
ANDmatches this trace - Span-level
ANDmatches nothing
Current workaround
Intersect two TraceId sets outside the where bar:
TraceIds where any span hastuid = XTraceIds where any span hasServiceName = Y- Fetch full traces for the intersection
That works against ClickHouse, but it is not something a user can do from the search bar.
Proposed behavior
Support a trace-scoped search mode (or syntax) where boolean operators apply at the trace:
A AND B→ traces that contain a span matching A and a span matching B- Keep today’s span-level
ANDas an explicit mode, since it is still useful (“this span is slow and this span ischeckout-service”)
Jaeger, Haystack, and several commercial APM products default to the trace-level interpretation for this class of query.
Additional context
Verified directly in ClickHouse on otel_traces-style data: the traces exist; no single row satisfies both predicates. Happy to share a minimal SQL sketch of the TraceId intersection if useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.