-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(unreal): Add Session Replay feature #17880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tustanivsky
wants to merge
1
commit into
master
Choose a base branch
from
ue/session-replay
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+98
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| --- | ||
| title: Set Up Session Replay | ||
| sidebar_title: Session Replay | ||
| description: "Learn how to capture gameplay video and attach it to crash reports with Sentry's Unreal Engine SDK." | ||
| sidebar_order: 5500 | ||
| sidebar_section: features | ||
| --- | ||
|
|
||
| <Alert level="warning"> | ||
|
|
||
| Session Replay for Unreal Engine is **experimental** and currently limited to a small set of platforms (see [Platform Support](#platform-support)). The API and behavior may change in future releases. | ||
|
|
||
| </Alert> | ||
|
|
||
| Session Replay records what was happening on screen in the moments leading up to a crash, giving you a visual reproduction to pair with the captured event. | ||
|
|
||
| Unlike the [web](/platforms/javascript/session-replay/) and [mobile](/platforms/android/session-replay/) Session Replay experiences, which reconstruct the UI from the view hierarchy and aggressively mask text and images by default, the Unreal Engine SDK captures the rendered output of your game directly. On desktop and console, it continuously encodes the rendered frames into a short rolling video clip and attaches that clip to crash reports. On Android, the feature delegates to the underlying [Android SDK's Session Replay](/platforms/android/session-replay/). | ||
|
|
||
| ## Platform Support | ||
|
|
||
| | Platform | What gets captured | Requirements | | ||
| | ----------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | ||
| | **Windows** | A rolling video clip of the game's backbuffer, attached to crash reports. | The `AVCodecsCore` and `NVCodecs` plugins enabled, an NVIDIA GPU (NVENC), and a plugin rebuild after enabling (see [below](#windows)). | | ||
| | **Xbox** | An OS-captured gameplay clip, attached to crash reports. | Development kits only. | | ||
| | **Android** | A full-session replay via the Android SDK, with default text and image masking. | None beyond the standard Android setup. | | ||
|
|
||
| All other platforms (Linux, macOS, iOS, PlayStation, and Nintendo Switch) are not currently supported. On those platforms the setting is a no-op. | ||
|
|
||
| ## Enabling Session Replay | ||
|
|
||
| To enable Session Replay, navigate to **Project Settings > Plugins > Sentry** and expand the **Session Replay** section, then toggle **Enable session replay (experimental)**. | ||
|
|
||
| Alternatively, add the following to your project's configuration `.ini` file: | ||
|
|
||
| ```ini | ||
| [/Script/Sentry.SentrySettings] | ||
| AttachSessionReplay=True | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| The following settings are available under the **Session Replay** section in the plugin settings: | ||
|
|
||
| - **Enable session replay (experimental)** (`AttachSessionReplay`, default `False`) — Master toggle for the feature. | ||
| - **Replay duration (ms)** (`SessionReplayDurationMs`, default `5000`, range `1000`–`60000`) — The requested length of the retroactive replay window. On Windows this is the rolling clip length kept on disk for crash attachment; on Xbox it's the requested length of the OS-captured clip (which may be shorter if not enough frames are buffered). This value is ignored on Android, where the underlying SDK determines the duration. | ||
|
|
||
| ### Advanced Recording Options (Windows) | ||
|
|
||
| The **Advanced recording options (Windows)** group (`SessionReplayOptions`) provides low-level encoder and muxer tuning for the Windows recorder. The defaults are sensible for most projects. | ||
|
|
||
| - **Fragment duration (seconds)** (`FragmentSeconds`, default `0.5`, range `0.1`–`2.0`) — Length of each video fragment. Shorter values reduce the worst-case amount of footage lost at crash time, but increase keyframe frequency and lower compression efficiency. | ||
| - **Rotation interval (seconds)** (`RotationIntervalSeconds`, default `1.0`, range `0.25`–`5.0`) — How often the on-disk attachment file is refreshed. | ||
| - **Target framerate** (`Framerate`, default `30`, range `10`–`60`) — Capture framerate. The game can render faster; frames are sampled down to this rate. | ||
| - **Target bitrate (kbps)** (`BitrateKbps`, default `2000`, range `200`–`20000`) — Encoder target bitrate. | ||
|
|
||
| ```ini | ||
| [/Script/Sentry.SentrySettings] | ||
| AttachSessionReplay=True | ||
| SessionReplayDurationMs=5000 | ||
| SessionReplayOptions=(FragmentSeconds=0.500000,RotationIntervalSeconds=1.000000,Framerate=30,BitrateKbps=2000) | ||
| ``` | ||
|
|
||
| ## Platform Notes | ||
|
|
||
| ### Windows | ||
|
|
||
| On Windows, Session Replay continuously encodes the game's backbuffer into a rolling video clip that's attached to crash reports captured by the native crash handler. It relies on hardware-accelerated H.264 encoding and has the following requirements: | ||
|
|
||
| - **The `AVCodecsCore` and `NVCodecs` engine plugins must be enabled** in your project. The Sentry plugin only compiles the recorder when these are present. | ||
| - **An NVIDIA GPU is required.** Encoding goes through NVIDIA NVENC; machines without a compatible NVIDIA GPU fall back to no recording (the feature self-disables and logs a warning). | ||
| - **A plugin rebuild is required after toggling the setting.** Whether Session Replay is compiled in is decided at build time from `AttachSessionReplay`, so after enabling or disabling it, delete your project's `Binaries` and `Intermediate` directories and rebuild. | ||
|
|
||
| <Alert> | ||
|
|
||
| The most recent fraction of a second of footage (up to one fragment duration) may be missing from the attached clip, since the fragment being encoded at the moment of the crash isn't yet finalized. | ||
|
|
||
| </Alert> | ||
|
|
||
| ### Xbox | ||
|
|
||
| On Xbox, Session Replay uses the operating system's game-capture facility to grab a clip of recent gameplay at crash time. This is supported on **development kits only** and is not available in retail builds. | ||
|
|
||
| ### Android | ||
|
|
||
| On Android, enabling the setting turns on the [Android SDK's Session Replay](/platforms/android/session-replay/), recording the full session rather than a crash-attached clip. As with the standalone Android SDK, all text and images are masked by default. See the [Android Session Replay docs](/platforms/android/session-replay/) for details on masking, sampling, and privacy. | ||
|
|
||
| ## Privacy | ||
|
|
||
| <Alert level="warning"> | ||
|
|
||
| On Windows and Xbox, Session Replay records the rendered game frames as-is — there is **no automatic masking**. Any sensitive information shown on screen (player names, chat, email addresses, in-game purchases, and so on) will be present in the captured video. Only enable this feature if the content rendered by your game is safe to record, and make sure your data-handling and privacy policies account for it. | ||
|
|
||
| </Alert> | ||
|
|
||
| On Android, the underlying SDK masks all text and images by default. Review the [Android Session Replay privacy documentation](/platforms/android/session-replay/privacy/) before adjusting those defaults. | ||
|
|
||
| If you run into issues or have feedback about Session Replay on Unreal Engine, please open a [GitHub issue](https://github.com/getsentry/sentry-unreal/issues). | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could mark it with the green
newicon (like we used for metrics/logs) maybe? not sure if allowed if the product itself isn't new, but only the platform is 🤔