Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(replay): Update rrweb to 1.105.0 & add breadcrumb when encountering large mutation#7314
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
355be04624ffb7fd732a56d60303e29e310dc19c9fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -198,6 +198,23 @@ export class ReplayContainer implements ReplayContainerInterface { | ||
| // instead, we'll always keep the last 60 seconds of replay before an error happened | ||
| ...(this.recordingMode === 'error' && { checkoutEveryNms: ERROR_CHECKOUT_TIME }), | ||
| emit: this._handleRecordingEmit, | ||
| onMutation: (mutations: unknown[]) => { | ||
| if (this._options._experiments.captureMutationSize) { | ||
| const count = mutations.length; | ||
| if (count > 500) { | ||
| const breadcrumb = createBreadcrumb({ | ||
| category: 'replay.mutations', | ||
| data: { | ||
| count, | ||
| }, | ||
| }); | ||
| this._createCustomBreadcrumb(breadcrumb); | ||
| } | ||
| } | ||
| // `true` means we use the regular mutation handling by rrweb | ||
| return true; | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a comment on why we return true here? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to be sure, will this be shown in the UI automatically or does that need changes in the UI to be reflected? Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm let me double check the breadcrumbs, iirc we just display them all
| ||
| }, | ||
| }); | ||
| } catch (err) { | ||
| this._handleException(err); | ||
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 think you should be able to
import {mutationRecord} from '@sentry-internal/rrweb'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.
IMHO we can leave this as unknown as we really don't care about what type of array that is (for now), one less import to care about 😅