Summary
The Android SDK added experimental support for capturing SurfaceView content in Session Replay in sentry-java v8.41.0 (#5333). This allows replays to include content from components that render outside the normal View hierarchy — e.g. Unity views, video players, and map SDKs — which otherwise appear as black or transparent regions.
We already depend on sentry-android:8.41.0, but the captureSurfaceViews option is not bridged to the React Native SDK.
What needs to happen
- TypeScript: Add
captureSurfaceViews?: boolean to MobileReplayOptions in packages/core/src/js/replay/mobilereplay.ts
- Android: Read the option from
rnMobileReplayOptions in RNSentryStart.java and call androidReplayOptions.setCaptureSurfaceViews()
- iOS is not affected (Android-only feature)
Notes
Summary
The Android SDK added experimental support for capturing
SurfaceViewcontent in Session Replay in sentry-java v8.41.0 (#5333). This allows replays to include content from components that render outside the normal View hierarchy — e.g. Unity views, video players, and map SDKs — which otherwise appear as black or transparent regions.We already depend on
sentry-android:8.41.0, but thecaptureSurfaceViewsoption is not bridged to the React Native SDK.What needs to happen
captureSurfaceViews?: booleantoMobileReplayOptionsinpackages/core/src/js/replay/mobilereplay.tsrnMobileReplayOptionsinRNSentryStart.javaand callandroidReplayOptions.setCaptureSurfaceViews()Notes
SurfaceViewlevel only (cannot mask individual elements inside theSurfaceView)PixelCopyscreenshot strategy (the default)