Session replay in Splunk RUM
Replay a session to view exactly what the user experienced and make informed decisions about what to do next. Sessions have a maximum duration of 4 hours.
Use cases
You might want to replay sessions for the following reasons:
-
Reduce the amount of time support teams take to troubleshoot a problem. By seeing errors from the perspective of an actual user, support teams can quickly identify what happened, and take action. Without session replay, support teams could spend a long time investigating a variety of possible causes based on an incomplete description of the problem.
-
Introduce fast fixes to your applications by honing in on errors and seeing what errors impact users.
-
Improve UX by seeing how users interact with your applications and following their navigation path. For example, if customers aren’t adding promo codes from a targeted ad campaign, review the checkout workflow to see if customers can even find the drop-down list to add a promo code.
Prerequisite
Session replay is available for enterprise customers only. For more information on each type of subscription, see Splunk RUM Pricing.
Set up session replay
There are 2 ways to set up session replay: CDN or NPM.
This example shows the order in which to initialize the scripts:
<script src="https://cdn.signalfx.com/o11y-gdi-rum/latest/splunk-otel-web.js" crossorigin="anonymous"></script>
<script src="https://cdn.signalfx.com/o11y-gdi-rum/latest/splunk-otel-web-session-recorder.js" crossorigin="anonymous"></script>
<script>
SplunkRum.init({
realm: '<realm>',
rumAccessToken: '<your_rum_token>',
applicationName: '<your_app_name>',
version: '<your_app_version>',
deploymentEnvironment: '<your_environment_name>'
});
SplunkSessionRecorder.init({
realm: '<realm>',
rumAccessToken: '<your_rum_token>'
});
</script>
CDN
Initialize this code snippet to set up session replay through Splunk CDN.
<script src="https://cdn.signalfx.com/o11y-gdi-rum/latest/splunk-otel-web-session-recorder.js" crossorigin="anonymous"></script>
<script>
SplunkSessionRecorder.init({
realm: '<realm>',
rumAccessToken: '<your_rum_token>'
});
</script>
NPM
Use the following command to set up session replay with NPM through a package named @splunk/otel-web-session-recorder.
npm install @splunk/otel-web-session-recorder
Next, initialize this code snippet:
import SplunkSessionRecorder from '@splunk/otel-web-session-recorder'
SplunkSessionRecorder.init({
realm: '<realm>',
rumAccessToken: '<your_rum_token>'
});
Deactivate session replay
To deactivate session replay, you can choose from the following options:
-
Turn it off for the particular session replay.
-
Remove the instrumentation if you want to deactivate it completely.
Additional instrumentation settings
For more information on configuration options, see https://github.com/rrweb-io/rrweb/blob/master/guide.md#guide on GitHub.
Redact information
Text is redacted by default, you can optionally configure image redaction as well. The following image shows how the Splunk RUM homepage looks with text redaction enabled. All text is replaced by asterisk ( * ) symbols.
Image redaction
To redact images, set inlineImages: false in the splunksessionrecorder.init function.
For more information on how to customize your instrumentation, see the Privacy section of https://github.com/rrweb-io/rrweb/blob/master/guide.md#privacy on GitHub.
Replay a session
To replay a session, open the session you’re interested in session waterfall, and if there’s a replay option available, select Replay. Here are a few controls you can configure:
-
Adjust the speed of the session and the size of the window.
-
Toggle the timeline to see multiple replay segments if the user had multiple instances of the application open at the same time.
Troubleshooting
Try these methods:
-
If a session is incomplete, it might be because the network bandwidth isn’t strong enough, which can cause part of a session to drop off.
-
If a user has multiple tabs of the same application open, then there is a session replay available for each tab. Make sure to open the tab below session replay and navigate to the tab you’re interested in. For example, in the following image, the blue tabs at the top of the chart represent a user loading the page again, or opening the app in a different page.
-
Elements or images aren’t appearing in your session replay. It’s possible that the images or elements are blocked by a content security policy. Review the policy and CDN provider to confirm.
-
Aspect ratio is distorted. The aspect ratio is dependent on the user’s window size.