Skip to content

structural, wording, and styling changes #5946

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 4 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions src/docs/product/session-replay/index.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
title: "Session Replay"
sidebar_order: 3
description: "Session Replay"
description: "Learn about Sentry's Session Replay, which provides video-like reproductions of user interactions on a site or web app."
---

<Note>

Session Replay is currently in beta. Beta features are still in-progress and may have bugs. We recognize the irony. If you have any questions or feedback, please email us at [[email protected]](mailto:[email protected]).

**Currently, this feature is supported for only browser JavaScript, including these frameworks:**

- Angular
- Ember
- Gatsby
Expand All @@ -20,7 +21,7 @@ Session Replay is currently in beta. Beta features are still in-progress and may

</Note>

Get to the root cause of an error or latency issue faster by seeing all the technical details related to that issue in one visual replay on your web application.
Get to the root cause of an error or latency issue faster by seeing all the technical details related to that issue in one visual replay on your web application. **Session Replay** provides a video-like reproduction of user interactions on a site or web app. All user interactions — including page visits, mouse movements, clicks, and scrolls — are captured, helping developers connect the dots between a known issue and how a user experienced it in the UI.

## Join the Session Replay Waitlist

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
To set up the integration, add the following to your Sentry initialization. Several options are supported and passable via the integration constructor. See the [configuration sections](/platforms/javascript/session-replay/) for more details.
To set up the integration, add the following to your Sentry initialization. Several options are supported and passable using the integration constructor. See the [configuration documentation](/platforms/javascript/session-replay/configuration/) for more details.

```javascript {tabTitle: ESM}
// import Sentry from your framework SDK (e.g. @sentry/react) instead of @sentry/browser
// import Sentry from your framework SDK (e.g. @sentry/react) instead of @sentry/browser
import * as Sentry from "@sentry/browser";

import { Replay } from "@sentry/replay";
Expand All @@ -21,9 +21,9 @@ Sentry.init({
new Replay({
// Additional SDK configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true
blockAllMedia: true,
// See below for all available options
})
}),
],
});
```
Expand All @@ -44,9 +44,9 @@ Sentry.init({
new Sentry.Integrations.Replay({
// Additional SDK configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true
blockAllMedia: true,
// See below for all available options
})
}),
],
});
```
Expand All @@ -56,4 +56,4 @@ You can verify that with the following:

```javascript
myUndefinedFunction();
```
```
26 changes: 13 additions & 13 deletions src/platforms/javascript/common/session-replay/configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Configuration
sidebar_order: 410
sidebar_order: 4100
notSupported:
- javascript.capacitor
- javascript.cordova
Expand All @@ -15,25 +15,25 @@ description: "Learn about the general Session Replay configuration fields."

The following options can be configured on the root level of your browser-based Sentry SDK, in `init({})`:

| key | type | default | description |
| ------------------------ | ------- | ------- | --- |
| replaysSessionSampleRate | number | `0.1` | The sample rate for replays that begin recording immediately and last the entirety of the user's session. 1.0 will collect all replays, 0 will collect no replays. |
| replaysOnErrorSampleRate | number | `1.0` | 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. 1.0 capturing all sessions with an error, and 0 capturing none. |
| Key | Type | Default | Description |
| ------------------------ | ------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| replaysSessionSampleRate | number | `0.1` | The sample rate for replays that begin recording immediately and last the entirety of the user's session. `1.0` collects all replays, and `0` collects none. |
| replaysOnErrorSampleRate | number | `1.0` | 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. `1.0` captures all sessions with an error, and `0` captures none. |

The following options can be configured as options to the integration, in `new Replay({})`:

| key | type | default | description |
| ------------------- | ------- | ------- | --- |
| stickySession | boolean | `true` | Keep track of the user across page loads. Note a single user using multiple tabs will result in multiple sessions. Closing a tab will result in the session being closed as well. |
| Key | Type | Default | Description |
| ------------- | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| stickySession | boolean | `true` | Keep track of the user across page loads. Note, a single user using multiple tabs will result in multiple sessions. Closing a tab will result in the session being closed as well. |

## Optimization Configuration

The following options can be configured as options to the integration, in `new Replay({})`:

| key | type | default | description |
| ---------------- | ----------------------- | ------- | --- |
| collectFonts | boolean | `false` | Should collect fonts used on the website |
| inlineImages | boolean | `false` | Should inline `<image>` content |
| Key | Type | Default | Description |
| ---------------- | ------- | ------- | ----------------------------------------------- |
| collectFonts | boolean | `false` | Should collect fonts used on the website |
| inlineImages | boolean | `false` | Should inline `<image>` content |
| inlineStylesheet | boolean | `true` | Should inline stylesheets used in the recording |

