To utilize session replay in New Relic, start by enabling this feature in your browser application settings. This step is essential for capturing user interactions on your web app, providing insights into user journeys, and troubleshooting issues effectively. Follow the steps below to enable session replay and ensure your browser agent is configured correctly.
중요
Certain settings, including enabling or disabling the session replay and adjusting the sample rates for overall sessions or for just those with errors, have been moved to server-side configuration. For example, after the snippet has been updated in your pages to include the session replay feature, there's no need to redeploy the script when changing the sample rates or when disabling or re-enabling the feature. If the feature has not been included in the deployed script then the server-side configuration will not have any impact. This is applicable for browser agent version 1.259.0 or higher.
Enable session replay
Go to one.newrelic.com > All Capabilities > Browser.
Select your browser app.
In the left-hand menu, click Application settings.
On the Application settings page, make sure Pro or Pro + SPA browser agent is selected. Session replay is not available for the Lite browser agent.
Toggle Session traces and Session replay ON.
중요
If you are unable to view Session replay settings. Contact your admin for further assistance.
Setting sampling rates
Set a sampling rate (0%-100%) for the following samples:
User sessions records a random sample of all user sessions.
Errored session records a random sample of all errored sessions. The agent buffers a sliding window of data for up to 30 seconds on the client-side, and if errors occur, the buffered data will be harvested and the remainder of the session will be recorded. If an error doesn't occur, the replay is never harvested.
For example, if you set the session sampling rate to 50% and the error sampling rate to 100%, it means that:
Half of all user sessions will be recorded.
All errored sessions will be recorded, even if they're not part of the 50% sample.