Preview
Session Replay for Flutter is available as a preview. Register for the preview program to get access to this feature.
Session Replay for Flutter is not available for RUM Classic or Dynatrace Managed. The preview is available to customers with Latest Dynatrace and DPS licensing.
This page describes how to activate and customize Session Replay for your Flutter apps.
Session Replay on Flutter enables you to capture your customers' interactions with your mobile application and replay each tap, swipe, and screen rotation in a movie-like experience.
Additionally, you can use it to get additional context for crash analysis in the form of video-like screen recordings that replay the user actions preceding a detected crash.
Make sure that your system meets the following requirements:
dynatrace_flutter_plugin) version 3.349.1+ with the dynatrace_flutter_plugin_replay package added.Session Replay is a video-like reconstruction of user interaction with a mobile application based on captured events and data. Because of this approach, a replayed session can differ from the actual user experience.
Known issues:
obscureText set to true are always masked, regardless of the configured masking level.Before you start this procedure, make sure you have completed all steps described in Initial setup for Flutter frontends to add the Dynatrace Flutter plugin and generate your dynatrace.config.yaml file.
Experience Vitals > Overview.100 percent to capture all sessions.100 percent to capture randomly selected sessions.Session Replay starts automatically the next time your app calls Dynatrace().start(...). You don't need to add any additional initialization code.
All masking happens in the end-user device, so that no sensitive data leaves the device.
Session Replay for Flutter comes with three predefined masking levels:
By default, the plugin applies the Safest masking level. To change it to the Safe or Custom level, set the maskingConfiguration on SessionReplay(). If you've opted for the Custom level, see Configure custom masking for details on how to set which widgets should be masked.
Use the following code to set the masking level to Safe.
SessionReplay().maskingConfiguration = DynatraceMaskingConfiguration.safe();
Use the following code to set the masking level to Custom. For additional options, see Configure custom masking.
SessionReplay().maskingConfiguration = DynatraceMaskingConfiguration.custom();
Use the following code to set the masking level to Custom with no widget types masked by default. For additional options, see Configure custom masking.
SessionReplay().maskingConfiguration = DynatraceMaskingConfiguration.custom(widgetTypes: {});
If you set the data masking level to Custom, you can use additional API methods to decide which widgets should be masked. You can:
You can enable or disable masking for specific widget types, such as text fields, images, and switches.
SessionReplay().maskingConfiguration = DynatraceMaskingConfiguration.custom().withMaskedWidgetType<Image>() // Adds Image as a masked widget type.withoutMaskedWidgetType<Switch>(); // Removes Switch as a masked widget type
You can also mask or unmask a specific widget by wrapping it, regardless of its widget type or the active masking level.
SessionReplayMask(child: Text('Sensitive data'),)
SessionReplayUnmask(child: Text('Not sensitive'),)
SessionReplayMask always takes priority over both SessionReplayUnmask and the active masking configuration.
By default, masked text is covered with a solid color block. To replace masked text with asterisks instead, set textMaskingMode to TextMaskingMode.asterisks.
SessionReplay().maskingConfiguration = DynatraceMaskingConfiguration.safest(textMaskingMode: TextMaskingMode.asterisks,);
Session Replay logs are part of the general Dynatrace Flutter plugin logs. For details, see Debug logging.
Session Replay records only certain events. However, you can track an event that is not supported by default. This triggers a manual screenshot capture tagged with the given name.
SessionReplay().trackCustomEvent('User logged');
For setup and configuration issues specific to the Dynatrace Flutter plugin, see Troubleshooting.