## Identifying Users
Expand Down Expand Up @@ -76,4 +76,4 @@ replay.stop(); // Stop recording

## Privacy

We take privacy seriously so we provide a number of privacy-oriented settings. Learn more about these in our our<PlatformLink to="/session-replay/privacy/#privacy-configuration">Session Replay privacy documentation</PlatformLink>.
We take privacy seriously, so we provide a number of privacy-oriented settings. Learn more about these in our our <PlatformLink to="/session-replay/privacy/#privacy-configuration">Session Replay privacy documentation</PlatformLink>.
24 changes: 12 additions & 12 deletions src/platforms/javascript/common/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,43 @@ redirect_from:

<Include name="beta-note-session-replay.mdx" />

With [session replays](/product/session-replay/) you can get to the root cause of an error or latency issue faster by seeing all the technical details related to that issue in one visual replay on your web application. Sentry provides a video-like reproduction of user interactions on a site or web app. All user interactions - including page visits, mouse movements, clicks, and scrolls - are captured, helping developers connect the dots between a known issue and how a user experienced it in the UI.
With [session replays](/product/session-replay/) you can get to the root cause of an error or latency issue faster by seeing all the technical details related to that issue in one visual replay on your web application. Sentry provides a video-like reproduction of user interactions on a site or web app. All user interactions including page visits, mouse movements, clicks, and scrolls are captured, helping developers connect the dots between a known issue and how a user experienced it in the UI.

By default, it'll mask all fields, so no personally identifiable information (PII) is collected, eliminating any concerns with General Data Protection Regulation (GDPR). Learn more on <PlatformLink to="/session-replay/privacy">Session Replay Privacy</PlatformLink>.

## Pre-requisites

For the sentry-replay integration to work, you must have the [Sentry browser SDK package](https://www.npmjs.com/package/@sentry/browser), or an equivalent framework SDK (e.g. [@sentry/react](https://www.npmjs.com/package/@sentry/react)) installed. The minimum version required for the SDK is `7.24.0`.
For the sentry-replay integration to work, you must have the [Sentry browser SDK package](https://www.npmjs.com/package/@sentry/browser), or an equivalent framework SDK (for example, [@sentry/react](https://www.npmjs.com/package/@sentry/react)) installed. The minimum version required for the SDK is `7.24.0`.

Make sure to use the exact same version of `@sentry/replay` as your other Sentry package(s), e.g. `@sentry/browser` or `@sentry/react`.
Make sure to use the exact same version of `@sentry/replay` as your other Sentry package(s), such as `@sentry/browser` or `@sentry/react`.

`@sentry/replay` requires Node 12+, and browsers newer than IE11.

## Installation
## Install

<PlatformContent includePath="session-replay/install-session-replay" />
<PlatformContent includePath="session-replay/install" />

## Set up
## Set Up

<PlatformContent includePath="session-replay/setup-session-replay" />
<PlatformContent includePath="session-replay/setup" />

## User Session

A user session starts when the Session Replay SDK is first loaded and initialized. The session will continue until five minutes passes without any user interactions with the application **or** until a maximum of 30 minutes have elapsed. Closing the browser tab will end the session immediately according to the rules for [SessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage).

<Note>

An 'interaction' refers to either a mouse click or a browser navigation event.
An _interaction_ refers to either a mouse click or a browser navigation event.

</Note>

### Replay Captures Only on Errors
### Replay Captures on Errors Only

Alternatively, rather than recording an entire session, you can capture a replay only when an error occurs. In this case, the integration will buffer up to one minute worth of events prior to the error being thrown. It will continue to record the session following the rules above regarding session life and activity. Read the [sampling](#sampling) section for configuration options.

## 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 more relevant to your interests:
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 your interests:

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.
Expand All @@ -70,14 +70,14 @@ Sampling occurs when the session is first started. <PlatformIdentifier name="rep

## Error Linking

Currently, errors that happen on the page while a replay is running are linked to the Replay, making it as easy as possible to jump between related issues/replays. However, please note that it is __possible__ that the error count reported on the Replay Detail page does not match the actual errors that have been captured. The reason for that is that errors can be lost, e.g. a network request fails, or similar. This should not happen to often, but be aware that it is theoretically possible.
Currently, errors that happen on the page while a replay is running are linked to the Replay, making it as easy as possible to jump between related issues and replays. However, it is **possible** that the error count reported on the **Replays Details** page does not match the actual errors that have been captured. This is because errors can be lost; for example, a network request may fail or similar. This shouldn't happen often, but it's theoretically possible.

## Verify

While you're testing, set <PlatformIdentifier name="replays-session-sample-rate" /> to `1.0`, as that 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`.

**Next Steps:**
## Next Steps

<PageGrid />
Loading