Skip to content

Include breadcrumbs in crash session replays on Apple platforms#1480

Open
tustanivsky wants to merge 8 commits into
mainfrom
feat/apple-replay-breadcrumbs
Open

Include breadcrumbs in crash session replays on Apple platforms#1480
tustanivsky wants to merge 8 commits into
mainfrom
feat/apple-replay-breadcrumbs

Conversation

@tustanivsky

@tustanivsky tustanivsky commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

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 breadcrumb custom events and embedded into the replay_recording payload 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: new BuildBreadcrumbEvents helper converts the crash event's breadcrumbs (already persisted at crash time and restored by the Cocoa SDK on relaunch) into rrweb type-5 events with tag: "breadcrumb" - outer timestamps in ms, payload timestamps in seconds, data sanitized for JSON; BuildReplayRecording appends them after the meta/video events.
  • FAppleSentryConverters::SentryLevelToString: new converter mapping SentryLevel to its canonical string name (inverse of the existing StringToSentryLevel).
  • The replay integration test now adds a couple of breadcrumbs right before crashing, and the desktop test suite fetches the replay's rrweb recording from Sentry to assert they were embedded with the expected payloads. This covers both the Cocoa path (macOS) and the sentry-native path (Windows/Linux) in CI.

Related items

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 tustanivsky changed the title Include breadcrumbs in crash session replays on Apple platforms Include breadcrumbs in crash session replays Jul 16, 2026
@tustanivsky tustanivsky changed the title Include breadcrumbs in crash session replays Include breadcrumbs in crash session replays on Apple platforms Jul 16, 2026
@tustanivsky
tustanivsky marked this pull request as ready for review July 17, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant