Skip to content

Add experimental session replay capturing for Android#1386

Merged
tustanivsky merged 8 commits into
mainfrom
feat/android-session-replay
May 18, 2026
Merged

Add experimental session replay capturing for Android#1386
tustanivsky merged 8 commits into
mainfrom
feat/android-session-replay

Conversation

@tustanivsky
Copy link
Copy Markdown
Collaborator

@tustanivsky tustanivsky commented May 15, 2026

This PR adds Android session replay support, leveraging the new SurfaceView capture path introduced in sentry-java 8.41.0 (getsentry/sentry-java#5333) so that Unreal Engine's render surface is included in the captured video (previously SurfaceView regions appeared as transparent/black holes).

Example crash event with session replay captured on Android.

Key changes

  • Forward the existing AttachSessionReplay setting through the Android subsystem to the Java bridge.
  • When the setting is enabled, configure session replay with sessionSampleRate=1.0 and captureSurfaceViews=true.
  • Bundle the new sentry-android-replay AAR via UPL and add kotlin-stdlib-jdk8:1.9.24 to the Android Gradle dependencies
  • scripts/build-android.sh and scripts/build-deps.ps1 now also build and copy sentry-android-replay-release.aar.
  • Ported the sentry-native-ndk download step from build-android.sh to build-deps.ps1, so -Java is now a complete drop-in replacement for the CI-produced Android artifact (previously it wiped the directory without restoring native-ndk)

Limitations

Currently, frame rate and replay duration aren't configurable since sentry-java keeps these @ApiStatus.Internal with no public setters.

Related items

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against e9c9c33

@tustanivsky tustanivsky changed the title Add session replay for Android Add experimental session replay capturing for Android May 15, 2026
@tustanivsky tustanivsky marked this pull request as ready for review May 15, 2026 12:59
@tustanivsky tustanivsky marked this pull request as draft May 15, 2026 13:00
@tustanivsky tustanivsky marked this pull request as ready for review May 18, 2026 07:08
Copy link
Copy Markdown
Collaborator

@limbonaut limbonaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff!

@tustanivsky tustanivsky merged commit 012b2ea into main May 18, 2026
274 of 280 checks passed
@tustanivsky tustanivsky deleted the feat/android-session-replay branch May 18, 2026 17:43
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.

3 participants