Skip to content

feat: add Sentry v2 UI — exceptions, traces, logs, service map#273

Merged
butschster merged 5 commits intomasterfrom
feat/sentry-v2-ui
Mar 31, 2026
Merged

feat: add Sentry v2 UI — exceptions, traces, logs, service map#273
butschster merged 5 commits intomasterfrom
feat/sentry-v2-ui

Conversation

@butschster
Copy link
Copy Markdown
Member

@butschster butschster commented Mar 31, 2026

Summary

Full Sentry v2 frontend implementation: sub-navigation with Exceptions / Traces / Logs tabs, grouped exceptions view, trace waterfall visualization, service map, Sentry native logs, and real-time WebSocket updates.

Sentry Section UI

  • Sub-navigation: [Exceptions N] [Traces N] [Logs N] with progressive tab visibility and real-time badge counts
  • Exceptions: Timeline mode (reuses existing feed) + Group by type mode (sorted by count)
  • Traces: Waterfall list with mini-waterfall preview cards + Service map (Vue Flow + Dagre)
  • Trace Detail: Full span waterfall with tree indentation, expandable attributes, Related Errors / Related Logs tabs
  • Logs: Level-filtered list with expandable attributes, trace links (shown only when trace exists)
  • Empty States: Contextual SDK setup snippets per tab

Routing

  • /sentry → redirects to /sentry/exceptions
  • /sentry/exceptions, /sentry/traces, /sentry/logs — sub-section pages
  • /sentry/traces/:traceId — trace detail
  • /sentry/event/:id — dedicated event detail route (avoids conflict with sentry parent route)
  • /sentry/:id → redirects to /sentry/event/:id (backward compat)

Bug Fixes

  • Related Errors link: Backend returned sentry_error_events.id instead of canonical events.event_id — fixed SQL query
  • Trace link in logs: Only shown when trace_exists=true (backend LEFT JOIN check)
  • Transactions in feed: Sentry transactions no longer appear as empty cards in the global event feed
  • 404 handling: event-page.vue now throws on null event (was silently showing empty page); router.replace for 404 (fixes "Go back" loop)
  • Breadcrumbs: Added Home / Sentry header to Sentry layout; fixed breadcrumb back link for /sentry/event/:id
  • Event cleanup: DELETE /api/sentry/all endpoint clears all structured tables; called on Clear Events (both WS and REST paths)
  • Real-time updates: Sentry sub-nav counts, grouped exceptions, traces list, and logs list refresh on WebSocket events (debounced 1s)
  • Preview card body: Fallback rendering when exception data is missing
  • HTTP error handling: fetchJSON checks response.ok; getSingle returns null on 404

SF-Dump Improvements

  • Replaced toolbar with right-click context menu (Expand all, Collapse all, Depth levels, Search, Copy, Stats)
  • Search bar appears only via Ctrl+F or context menu (sticky, Esc to close)
  • Fixed arrow (chevron) click toggle for deeply nested SVG elements

Design System Alignment

  • All new components match existing design language: border-l-[3px] accent stripes, text-2xs badges, bg-gray-50 dark:bg-gray-900 containers
  • Trace cards, exception group cards, waterfall, log rows — all use consistent borders (gray-200 dark:gray-700), hover states, and dark mode tokens
  • Focus-visible rings on all interactive elements

Backend Changes (in server/ repo)

  • api_traces.go: Fixed related_errors to return event_id (canonical UUID)
  • api_logs.go: Added trace_exists field via LEFT JOIN
  • handler.go: Filter transactions from canonical event feed; isTransaction() detection
  • api.go: Added DELETE /api/sentry/all cleanup endpoint
  • cors.go: CORS middleware with configurable origins (default: ["*"])
  • config.go: server.cors_origins config + CORS_ORIGINS env var

