Sentry Session Replay with Canvas
Pre-requisites
Replay with canvas requires Node 14+, and browsers newer than IE11.
Installation
Replay and ReplayCanvas can be imported from @sentry/browser
, or a respective SDK package like @sentry/react
or
@sentry/vue
. You don't need to install anything in order to use Session Replay. The minimum version that includes
Replay is 7.27.0.
For details on using Replay when using Sentry via the CDN bundles, see CDN bundle.
Setup
To set up the canvas integration, add the following to your Sentry integrations:
Sentry.replayCanvasIntegration(),
Full Example
import * as Sentry from '@sentry/browser';
Sentry.init({
dsn: '__DSN__',
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
integrations: [Sentry.replayIntegration(), Sentry.replayCanvasIntegration()],
});
8.0.0-rc.2
Important Changes
- feat(node): Register ESM patching hooks in init for supported Node.js versions
This release includes adds support for ESM when Sentry.init()
is called within a module imported via the --import
Node.js flag:
node --import ./your-file-with-sentry-init.mjs your-app.mjs
Note that the SDK only supports ESM for node versions 18.19.0
and above, and 20.6.0
above.
Other Changes
- deps(node): Bump
@opentelemetry/core
to 1.24.1
and @opentelemetry/instrumentation
to 0.51.1
(#11941) - feat(connect): Warn if connect is not instrumented (#11936)
- feat(express): Warn if express is not instrumented (#11930)
- feat(fastify): Warn if fastify is not instrumented (#11917)
- feat(hapi): Warn if hapi is not instrumented (#11937)
- feat(koa): Warn if koa is not instrumented (#11931)
- fix(browser): Continuously record CLS web vital (#11934)
- fix(feedback): Pick user from any scope (#11928)
- fix(node): Fix cron instrumentation and add tests (#11811)