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-beta.2
Important Changes
- feat(browser): Update
propagationContext
on spanEnd
to keep trace consistent
To ensure consistency throughout a route's duration, we update the scope's propagation context when the initial page
load or navigation span ends. This keeps span-specific attributes like the sampled decision and dynamic sampling context
on the scope, even after the transaction has ended.
- fix(browser): Don't assume window.document is available (#11602)
We won't assume window.dodument
is available in the browser SDKs anymore. This should prevent errors in environments
where window.document
is not available (such as web workers).
Other changes
- feat(core): Add
server.address
to browser http.client
spans (#11634) - feat(opentelemetry): Update OTEL packages & relax some version ranges (#11580)
- feat(deps): bump @opentelemetry/instrumentation-hapi from 0.34.0 to 0.36.0 (#11496)
- feat(deps): bump @opentelemetry/instrumentation-koa from 0.37.0 to 0.39.0 (#11495)
- feat(deps): bump @opentelemetry/instrumentation-pg from 0.38.0 to 0.40.0 (#11494)
- feat(nextjs): Skip OTEL root spans emitted by Next.js (#11623)
- feat(node): Collect Local Variables via a worker (#11586)
- fix(nextjs): Escape Next.js' OpenTelemetry instrumentation (#11625)
- fix(feedback): Fix timeout on feedback submission (#11619)
- fix(node): Allow use of
NodeClient
without calling init
(#11585) - fix(node): Ensure DSC is correctly set in envelope headers (#11628)