Skip to content

Commit ec84cb7

Browse files
bruno-garciabrustolinromtsnkrystofwoldrich
authored andcommitted
feat: mobile replay beta (#10711)
* 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]>
1 parent f16aec2 commit ec84cb7

File tree

13 files changed

+368
-14
lines changed

13 files changed

+368
-14
lines changed

.github/CODEOWNERS

+5-6
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@
4545

4646
# ###### Replays #######
4747

48-
# /src/docs/product/session-replay/ @getsentry/replay
49-
# /src/includes/feature-stage-beta-session-replay.mdx @getsentry/replay
50-
# /src/platform-includes/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
51-
# /src/platforms/javascript/common/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
52-
# /src/wizard/javascript/replay-onboarding/ @getsentry/replay @getsentry/replay-sdk-web
48+
# /src/docs/product/session-replay/ @getsentry/replay
49+
# /src/includes/session-replay-web-report-bug.mdx @getsentry/replay
50+
# /src/platform-includes/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
51+
# /src/platforms/javascript/common/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
52+
# /src/wizard/javascript/replay-onboarding/ @getsentry/replay @getsentry/replay-sdk-web
5353

5454
# ###### End Replays #######
55-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Set Up Session Replay - Beta
3+
sidebar_order: 5500
4+
notSupported:
5+
description: "Learn how to enable the Beta of Mobile Session Replay in your app."
6+
---
7+
8+
<Note>
9+
10+
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.
11+
12+
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.
13+
14+
</Note>
15+
16+
[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.
17+
18+
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>.
19+
20+
## Pre-requisites
21+
22+
Make sure your Sentry Android SDK version is at least 7.12.0.
23+
24+
## Install
25+
26+
The easiest way to update through the Sentry Android Gradle plugin to your app module's `build.gradle` file.
27+
28+
```groovy {filename:app/build.gradle}
29+
plugins {
30+
id "com.android.application"
31+
id "io.sentry.android.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '4.10.0') }}"
32+
}
33+
```
34+
35+
```kotlin {filename:app/build.gradle.kts}
36+
plugins {
37+
id("com.android.application")
38+
id("io.sentry.android.gradle") version "{{@inject packages.version('sentry.java.android.gradle-plugin', '4.10.0') }}"
39+
}
40+
```
41+
42+
If you have the SDK installed without the Sentry Gradle Plugin, you can update the version directly in the `build.gradle` through:
43+
```groovy {filename:app/build.gradle}
44+
dependencies {
45+
implementation 'io.sentry:sentry-android:{{@inject packages.version('sentry.java.android', '7.12.0') }}'
46+
}
47+
```
48+
49+
```kotlin {filename:app/build.gradle.kts}
50+
dependencies {
51+
implementation("io.sentry:sentry-android:{{@inject packages.version('sentry.java.android', '7.12.0') }}")
52+
}
53+
```
54+
55+
## Set Up
56+
57+
To set up the integration, add the following to your Sentry initialization.
58+
59+
```kotlin
60+
SentryAndroid.init(context) { options ->
61+
options.dsn = "___PUBLIC_DSN___"
62+
options.isDebug = true
63+
64+
// Currently under experimental options:
65+
options.experimental.sessionReplay.errorSampleRate = 1.0
66+
options.experimental.sessionReplay.sessionSampleRate = 1.0
67+
}
68+
```
69+
70+
```xml {filename:AndroidManifest.xml}
71+
<meta-data android:name="io.sentry.session-replay.error-sample-rate" android:value="1.0" />
72+
<meta-data android:name="io.sentry.session-replay.session-sample-rate" android:value="1.0" />
73+
```
74+
75+
<SignInNote />
76+
77+
## Verify
78+
79+
While you're testing, we recommend that you set `sessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
80+
81+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `errorSampleRate` set to `1.0`.
82+
83+
## Sampling
84+
85+
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:
86+
87+
1. `sessionSampleRate` - The sample rate for
88+
replays that begin recording immediately and last the entirety of the user's session.
89+
2. `errorSampleRate` - The sample rate for
90+
replays that are recorded when an error happens. This type of replay will record
91+
up to a minute of events prior to the error and continue recording until the session
92+
ends.
93+
94+
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.
95+
96+
## Privacy
97+
98+
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.
99+
100+
<Note>
101+
102+
Jetpack Compose views are not yet redacted. This is being [tracked here](https://github.com/getsentry/sentry-java/issues/3577).
103+
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).
104+
105+
</Note>
106+
107+
To disable redaction altogether (not to be used on applications with sensitive data):
108+
109+
```kotlin
110+
options.experimental.sessionReplay.redactAllText = false
111+
options.experimental.sessionReplay.redactAllImages = false
112+
```
113+
114+
## Error Linking
115+
116+
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:
117+
118+
- The replay was rate-limited and couldn't be accepted.
119+
- The replay was deleted by a member of your org.
120+
- There were network errors and the replay wasn't saved.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: Set Up Session Replay - Beta
3+
sidebar_order: 5500
4+
notSupported:
5+
description: "Learn how to enable the Beta of Mobile Session Replay in your app."
6+
---
7+
8+
<Note>
9+
10+
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.
11+
12+
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.
13+
14+
</Note>
15+
16+
[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.
17+
18+
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>.
19+
20+
## Pre-requisites
21+
22+
Make sure your Sentry Cocoa SDK version is at least 8.31.1
23+
24+
## Install
25+
26+
If you already have the SDK installed, you can update it to the latest version with:
27+
28+
```swift {tabTitle:SPM}
29+
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "{{@inject packages.version('sentry.cocoa') }}"),
30+
```
31+
```ruby {tabTitle:Cocoapods}
32+
pod update
33+
```
34+
```ruby {tabTitle:Carthage}
35+
github "getsentry/sentry-cocoa" "{{@inject packages.version('sentry.cocoa') }}"
36+
```
37+
38+
39+
## Set Up
40+
41+
To set up the integration, add the following to your Sentry initialization.
42+
43+
```swift
44+
SentrySDK.start(configureOptions: { options in
45+
options.dsn = "___PUBLIC_DSN___"
46+
options.debug = true
47+
48+
// Currently under experimental options:
49+
options.experimental.sessionReplay.errorSampleRate = 1.0
50+
options.experimental.sessionReplay.sessionSampleRate = 1.0
51+
})
52+
```
53+
54+
<SignInNote />
55+
56+
## Verify
57+
58+
While you're testing, we recommend that you set `sessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
59+
60+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `errorSampleRate` set to `1.0`.
61+
62+
## Sampling
63+
64+
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:
65+
66+
1. `sessionSampleRate` - The sample rate for
67+
replays that begin recording immediately and last the entirety of the user's session.
68+
2. `errorSampleRate` - The sample rate for
69+
replays that are recorded when an error happens. This type of replay will record
70+
up to a minute of events prior to the error and continue recording until the session
71+
ends.
72+
73+
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.
74+
75+
## Privacy
76+
77+
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.
78+
79+
<Note>
80+
81+
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).
82+
83+
</Note>
84+
85+
To disable redaction altogether (not to be used on applications with sensitive data):
86+
87+
```swift
88+
options.experimental.sessionReplay.redactAllText = true
89+
options.experimental.sessionReplay.redactAllImages = true
90+
```
91+
92+
## Error Linking
93+
94+
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:
95+
96+
- The replay was rate-limited and couldn't be accepted.
97+
- The replay was deleted by a member of your org.
98+
- There were network errors and the replay wasn't saved.

docs/platforms/javascript/common/session-replay/configuration.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ notSupported:
1919
description: "Learn about the general Session Replay configuration fields."
2020
---
2121

22-
<Include name="feature-stage-beta-session-replay.mdx" />
22+
<Include name="session-replay-web-report-bug.mdx" />
2323

2424
## General Integration Configuration
2525

docs/platforms/javascript/common/session-replay/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ notSupported:
1919
description: "Learn how to enable Session Replay in your app if it is not already set up."
2020
---
2121

22-
<Include name="feature-stage-beta-session-replay.mdx" />
22+
<Include name="session-replay-web-report-bug.mdx" />
2323

2424
[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 video-like reproduction of what was happening in the user's browser before, during, and after the issue. You can rewind and replay your application's DOM state and see key user interactions, like mouse clicks, scrolls, network requests, and console entries, in a single combined UI inspired by your browser's DevTools.
2525

docs/platforms/javascript/common/session-replay/privacy.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ notSupported:
1919
description: "Configuring Session Replay to maintain user and data privacy."
2020
---
2121

22-
<Include name="feature-stage-beta-session-replay.mdx" />
22+
<Include name="session-replay-web-report-bug.mdx" />
2323

2424
There are several ways to deal with personally identifiable information (PII). By default, the Session Replay SDK will mask all text content with `*` and block all media elements (`img`, `svg`, `video`, `object`, `picture`, `embed`, `map`, `audio`) on the client, before it is sent to the server. This can be disabled by setting `maskAllText` to `false`. It's also possible to add the following CSS classes to specific DOM elements to prevent recording their contents: `sentry-block`, `sentry-ignore`, and `sentry-mask`. The following sections will show examples of how content is handled by the differing methods.
2525

0 commit comments

Comments
 (0)