getsentry / rrweb

record and replay the web
https://www.rrweb.io/
Other
9 stars 5 forks source link

feat(replay): Catch exceptions from `getCanvasManager` #148

Closed billyvg closed 6 months ago

billyvg commented 6 months ago

Catches exceptions thrown from getCanvasManager and returns the Noop version so that replay recording can continue.

Fixes https://sentry.sentry.io/issues/4745239659/?project=11276

github-actions[bot] commented 6 months ago

size-limit report 📦

Path Size
rrweb - record only (gzipped) 16.59 KB (+0.16% 🔺)
rrweb - record & getCanvasManager only (gzipped) 19.16 KB (+0.15% 🔺)
rrweb - record only (min) 56.61 KB (+0.14% 🔺)
rrweb - record with treeshaking flags (gzipped) 15.37 KB (+0.16% 🔺)
mydea commented 6 months ago

Hmm, should we instead wrap this in the callback wrapper? This saves us the bytes for the console.warn log, and allows us to still bubble errors there up internally but swallow them for other users..?

billyvg commented 6 months ago

@mydea Actually we can't use callbackWrapper here since we need to catch the exception and return the noop interface.