From 836695c8ffb9226e9ff33715cfc42d60bc01ae09 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 7 Dec 2023 10:39:08 +0100 Subject: [PATCH 1/6] feat(replay): Add slow click detection docs --- .../common/session-replay/configuration.mdx | 27 ++++++++++--------- .../common/session-replay/troubleshooting.mdx | 14 ++++++++++ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/platforms/javascript/common/session-replay/configuration.mdx b/src/platforms/javascript/common/session-replay/configuration.mdx index 2f10431201d09..5cc0bfc52ad65 100644 --- a/src/platforms/javascript/common/session-replay/configuration.mdx +++ b/src/platforms/javascript/common/session-replay/configuration.mdx @@ -20,19 +20,20 @@ The following options can be configured on the root level of your browser-based The following can be configured as integration options in `new Replay({})`: -| Key | Type | Default | Description | -| ----------------------- | ----------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| stickySession | `boolean` | `true` | Keep track of users across page loads. Note, because closing a tab ends the session, a single user using multiple tabs will be recorded as multiple sessions. | -| mutationLimit | `number ` | 10000 | The upper bound of mutations to process before Session Replay stops recording due to performance impacts. See [Mutation Limits](#mutation-limits) | -| mutationBreadcrumbLimit | `number ` | 750 | The upper bound of mutations to process before Session Replay sends a breadcrumb to warn of large mutations. See [Mutation Limits](#mutation-limits) | -| minReplayDuration | `number` | 5000 | The length of the replay, **in milliseconds**, before the SDK should start sending to Sentry. Max value is 15000. | -| workerUrl | `string` | `undefined` | A URL for a self-hosted worker for compression Replay data. See [Using a Custom Compression Worker](#using-a-custom-compression-worker) to learn more. | -| networkDetailAllowUrls | (string\|RegExp)[] | `[]` | Capture request and response details for XHR and fetch requests that match the given URLs. | -| networkCaptureBodies | `boolean` | `true` | Decide whether to capture request and response bodies for URLs defined in `networkDetailAllowUrls`. | -| networkRequestHeaders | `string[]` | `[]` | Additional request headers to capture for URLs defined in `networkDetailAllowUrls`. See [Network Details](#network-details) to learn more. | -| networkResponseHeaders | `string[]` | `[]` | Additional response headers to capture for URLs defined in `networkDetailAllowUrls`. See [Network Details](#network-details) to learn more. | -| beforeAddRecordingEvent | (event) => event\|null | `i => i` | Filter additional recording events that include console logs and network requests/responses. | -| beforeErrorSampling | `(event) => boolean` | `i => true` | Filter error events which should be skipped for error sampling. Return `false` if error sampling should be skipped for this error event, or `true` to sample for this error. | +| Key | Type | Default | Description | +| ------------------------ | ----------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| stickySession | `boolean` | `true` | Keep track of users across page loads. Note, because closing a tab ends the session, a single user using multiple tabs will be recorded as multiple sessions. | +| mutationLimit | `number ` | 10000 | The upper bound of mutations to process before Session Replay stops recording due to performance impacts. See [Mutation Limits](#mutation-limits) | +| mutationBreadcrumbLimit | `number ` | 750 | The upper bound of mutations to process before Session Replay sends a breadcrumb to warn of large mutations. See [Mutation Limits](#mutation-limits) | +| minReplayDuration | `number` | 5000 | The length of the replay, **in milliseconds**, before the SDK should start sending to Sentry. Max value is 15000. | +| workerUrl | `string` | `undefined` | A URL for a self-hosted worker for compression Replay data. See [Using a Custom Compression Worker](#using-a-custom-compression-worker) to learn more. | +| networkDetailAllowUrls | (string\|RegExp)[] | `[]` | Capture request and response details for XHR and fetch requests that match the given URLs. | +| networkCaptureBodies | `boolean` | `true` | Decide whether to capture request and response bodies for URLs defined in `networkDetailAllowUrls`. | +| networkRequestHeaders | `string[]` | `[]` | Additional request headers to capture for URLs defined in `networkDetailAllowUrls`. See [Network Details](#network-details) to learn more. | +| networkResponseHeaders | `string[]` | `[]` | Additional response headers to capture for URLs defined in `networkDetailAllowUrls`. See [Network Details](#network-details) to learn more. | +| beforeAddRecordingEvent | (event) => event\|null | `i => i` | Filter additional recording events that include console logs and network requests/responses. | +| beforeErrorSampling | `(event) => boolean` | `i => true` | Filter error events which should be skipped for error sampling. Return `false` if error sampling should be skipped for this error event, or `true` to sample for this error. | +| slowClickIgnoreSelectors | `string[]` | `[]` | Ignore slow/rage click detection on elements matching the given CSS selector(s). | ## Privacy Configuration diff --git a/src/platforms/javascript/common/session-replay/troubleshooting.mdx b/src/platforms/javascript/common/session-replay/troubleshooting.mdx index b6fa0c6aebaec..4870359a03d01 100644 --- a/src/platforms/javascript/common/session-replay/troubleshooting.mdx +++ b/src/platforms/javascript/common/session-replay/troubleshooting.mdx @@ -62,6 +62,20 @@ Because of the complexity of the browser environment, there's a significant amou We're always working on ways to reduce the bundle size. Additionally, there are steps you can take in order to reduce the size of Session Replay based on your specific use case. See [Tree Shaking](../../configuration/tree-shaking/) for more information. +## How does Rage Click detection work? + +The Replay SDK tries to detect cases where a user clicked on something, but nothing happened. This is called a "Dead Click", a click that seems to be "dead" and does nothing, from the users perspective. This can happen if a bug or similar prevents the UI from being correctly updated after a button is clicked. + +The way the Replay SDK detects this is by checking if a click on a `