-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: mobile replay beta * better state its beta * Update docs/platforms/apple/guides/ios/session-replay/index.mdx Co-authored-by: Dhiogo Brustolin <[email protected]> * improve heading * redaction note * note on privacy * fix links * fix syntax type * add rn component name * verify right after set up * Update docs/platforms/android/session-replay/index.mdx * Update index.mdx * Update docs/platforms/apple/guides/ios/session-replay/index.mdx * Update .github/CODEOWNERS * Update docs/platforms/react-native/session-replay/index.mdx * Apply suggestions from code review Co-authored-by: Krystof Woldrich <[email protected]> --------- Co-authored-by: Dhiogo Brustolin <[email protected]> Co-authored-by: Roman Zavarnitsyn <[email protected]> Co-authored-by: Krystof Woldrich <[email protected]>
- Loading branch information
1 parent
a2c0a4a
commit 7b24723
Showing
13 changed files
with
368 additions
and
14 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains 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 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 | ||
} | ||
``` | ||
|
||
```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 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 | ||
|
||
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 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 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 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.