You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse Sentry transaction envelope items in TrapFall so performance data (latency, spans, DB queries) is captured, stored, and displayed in the dashboard.
Context
TrapFall currently only parses event envelope items (errors). All other item types — including transaction — are silently dropped in envelope.rs:83. The Sentry Rust SDK emits transaction items when SentryHttpLayer::new().enable_transaction() is used with the tower feature.
Goal
Parse Sentry
transactionenvelope items in TrapFall so performance data (latency, spans, DB queries) is captured, stored, and displayed in the dashboard.Context
TrapFall currently only parses
eventenvelope items (errors). All other item types — includingtransaction— are silently dropped inenvelope.rs:83. The Sentry Rust SDK emits transaction items whenSentryHttpLayer::new().enable_transaction()is used with thetowerfeature.Transaction Payload (from SDK)
{ "event_id": "uuid", "transaction": "POST /api/feedback", "start_timestamp": 1703894474.296, "timestamp": 1703894474.891, "release": "rungu@0.2.0", "environment": "production", "spans": [ { "span_id": "...", "trace_id": "...", "op": "db.sql.select", "description": "SELECT * FROM feedback WHERE ...", "start_timestamp": 1703894474.300, "timestamp": 1703894474.450, "status": "ok" } ] }Tasks
1a.
trapfall-proto— Wire typesTransactionstruct:event_id,transaction(name),start_timestamp,timestamp,release,environment,spans: Vec<Span>,contexts,request,tags,extraSpanstruct:span_id,trace_id,parent_span_id,op,description,start_timestamp,timestamp,status,tags,dataSpanStatusenum:ok,deadline_exceeded,cancelled,unknown_error,internal_error,resource_exhausted, etc.ParsedEnvelopereturn type (replacesVec<Event>)1b.
trapfall-ingest— Parserparse_envelope()return type:Result<Vec<Event>>→Result<ParsedEnvelope>parse_envelope_text():if item_type == "transaction" { parse Transaction }parse_envelope()to useParsedEnvelope1c.
trapfall-db— Schema + queriestransactionsandtransaction_spanstablesinsert_transaction(),list_transactions(),get_transaction()queriesget_slowest_transactions()— top N by duration (for dashboard)1d.
trapfalld— Handler + WebSocketServerMessageenum withTransactionReceivedvariant1e. Dashboard — Performance UI
Dependencies
parse_envelope()return type — all consumers must updateEffort
~2-3 days
Sub-issues: