Session Replay


Session Replay expands your user experience monitoring by allowing you to capture and visually replay the web browsing experience of your users. Combined with RUM performance data, Session Replay is beneficial for error identification, reproduction, and resolution, and provides insights into your web application’s usage patterns and design pitfalls.

The RUM Browser SDK is open source and leverages the open source rrweb project.

Session Replay recorder

The Session Replay recorder is part of the RUM Browser SDK. The recorder takes a snapshot of the browser’s DOM and CSS by tailing and recording events happening on a web page (such as DOM modification, mouse move, clicks, and input events) along with these events’ timestamps.

Datadog then rebuilds the web page and re-applies the recorded events at the appropriate time in the replay view. Session Replay follows the same 30 day retention policy as normal RUM sessions.

The Session Replay recorder supports all browsers supported by the RUM Browser SDK with the exception of IE11. For more information, see the browser support table.

To reduce Session Replay’s network impact and ensure the Session Replay recorder has minimal overhead on your application’s performance, Datadog compresses the data prior to sending it. Datadog also reduces the load on a browser’s UI thread by delegating most of the CPU-intensive work (such as compression) to a dedicated web worker. The expected network bandwidth impact is less than 100kB/min.


Session Replay is available in the RUM Browser SDK. To start collecting data for Session Replay, set up Datadog RUM Browser Monitoring by creating a RUM application, generating a client token generation, and initializing the RUM Browser SDK. For setup in mobile environments, see Mobile Session Replay.

You must be on the latest version of the SDK (v3.6.0 or later)


Starting with v5.0.0 of the RUM Browser SDK, the Session Replay starts recording automatically when calling init(). To conditionally start the recording, use the startSessionReplayRecordingManually init parameter and call startSessionReplayRecording().

For example, to only record authenticated user sessions:

  applicationId: '<DATADOG_APPLICATION_ID>',
  clientToken: '<DATADOG_CLIENT_TOKEN>',
  site: '<DATADOG_SITE>',
  //  service: 'my-web-application',
  //  env: 'production',
  //  version: '1.0.0',
  sessionSampleRate: 100,
  sessionReplaySampleRate: 100,
  startSessionReplayRecordingManually: true,

if (user.isAuthenticated) {

To stop the Session Replay recording, call stopSessionReplayRecording().

When using a version of the RUM Browser SDK older than v5.0.0, Session Replay recording does not begin automatically. Call `startSessionReplayRecording()` to begin recording.

Disable Session Replay

To stop session recordings, set sessionReplaySampleRate to 0. This stops collecting data for the Browser RUM & Session Replay plan.


By default, Session Replay data is retained for 30 days.

To extend retention to 15 months, you can enable Extended Retention on individual session replays. These sessions must be non-active (the user has completed their experience).

Extended Retention only applies to Session Replay and does not include associated events. The 15 months start when Extended Retention is enabled, not when the session is collected.

You can disable Extended Retention at any time. If the session replay is still within its default 30 days of retention, the replay expires at the end of the initial 30 day window. If you disable Extended Retention on a session replay that is older than 30 days, the replay immediately expires.

Enable extended retention

Refer to the below diagram to understand what data is retained with extended retention.

Diagram of what data is retained with extended retention

Mobile Session Replay

Learn more about the Session Replay for Mobile.

Further Reading