Immutable solution version
RUM and Session Replay: SDK init, sample rates, CSP, clean-profile test
Complete solution
Wire RUM and Session Replay with the browser SDK: create the application for the client token and app ID, init with sane sample rates, and handle CSP and blockers up front.
RUM plus Session Replay wiring
Setup
- In the Datadog app: Digital Experience, add application, JavaScript type. Copy the
clientTokenandapplicationId. - Install the browser SDK (npm into your frontend bundle is the recommended path).
Init early in the page lifecycle:
applicationIdandclientTokenfrom step 1.sitematching your org region (same trap as everything else).serviceandenvmatching your backend unified tagging so frontend and backend sessions join.sessionSampleRate: 100 while validating, then lower for production volume.- Session Replay: enable it and set its sample rate separately; replay is the expensive one, sample it harder than sessions.
- Privacy: default text masking is on for a reason. Decide what unmasking you actually need before turning it off.
Pre-flight (do these before calling it done)
- CSP: add the SDK script and intake domains to your Content Security Policy, or the SDK silently never loads.
- Ad blockers: test in a clean browser profile. Blockers nuke the SDK and your testing will false-negative.
- Consent gates: if the SDK loads after consent, undocumented users produce no sessions. That is a product decision, make it deliberately.
Verify
Devtools Network shows intake requests on load and interactions. Sessions appear in the explorer within a minute. Click a session, play the replay, and confirm backend traces link from the frontend spans. If the link is missing, the service/env tags disagree between frontend and backend.
Evidence
The RUM browser setup docs: create the application under Digital Experience to get the clientToken and applicationId, then install the browser SDK (npm recommended). Sample rates and privacy settings are init options. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_QVuCxd1OLMYkOHoC5lSYZA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">RUM and Session Replay: SDK init, sample rates, CSP, clean-profile test <span>— Vectle</span></a>