Test plan

  • 26 Playwright e2e tests covering all navigation flows (all passing)
  • TypeScript strict mode — no errors
  • Vite production build — no errors
  • Storybook build — no errors
  • Manual: send sentry exception → appears in Exceptions timeline
  • Manual: send sentry trace → appears in Traces list (NOT in global feed)
  • Manual: send sentry logs → appears in Logs list
  • Manual: click Related Errors in trace detail → opens event detail
  • Manual: right-click on sf-dump → context menu works
  • Manual: Ctrl+F on sf-dump → search bar appears
  • Manual: Clear Events → sentry structured tables also cleared

🤖 Generated with Claude Code

Add sub-navigation with progressive tab visibility, exceptions page
with timeline/grouped toggle, trace list with mini-waterfall cards,
full trace detail with span waterfall, service map via Vue Flow,
logs list with level filters, and contextual empty states with SDK
setup snippets.
@butschster butschster added the enhancement New feature or request label Mar 31, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

📸 Storybook Screenshots

Screenshots for 72 changed components in this PR.

Entities/Ray/RayLog

Default

Entities/Ray/RayLog / Default

Sf Dump

Entities/Ray/RayLog / Sf Dump

Zero

Entities/Ray/RayLog / Zero

Integer

Entities/Ray/RayLog / Integer

Empty String

Entities/Ray/RayLog / Empty String

Entities/Sentry/MiniWaterfall

Three Spans

Entities/Sentry/MiniWaterfall / Three Spans

Five Spans

Entities/Sentry/MiniWaterfall / Five Spans

With Error

Entities/Sentry/MiniWaterfall / With Error

Entities/Sentry/PreviewCard

Spiral

Entities/Sentry/PreviewCard / Spiral

Laravel

Entities/Sentry/PreviewCard / Laravel

Event

Entities/Sentry/PreviewCard / Event

JS Event

Entities/Sentry/PreviewCard / JS Event

Python

Entities/Sentry/PreviewCard / Python

Python Log

Entities/Sentry/PreviewCard / Python Log

With Occurrence Badge

Entities/Sentry/PreviewCard / With Occurrence Badge

Entities/Sentry/SentryEmptyState

Exceptions

Entities/Sentry/SentryEmptyState / Exceptions

Traces

Entities/Sentry/SentryEmptyState / Traces

Logs

Entities/Sentry/SentryEmptyState / Logs

Entities/Sentry/SentryExceptionGroupCard

Unhandled

Entities/Sentry/SentryExceptionGroupCard / Unhandled

Handled

Entities/Sentry/SentryExceptionGroupCard / Handled

Single Occurrence

Entities/Sentry/SentryExceptionGroupCard / Single Occurrence

Long Class Name

Entities/Sentry/SentryExceptionGroupCard / Long Class Name

Entities/Sentry/SentryLogRow

Info

Entities/Sentry/SentryLogRow / Info

Warning

Entities/Sentry/SentryLogRow / Warning

Error

Entities/Sentry/SentryLogRow / Error

Debug

Entities/Sentry/SentryLogRow / Debug

Entities/Sentry/SentryLogsList

Default

Entities/Sentry/SentryLogsList / Default

Loading

Entities/Sentry/SentryLogsList / Loading

Empty

Entities/Sentry/SentryLogsList / Empty

Entities/Sentry/SentryPageBreadcrumbs

Laravel

Entities/Sentry/SentryPageBreadcrumbs / Laravel

Spiral

Entities/Sentry/SentryPageBreadcrumbs / Spiral

Entities/Sentry/SentryPage

Page Common

Entities/Sentry/SentryPage / Page Common

Page Event

Entities/Sentry/SentryPage / Page Event

Page Laravel

Entities/Sentry/SentryPage / Page Laravel

Page Spiral

Entities/Sentry/SentryPage / Page Spiral

Page JS

Entities/Sentry/SentryPage / Page JS

Page JS Message

Entities/Sentry/SentryPage / Page JS Message

Page Python

Entities/Sentry/SentryPage / Page Python

Page Python Log

Entities/Sentry/SentryPage / Page Python Log

Entities/Sentry/SentrySubNav

Default

Entities/Sentry/SentrySubNav / Default

