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

fix(replay): Handle multiple clicks in a short time #8773

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 9, 2023

We assumed that the click debounce should only let one click per second through. however, that does not work if clicking different elements quickly (as it only debounces a single click/element). This adds a guard to ensure we only handle a single click breadcrumb per second.

Fixes getsentry/sentry#54293

@mydea mydea requested a review from billyvg August 9, 2023 15:22
@mydea mydea self-assigned this Aug 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 75.03 KB (+0.24% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.11 KB (0%)
@sentry/browser - Webpack (gzipped) 21.81 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 69.64 KB (+0.14% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.16 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.18 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 219.51 KB (+0.21% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 84.69 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 59.86 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.03 KB (+0.04% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 65.24 KB (+0.28% 🔺)
@sentry/react - Webpack (gzipped) 21.84 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 92.86 KB (+0.23% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 50.64 KB (+0.06% 🔺)

Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

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

In the test case only breadcrumb 1 & 3 get captured right?

@mydea mydea force-pushed the fn/debounce-clicks branch from 0a21022 to b118e92 Compare August 10, 2023 08:33
@mydea
Copy link
Member Author

mydea commented Aug 10, 2023

In the test case only breadcrumb 1 & 3 get captured right?

Jup, I actually adjusted the test to make this clear (by adding the exact timestamps)!

@mydea mydea merged commit f83b906 into develop Aug 10, 2023
@mydea mydea deleted the fn/debounce-clicks branch August 10, 2023 09:36
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.

Trio of events seen in replay timeline
2 participants