Add integration with Session Replay product for Apple platforms - #1468
Merged
Conversation
Contributor
|
tustanivsky
marked this pull request as ready for review
July 8, 2026 07:39
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aa413ff. Configure here.
JoshuaMoelans
approved these changes
Jul 8, 2026
tustanivsky
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Jul 8, 2026
This PR updates the Unreal SDK Session Replay documentation now that the feature is fully integrated with the corresponding Sentry product. Related items: - getsentry/sentry-unreal#1445 - getsentry/sentry-unreal#1468
This was referenced Jul 8, 2026
2 tasks
billyvg
added a commit
to getsentry/sentry
that referenced
this pull request
Jul 8, 2026
…19235) ## What Adds `sentry.cocoa.unreal` to the `getPath()` switch in `configureReplayCard.tsx`, routing it to the same `apple/guides/ios` docs path as `sentry.cocoa`. ## Why `sentry-unreal` (see [sentry-unreal#1468](getsentry/sentry-unreal#1468)) embeds the Cocoa SDK to provide Session Replay on iOS builds of Unreal Engine games. That embedded SDK reports its name as `sentry.cocoa.unreal`. Because this name wasn't in the `getPath()` switch: - Every affected page load hit the `default` branch, firing `Sentry.captureMessage('Unknown mobile platform in configure card: sentry.cocoa.unreal')` - All three Configure Replay dropdown items (General / Masking / Identify Users) were disabled for those sessions The underlying replay implementation is the standard Cocoa SDK, so `apple/guides/ios` is the correct docs target. ## Changes - `configureReplayCard.tsx`: add `case 'sentry.cocoa.unreal':` as a fall-through to `case 'sentry.cocoa':` with an explanatory comment - `configureReplayCard.spec.tsx`: new test file covering `sentry.cocoa.unreal` → enabled menu items and no `captureMessage`, plus regression coverage for unknown SDK names ## Verification TypeScript compiler not available in sandbox; relied on manual review of the one-line fall-through change. CI will cover type checks and the new spec. Fixes JAVASCRIPT-3ARC <!-- junior-session-footer:start --> -- [View Junior Session in Sentry](https://sentry.sentry.io/explore/conversations/slack%3AC013P75SQUB%3A1783512585.309359/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
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 Session Replay product integration for platforms where sentry-cocoa is used (macOS and iOS). The gameplay recorded in the rolling buffer before a crash is now delivered to Sentry as a separate session replay envelope (discoverable in the Replays dashboard and associated with the crash) instead of only being attached to the event as an MP4 file. This closes the macOS limitation noted in #1445 and extends the integration to iOS.
Since sentry-cocoa sends crash reports on the next application launch, the replay envelope is assembled in-process within the
onLastRunStatusDeterminedcallback: the plugin reads the recorded MP4 and its JSON metadata sidecar, builds thereplay_event/replay_recordingpayloads, packs them together with the video into a msgpack payload (same wire format as sentry-cocoa's ownSentryMsgPackSerializerand the sentry-native implementation), and hands the envelope to the SDK for sending via the internal envelope API.Example replay captured on macOS.
Key Changes
AppleSentryReplayEnvelopewhich builds thereplay_videoenvelope from the recorded clip, its metadata sidecar, and the crash event from the previous app run, and captures it through sentry-cocoa's envelope API.GetLatestSessionReplaynow resolves both the replay video and its metadata sidecar, succeeding only when the latest pair belongs to the same replay.Testing
Documentation
Related items