> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traceback.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Replay

> High-fidelity DOM replay and user action streams synchronized with runtime errors.

Traceback Session Replay lets you watch a video-like reconstruction of what a user experienced before and during an error.

## Features

* **DOM Mutation Playback**: Reconstructs complete HTML and CSS rendering state using lightweight mutation streams.
* **Synchronized Console & Network**: Console logs, warnings, fetch requests, and responses are tied to playback timestamps.
* **Privacy by Default**: All sensitive input fields, text nodes, and PII are masked before capture.

***

## Enabling Replay in Browser

```typescript theme={null}
import * as Traceback from "@traceback/browser";

Traceback.init({
  dsn: "https://tb_live_key@ingest.traceback.dev/1",
  integrations: [
    new Traceback.Replay({
      maskAllInputs: true,
      maskAllText: false,
      blockClass: "tb-mask",
    }),
  ],
  // Capture 5% of normal sessions for user journeys
  replaysSessionSampleRate: 0.05,
  // Capture 100% of sessions that encounter an error
  replaysOnErrorSampleRate: 1.0,
});
```

***

## Privacy & Masking

Add the `tb-mask` CSS class or `data-tb-mask` attribute to any DOM element you wish to blur or exclude:

```html theme={null}
<div class="tb-mask">
  <p>Account Balance: $1,420,000.00</p>
</div>
```
