feat: filterable traces (name, attribute, errors-only, min duration)#46
Merged
Conversation
The trace list could only filter by service + time. Bring it to parity with logs and add trace-specific dimensions: - root-span name substring - attribute key=value (matched against any span in the trace) - errors-only (traces with at least one error span) - min duration (find slow traces) Backend (list_traces): service + time still bound the span scan (index- friendly); the new filters are applied with HAVING so each trace's aggregates (duration, span/error counts) stay computed over the whole trace. Filters compose. UI: a filter bar on the traces view mirroring the logs one (service kept in the URL so service-map drill-downs still land here); the rest are local, debounced inputs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The trace list only filtered by service + time. This brings it to parity with logs and adds trace-specific dimensions.
Filters
key=value— matched against any span in the trace (JSONB containment)status_code = 2)All compose.
Backend (
list_traces)service+ time window still bound the spans scanned (index-friendly). The trace-level filters (name / attribute / errors / duration) are applied withHAVING, so each trace's aggregates — duration, span count, error count — stay computed over the whole trace rather than a filtered subset.UI
A filter bar on the traces view mirroring the logs one: a
serviceinput bound to the URL param, plus debounced local inputs for name,key=valueattribute, a min-ms number, and an errors-only checkbox.Tests
New
traces_filter_by_name_attr_errors_and_durationexercises each filter and a composed query (34 backend tests pass; UI type-check + build clean).🤖 Generated with Claude Code