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

Set maximum resolution limits for canvas recordings #10498

Closed
billyvg opened this issue Feb 5, 2024 · 2 comments · Fixed by #11617
Closed

Set maximum resolution limits for canvas recordings #10498

billyvg opened this issue Feb 5, 2024 · 2 comments · Fixed by #11617
Labels
Package: replay Issues related to the Sentry Replay SDK

Comments

@billyvg
Copy link
Member

billyvg commented Feb 5, 2024

We need to set a max canvas size when recording and downscale the snapshots as necessary, otherwise end users may run into performance issues capturing large canvases and we will end up storing large snapshots.

Right now we call createImageBitmap on the main thread and transfer it to the webworker to base64 encode. We may want to think about combining this ticket with #10497 to make sure we do not make performance even worse.

We may be able to clone/transfer the canvas to webworker, and then scale it down to a reasonable size, call createImageBitmap(), and base64 encode it (all on webworker).

@billyvg billyvg added the Package: replay Issues related to the Sentry Replay SDK label Feb 5, 2024
@billyvg
Copy link
Member Author

billyvg commented Feb 8, 2024

@mydea I'm going to be out this upcoming week, this is the only remaining blocker for GA, would you be able to take a look at this next week? If not I will pick it up when I'm back.

billyvg added a commit that referenced this issue Apr 22, 2024
We do not want to allow users to capture super large canvases, enforce a
max size limit

Requires getsentry/rrweb#174

Closes #10498
billyvg added a commit that referenced this issue Apr 22, 2024
We do not want to allow users to capture super large canvases, enforce a
max size limit

Requires getsentry/rrweb#174
Closes #10498
Backport of #11617
mydea pushed a commit that referenced this issue Apr 23, 2024
We do not want to allow users to capture super large canvases, enforce a
max size limit

Requires getsentry/rrweb#174
Closes #10498
Backport of #11617
@AbhiPrasad
Copy link
Member

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 a pull request may close this issue.

2 participants