Skip to content

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 17 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@

# ###### Replays #######

# /src/docs/product/session-replay/ @getsentry/replay
# /src/includes/feature-stage-beta-session-replay.mdx @getsentry/replay
# /src/platform-includes/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
# /src/platforms/javascript/common/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
# /src/wizard/javascript/replay-onboarding/ @getsentry/replay @getsentry/replay-sdk-web
# /src/docs/product/session-replay/ @getsentry/replay
# /src/includes/feature-stage-beta-session-replay.mdx @getsentry/replay
# /src/includes/session-replay-web-report-bug.mdx @getsentry/replay
# /src/platform-includes/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
# /src/platforms/javascript/common/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
# /src/wizard/javascript/replay-onboarding/ @getsentry/replay @getsentry/replay-sdk-web

# ###### End Replays #######

97 changes: 97 additions & 0 deletions docs/platforms/android/session-replay/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Set Up Beta Session Replay for Mobile
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', '3.0.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', '3.0.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.11.0') }}'
}
```

```kotlin {filename:app/build.gradle.kts}
dependencies {
implementation("io.sentry:sentry-android:{{@inject packages.version('sentry.java.android', '7.11.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
}
```

<SignInNote />

## 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.

## 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.

## 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`.
81 changes: 81 additions & 0 deletions docs/platforms/apple/guides/ios/session-replay/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: Set Up Beta Session Replay for Mobile
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.0

## 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:Cathage}
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 />

## 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.

## 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.

## 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`.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ notSupported:
description: "Learn about the general Session Replay configuration fields."
---

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

## General Integration Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/platforms/javascript/common/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ notSupported:
description: "Learn how to enable Session Replay in your app if it is not already set up."
---

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

[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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ notSupported:
description: "Configuring Session Replay to maintain user and data privacy."
---

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

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.

Expand Down
80 changes: 80 additions & 0 deletions docs/platforms/react-native/session-replay/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: Set Up Beta Session Replay for Mobile
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-react-native/issues/new?assignees=&labels=Platform%3A+React-Native%2CType%3A+%F0%9F%AA%B2+Bug&projects=&template=BUG_REPORT.md) 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 React Native SDK version is at least 5.26.0.

## Install

If you already have the SDK installed, you can update it to the latest version with:
```
npm install @sentry/react-native --save
```

## Set Up

To set up the integration, add the following to your Sentry initialization.

```javascript
import * as Sentry from '@sentry/react-native';

Sentry.init({
dsn = "___PUBLIC_DSN___",
_experiments: {
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
},
integration: [
Sentry.mobileReplayIntegration({
maskAllText: true,
maskAllImages: true,
}),
],
});
```

<SignInNote />

## 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. <PlatformIdentifier name="replays-session-sample-rate" /> - The sample rate for
replays that begin recording immediately and last the entirety of the user's session.
2. <PlatformIdentifier name="replays-on-error-sample-rate" /> - 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. <PlatformIdentifier name="replays-session-sample-rate" /> is evaluated first. If it's sampled, the replay recording will begin. Otherwise, <PlatformIdentifier name="replays-on-error-sample-rate" /> 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.

## 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.

## Verify

While you're testing, we recommend that you set <PlatformIdentifier name="replays-session-sample-rate" /> 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 <PlatformIdentifier name="replays-on-error-sample-rate" /> set to `1.0`.
2 changes: 1 addition & 1 deletion docs/product/explore/session-replay/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_order: 6
description: "Learn which SDKs support Session Replay and start sending replays to Sentry."
---

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

With Session Replay, Sentry users can get to the root of an error or performance issue faster, by watching a video-like reproduction of a user session and getting additional information such as what would appear in the developer tools of a client browser.

Expand Down
2 changes: 1 addition & 1 deletion docs/product/explore/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_order: 70
description: "Use Session Replay to get video-like reproductions of user interactions to improve your website or app experience."
---

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

Session Replay allows you to see video-like reproductions of user sessions which can help you understand what happened before, during, and after an error or performance issue occurred. You'll be able to gain deeper debugging context into issues so that you can reproduce and resolve problems faster without the guesswork. As you play back each session, you'll be able to see every user interaction in relation to network requests, DOM events, and console messages. It’s effectively like having [DevTools](https://developer.chrome.com/docs/devtools/overview/) active in your production user sessions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_order: 48
description: "Learn more about how enabling Session Replay impacts the performance of your application."
---

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

Session Replay works by observing and recording changes to your web application's DOM and transmitting that data to event ingestion servers over the public internet. In order to perform this work without negatively impacting the host page's performance, the Session Replay SDK takes care to introduce minimal additional filesize, observe and record DOM content in a non-intrusive way, send the absolute minimum number of bytes required, and use low-latency ingestion endpoints geographically close to your end-users.

Expand Down
2 changes: 1 addition & 1 deletion docs/product/explore/session-replay/replay-details.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_order: 24
description: "Learn more about how information is organized on the Replay Details page and how to share and delete replays."
---

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

Every replay has a detailed view that contains the embedded video player and rich debugging context. Playing back the video will allow you to see every user interaction in relation to console messages, DOM events, and network requests. It’s like having [DevTools](https://developer.chrome.com/docs/devtools/overview/) active for your production user sessions. Almost every component on this page is connected through timestamps. See the breakdown of each component and why it’s valuable:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_order: 12
description: "Learn how to navigate the Replays page and filter user sessions that meet specific conditions."
---

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

You can search for or browse replays of user sessions on the **Replay** page, where they’re organized chronologically by default. You’ll see the following information for each session:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_order: 96
description: "Learn about how Session Replay captures data while protecting user privacy."
---

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

With the extra scrutiny and sensitivity around session replay products and the logging of user interactions (e.g., text inputs, page visits, mouse movements, clicks, and scrolls) on websites and applications, we built our own session replay product with an eye towards privacy.

Expand Down
Loading