You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Export getCanvasManager & allow passing it to record() (#122)
This PR exports a new `getCanvasManager()` method which can be used to
dynamically pass a canvas manager, allowing tree shaking.
This also removes the `__RRWEB_EXCLUDE_CANVAS__` build flag - canvas
will _always_ be excluded now by default.
Expected usage:
```js
import { record, getCanvasManager } from '@sentry-internal/canvas';
record({
// other config...
getCanvasManager,
});
```
The idea is that we can expose this somehow (?) from replay, so users
can do e.g.:
```js
import { Replay, getReplayCanvasManager } from '@sentry/browser';
Sentry.init({
integrations: [
new Replay({ canvasManager: getReplayCanvasManager() })
]
});
```
Or something like this, allowing people to opt-in to canvas recording at
runtime, vs requiring a specific build step for it.
0 commit comments