Configure Datadog RUM Session Replay privacy level to mask user data

domain: docs.datadoghq.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install or upgrade the Datadog Browser SDK to v5 or later: `npm install @datadog/browser-rum`.
  2. Initialize the SDK with `datadogRum.init({...})` including `sessionReplaySampleRate` set to a value greater than 0 to enable replay recording.
  3. The default `defaultPrivacyLevel` in SDK v5+ is `'mask'` — all HTML text, inputs, images, and `data-*` attributes are masked by default without any additional configuration.
  4. To relax masking for specific elements, override `defaultPrivacyLevel` to `'mask-user-input'` or `'allow'` in `datadogRum.init()`, or apply element-level overrides via `data-dd-privacy` HTML attributes.
  5. Validate masking in the Datadog Session Replay player — inspect replayed sessions to confirm that PII fields are masked before enabling in production.

Known gotchas

Related routes

Enable Datadog Session Replay and configure privacy masking to protect sensitive user data
docs.datadoghq.com · 6 steps · unrated
Configure Sentry Session Replay with privacy masking
sentry.io · 6 steps · unrated
Instrument a single-page application with Datadog RUM for session and view tracking
docs.datadoghq.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans