Skip to content
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
2 changes: 1 addition & 1 deletion src/docs/product/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The start of a replay recording can be triggered by:

The end of a replay recording can be triggered by:

- 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.)
- User inactivity within the tab/page that’s being recorded. (If a user doesn’t click or navigate around the site for more than 15 minutes. Mouse scrolls, mouse movements, and keyboard events don’t currently qualify as activity.)
Comment thread
bruno-garcia marked this conversation as resolved.
Resolved
- A recording reaching the maximum replay duration limit (currently 60 minutes)
- Manually calling the [replay.stop()](/platforms/javascript/session-replay/configuration/#start-and-stop-recording) method

Expand Down
2 changes: 1 addition & 1 deletion src/docs/product/session-replay/replay-details.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Every replay has a detailed view that contains the embedded video player and ric

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

- **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.
- **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. If configured, Sentry can also show the actual [HTTP request body and headers](/platforms/javascript/session-replay/configuration/#network-details).

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

Expand Down
24 changes: 16 additions & 8 deletions src/platforms/javascript/common/session-replay/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,29 @@ If you give us a string, we'll match any URL that contains that string. You can

Requests to a URL matched by the configured patterns will be enhanced with the request and response body, as well as the following default headers:

* `content-type`
* `content-length`
* `accept`
* `Content-Type`
* `Content-Length`
* `Accept`

If you want to capture additional headers, you'll have to configure them with the options `networkRequestHeaders` and `networkResponseHeaders`.
If you want to capture additional headers, you'll have to configure them with the options `networkRequestHeaders` and `networkResponseHeaders`, for example:

```javascript
new Replay({
networkDetailAllowUrls: ['https://my-website.com/api'],
networkRequestHeaders: [
"Cache-Control",
],
networkResponseHeaders: [
"Referrer-Policy",
],
});
```

<Note>
Captured bodies will be truncated to 150k characters max. Content in
bodies will be PII-sanitized server-side, based on object keys and values.
</Note>

### Sensitive Data in Request and Response Bodies

Sentry attempts to scrub certain types of sensitive data from request and response bodies, if you accidentally opt-in to a URL that includes this type of data. This mechanism happens on our ingestion service, before data hits our disks. This is a best effort approach which pattern-matches the content with things like credit card information, social security numbers, and [passwords](https://github.com/search?q=repo%3Agetsentry%2Frelay%20PASSWORD_KEY_REGEX&type=code). The best way to avoid getting PII into Sentry is by not adding URLs of endpoints that may contain PII.

## Identifying Users

You can use the Sentry SDK to link a user to a session. Read more about it in our <PlatformLink to="/enriching-events/identify-user">docs</PlatformLink>.
Expand Down
7 changes: 7 additions & 0 deletions src/platforms/javascript/common/session-replay/privacy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ The following options can be configured as options to the integration, in `new R
| unblock | string[] | `.sentry-unblock, [data-sentry-unblock]` | Don't redact any elements that match the DOM selectors. Used to unblock specific media elements that are blocked with `blockAllMedia`. |
| unmask | string[] | `.sentry-unmask, [data-sentry-unmask]` | Unmask all elements that match the given DOM selectors. Used to unmask specific elements that are masked with `maskAllText`. |

## Network Request and Response Bodies and Headers

Collecting request and response bodies is an opt-in feature. That's because the best way to avoid getting PII into Sentry is by not adding URLs of endpoints that may contain PII.
Additionally, Sentry attempts to [scrub](/product/data-management-settings/scrubbing/server-side-scrubbing/) certain types of sensitive data from request and response bodies, if you accidentally opt-in to a URL that includes this type of data. This mechanism happens on our ingestion service, before data hits our disks. This is a best effort approach which pattern-matches the content with things like credit card information, social security numbers, and [passwords](https://github.com/search?q=repo%3Agetsentry%2Frelay%20PASSWORD_KEY_REGEX&type=code).

More details about this feature can be found in the [configuration page](/platforms/javascript/session-replay/configuration/#network-details).

### Deprecated Options

Note that the privacy API prior to version 7.35.0 has been deprecated and replaced with the options above. Please see the [Replay migration guide](https://github.com/getsentry/sentry-javascript/blob/master/packages/replay/MIGRATION.md#upgrading-replay-from-7340-to-7350---6645) for further information.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ redirect_from:
- /platforms/javascript/guides/wasm/troubleshooting/session-replay/
---

This guide aims to extend the <PlatformLink to="/troubleshooting/">main troubleshooting</PlatformLink> guide covering Replay-specific scenarios.
This guide aims to extend the <PlatformLink to="/troubleshooting/">main troubleshooting</PlatformLink> guide by covering Replay-specific scenarios.

## My `canvas` Elements Aren't Getting Captured

Expand All @@ -35,6 +35,15 @@ Due to [browser limitations](https://developer.mozilla.org/en-US/docs/Web/SVG/El

</Alert>

## Why can't I see the full HTTP request body or all the headers?

By default, Replay will capture basic information about all outgoing fetch and XHR requests in your application. This includes the URL, request and response body size, method, and status code.
The intention is to limit the chance of collecting private data. You can <PlatformLink to="/session-replay/configuration/">configure the SDK to capture bodies and additional headers</PlatformLink>.

Another reason you might not see the body is if the format is not supported. We only capture text-based bodies, including JSON, XML, FormData, and similar data types. Any captured body will be truncated to 150k characters. When we identify the body as JSON, we will try to truncate it while keeping the payload valid JSON. Bodies of byte, file, or media types are not captured.

More details about this feature can be found in the <PlatformLink to="/session-replay/configuration/">configuration page</PlatformLink>.

## Replay on My Bowser Extension Doesn't Work

This is not a supported use-case. The replay package is built to work on a website and not as an externally-loaded script via browser extension or other mechanism. In fact, Sentry's Session Replay product can help developers find out when a third-party Chrome extension causes otherwise hard to debug or reproduce issues with their website.