sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Capture maps (google, mapbox, etc.) in Session Replay

Open romtsn opened this issue 9 months ago • 2 comments

Description

There's a discord thread about mapbox not working https://www.npmjs.com/package/@rnmapbox/maps. That's probably due to them doing rendering in native directly to opengl. My impression was that it's possible to capture this still, because I have seen google maps in some replays. But we'd have to investigate mapbox.

romtsn avatar Mar 26 '25 15:03 romtsn

Investigated this and the results are the following:

SDK / Strategy PixelCopy Canvas
Google Maps
Mapbox

So only PixelCopy + GoogleMaps is supported. Mapbox likely can't be captured because it uses a custom TextureView/GL stuff.

However, there's a way to capture those for both in both strategies I think, but we'll likely have to introduce a separate replay module that compilesOnly google maps and mapbox. Then at runtime we'd check if the hierarchy contains one of those, and then use the snapshot() API which both expose, and which returns a Bitmap snapshot of the current map view that we could use as replay frame.

I'm going to convert this issue into a feature request and backlog it for now.

romtsn avatar Nov 04 '25 21:11 romtsn

JAVA-221

linear[bot] avatar Nov 04 '25 21:11 linear[bot]