Link structured logs with captured session replays - #1470
Merged
Conversation
tustanivsky
marked this pull request as ready for review
July 8, 2026 13:06
JoshuaMoelans
approved these changes
Jul 8, 2026
2 tasks
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 automatic linking between structured logs and captured session replays on platforms where the plugin provides its own replay recording - desktop (
sentry-native) and Apple (sentry-cocoa).When session replay capturing is enabled and the recorder initializes successfully, the SDK now sets two scope-level log attributes (in addition to the existing
contexts.replay.replay_idused for events):sentry.replay_id- the session's replay id, allowing Sentry to associate logs with the corresponding replaysentry._internal.replay_is_buffering: true- marks the replay link as provisional, since the Unreal SDK records replays into a local rolling video file and uploads them only when a crash occurs (equivalent to thebuffer/onErrormode in other SDKs)Both attributes are set once during SDK initialization via the existing
SetAttributewrapper (sentry_set_attributeon native,Scope.setAttributeValueon cocoa). The underlying SDKs automatically apply scope attributes to every log at capture time, so there is no per-log overhead. This works for all log sources: theLog*subsystem API, Blueprint calls, and the automatic UE log forwarding.Example replay with linked logs.
Related items: