feat: add Sentry v2 structured storage, parser, and REST API#320
Merged
butschster merged 4 commits intomasterfrom Mar 31, 2026
Merged
feat: add Sentry v2 structured storage, parser, and REST API#320butschster merged 4 commits intomasterfrom
butschster merged 4 commits intomasterfrom
Conversation
Parse Sentry envelopes into typed tables (error events, exceptions, breadcrumbs, traces, transactions, spans, logs) with fingerprint-based grouping, span classification for service map, and 7 new REST endpoints. Transactions and standalone spans/logs are stored in structured tables only and do not create canonical feed events. Adds FRONTEND_DIR env var to serve frontend from disk during development.
This was
linked to
issues
Mar 31, 2026
When a request has an explicitly detected event type (e.g., sentry@host in DSN), stop the pipeline after the matching handler — even if it returns nil (no canonical event). HTTP dump catch-all now skips requests with a detected type that belongs to another module. Add pipeline integration tests verifying handler isolation for Sentry events, transactions, logs, sessions, Inspector, and unknown POST.
Previously only SDK v3 was fully supported. This fixes three issues:
1. SDK v4 always uses envelope format and omits event_id from the item
payload (only in envelope header). Events were invisible in the UI
because the frontend couldn't find event_id in the payload. Fix:
inject event_id from envelope header when missing.
2. SDK v2 sends timestamps as ISO 8601 strings ("2026-03-31T12:44:44Z")
instead of numeric epoch. json.Number rejected these, causing the
entire ErrorEvent unmarshal to fail silently — structured storage
was skipped. Fix: FlexibleTS type accepts both formats.
3. SDK v3/v4 parameterized messages use object form
{"message":"...", "params":[...], "formatted":"..."} which broke
string unmarshal. Fix: FlexibleMessage type accepts both forms.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Open
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.
What
Full rework of the Sentry module: parse all envelope item types into typed SQLite tables, expose REST API for exceptions, traces, logs, and service map.
Why
Enable structured querying, fingerprint-based grouping, trace waterfall visualization, and service dependency mapping for Sentry data — instead of storing everything as a JSON blob.
How
sentry_error_events,sentry_exceptions,sentry_breadcrumbs,sentry_traces,sentry_transactions,sentry_spans,sentry_logsevent,transaction,spans,log) to dedicated storage functionspeer_type/peer_addressfrom span attributes for service map/api/sentry/with pagination and filtersFRONTEND_DIRenv var for serving frontend from disk during developmentTesting
go test ./modules/sentry/... -timeout 30s— all pass