Configuration

Learn about the general Session Replay configuration fields.

The following options can be configured in the options.replay field of your Sentry Flutter SDK, in SentryFlutter.init((options) { ... }):

KeyTypeDefaultDescription
sessionSampleRatedouble0The sample rate for replays that begin recording immediately and last the entirety of the user's session. 1.0 collects all replays, and 0 collects none.
onErrorSampleRatedouble0The sample rate for replays that are recorded when an error happens. This type of replay will record up to a minute of events prior to the error and continue recording until the session ends. 1.0 captures all sessions with an error, and 0 captures none.
qualitySentryReplayQualitySentryReplayQuality.mediumDefines the image quality of the session replay. The higher the quality, the more accurate the replay will be, but also more data to transfer and more CPU load.

In order to capture basic information about network requests, you need to use our Sentry integrations for the HTTP client you are using. This allows the Sentry instrumented HTTP client to capture network details during your replay.

In order to capture screen names and navigation breadcrumbs, you need to add our SentryNavigatorObserver to your application's navigatorObservers and define route names when you navigate to a new screen.

Read more about how to configure the SentryNavigatorObserver in our Routing Instrumentation guide.

In order to capture user interaction breadcrumbs such as button taps, you need to wrap your root widget with SentryWidget and define unique keys for your buttons.

Read more about how to set up user interactions in our User Interaction Instrumentation guide.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").