This page describes how to enable and customize Session Replay on crashes for your Android apps.
Session Replay on crashes visually recreates the last user actions before a crash occurred in your mobile application. It allows you to reproduce the issue that your users experienced so that you have the full context to understand what took place and why.
Make sure that your system meets the following requirements:
Dynatrace version 1.245+
OneAgent for Android version 8.245+
Real User Monitoring enabled for your application
Active Dynatrace Digital Experience Monitoring license
The web UI URL has a trusted certificate
Known limitations and issues
Technical limitations
Android 5.0+ (API level 21+) is supported.
Android Gradle plugin 7.0+ is supported.
Kotlin version 1.8+ is supported.
Jetpack Compose is not supported.
Only AndroidX support libraries are supported. Classes such as Activity or Fragment in com.android.support are not supported.
Session Replay is not available for Cordova, React Native, Flutter, or Xamarin.
For a hybrid app, Session Replay on crashes is supported only for the native part of the app. Session Replay is not supported for the browser part of a hybrid app.
We recommend that you not use other crash reporting tools together with Dynatrace Session Replay.
Session Replay can capture only certain events. However, if you need to track a specific view or event that is not supported by default, you can capture a custom event.
You can play back the user sessions recorded with Session Replay only in certain browsers.
Fragments with in-out animations can cause problems, especially when animations are short.
Floating action buttons can cause data masking issues.
The inputType attribute within the Button component might result in buttons appearing without text when captured.
Enable Session Replay on crashes
If you haven't done so already, complete all steps described in the instrumentation wizard.
Go to Mobile.
Select the mobile application that you want to configure.
Select More (…) > Edit in the upper-right corner of the tile with your application name.
From the application settings, select General > Enablement and cost control.
Turn on Enable Session Replay on crashes.
From the application settings, select General > Data privacy.
Turn on Enable user opt-in mode.
From the application settings, select Instrumentation wizard, and then select Android or iOS.
Follow the steps in the instrumentation wizard.
Mask sensitive data
Data masking levels
Session Replay on crashes comes with three predefined masking levels:
Safest—all the editable text fields, images, labels, web views, and switches are masked.
Safe—all the editable text fields are masked.
Custom—by default, masks the same elements as Safest, but you can decide exactly which application components or views should be masked. See Configure custom masking for details.
Change masking level
By default, OneAgent applies the Safest masking level. To change it to the Safe or Custom level, use the API to configure OneAgent. If you've opted for the Custom level, see Configure custom masking for details on how to set which application components or views should be masked.
Example 1: Change masking level to Safe
Use the following code to set the masking level to Safe.
MaskingConfiguration config = new MaskingConfiguration.Safe(); // .Safest or .Custom
Example 3: Change masking level to Custom and remove all masked views
Use the following code to set the masking level to Custom and remove all masked views (removeAllMaskedViews). For additional options, see Configure custom masking.
MaskingConfiguration config = new MaskingConfiguration.Custom().removeAllMaskedViews();
If you set the data masking level to Custom, you can use additional API methods to decide which application components or views should be masked. You can:
By default, all data—information on captured events and images—is sent over any connection. However, you can opt to transfer images only when the users are connected to Wi-Fi to save their mobile data.
1.0 DEM unit per user session captured with Session Replay.
We've set hard limits of 300 KB per session and 10 MB for all sessions. Anything exceeding these limits gets trimmed down to the limits as mentioned above.
When recording a user session, Dynatrace may consume up to 10 MB of the user's mobile device storage. However, Dynatrace won't send a session that's more than 300 KB.
No. Session volume depends on a variety of factors, including the application size, session duration, and users' interactivity with the application.
No. To record sessions, Session Replay on crashes takes screenshots of the mobile app screen and its parts.
The data is sent one time. This is performed in several requests according to the data collected.
Currently, there is no time limit for storing images; only the 10 MB hard limit mentioned above is applied. However, in emergency stop situations, everything is deleted.
The impact is very low, and overhead is mainly seen during runtime. In general, it's related to the complexity of the application, for instance, to how many views are displayed at a time.
Dynatrace sends the data immediately after the crash. The user does not have to relaunch the app.