Session Replay for Mobile

Use Session Replay for Mobile to get reproductions of user sessions. You'll be able to repro issues faster and get a better understanding of user impact.

Session Replay allows you to see reproductions of user sessions, which can help you understand what happened before, during, and after an error or performance issue occurred. As you play back each session, you'll be able to see every user interaction in relation to network requests, frontend and backend errors, backend spans, and more.

Replays help you see exactly how the user experience is impacted by errors. Because they're integrated with our Issues product, you'll be able to see session replays connected to error events on the Issue Details page in Sentry. To make sure backend errors are also included in the replay, see our backend set up instructions.

Session Replay for Mobile works by taking snapshots of the view hierarchy as well as a screenshot within the same frame, at the rate of one per second. These screenshots are then compressed into a video file representing a segment of the user’s session. All these small segments are then streamed into Sentry with additional trace identifiers, breadcrumbs, and other useful debugging information to compose the full user session.

The user session (replay) lasts until the user closes the app, the app crashes, the user puts the app in the background for over 30 seconds, or the session reaches 60 minutes in duration. The result is a video playback that can help you reproduce bugs in your mobile app, including hard-to-debug issues related to backend APIs and microservices.

To redact anything potentially sensitive and preserve maximum user privacy, the view hierarchy is used to find the position of controls such as text boxes, images, labels, and buttons. Redaction is done with a block that's drawn over these controls, using the most predominant color of the control.

Session Replay for mobile is currently available for Android and iOS on both native SDKs, as well as for React Native and Flutter.

We recommend updating to the latest version, but the minimum versions supported are:

Replays are integrated with Sentry's tracing data model, enabling you to see replays associated with backend errors. For these replays, you can view backend errors in the Timeline, the Breadcrumbs and Errors tabs, and other places when you go to the Replay Details view. You'll also see a Replays tab and replay previews in the Issue Details page for any backend error that has a linked replay.

To see replays for backend errors, you need to have Sentry set up for both your frontend and backend, along with distributed tracing. This provides end-to-end data connectivity on your APIs, allowing Sentry to link replays to backend endpoints.

Make sure you've set up trace propagation in your backend projects. For example:

Copied
import Sentry

SentrySDK.start { options in
    options.dsn = "https://examplePublicKey@o0.ingest.sentry.io/0"
    options.tracePropagationTargets = ["MyAppDomain.com"]
}

Currently, replays for backend errors are supported for the following SDK versions or newer:

How do you protect user data?

Sentry is privacy-focused so protecting user data is always top of mind. That’s why by default, our privacy configuration is very aggressive and redacts all text and images to ensure no sensitive user information is collected. We also provide server-side scrubbing on debugging context to additionally filter on the server as an added precaution.

Additionally, we offer a self-serve deletion capability of individual replays in the UI.

What is the performance overhead of the Replay package?

For most mobile applications, the performance overhead of our client SDK will be imperceptible to end-users. In our own testing, the overhead was not noticeable by end-users. However, this testing was not exhaustive and you may discover the recording overhead may negatively impact your mobile application performance depending on your application complexity.

To reduce the performance overhead, we only take screenshots when something changes on the screen. Our default frame rate is 1 frame per second. If you experience any performance degradations after installing Session Replay, please open an issue on GitHub for your respective SDK: Android, iOS, React Native, and Flutter.

How much does it cost to use Session Replay for mobile?

Session Replay for Mobile is currently available for all plans. Check out our pricing page for details.

Are unhandled exceptions (for example, crashes) available as part of Session Replay for mobile?

Yes, Session Replay for Mobile covers handled and unhandled exceptions as well as ANRs/App Hangs and native (NDK) crashes. Make sure to use the latest SDK version as mentioned in SDKs Supported.

How does Session Replay for mobile work if my app is offline?

Session Replay for Mobile currently supports offline mode only when onErrorSampleRate is specified. When an error happens, the SDK will capture the segment it recorded until that time (up to 30 seconds) and store it to disk. When the application comes back online, that segment will be sent to Sentry together with the error.

Currently sessionSampleRate is not supported in offline mode. Please subscribe to this GitHub issue for updates.

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").