Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Aug 7, 2023

This shouldn't happen, but it makes sense to guard so we only clear the event buffer cache on checkouts when in buffer mode. I guess the behavior of rrweb is not 100% defined in that it cannot generate a new checkout in non-buffer mode 🤔 better safe than sorry.

FWIW I don't think that is the cause of our too-long-empty-replays issue right now, but 🤷 it doesn't hurt anyhow to be cautious here.

@mydea mydea added the Package: replay Issues related to the Sentry Replay SDK label Aug 7, 2023
@mydea mydea requested a review from billyvg August 7, 2023 10:58
@mydea mydea self-assigned this Aug 7, 2023
@mydea mydea requested a review from Lms24 August 7, 2023 11:14
@mydea mydea force-pushed the fn/replay-avoid-clear-buffer branch from e2149de to 9813ebd Compare August 7, 2023 13:02
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 74.86 KB (+0.01% 🔺)
@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.55 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.15 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.17 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 219.1 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 84.67 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 59.83 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.02 KB (+0.01% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 65.06 KB (+0.02% 🔺)
@sentry/react - Webpack (gzipped) 21.84 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 92.66 KB (+0.01% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 50.61 KB (0%)

@mydea mydea merged commit 4c6f62e into develop Aug 7, 2023
@mydea mydea deleted the fn/replay-avoid-clear-buffer branch August 7, 2023 13:40

try {
if (isCheckout) {
if (isCheckout && replay.recordingMode === 'buffer') {
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible we rely on this behavior in session mode as well?

e.g. when we call stopRecording, and then restart it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Package: replay Issues related to the Sentry Replay SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants