sentry icon indicating copy to clipboard operation
sentry copied to clipboard

ref(replays): Clean up RRWeb event parsing logic

Open cmanallen opened this issue 7 months ago • 1 comments

As we mess around with extracting data from RRWeb we need more robust methods of handling the data. The previous code was adhoc and was breakable given a sufficiently motivated person wanted to break it. It didn't break because the SDK has a limited range of event-formats it provides but that does not imply that no one could send bad events in the future.

We naively parse the events and if parsing fails we handled the exception.

cmanallen avatar Jun 13 '25 16:06 cmanallen

Codecov Report

Attention: Patch coverage is 91.34615% with 18 lines in your changes missing coverage. Please review.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/replays/usecases/ingest/event_parser.py 89.02% 18 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #93517      +/-   ##
==========================================
- Coverage   88.02%   88.02%   -0.01%     
==========================================
  Files       10331    10329       -2     
  Lines      596378   596143     -235     
  Branches    23160    23107      -53     
==========================================
- Hits       524976   524737     -239     
- Misses      70946    70957      +11     
+ Partials      456      449       -7     

codecov[bot] avatar Jun 13 '25 16:06 codecov[bot]