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

upstream: Add config option to turn off all snapshotting and related observers #163

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Jan 31, 2024

  • Add config option to turn off all snapshotting and related observers
  • allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
  • could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)

Authored-by: eoghanmurray eoghanmurray@users.noreply.github.com
Co-authored-by: Justin Halsall Juice10@users.noreply.github.com

…rweb-io#1311)

* Add config option to turn off all snapshotting and related observers

 - allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
 - could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------

Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Copy link

github-actions bot commented Jan 31, 2024

size-limit report 📦

Path Size
rrweb - record only (gzipped) 16.89 KB (+0.32% 🔺)
rrweb - record & CanvasManager only (gzipped) 19.7 KB (+0.3% 🔺)
rrweb - record only (min) 57.47 KB (+0.21% 🔺)
rrweb - record with treeshaking flags (gzipped) 15.67 KB (+0.33% 🔺)

@billyvg billyvg changed the title Add config option to turn off all snapshotting and related observers (#1311) upstream: Add config option to turn off all snapshotting and related observers Jan 31, 2024
@billyvg
Copy link
Member Author

billyvg commented Jan 31, 2024

Ref rrweb-io#1311

@billyvg billyvg marked this pull request as ready for review January 31, 2024 17:16
@billyvg billyvg requested a review from a team January 31, 2024 17:16
if (o.recordDOM) {
styleSheetObserver = initStyleSheetObserver(o, { win: currentWindow });
adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);
styleDeclarationObserver = initStyleDeclarationObserver(o, {
Copy link
Member

Choose a reason for hiding this comment

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

what's this for?

Copy link
Member Author

Choose a reason for hiding this comment

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

@billyvg billyvg merged commit 3ff48e1 into sentry-v2 Apr 24, 2024
14 checks passed
@billyvg billyvg deleted the sentry-v2-config-turn-off-snapshotting branch April 24, 2024 19:57
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.

None yet

3 participants