SentryIvan TustanivskyiAnnouncement
Session Replay for Unreal Engine: see the crash before the crash
Summary
Crash reports in non-deterministic game environments often lack player context, making callstack-only debugging difficult. Sentry's SDK version 1.16.0 for Unreal Engine introduces Session Replay to continuously record gameplay and attach the final video clip directly to crash reports. The cross-platform recording pipeline hooks into Slate's backbuffer presentation on the render thread, uses engine pixel shaders for format conversion, and feeds frames to hardware H.264 encoders via Unreal's AVCodecs plugins. Encoded fragments are organized in a rolling ring buffer and periodically written to temporary MP4 files that are uploaded alongside crash data. Benchmark results in a 4K demo game showed an overhead of approximately 0.20 ms per frame.
Context
Crash reports in games frequently offer stack traces without showing what the player was doing, making non-deterministic gameplay bugs hard for QA to reproduce and developers to diagnose from core dumps alone.
Approach / What changed
Sentry built a cross-platform Unreal-native recording pipeline that hooks Slate's OnBackBufferReadyToPresent, converts backbuffer formats via pixel shaders or GPU copies, passes frames to vendor hardware H.264 encoders using AVCodecs, and maintains a rolling ring buffer of MP4 fragments to upload upon a crash.
Takeaways
Profiling a demo game at 4K resolution showed Session Replay added about 0.20 ms of frame time overhead (roughly 1.2 percent of a 16.7 ms frame budget at 60 FPS).
The recording pipeline dynamically selects hardware encoders at runtime based on the GPU (NVENC, AMF, or VideoToolbox) and automatically disables itself if no compatible hardware encoder exists.
The feature currently does not support automatic masking, meaning all on-screen content including player names and chat is recorded directly into the video.
Source and freshness
- Source
- blog.sentry.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.