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

feat(replay): Add ReplayCanvas integration #10112

Merged
merged 50 commits into from
Jan 17, 2024

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Jan 8, 2024

Adding this integration in addition to Replay will set up canvas recording.

Copy link
Contributor

github-actions bot commented Jan 8, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.3 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.6 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.24 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.62 KB (0%)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.13 KB (0%)
@sentry/browser - Webpack (gzipped) 22.48 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 74.88 KB (-0.02% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 66.53 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 32.36 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.13 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 209.64 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 97.61 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 72.23 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 35.4 KB (0%)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 68.99 KB (+0.02% 🔺)
@sentry/react - Webpack (gzipped) 22.52 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.63 KB (+0.03% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.73 KB (0%)
@sentry-internal/feedback - Webpack (gzipped) 17.11 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.41 KB (added)

@billyvg
Copy link
Member Author

billyvg commented Jan 8, 2024

@mydea works if it's in a sep package, but still need to test that canvas recording still works (though the e2e test should confirm this)

@mydea
Copy link
Member

mydea commented Jan 9, 2024

@mydea works if it's in a sep package, but still need to test that canvas recording still works (though the e2e test should confirm this)

hmm wtf, but well, good :D if that fixes it, amazing!

@billyvg
Copy link
Member Author

billyvg commented Jan 9, 2024

@mydea a few questions:

  • Thoughts on what to do about bundles here?
  • What branch(es) should this be merged to?

@billyvg billyvg marked this pull request as ready for review January 9, 2024 19:02
@billyvg billyvg requested review from mydea, Lms24 and c298lee and removed request for Lms24 January 9, 2024 19:05
billyvg added a commit to getsentry/rrweb that referenced this pull request Jan 9, 2024
This simplifies the code a bit by exporting the CanvasManager directly. With [ReplayCanvas](getsentry/sentry-javascript#10112), we can rely on it for complex setup, but keeps it simple for our users.
billyvg added a commit to getsentry/rrweb that referenced this pull request Jan 9, 2024
This simplifies the code a bit by exporting the CanvasManager directly. With [ReplayCanvas](getsentry/sentry-javascript#10112), we can rely on it for complex setup, but keeps it simple for our users.
packages/replay/src/constants.ts Show resolved Hide resolved
packages/replay/src/integration.ts Outdated Show resolved Hide resolved
billyvg added a commit to getsentry/rrweb that referenced this pull request Jan 9, 2024
This simplifies the code a bit by exporting the CanvasManager directly. With [ReplayCanvas](getsentry/sentry-javascript#10112), we can rely on it for complex setup, but keeps it simple for our users.
billyvg added a commit to getsentry/rrweb that referenced this pull request Jan 9, 2024
This simplifies the code a bit by exporting the CanvasManager directly. With [ReplayCanvas](getsentry/sentry-javascript#10112), we can rely on it for complex setup, but keeps it simple for our users.
@@ -32,6 +32,10 @@ targets:
- name: npm
id: '@sentry-internal/feedback'
includeNames: /^sentry-internal-feedback-\d.*\.tgz$/
## 1.8 ReplayCanvas package (browser only)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to publish this? Or could we just inline this into browser/replay, same as we do with e.g. replay-worker? IMHO if we can avoid to publish it, we should!

Copy link
Member Author

Choose a reason for hiding this comment

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

@mydea I added this back, it's been a pain trying to test this package without it being published. e.g. in my test app, I'll use yalc to add @sentry/browser @sentry/replay, but yarn will complain:

error Couldn't find package "@sentry-internal/replay-canvas@7.93.0" required by "@sentry/browser@file:.yalc/@sentry/browser" on the "npm" registry.

@billyvg billyvg force-pushed the fn/replay-canvas-integration-sep-package branch 2 times, most recently from 3e11d66 to 86ce591 Compare January 10, 2024 15:08
billyvg added a commit to getsentry/rrweb that referenced this pull request Jan 10, 2024
#153)

This simplifies the code a bit by exporting the CanvasManager directly.
With
[ReplayCanvas](getsentry/sentry-javascript#10112),
we can rely on it for complex setup, but keeps it simple for our users.
@billyvg billyvg force-pushed the fn/replay-canvas-integration-sep-package branch 3 times, most recently from b39c5fe to d001529 Compare January 11, 2024 03:53
@billyvg billyvg force-pushed the fn/replay-canvas-integration-sep-package branch from 9dd8cfe to b87f421 Compare January 16, 2024 19:13
@billyvg billyvg merged commit 11a8afe into develop Jan 17, 2024
97 checks passed
@billyvg billyvg deleted the fn/replay-canvas-integration-sep-package branch January 17, 2024 14:50
billyvg added a commit to getsentry/rrweb that referenced this pull request Apr 26, 2024
#153)

This simplifies the code a bit by exporting the CanvasManager directly.
With
[ReplayCanvas](getsentry/sentry-javascript#10112),
we can rely on it for complex setup, but keeps it simple for our users.
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