# Session replays

Watch recordings of real user sessions to see exactly what your users saw and did. Session replays record DOM changes during a session and replay them visually, alongside the session's events, console output, and errors.

## Watch a session

1. Open [Sessions](https://rum.betterstack.com/team/0/sessions ";_blank") in the side menu.
2. Pick a session. Sessions with a recording show a **Replay** button. Sort by **Most recent**, **Longest duration**, **Most pages**, **Most clicks**, or **Most errors**, or use the **Has session replay** preset.
3. The session view plays the recording next to a timeline of everything that happened: page views, clicks, form interactions, console logs, and exceptions.

![Session detail with replay, events, and timeline](https://imagedelivery.net/xZXo0QFi-1_4Zimer-T0XQ/b2e47364-c428-4ef6-711d-bf6309feab00/orig =3656x2912)

When your backend is traced with Better Stack, the session timeline also shows the backend spans behind the user's requests, so you can follow a slow click all the way to the backend.

Mark investigated sessions as **Resolved** to keep the list focused. The default view shows unresolved sessions.

## Recording settings

Session replays are controlled from your application's **Frontend** tab:

- **Record session replays** toggles recording. Enabled by default.
- **Sampling of session replays** controls the percentage of sessions recorded. Sampling is decided per session: a sampled-in session is recorded in full.
- **Session replays retention** controls how long recordings are stored.

See [Configure the JavaScript tag](https://betterstack.com/docs/rum/js-tag/configuration/) for details.

## Privacy

Form inputs are excluded from recordings by default, so passwords and other typed values are not recorded. Adjust the exclusions in the Frontend tab, e.g. to record inputs and exclude only sensitive fields like `input[type=password]`:

- **Exclude HTML elements** removes matching elements from recordings entirely.
- **Mask HTML elements** replaces the text of matching elements with asterisks while keeping the page layout visible.

Both accept CSS selectors, e.g. `.customer-name` or `[data-pii]`.

## Replays and errors

Replays are linked to captured exceptions. When investigating an error in Better Stack error tracking, open its **Sessions** tab to watch what led to the error. In the other direction, sessions on the [Sessions](https://rum.betterstack.com/team/0/sessions ";_blank") page show their error counts, and sorting by **Most errors** surfaces the sessions worth watching first.

## Next steps

- [Analyzing users](https://betterstack.com/docs/rum/using-the-product/analyzing-users/): find all sessions of a specific user.
- [SQL API](https://betterstack.com/docs/rum/api/sql-api/): query replay metadata programmatically.
