sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

fix(replay): Mask SVGs from `react-native-svg` when `maskAllVectors=true`

Open krystofwoldrich opened this issue 1 year ago • 4 comments

:loudspeaker: Type of change

  • [x] Bugfix

:scroll: Description

This PR fixes visible SVG from react-native-svg the most popular library for handling SVGs in RN. RN doesn't have a built in support for SVGs.

🛑 Blocked by

  • https://github.com/getsentry/sentry-java/pull/3546

:bulb: Motivation and Context

Web hides SVGs by default when masking all media.

:green_heart: How did you test it?

rn sample app

:pencil: Checklist

  • [x] I reviewed submitted code
  • [ ] I added tests to verify changes
  • [x] No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • [x] All tests passing
  • [x] No breaking changes

krystofwoldrich avatar Jul 02 '24 14:07 krystofwoldrich

Android (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 432.58 ms 465.77 ms 33.18 ms
Size 17.73 MiB 20.04 MiB 2.31 MiB

Baseline results on branch: feat/replay

Startup times

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de 429.33 ms 451.24 ms 21.91 ms
376301c0b4714309405998099f97f661f10e8375 445.52 ms 474.70 ms 29.18 ms
063bfcee71b276ada63ad5e92c21b6ad648543fe 469.96 ms 516.38 ms 46.42 ms
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2 422.50 ms 465.69 ms 43.19 ms

App size

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de 17.73 MiB 20.04 MiB 2.30 MiB
376301c0b4714309405998099f97f661f10e8375 17.73 MiB 20.04 MiB 2.30 MiB
063bfcee71b276ada63ad5e92c21b6ad648543fe 17.73 MiB 20.04 MiB 2.30 MiB
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2 17.73 MiB 20.04 MiB 2.31 MiB

Previous results on branch: kw/add-rn-svg-block

Startup times

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53 484.08 ms 540.62 ms 56.54 ms

App size

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53 17.73 MiB 20.04 MiB 2.30 MiB

github-actions[bot] avatar Jul 02 '24 14:07 github-actions[bot]

Android (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 386.49 ms 403.92 ms 17.43 ms
Size 7.15 MiB 8.32 MiB 1.17 MiB

Baseline results on branch: feat/replay

Startup times

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de+dirty 374.57 ms 415.25 ms 40.68 ms
063bfcee71b276ada63ad5e92c21b6ad648543fe+dirty 338.00 ms 369.88 ms 31.88 ms
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2+dirty 391.15 ms 446.94 ms 55.79 ms
376301c0b4714309405998099f97f661f10e8375+dirty 353.80 ms 388.54 ms 34.74 ms

App size

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de+dirty 7.15 MiB 8.31 MiB 1.16 MiB
063bfcee71b276ada63ad5e92c21b6ad648543fe+dirty 7.15 MiB 8.31 MiB 1.17 MiB
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2+dirty 7.15 MiB 8.32 MiB 1.17 MiB
376301c0b4714309405998099f97f661f10e8375+dirty 7.15 MiB 8.31 MiB 1.17 MiB

Previous results on branch: kw/add-rn-svg-block

Startup times

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53+dirty 513.88 ms 552.51 ms 38.63 ms

App size

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53+dirty 7.15 MiB 8.31 MiB 1.17 MiB

github-actions[bot] avatar Jul 02 '24 14:07 github-actions[bot]

iOS (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1240.37 ms 1243.65 ms 3.29 ms
Size 2.36 MiB 3.05 MiB 703.34 KiB

Baseline results on branch: feat/replay

Startup times

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de+dirty 1207.36 ms 1210.32 ms 2.96 ms
376301c0b4714309405998099f97f661f10e8375+dirty 1215.73 ms 1219.80 ms 4.06 ms
063bfcee71b276ada63ad5e92c21b6ad648543fe+dirty 1224.27 ms 1219.66 ms -4.61 ms
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2+dirty 1221.27 ms 1223.08 ms 1.81 ms

App size

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de+dirty 2.36 MiB 3.04 MiB 698.69 KiB
376301c0b4714309405998099f97f661f10e8375+dirty 2.36 MiB 3.05 MiB 702.83 KiB
063bfcee71b276ada63ad5e92c21b6ad648543fe+dirty 2.36 MiB 3.05 MiB 702.78 KiB
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2+dirty 2.36 MiB 3.05 MiB 703.38 KiB

Previous results on branch: kw/add-rn-svg-block

Startup times

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53+dirty 1223.82 ms 1223.50 ms -0.32 ms

App size

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53+dirty 2.36 MiB 3.05 MiB 703.10 KiB

github-actions[bot] avatar Jul 02 '24 14:07 github-actions[bot]

iOS (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1234.96 ms 1234.13 ms -0.83 ms
Size 2.92 MiB 3.61 MiB 710.32 KiB

Baseline results on branch: feat/replay

Startup times

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de+dirty 1208.60 ms 1210.47 ms 1.87 ms
376301c0b4714309405998099f97f661f10e8375+dirty 1224.74 ms 1227.00 ms 2.26 ms
063bfcee71b276ada63ad5e92c21b6ad648543fe+dirty 1225.38 ms 1218.06 ms -7.31 ms
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2+dirty 1227.53 ms 1231.76 ms 4.22 ms

App size

Revision Plain With Sentry Diff
41db11d8196b65bca2dd47a43699f03809c383de+dirty 2.92 MiB 3.61 MiB 705.84 KiB
376301c0b4714309405998099f97f661f10e8375+dirty 2.92 MiB 3.61 MiB 709.95 KiB
063bfcee71b276ada63ad5e92c21b6ad648543fe+dirty 2.92 MiB 3.61 MiB 710.22 KiB
52f5e03f3090b7bdf699476e3ed3bc3d8b9afbe2+dirty 2.92 MiB 3.61 MiB 710.43 KiB

Previous results on branch: kw/add-rn-svg-block

Startup times

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53+dirty 1227.11 ms 1227.53 ms 0.42 ms

App size

Revision Plain With Sentry Diff
e13a34b6cf189334901764583e52de3b27bbad53+dirty 2.92 MiB 3.61 MiB 710.15 KiB

github-actions[bot] avatar Jul 02 '24 14:07 github-actions[bot]