Configure Session Replay

Session Replay can be configured to change consumption and also to comply with data privacy regulations.

Configure Cost and traffic control

The Cost and traffic control setting can be used to reduce usage while recording user sessions.

By default, Dynatrace captures all user actions and user sessions for analysis, which ensures complete insight into your application's performance and customer experience. With this setting, you can choose to reduce the granularity of user-action and user-session analysis by capturing a lower percentage of user sessions.

While this setting reduces monitoring costs, it also results in lower visibility into how your customers use your application. For example, a setting of 10% results in Dynatrace analyzing only every tenth user session.

To limit the number of sessions recorded by Session Replay

  1. Select Applications from the navigation menu.

  2. Select the application that you want to configure.

  3. On the Application overview page, click the browse [...] button on the upper-right corner and select Edit.

  4. On the Application settings page, select the Session Replay tab on the left.

  5. Enable the Session Replay setting.

  6. Type a value less than 100% in the Analyze % of user sessions field.

cost and traffic control

Configure Session Replay for personal data protection

To assist your organization in complying with the data protection laws and regulations, such as GDPR (Europe), California Privacy Act (CCPA), and Brazilian General Data Protection Law (LGPD), Dynatrace has introduced several Session Replay configuration settings that you should use to protect your customers’ personal information. Before enabling Session Replay and proceeding with the privacy configuration settings explained in this topic, ensure that your organization has taken all other necessary steps to protect your customers' personal data.

Session Replay opt-in mode

Session Replay opt-in mode gives you the freedom to decide which parts of a user session must be recorded and when recording is permitted to begin. For example, you may choose to record user sessions:

  • As soon as any user logs in
  • Only for select customers so that you can offer them premium support
  • Only for certain pages of the recorded application

When you enable Session Replay opt-in mode for your web application, recording of the active user session begins only once you invoke the enableSessionReplay() method on the dtrum global object. The dtrum global object is available following the auto-injection of the Real User Monitoring JavaScript tag.

This command starts session recording and creates a session cookie that stores the current replay state so that Session Replay remains active and recording begins automatically on all subsequent pages visited during the same session. This eliminates the need to call dtrum.enableSessionReplay() for each page visited during a single session.

The dtrum.enableSessionReplay() method includes the ignoreCostControl parameter, which can be used to record certain user sessions by disregarding the value in Cost and traffic control.

When Real User Monitoring opt-in mode is enabled, the same cookie is applied to Session Replay opt-in mode. In this case, Real User Monitoring must be enabled before you can enable Session Replay:

Session Replay content and interaction masking

Session Replay records every user interaction. Therefore, protecting sensitive user data is of utmost importance.

To protect this sensitive data, Session Replay implements content masking. All sensitive content in your web application can be masked in such a way that the original content is inaccessible. So, when you replay a recorded user session within which an end user has typed in some personal data, asterisks are displayed in place of the original data.

Note: Only alphanumeric data is masked. Special characters such as periods, commas, and colons aren't masked.

As an example, consider an email address field on a typical web form. The user types in their email address, as shown in the following image:

email field with content

Session Replay masks this data and displays asterisks in its place:

email field with masked content

Session Replay also provides masking functionalities that can be used to hide interactions with elements that may inadvertently reveal confidential end-user information. For example, think of a select box that provides multiple options for responding to a form question about the user's religion or gender. Even with the text masked, the end user's response could be easily deduced by seeing the option that they selected.

To address such situations, the recorder masks any element, whether a form field or a content node, that contains the attribute data-dtrum-mask. In the presence of such an attribute, all mouse and touch interactions are ignored. Additionally, the node and all its descendants will have their text and input values masked.

Note: The masked data displayed as asterisks (*****) in the replayed session never leaves the client browser.

Default masking settings

By default, masking is applied as follows:

  • All form fields are masked.
  • All password fields are masked.
  • Content masking is disabled.
  • Attribute masking is disabled.
  • Interaction masking is enabled for select form fields, such as gender selection drop-down option lists.

Configurable masking settings

To protect your customers' confidential information, you can apply a combination of configuration settings. Dynatrace will use your custom configuration settings to identify the data that must not leave the user's browser or be sent to Dynatrace Server.

Note: Masking rules will also be applied at replay time. If masking rules aren't properly configured, you can reconfigure them correctly after the sessions are captured. Session Replay applies the existing masking configuration to the captured sessions when they're replayed.

There are several masking options that you can configure to selectively mask sensitive data:

URL exclusion

URL exclusion is applicable to pages and views. If you want to exclude a page from Session Replay recording, define the regular expression that will be used to match against the specific page URL. You can configure rules for individual web pages, entire web sites, and single-page applications.

To exclude pages from recording

  1. Define a regular expression that matches the page URL.

  2. Add the expression to the URL exclusion rule.

URL exclusion

Frequently asked questions