Skip to content

feat: filterable traces (name, attribute, errors-only, min duration)#46

Merged
thejefflarson merged 1 commit into
mainfrom
trace-filters
Jun 8, 2026
Merged

feat: filterable traces (name, attribute, errors-only, min duration)#46
thejefflarson merged 1 commit into
mainfrom
trace-filters

Conversation

@thejefflarson

Copy link
Copy Markdown
Owner

The trace list only filtered by service + time. This brings it to parity with logs and adds trace-specific dimensions.

Filters

  • service (existing) — kept in the URL, so service-map drill-downs still land here
  • root-span name — substring match on the trace's root operation
  • attribute key=value — matched against any span in the trace (JSONB containment)
  • errors only — traces with at least one error span (status_code = 2)
  • min duration (ms) — find slow traces

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 with HAVING, 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 service input bound to the URL param, plus debounced local inputs for name, key=value attribute, a min-ms number, and an errors-only checkbox.

Tests

New traces_filter_by_name_attr_errors_and_duration exercises each filter and a composed query (34 backend tests pass; UI type-check + build clean).

🤖 Generated with Claude Code

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>
@thejefflarson thejefflarson merged commit f45f20b into main Jun 8, 2026
5 checks passed
@thejefflarson thejefflarson deleted the trace-filters branch June 8, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant