Browse docs
Session replay
See what the user did, not just where it crashed.
Replay records the DOM as a stream of mutations using rrweb (the same library Sentry uses). When an error fires, the SDK attaches the most recent buffer to the envelope. The dashboard re-runs the recording so you can scrub through the last 30 seconds before the crash.
Enable in the SDK
Add the replayIntegration when you initialize Sentry. Use replaysOnErrorSampleRate: 1.0 to capture every error, and replaysSessionSampleRate: 0 to keep continuous-session recording off (much cheaper, much less PII risk):
Sentry.init({
dsn: "<YOUR_DSN>",
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
integrations: [
Sentry.replayIntegration({
maskAllText: true,
maskAllInputs: true,
blockAllMedia: true,
}),
],
});Privacy defaults
GlitchReplay's recommended defaults are stricter than Sentry's:
maskAllText: true— all text content recorded as***maskAllInputs: true— input values never recordedblockAllMedia: true—<img>,<video>,<canvas>rendered as placeholders
These should be your starting point even on internal apps. To selectively unmask elements you trust:
<div data-sentry-unmask>This text appears in replay.</div>
<div class="sentry-unmask">Same effect.</div>And to block elements that would otherwise be unmasked:
<input data-sentry-mask /> <!-- value masked -->
<div data-sentry-block /> <!-- entire subtree blocked -->What it costs
- Free plan — replay disabled.
- Pro / Business / Enterprise — replay included; no per-replay charge.
Sentry charges $6 per 1,000 replays on top of their Business tier. We don't.
How replays are stored
rrweb events are stored in R2 next to the raw envelope, keyed by {project_id}/{event_id}/replay.json. The dashboard's replay player streams them back on demand — there's no server-side rendering, so scrubbing is instant once the file is fetched.
Replay summary (AI)
On Pro and above, each replay is summarized into a one-sentence narrative — "User opened the search modal, typed ‘invo’, hit Enter, then the page froze." — generated from the breadcrumb stream alone (no DOM content, no PII risk). Useful for triaging a list of issues without opening each one.
What replay does not do
- It's not a UX-research tool. Don't use it for funnel analysis.
- It doesn't cover server-side or RSC errors that never touched the browser. For those, replay is empty (the error event still ingests).
- It doesn't record cross-origin
<iframe>contents.
Next: configure alerts for new issues with replay, or read about PII scrubbing.