Skip to content

Commit 445e1be

Browse files
session replay product docs (#6255)
* session replay product docs * fix order * fix jsx * links * link in Note block; glhf * fix headings * Update src/docs/product/session-replay/replay-details.mdx * fix boldin * page grid and beta links * Apply suggestions from code review Co-authored-by: Jasmin <[email protected]> * spacing * note as sub item * Update src/docs/product/session-replay/replay-page-and-filters.mdx Co-authored-by: Jasmin <[email protected]> * image`` * formatting * formatting --------- Co-authored-by: Jasmin <[email protected]>
1 parent 228659a commit 445e1be

File tree

11 files changed

+190
-17
lines changed

11 files changed

+190
-17
lines changed

src/docs/product/issues/issue-details/error-issues/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ It's the most important piece of information that the Sentry grouping algorithm
7979

8080
You can set your own <PlatformLink to="/enriching-events/breadcrumbs/">breadcrumbs</PlatformLink> to make them more useful for debugging.
8181

82+
If you’ve enabled [Session Replay](/product/session-replay/), you’ll see a replay preview under Breadcrumbs if there’s one associated with the frontend error event you’re viewing. This will lead you to the [Replay Details](/product/session-replay/replay-details/) page when you click it.
83+
8284
## Trace Details
8385

8486
[Tracing](/product/sentry-basics/tracing/distributed-tracing/) augments your existing error data by capturing interactions between your software systems. In the "Trace Details" section, you can click the "Search by Trace" button to see all the events that share the same trace ID.

src/docs/product/issues/issue-details/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ It's the most important piece of information that the Sentry grouping algorithm
6969

7070
You can set your own <PlatformLink to="/enriching-events/breadcrumbs/">breadcrumbs</PlatformLink> to make them more useful for debugging.
7171

72+
If you’ve enabled [Session Replay](/product/session-replay/), you’ll see a replay preview under Breadcrumbs if there’s one associated with the event you’re viewing. This will lead you to the [Replay Details](/product/session-replay/replay-details/) page when you click it.
73+
7274
## Trace Details
7375

7476
[Tracing](/product/sentry-basics/tracing/distributed-tracing/) augments your existing error data by capturing interactions between your software systems. In the "Trace Details" section, you can click the "Search by Trace" button to see all the events that share the same trace ID.
@@ -84,3 +86,4 @@ This page displays the "Details" tab when it first opens, but several other tabs
8486
- **All Events** - A list of all the error events included in the issue.
8587
- **Merged Issues** - A list of error issues that have been merged with this one.
8688
- **Similar Issues** - A list of error issues that have a similar stack trace [that you can merge](/product/data-management-settings/event-grouping/merging-issues/).
89+
- **Replays** – A list of [replays](/product/session-replay/) tied to error events included in the issue.

src/docs/product/performance/transaction-summary.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ In the example below, the self time of each span is highlighted by the darker ar
141141

142142
Spans with the same operation and description are grouped together into a single span group. Some processing is done to group similar spans together. If you find that the span grouping is not ideal, you can change this by making sure the spans you want grouped together have the same operation and description.
143143

144+
### Replays
145+
146+
The Replays tab displays a list of replays where the transaction you’re viewing had occurred. Go directly to [Replay Details](/product/session-replay/replay-details/) for any replay and see how a slow transaction impacted the user experience. Note: you must have [Session Replay](/product/session-replay/) enabled to see this tab.
147+
144148
## Additional Actions
145149

146150
### Starring Important Transactions {#starring-key-transactions}
Loading
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "Set Up"
3+
sidebar_order: 6
4+
description: "Get started with Sentry's Session Replay, which allows you to visualize a video-like reproduction of a user's session."
5+
---
6+
7+
<Include name="beta-note-session-replay.mdx" />
8+
9+
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.
10+
11+
To get instructions for how to set it up and start sending replays, click a link for one of the supported SDKs below.
12+
13+
## Supported SDKs
14+
15+
Session Replay supports all browser-based JavaScript applications. It’s built to work with `@sentry/browser` and our browser framework SDKs:
16+
17+
- [Vanilla JavaScript](/platforms/javascript/session-replay/)
18+
- [Angular](/platforms/javascript/guides/angular/session-replay/)
19+
- [Capacitor](/platforms/javascript/guides/capacitor/session-replay/)
20+
- [Electron](/platforms/javascript/guides/electron/session-replay/)
21+
- [Ember](/platforms/javascript/guides/ember/session-replay/)
22+
- [Gatsby](/platforms/javascript/guides/gatsby/session-replay/)
23+
- [Next.js](/platforms/javascript/guides/nextjs/session-replay/)
24+
- [React](/platforms/javascript/guides/react/session-replay/)
25+
- [Remix](/platforms/javascript/guides/remix/session-replay/)
26+
- [Svelte](/platforms/javascript/guides/svelte/session-replay/)
27+
- [Vue](/platforms/javascript/guides/vue/session-replay/)

src/docs/product/session-replay/index.mdx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,35 @@ sidebar_order: 3
44
description: "Learn about Sentry's Session Replay, which provides video-like reproductions of user interactions on a site or web app."
55
---
66

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

9+
Session Replay shows you a video-like reproduction of your user sessions so you can see what happened before, during, and after an error or performance issue occurred. With Session Replay, you gain deeper debugging context into any issue so that you can reproduce problems and resolve them faster without the guesswork. As you play back each session, you can 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.
10+
11+
Replays are integrated with other areas of the Sentry product so you can see how the user experience is impacted by errors and slow transactions. Replays associated with error events will appear on the [Issue Details](/product/issues/issue-details/) page, while those showing slow transactions will appear on the [Transaction Summary](/product/performance/transaction-summary/) page.
12+
13+
## What is a Replay?
14+
15+
A replay is **not** a video recording. It’s a video-like reproduction of a user session, built using the  [rrweb recording library](https://www.rrweb.io/). Replays are created from snapshots of your web application’s DOM state (the browser’s in-memory representation of HTML). A user session can span multiple page loads, including page refreshes.
16+
17+
The start of a replay recording can be triggered by:
18+
19+
- A user session being part of a sampling rate, as controlled by [replaysSessionSampleRate](/platforms/javascript/session-replay/#sampling). When a user loads a page, a decision is made whether to sample it or not.
20+
- An error occurring during a session that’s not being recorded. The session is then recorded based on [replaysOnErrorSampleRate](/platforms/javascript/session-replay/#sampling)
21+
- Manually calling the [replay.start()](/platforms/javascript/session-replay/configuration/#start-and-stop-recording) method
22+
23+
The end of a replay recording can be triggered by:
24+
25+
- User inactivity within the tab/page that’s being recorded. (If a user doesn’t click or navigate around the site for more than 5 minutes. Mouse scrolls, mouse movements, and keyboard events don’t currently qualify as activity.)
26+
- A recording reaching the maximum replay duration limit (currently 60 minutes)
27+
- Manually calling the [replay.stop()](/platforms/javascript/session-replay/configuration/#start-and-stop-recording) method
28+
29+
30+
<Note>
31+
32+
Unlike [sessions](/product/releases/health/#session) on the **Releases** page, user sessions in Session Replay can span multiple page loads.
33+
34+
</Note>
1035

11-
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.
36+
## Learn More
1237

38+
<PageGrid />
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "Performance Overhead"
3+
sidebar_order: 48
4+
description: "Session Replay SDK performance overhead."
5+
---
6+
7+
<Include name="beta-note-session-replay.mdx" />
8+
9+
Sentry’s Session Replay SDK takes several steps to avoid negatively impacting the performance of the page on which it’s running:
10+
11+
- At the time of publishing this document, the Session Replay plugin is an additional ~36KB gzipped. In our own research, this is among the smallest Session Replay SDKs available.
12+
- The Session Replay SDK works by snapshotting the web page’s Document Object Model (DOM) and transmitting its content to Sentry’s servers. To minimize the amount of bytes transferred, multiple strategies are employed:
13+
- Once the initial DOM tree is snapshotted, the SDK records and transmits *changes* to the DOM rather than snapshotting the entire tree again. This significantly reduces the amount of bytes transferred.
14+
- DOM content itself is gzip compressed client-side before transmission over HTTP. The compression operation is executed in a background thread using a [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers), which means the browser’s UI thread is unaffected.
15+
16+
Sentry’s event ingestion infrastructure uses [distributed Points-of-Presence (PoPs)](https://blog.sentry.io/2022/03/31/sentry-points-of-presence-how-we-built-a-distributed-ingestion/) which place ingestion servers around the world and close to your users. When a Session Replay event is transmitted, the user’s browser connects and transmits the event payload to the closest PoP available for their region. This greatly reduces end-to-end latency and minimizes the amount of networking overhead placed on the browser.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "Protecting User Privacy"
3+
sidebar_order: 96
4+
description: "Protecting user privacy with Session Replay."
5+
---
6+
7+
<Include name="beta-note-session-replay.mdx" />
8+
9+
## HTML Content
10+
11+
To reduce the risk of Potentially Identifiable Information (PII) being ingested and stored on our servers, Sentry’s Session Replay SDK is designed to be “private by default”. The Session Replay SDK in its default configuration redacts **all** HTML text nodes and images before it leaves the browser. During playback, redacted text nodes and images are clearly denoted using asterisks and static gray boxes, respectively.
12+
13+
To see unredacted HTML content – for example, your static navigation items, menus, and links – you may additionally opt-in static HTML elements that are known not to contain PII by denoting those elements with `$classname`. It’s strongly recommended not to opt-in any known, user-generated content.
14+
15+
![Replay PII Scrubbing example](Replay-PIIScrubbing.png)
16+
17+
Alternatively, you can turn off the default privacy configuration, which will cause all text nodes and images to be transferred unredacted. This is only recommended when working with static content websites known not to contain any sensitive user information. Note that when using this configuration option, failure to carefully identify HTML elements containing PII means risking sensitive content leaving the user’s browser.
18+
19+
To learn more, including available configuration options, see [Session Replay Privacy](/platforms/javascript/session-replay/privacy/).
20+
21+
## User Input
22+
23+
In addition to HTML content, Session Replay records key user interactions like mouse movements, mouse clicks, and keyboard presses. By default, all user keypresses are redacted and replaced with asterisks. Captured mouse movements are limited to source and target destinations (for example, where the mouse came from and where it went, not the exact path). A low-fidelity approximation of this movement is recreated during playback.
24+
25+
## Breadcrumbs and other Metadata
26+
27+
To assist in debugging, Session Replay captures additional metadata like console.log entries, network requests, browser, operating system, and more. By default, Sentry scans this data on the server and automatically removes potentially sensitive strings like credit card numbers, social security numbers, API tokens, and more. This same process is applied to other Sentry event types like Errors and Transactions.
28+
29+
To learn more see [PII and Data Scrubbing](/product/relay/pii-and-data-scrubbing/).
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: "Replay Details"
3+
sidebar_order: 24
4+
description: "Session Replay Details."
5+
---
6+
7+
<Include name="beta-note-session-replay.mdx" />
8+
9+
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:
10+
11+
- **Replay Player:** Video-like reproduction of a user session created from DOM snapshots. This is where you can visualize exactly what actions the user took during a user session, and how the website behaved within this specific user’s environment, including browser, latency, settings, and so on. Most importantly, you can see which actions lead to an error and take the guesswork out of debugging.
12+
- By default, the Session Replay SDK is configured to replace all text nodes and user input with asterisks (*), and to remove media elements. See all privacy configuration options [here](/platforms/javascript/session-replay/privacy/).
13+
14+
15+
- **Breadcrumbs:** The replay breadcrumbs show when key user interactions took place, specifically: user clicks, user inputs, [page navigations, page loads](/product/performance/transaction-summary/#what-is-a-transaction), as well as [custom breadcrumbs](/product/sentry-basics/integrate-backend/configuration-options/#breadcrumbs) set by the organization and the [Largest Contentful Paint (LCP)](/product/performance/web-vitals/#largest-contentful-paint-lcp) web vital. These breadcrumbs are synced with the replay player and will auto-scroll as the video plays.
16+
- Some [breadcrumb types](/product/issues/issue-details/breadcrumbs/) visible in **Issue Details** are not 1:1 to the replay breadcrumbs list. The trail of events typically seen in the Issue Details page are now displayed in the Console and Network components of the **Replay Details** page.
17+
18+
19+
- **Timeline:** This is the section at the top of the **Replay Details** page that illustrates where significant events (such as errors and user interactions) happen over the course of the replay. This allows users to easily scrub to key events by dragging across the timeline. It also visually conveys the amount of time that took place between events.
20+
21+
22+
- **Console:** A list of all messages that were emitted to the web console. This includes debugging information included in the web application, as well as browser-generated messages to the developer. As the video plays, there’s a visual indicator that tracks through the table of console messages, highlighting which messages happened prior to, or next to this point in the video. You can also click the timestamp on the far right of the console message to bring yourself to that point in the replay player.
23+
24+
25+
- **Network:** A list of all network requests that were initiated by the page while the replay recording was active. As the video plays, there’s a visual indicator that tracks through the table of network requests, highlighting which requests happened prior to, or next to this point in the video. You can also click the timestamp on the far right of each request to bring yourself to that point in the replay player.
26+
27+
28+
- **DOM Events:** DOM event breadcrumbs, like user clicks, are augmented with surrounding HTML source code to help users understand which event was targeted. As the video plays, there’s a visual indicator that tracks through the table of DOM events, highlighting which events happened prior to, or next to this point in the video. You can also click the timestamp on the far right of each DOM event to bring yourself to that point in the replay player.
29+
30+
31+
- **Trace:** Connects all the [trace(s)](/product/sentry-basics/tracing/distributed-tracing#traces-transactions-and-spans) that happened during the replay.
32+
- Due to transaction sampling, this view may be missing traces.
33+
34+
35+
- **Issues:** See the [issue(s)](/product/issues/issue-details/error-issues/) that correspond to frontend errors that occurred in the replay and the impact these issues have had holistically across *all users* on your application.
36+
37+
38+
- **Memory:** The view shows a heap size chart displaying the total amount of memory being used by JavaScript objects.
39+
- This view is only available when the replay was recorded on a Chromium-based browser.
40+
41+
## Share Replays
42+
43+
Share a replay at a specific timestamp with a Sentry member by clicking the “Share” button in the top-right corner of the **Replay Details** page. This allows you to share replays at the point of a critical event or user flow with other Sentry members in your organization.
44+
45+
## Delete Replays
46+
47+
Delete an individual replay by clicking the “Delete” button in the top-right corner of **the Replay Details** page. If you need to bulk delete replays, contact [[email protected]](mailto:[email protected]). You can’t delete replays that are in-progress.
48+
49+
## Tags
50+
51+
Find a complete list of built-in fields and custom tags associated with a replay under the “Tags” tab next to Breadcrumbs for additional context around the replay you’re viewing.
52+
53+
## Retention
54+
55+
Replays are retained for 90 days in sentry.io (the same retention period as other event types, such as Errors and Transactions). The retention period is not configurable.

0 commit comments

Comments
 (0)