Skip to content
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

feat: Add onMutation option to record #70

Merged
merged 1 commit into from
Feb 28, 2023
Merged

feat: Add onMutation option to record #70

merged 1 commit into from
Feb 28, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Feb 28, 2023

When this callback returns false, we skip handling the mutations normally. It's up to the host app to do something with this then.

Replaces #58

callbackWrapper((mutations) => {
// If this callback returns `false`, we do not want to process the mutations
// This can be used to e.g. do a manual full snapshot when mutations become too large, or similar.
if (options.onMutation && options.onMutation(mutations) === false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the idea is that we then trigger this full snapshot from the Replay integration, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jup, we can control what to do from replay then!

@mydea mydea merged commit 209abfe into sentry-v1 Feb 28, 2023
@mydea mydea deleted the fn/onMutation branch February 28, 2023 14:35
billyvg pushed a commit that referenced this pull request Jul 24, 2023
When this callback returns `false`, we skip handling the mutations
normally. It's up to the host app to do something with this then.
billyvg pushed a commit that referenced this pull request Jul 29, 2023
When this callback returns `false`, we skip handling the mutations
normally. It's up to the host app to do something with this then.
@billyvg billyvg mentioned this pull request Aug 1, 2023
billyvg pushed a commit that referenced this pull request Aug 7, 2023
When this callback returns `false`, we skip handling the mutations
normally. It's up to the host app to do something with this then.
billyvg pushed a commit that referenced this pull request Aug 7, 2023
When this callback returns `false`, we skip handling the mutations
normally. It's up to the host app to do something with this then.
billyvg pushed a commit that referenced this pull request Aug 8, 2023
When this callback returns `false`, we skip handling the mutations
normally. It's up to the host app to do something with this then.
billyvg pushed a commit that referenced this pull request Aug 30, 2023
When this callback returns `false`, we skip handling the mutations
normally. It's up to the host app to do something with this then.
@billyvg billyvg mentioned this pull request Sep 20, 2023
billyvg added a commit that referenced this pull request Sep 21, 2023
Brings this library up to date w/ upstream. Includes additional commits for enhanced privacy and Sentry release workflows.

Cherry picks include the following upstream PRs:

* rrweb-io#1096
* rrweb-io#1155
* rrweb-io#1257
* rrweb-io#1262


Cherry picks from getsentry fork:
* #70
* #103
*
064d8c4
*
e274f88
*
cffefa2
* #20

---------

Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
Co-authored-by: mdellanoce <mdellanoce@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
billyvg added a commit that referenced this pull request Oct 20, 2023
Brings this library up to date w/ upstream. Includes additional commits for enhanced privacy and Sentry release workflows.

Cherry picks include the following upstream PRs:

* rrweb-io#1096
* rrweb-io#1155
* rrweb-io#1257
* rrweb-io#1262

Cherry picks from getsentry fork:
* #70
* #103
*
064d8c4
*
e274f88
*
cffefa2
* #20

---------

Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
Co-authored-by: mdellanoce <mdellanoce@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
billyvg added a commit that referenced this pull request Apr 26, 2024
Brings this library up to date w/ upstream. Includes additional commits for enhanced privacy and Sentry release workflows.

Cherry picks include the following upstream PRs:

* rrweb-io#1096
* rrweb-io#1155
* rrweb-io#1257
* rrweb-io#1262

Cherry picks from getsentry fork:
* #70
* #103
*
064d8c4
*
e274f88
*
cffefa2
* #20

---------

Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
Co-authored-by: mdellanoce <mdellanoce@users.noreply.github.com>
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants