Include breadcrumbs in crash session replays on Apple platforms#1480
Open
tustanivsky wants to merge 8 commits into
Open
Include breadcrumbs in crash session replays on Apple platforms#1480tustanivsky wants to merge 8 commits into
tustanivsky wants to merge 8 commits into
Conversation
Convert the breadcrumbs carried by the crash event that fall inside the replay window into rrweb `breadcrumb` custom events and append them to the `replay_recording` payload built on relaunch after a crash, so they show up on the replay timeline. The crash event delivered by the Cocoa SDK already carries the breadcrumbs persisted at crash time, mirroring the behavior recently added to sentry-native for the other desktop platforms.
Temporary pin to getsentry/sentry-native#1875 so CI builds binaries that embed breadcrumbs into crash replay recordings; revert to a tagged release once it ships.
The replay test now adds a couple of breadcrumbs right before crashing, and the test suite fetches the replay recording from Sentry to assert they were embedded as rrweb breadcrumb events with the expected payloads. Bumps app-runner to bring in the replay recording segments API helper.
tustanivsky
marked this pull request as ready for review
July 17, 2026 09:54
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.
This PR adds breadcrumbs to crash session replays on Native and Apple platforms: breadcrumbs carried by the crash event that fall inside the replay window are converted into rrweb
breadcrumbcustom events and embedded into thereplay_recordingpayload built on relaunch, so they show up on the replay timeline. Together with getsentry/sentry-native#1875 (which covers all sentry-native backends) this also brings breadcrumb-enriched crash replays to all desktop platforms.Example replay with breadcrumbs included (Windows)
Example replay with breadcrumbs included (macOS)
Key changes
AppleSentryReplayEnvelope: newBuildBreadcrumbEventshelper converts the crash event's breadcrumbs (already persisted at crash time and restored by the Cocoa SDK on relaunch) into rrweb type-5 events withtag: "breadcrumb"- outer timestamps in ms, payload timestamps in seconds,datasanitized for JSON;BuildReplayRecordingappends them after the meta/video events.FAppleSentryConverters::SentryLevelToString: new converter mappingSentryLevelto its canonical string name (inverse of the existingStringToSentryLevel).Related items