@atatus/browser-rum and loads its recorder only when a session is selected for replay, so it costs nothing on sessions you do not record.
This page covers turning replay on, choosing how much to record, and masking sensitive content.
Turn on recording
Set a replay sample rate when you initialize the agent:Replay sampling applies to sessions that
sessionSampleRate already kept, so the two multiply. A session rate of 50 with a replay rate of 30 records replay for 15% of all sessions.Record only the sessions you need
A flat sample rate records a slice of everything, including sessions where nothing went wrong. If you would rather keep the sessions that matter, start recording yourself:Privacy
Replay records the DOM, so treat masking as the default on any screen that shows customer data, personal information, or payment details. Set the level for the whole application withdefaultPrivacyLevel:
mask-user-input is a good starting point for most applications: the page stays readable in the replay, while anything a user typed is hidden.
Override the level on one element
You can raise or lower the level on any element and everything inside it, with either an attribute or a class:Mask action names
Action names are built from the text of the element a user clicked, so a button labelled with a customer name leaks that name into the action. Turn onenablePrivacyForActionName to mask them:
data-atatus-action-name, which the agent reads by default:
actionNameAttribute. The agent checks it in addition to the default:
Redact URLs
Credentials often end up in query strings, and those appear on views and resources. Strip them inbeforeSend, which runs just before an event is sent:
Next steps
- Configuration: the full option list.
- Error Tracking: start replay when an error happens.