Skip to content

Link structured logs with captured session replays - #1470

Merged
tustanivsky merged 2 commits into
mainfrom
feat/replay-logs-link
Jul 8, 2026
Merged

Link structured logs with captured session replays#1470
tustanivsky merged 2 commits into
mainfrom
feat/replay-logs-link

Conversation

@tustanivsky

@tustanivsky tustanivsky commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

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_id used for events):

  • sentry.replay_id - the session's replay id, allowing Sentry to associate logs with the corresponding replay
  • sentry._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 the buffer/onError mode in other SDKs)

Both attributes are set once during SDK initialization via the existing SetAttribute wrapper (sentry_set_attribute on native, Scope.setAttributeValue on 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: the Log* subsystem API, Blueprint calls, and the automatic UE log forwarding.

Example replay with linked logs.

Related items:

@tustanivsky
tustanivsky marked this pull request as ready for review July 8, 2026 13:06
@tustanivsky
tustanivsky merged commit 39f71b1 into main Jul 8, 2026
55 of 57 checks passed
@tustanivsky
tustanivsky deleted the feat/replay-logs-link branch July 8, 2026 13:44
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.

2 participants