feat: #857 link captured errors to the recorded session (1.11.0)#6
Merged
Conversation
Errors captured while replay is recording carry that session's id and capture timestamp (sessionId/capturedAt on /api/telemetry/errors), stamped at enqueue time so a batch spanning a rotation stays correct. New session-state.ts holds the id on globalThis (mirroring identity-state, so it survives CDN-ESM bundle splits); error-capture reads it without importing the rrweb-bearing replay module. Page-load errors are back-stamped when recording starts; failed starts scrub fresh-session stamps and clear the id; the queue flushes on page-hide. Reconciled onto origin's 1.9.4 replay rework (sequence reservation, idle continuity, firstChunkAcked, shared identity). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
8b92ef9 to
1563a30
Compare
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
Captured client errors now carry the recorded replay session they happened in (vulk-corp/bworlds #857). Ships as 1.11.0 — 1.10.0 was taken by the Supabase identity-bridge release; this is rebased on top of it (the two features are orthogonal).
sessionId+capturedAtonPOST /api/telemetry/errors, stamped at enqueue time so a batch spanning a rotation keeps each error on its true session. Additive fields.session-state.tsholds the active session id onglobalThis(survives CDN-ESM bundle splits);error-capture.tsreads it without importing the rrweb-bearing replay module.visibilitychange → hidden.Test plan
npm run build && npm run type-check && npm test— green (239 passed / 3 todo; coexists with the Supabase-bridge tests).latestSessionIdresolves). Origin's replay rework + the identity bridge behaved correctly.🤖 Generated with Claude Code