feat(ui): add filter bars to Errors and Logs tabs#1329
Conversation
Adds per-tab filtering on the top-level Errors and Logs views: - Errors: search by message/exception type, filter by level and exception type. - Logs: search by message body, filter by severity and logger name. Filtering is gated to the standalone tabs and left out of the in-trace error/log lists. The filter bar UI mirrors the existing trace filter, extracted into a shared ListFilter component. Fixes #1315
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 678 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 57.62% 59.68% +2.06%
==========================================
Files 49 53 +4
Lines 1602 1672 +70
Branches 1153 1204 +51
==========================================
+ Hits 924 994 +70
- Misses 678 678 —
- Partials 123 128 +5Generated by Codecov Action |
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 678 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 57.62% 59.77% +2.15%
==========================================
Files 49 53 +4
Lines 1602 1674 +72
Branches 1153 1204 +51
==========================================
+ Hits 924 996 +72
- Misses 678 678 —
- Partials 123 128 +5Generated by Codecov Action |
|
Out of draft — all checks are green (unit tests across Node 20/22/24, E2E UI, CodeQL, semgrep, build). Self-review is clean: the filter bar reuses the existing trace-filter pattern via a shared |
|
Not enabling auto-merge — this exceeds the threshold for an automated merge (599 lines changed across 9 files vs. the 150-line / 5-file cap for a new UI feature). Leaving it for a maintainer to review and merge. |
Active filters were a flat list of raw option strings, with each dimension inferred by membership in its option set. When the same string existed in two dimensions (e.g. a logger and a level both named "error"), selecting it in one dropdown applied it to both, forcing rows to satisfy every matching dimension. Namespace each option value as "<dimension>:<value>" so dropdowns stay independent, and resolve the human-readable label for the active-filter badges. Adds regression tests for both hooks.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 26cadfb. Configure here.
When active filters excluded every log, the early return rendered only the filter bar and empty state, dropping LogDetails. A direct link to /telemetry/logs/:id then never opened the side panel until the filters were cleared. Include LogDetails in that branch too.
MathurAditya724
left a comment
There was a problem hiding this comment.
I reviewed this against #1315. No blocking findings.
The PR correctly adds top-level Errors filtering by message/exception type/level and Logs filtering by message/logger/severity, while bypassing trace-scoped Errors/Logs lists. The hook tests cover query matching, dimension filters, same-value collisions across dimensions, and hidden empty option groups. GitHub CI is green, so I consider this mergeable.
Minor non-blocking risks:
packages/spotlight/src/ui/telemetry/hooks/useLogsFiltering.tsx:12-14only recognizes logger names fromattributes["sentry.logger.name"]; logs emitted with a different logger attribute would not expose a logger filter.- Filter state is local to the component, so filters reset on tab unmount/navigation/reload. That is acceptable because the issue did not require persistence.
ListFiltershows “Clear all” only for dropdown filters, not search-only filtering, though search still has its own clear button.

Adds per-tab filtering on the top-level Errors and Logs views (#1315). The Errors tab gets a search box (matches message + exception type/value) plus Level and Exception Type dropdowns; the Logs tab gets a search box (matches message body) plus Severity and Logger dropdowns. Filter options are derived from the data actually present, and dropdowns hide themselves when there's nothing to filter by.
Filtering is gated to the standalone tabs — the in-trace error/log lists are unchanged. The bar reuses the existing trace-filter UI pattern, extracted into a shared
ListFiltercomponent (traces left untouched to keep the diff focused; convergingTraceListFilterontoListFilteris a reasonable follow-up).Testing
vitest runfor the two new hook test files — 13 tests pass.vitest run: telemetry/UI suites green; the 21 failures inserver/utils/__tests__/docker-compose.test.tsare pre-existing onmainand unrelated.biome checkclean on all changed files.Closes #1315