Skip to content

feat(replay): Track pending events in EventBuffer #6699

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

Merged
merged 5 commits into from
Jan 11, 2023

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Jan 10, 2023

  • Track raw pending events in EventBuffer. This can be helpful in the case
    where page is reloaded before the worker has a chance to close the compression
    stream.
  • Change EventBuffer.length to EventBuffer.pendingLength to better reflect
    what it is. In the case of compression worker, it is async, so recent events
    added to the buffer are not necessarily present in the workers compression
    stream.

Requires #6696, #6695

@billyvg billyvg changed the base branch from master to feat-replay-change-addevent-to-be-async January 10, 2023 00:52
@billyvg billyvg changed the title feat replay eventbuffer save pending events feat(replay): Track pending events in EventBuffer Jan 10, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.84 KB (-0.02% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 61.46 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.61 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 55 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.38 KB (0%)
@sentry/browser - Webpack (minified) 66.55 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.4 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.63 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.82 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.25 KB (-0.02% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.13 KB (+0.11% 🔺)
@sentry/replay - Webpack (gzipped + minified) 38.33 KB (+0.11% 🔺)

@billyvg billyvg requested review from mydea and Lms24 January 10, 2023 04:08
@billyvg billyvg force-pushed the feat-replay-eventbuffer-save-pending-events branch from c58b7c0 to efa539c Compare January 11, 2023 01:52
@mydea
Copy link
Member

mydea commented Jan 11, 2023

Do I understand correctly, this doesn't really do anything right now, and is just needed as a prerequisite for #6698?

@billyvg
Copy link
Member Author

billyvg commented Jan 11, 2023

@mydea Correct

@billyvg billyvg marked this pull request as ready for review January 11, 2023 14:41
@billyvg billyvg force-pushed the feat-replay-change-addevent-to-be-async branch 2 times, most recently from c400bb0 to 024c4ca Compare January 11, 2023 15:20
@billyvg billyvg force-pushed the feat-replay-eventbuffer-save-pending-events branch from efa539c to be829e1 Compare January 11, 2023 15:23
@billyvg billyvg force-pushed the feat-replay-change-addevent-to-be-async branch from 2bed985 to 97cb8ea Compare January 11, 2023 15:51
Base automatically changed from feat-replay-change-addevent-to-be-async to master January 11, 2023 18:09
* Track raw pending events in `EventBuffer`. This can be helpful in the case
where page is reloaded before the worker has a chance to close the compression
stream.
* Change `EventBuffer.length` to `EventBuffer.pendingLength` to better reflect
what it is. In the case of compression worker, it is async, so recent events
added to the buffer are not necessarily present in the workers compression
stream.
@billyvg billyvg force-pushed the feat-replay-eventbuffer-save-pending-events branch from be829e1 to 2756060 Compare January 11, 2023 18:18
@billyvg billyvg enabled auto-merge (squash) January 11, 2023 21:16
@billyvg billyvg merged commit ef83db6 into master Jan 11, 2023
@billyvg billyvg deleted the feat-replay-eventbuffer-save-pending-events branch January 11, 2023 21:17
billyvg added a commit that referenced this pull request Jan 11, 2023
* Track raw pending events in `EventBuffer`. This can be helpful in the case
where page is reloaded before the worker has a chance to close the compression
stream.
* Change `EventBuffer.length` to `EventBuffer.pendingLength` to better reflect
what it is. In the case of compression worker, it is async, so recent events
added to the buffer are not necessarily present in the workers compression
stream.
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.

2 participants