Add sessionReplaySampleRate to your datadogRum.init() call (value 0–100) and call datadogRum.startSessionReplayRecording() after init to begin capturing
Set defaultPrivacyLevel in the init config: use mask to replace all text with X (maximum privacy), mask-user-input (the default) to mask only form fields, or allow for pages with no sensitive data
For granular control, add data-dd-privacy='mask' or data-dd-privacy='allow' HTML attributes to individual elements to override the global setting at the element level
Use data-dd-action-name attributes on interactive elements so replays show meaningful action names instead of raw element text
Review recorded sessions in the RUM > Session Replay UI and confirm masked elements show as redacted wireframes before enabling in production
Restrict replay viewing to specific Datadog roles using RBAC to ensure only authorized team members can view session recordings
Known gotchas
If defaultPrivacyLevel is not set, mask is the default as of recent SDK versions — verify the effective default for your SDK version before assuming unmasked data is captured
Input masking applies at the SDK level before data leaves the browser; masked content is never sent to Datadog backends and cannot be recovered after the fact
Dynamic content injected into the DOM after init (e.g., by a third-party chat widget) may not respect data-dd-privacy attributes unless the widget cooperates — test replay rendering of all page regions
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp