-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: mobile replay beta #10711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: mobile replay beta #10711
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
35a83bf
feat: mobile replay beta
bruno-garcia 672c14b
better state its beta
bruno-garcia 1539ed3
Update docs/platforms/apple/guides/ios/session-replay/index.mdx
bruno-garcia 58afda1
improve heading
bruno-garcia bf44205
redaction note
bruno-garcia 2dabc3b
note on privacy
bruno-garcia 6ad9f66
fix links
bruno-garcia 6fee6d9
fix syntax type
bruno-garcia 5eaf711
add rn component name
bruno-garcia fa5b46d
verify right after set up
bruno-garcia fc16438
Update docs/platforms/android/session-replay/index.mdx
romtsn c28f573
Update index.mdx
romtsn 600ba32
Update docs/platforms/apple/guides/ios/session-replay/index.mdx
bruno-garcia 79fb2c7
Update .github/CODEOWNERS
bruno-garcia 35aeb98
Update docs/platforms/react-native/session-replay/index.mdx
bruno-garcia 6e02345
Apply suggestions from code review
bruno-garcia 55f945d
Merge branch 'master' into feat/replay-platform-mobile
bruno-garcia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| --- | ||
| title: Set Up Session Replay - Beta | ||
| sidebar_order: 5500 | ||
| notSupported: | ||
| description: "Learn how to enable the Beta of Mobile Session Replay in your app." | ||
| --- | ||
|
|
||
| <Note> | ||
|
|
||
| Mobile support for Session Replay is in Beta. Features available in Beta are still work-in-progress and may have bugs. We recognize the irony. | ||
|
|
||
| If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-java/issues/new?assignees=&labels=Platform%3A+Android%2CType%3A+Bug&projects=&template=bug_report_android.yml) with a link to a relevant replay in Sentry if possible. | ||
|
|
||
| </Note> | ||
|
|
||
| [Session Replay](/product/explore/session-replay/) helps you get to the root cause of an error or latency issue faster by providing you with a reproduction of what was happening in the user's device before, during, and after the issue. You can rewind and replay your application's state and see key user interactions, like taps, swipes, network requests, and console entries, in a single UI. | ||
|
|
||
| By default, our Session Replay SDK masks all text content, images, and user input, giving you heightened confidence that no sensitive data will leave the device. To learn more, see <PlatformLink to="/product/session-replay/">Session Replay Product docs</PlatformLink>. | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| Make sure your Sentry Android SDK version is at least 7.12.0. | ||
|
|
||
| ## Install | ||
|
|
||
| The easiest way to update through the Sentry Android Gradle plugin to your app module's `build.gradle` file. | ||
|
|
||
| ```groovy {filename:app/build.gradle} | ||
| plugins { | ||
| id "com.android.application" | ||
| id "io.sentry.android.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '4.10.0') }}" | ||
| } | ||
| ``` | ||
|
|
||
| ```kotlin {filename:app/build.gradle.kts} | ||
| plugins { | ||
| id("com.android.application") | ||
| id("io.sentry.android.gradle") version "{{@inject packages.version('sentry.java.android.gradle-plugin', '4.10.0') }}" | ||
| } | ||
| ``` | ||
|
|
||
| If you have the SDK installed without the Sentry Gradle Plugin, you can update the version directly in the `build.gradle` through: | ||
| ```groovy {filename:app/build.gradle} | ||
| dependencies { | ||
| implementation 'io.sentry:sentry-android:{{@inject packages.version('sentry.java.android', '7.12.0') }}' | ||
| } | ||
| ``` | ||
|
|
||
| ```kotlin {filename:app/build.gradle.kts} | ||
| dependencies { | ||
| implementation("io.sentry:sentry-android:{{@inject packages.version('sentry.java.android', '7.12.0') }}") | ||
| } | ||
| ``` | ||
|
|
||
| ## Set Up | ||
|
|
||
| To set up the integration, add the following to your Sentry initialization. | ||
|
|
||
| ```kotlin | ||
| SentryAndroid.init(context) { options -> | ||
| options.dsn = "___PUBLIC_DSN___" | ||
| options.isDebug = true | ||
|
|
||
| // Currently under experimental options: | ||
| options.experimental.sessionReplay.errorSampleRate = 1.0 | ||
| options.experimental.sessionReplay.sessionSampleRate = 1.0 | ||
| } | ||
bruno-garcia marked this conversation as resolved.
Show resolved
Hide resolved
bruno-garcia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
romtsn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ```xml {filename:AndroidManifest.xml} | ||
| <meta-data android:name="io.sentry.session-replay.error-sample-rate" android:value="1.0" /> | ||
| <meta-data android:name="io.sentry.session-replay.session-sample-rate" android:value="1.0" /> | ||
| ``` | ||
|
|
||
| <SignInNote /> | ||
|
|
||
| ## Verify | ||
|
|
||
| While you're testing, we recommend that you set `sessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry. | ||
|
|
||
| Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `errorSampleRate` set to `1.0`. | ||
|
|
||
| ## Sampling | ||
|
|
||
| Sampling allows you to control how much of your website's traffic will result in a Session Replay. There are two sample rates you can adjust to get the replays relevant to you: | ||
|
|
||
| 1. `sessionSampleRate` - The sample rate for | ||
| replays that begin recording immediately and last the entirety of the user's session. | ||
| 2. `errorSampleRate` - The 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. | ||
|
|
||
| Sampling begins as soon as a session starts. `sessionSampleRate` is evaluated first. If it's sampled, the replay recording will begin. Otherwise, `errorSampleRate` is evaluated and if it's sampled, the integration will begin buffering the replay and will only upload it to Sentry if an error occurs. The remainder of the replay will behave similarly to a whole-session replay. | ||
|
|
||
| ## Privacy | ||
|
|
||
| The SDK is recording and aggressively redacting all text and images. We plan to add fine controls for redacting, but in this version, we just allow either on or off. The default is on. Please don’t turn it off if you have sensitive data in your app. Before the Beta is complete, we'll give you the controls you need. | ||
|
|
||
| <Note> | ||
|
|
||
| Jetpack Compose views are not yet redacted. This is being [tracked here](https://github.com/getsentry/sentry-java/issues/3577). | ||
| If you encounter any other data not being redacted with the default settings, please let us know through a [GitHub issue](https://github.com/getsentry/sentry-java/issues/new?assignees=&labels=Platform%3A+Android%2CType%3A+Bug&projects=&template=bug_report_android.yml). | ||
|
|
||
| </Note> | ||
|
|
||
| To disable redaction altogether (not to be used on applications with sensitive data): | ||
|
|
||
| ```kotlin | ||
| options.experimental.sessionReplay.redactAllText = false | ||
| options.experimental.sessionReplay.redactAllImages = false | ||
| ``` | ||
|
|
||
| ## Error Linking | ||
|
|
||
| Errors that happen on the page while a replay is running will be linked to the replay, making it possible to jump between related issues and replays. However, it's **possible** that in some cases the error count reported on the **Replays Details** page won't match the actual errors that have been captured. That's because errors can be lost, and while this is uncommon, there are a few reasons why it could happen: | ||
|
|
||
| - The replay was rate-limited and couldn't be accepted. | ||
| - The replay was deleted by a member of your org. | ||
| - There were network errors and the replay wasn't saved. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| --- | ||
| title: Set Up Session Replay - Beta | ||
| sidebar_order: 5500 | ||
| notSupported: | ||
| description: "Learn how to enable the Beta of Mobile Session Replay in your app." | ||
| --- | ||
|
|
||
| <Note> | ||
|
|
||
| Mobile support for Session Replay is in Beta. Features available in Beta are still work-in-progress and may have bugs. We recognize the irony. | ||
|
|
||
| If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-cocoa/issues/new?assignees=&labels=Platform%3A+Cocoa%2CType%3A+Bug&projects=&template=bug.yml) with a link to a relevant replay in Sentry if possible. | ||
|
|
||
| </Note> | ||
|
|
||
| [Session Replay](/product/explore/session-replay/) helps you get to the root cause of an error or latency issue faster by providing you with a reproduction of what was happening in the user's device before, during, and after the issue. You can rewind and replay your application's state and see key user interactions, like taps, swipes, network requests, and console entries, in a single UI. | ||
|
|
||
| By default, our Session Replay SDK masks all text content, images, and user input, giving you heightened confidence that no sensitive data will leave the device. To learn more, see <PlatformLink to="/product/session-replay/">Session Replay Product docs</PlatformLink>. | ||
|
|
||
| ## Pre-requisites | ||
bruno-garcia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Make sure your Sentry Cocoa SDK version is at least 8.31.1 | ||
|
|
||
| ## Install | ||
|
|
||
| If you already have the SDK installed, you can update it to the latest version with: | ||
|
|
||
| ```swift {tabTitle:SPM} | ||
| .package(url: "https://github.com/getsentry/sentry-cocoa", from: "{{@inject packages.version('sentry.cocoa') }}"), | ||
| ``` | ||
| ```ruby {tabTitle:Cocoapods} | ||
| pod update | ||
| ``` | ||
| ```ruby {tabTitle:Carthage} | ||
| github "getsentry/sentry-cocoa" "{{@inject packages.version('sentry.cocoa') }}" | ||
| ``` | ||
|
|
||
|
|
||
| ## Set Up | ||
|
|
||
| To set up the integration, add the following to your Sentry initialization. | ||
|
|
||
| ```swift | ||
| SentrySDK.start(configureOptions: { options in | ||
| options.dsn = "___PUBLIC_DSN___" | ||
| options.debug = true | ||
|
|
||
| // Currently under experimental options: | ||
| options.experimental.sessionReplay.errorSampleRate = 1.0 | ||
| options.experimental.sessionReplay.sessionSampleRate = 1.0 | ||
| }) | ||
| ``` | ||
|
|
||
| <SignInNote /> | ||
|
|
||
| ## Verify | ||
|
|
||
| While you're testing, we recommend that you set `sessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry. | ||
|
|
||
| Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `errorSampleRate` set to `1.0`. | ||
|
|
||
| ## Sampling | ||
|
|
||
| Sampling allows you to control how much of your website's traffic will result in a Session Replay. There are two sample rates you can adjust to get the replays relevant to you: | ||
|
|
||
| 1. `sessionSampleRate` - The sample rate for | ||
| replays that begin recording immediately and last the entirety of the user's session. | ||
| 2. `errorSampleRate` - The 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. | ||
|
|
||
| Sampling begins as soon as a session starts. `sessionSampleRate` is evaluated first. If it's sampled, the replay recording will begin. Otherwise, `errorSampleRate` is evaluated and if it's sampled, the integration will begin buffering the replay and will only upload it to Sentry if an error occurs. The remainder of the replay will behave similarly to a whole-session replay. | ||
|
|
||
| ## Privacy | ||
|
|
||
| The SDK is recording and aggressively redacting all text and images. We plan to add fine controls for redacting, but in this version, we just allow either on or off. The default is on. Please don’t turn it off if you have sensitive data in your app. Before the Beta is complete, we'll give you the controls you need. | ||
|
|
||
| <Note> | ||
|
|
||
| If you encounter any data not being redacted with the default settings, please let us know through a [GitHub issue](https://github.com/getsentry/sentry-cocoa/issues/new?assignees=&labels=Platform%3A+Cocoa%2CType%3A+Bug&projects=&template=bug.yml). | ||
|
|
||
| </Note> | ||
|
|
||
| To disable redaction altogether (not to be used on applications with sensitive data): | ||
|
|
||
| ```swift | ||
| options.experimental.sessionReplay.redactAllText = true | ||
| options.experimental.sessionReplay.redactAllImages = true | ||
| ``` | ||
|
|
||
| ## Error Linking | ||
|
|
||
| Errors that happen on the page while a replay is running will be linked to the replay, making it possible to jump between related issues and replays. However, it's **possible** that in some cases the error count reported on the **Replays Details** page won't match the actual errors that have been captured. That's because errors can be lost, and while this is uncommon, there are a few reasons why it could happen: | ||
|
|
||
| - The replay was rate-limited and couldn't be accepted. | ||
| - The replay was deleted by a member of your org. | ||
| - There were network errors and the replay wasn't saved. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.