Entities/Sentry/TraceContextBlock

Default

Entities/Sentry/TraceContextBlock / Default

No Spans

Entities/Sentry/TraceContextBlock / No Spans

Entities/Sentry/TracePreviewCard

Default

Entities/Sentry/TracePreviewCard / Default

With Errors

Entities/Sentry/TracePreviewCard / With Errors

Long Transaction

Entities/Sentry/TracePreviewCard / Long Transaction

Entities/Sentry/TraceWaterfall

Default

Entities/Sentry/TraceWaterfall / Default

With Errors

Entities/Sentry/TraceWaterfall / With Errors

Empty

Entities/Sentry/TraceWaterfall / Empty

Screens/EventPage/EventPage

Default

Screens/EventPage/EventPage / Default

Screens/NotFound/NotFoundPage

Default

Screens/NotFound/NotFoundPage / Default

Screens/Sentry/SentryExceptionsPage

Default

Screens/Sentry/SentryExceptionsPage / Default

Screens/Sentry/SentryLogsPage

Default

Screens/Sentry/SentryLogsPage / Default

Screens/Sentry/SentryTraceDetailPage

Default

Screens/Sentry/SentryTraceDetailPage / Default

Screens/Sentry/SentryTracesPage

Default

Screens/Sentry/SentryTracesPage / Default

Shared/ValueDump

String

Shared/ValueDump / String

Boolean

Shared/ValueDump / Boolean

Sf Dump

Shared/ValueDump / Sf Dump

Widgets/EventCardMapper

Default

Widgets/EventCardMapper / Default

Monolog

Widgets/EventCardMapper / Monolog

Sentry

Widgets/EventCardMapper / Sentry

Smtp

Widgets/EventCardMapper / Smtp

Var Dump

Widgets/EventCardMapper / Var Dump

Profiler

Widgets/EventCardMapper / Profiler

Inspector

Widgets/EventCardMapper / Inspector

Http Dump

Widgets/EventCardMapper / Http Dump

Sms

Widgets/EventCardMapper / Sms

Sms With Warnings

Widgets/EventCardMapper / Sms With Warnings

Events List

Widgets/EventCardMapper / Events List

Events List Virtual

Widgets/EventCardMapper / Events List Virtual

Widgets/LayoutSidebar

Collapsed

Widgets/LayoutSidebar / Collapsed

Expanded

Widgets/LayoutSidebar / Expanded

Widgets/PageEventHeader

Default

Widgets/PageEventHeader / Default


Auto-generated from Storybook stories of changed .vue files

Update screenshot logic to capture `#storybook-root` content specifically, falling back to full viewport if unavailable.
@butschster butschster self-assigned this Mar 31, 2026
@butschster butschster moved this to In Progress in Buggregator Mar 31, 2026
butschster and others added 3 commits March 31, 2026 12:49
- Fix breadcrumbs on /sentry/event/:id (resolve type from loaded event)
- Add breadcrumb header to Sentry layout (Home / Sentry)
- Fix PageEventHeader back link for sentry event detail
- Clear sentry structured tables when events are cleared (via WS and REST)
- Add real-time WebSocket updates for Sentry sub-nav counts, grouped
  exceptions, traces list, and logs list (debounced 1s)
- Fix ReferenceError from computed accessing ref before declaration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove always-visible toolbar from sf-dump component
- Add right-click context menu with: expand/collapse all, depth
  levels, search, copy, and stats
- Search bar appears only via Ctrl+F or context menu (sticky, Esc to close)
- Fix arrow (chevron) click toggle using closest('a') for deep SVG nesting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Boolean values were showing raw "0"/"1" because the dumpBody
conversion was only used in CodeSnippet path. Now booleans render
with explicit true/false text and color-coded background
(green for true, red for false).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@butschster butschster merged commit 7f6fb90 into master Mar 31, 2026
1 of 2 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Buggregator Mar 31, 2026
@butschster butschster deleted the feat/sentry-v2-ui branch March 31, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant