-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(replay): Ensure dropped errors are removed from replay reference #6299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
size-limit report 📦
|
30619a0
to
93feea9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm on mobile atm, lmk if something is not clear and I can add a better explanation.
/** | ||
* We overwrite `client.recordDroppedEvent`, but store the original method here so we can restore it. | ||
*/ | ||
private _originalRecordDroppedEvent?: Client['recordDroppedEvent']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been omitting the underscore prefix with private members since it's marked as private already but since this seems to be a pattern in js sdk, maybe we should update the replay sdk to follow this pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is def. part of the todo list! :)
eb289af
to
553b49c
Compare
553b49c
to
e99110c
Compare
In replay, we attach errors that happened during replay-time via a global event handler.
However, due to various reasons some of these errors may be filtered out later. This leads to a weird user experience when there seem to be more errors that actually exist in sentry.
This PR fixes this (to a decent extend) by making sure we remove any error id that was actually dropped (due to rate limiting or because an integration/callback decided to drop it). For this, we monkey patch
recordDroppedEvent
.Closes #6285