From 74cc6b04a84d44ab29bb1e1d47c82a344ddf7f77 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 12 Mar 2024 14:41:07 +0100 Subject: [PATCH 1/3] change default option values --- .../replay/privacy-configuration/javascript.mdx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/platform-includes/replay/privacy-configuration/javascript.mdx b/platform-includes/replay/privacy-configuration/javascript.mdx index 0de3c79edd50b3..ae975165730cff 100644 --- a/platform-includes/replay/privacy-configuration/javascript.mdx +++ b/platform-includes/replay/privacy-configuration/javascript.mdx @@ -8,6 +8,15 @@ Sentry.replayIntegration({ }); ``` +Since v8, the options `unblock` and `unmask` do not add default DOM selectors anymore. If you want to keep the default behavior of previous versions, then we recommend you to explicitly specify them in your configuration: + +```javascript +Sentry.replayIntegration({ + unblock: ['.sentry-unblock, [data-sentry-unblock]'], + unmask: ['.sentry-unmask, [data-sentry-unmask]'], +}) +``` + The following is a complete list of options that can be used in `replayIntegration({})`: | key | type | default | description | @@ -19,5 +28,5 @@ The following is a complete list of options that can be used in `replayIntegrati | blockAllMedia | `boolean` | `true` | Block _all_ media elements (`img`, `svg`, `video`, `object`, `picture`, `embed`, `map`, `audio`). | | ignore | `string[]` | `['.sentry-ignore', '[data-sentry-ignore]']` | Ignores all events on the matching input fields. See [Ignoring](#ignoring) above for an example. | | maskFn | `(text: string) => string` | `(s) => '*'.repeat(s.length)` | Function to customize how text content is masked before sending to server. By default, masks text with `*`. | -| 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`. This doesn't affect sensitive elements such as `password`. | -| 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`. | +| unblock | `string[]` | `[]` | Don't redact any elements that match the DOM selectors. Used to unblock specific media elements that are blocked with `blockAllMedia`. This doesn't affect sensitive elements such as `password`. | +| unmask | `string[]` | `[]` | Unmask all elements that match the given DOM selectors. Used to unmask specific elements that are masked with `maskAllText`. | From 7e2e365f9527b15d15fb00b331f55dae7b0f526f Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 12 Mar 2024 16:49:45 +0100 Subject: [PATCH 2/3] change text --- platform-includes/replay/privacy-configuration/javascript.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/replay/privacy-configuration/javascript.mdx b/platform-includes/replay/privacy-configuration/javascript.mdx index ae975165730cff..acb51b7a186d05 100644 --- a/platform-includes/replay/privacy-configuration/javascript.mdx +++ b/platform-includes/replay/privacy-configuration/javascript.mdx @@ -8,7 +8,7 @@ Sentry.replayIntegration({ }); ``` -Since v8, the options `unblock` and `unmask` do not add default DOM selectors anymore. If you want to keep the default behavior of previous versions, then we recommend you to explicitly specify them in your configuration: +Starting with v8, the options `unblock` and `unmask` do not add default DOM selectors anymore. If you want to keep the default behavior of previous versions, then we recommend you to explicitly specify them in your configuration: ```javascript Sentry.replayIntegration({ From 5babafb973d5b4ac80386c02debc98c3b714ff70 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Wed, 13 Mar 2024 09:08:18 +0100 Subject: [PATCH 3/3] change text --- platform-includes/replay/privacy-configuration/javascript.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/replay/privacy-configuration/javascript.mdx b/platform-includes/replay/privacy-configuration/javascript.mdx index acb51b7a186d05..2d3d2a152f895c 100644 --- a/platform-includes/replay/privacy-configuration/javascript.mdx +++ b/platform-includes/replay/privacy-configuration/javascript.mdx @@ -8,7 +8,7 @@ Sentry.replayIntegration({ }); ``` -Starting with v8, the options `unblock` and `unmask` do not add default DOM selectors anymore. If you want to keep the default behavior of previous versions, then we recommend you to explicitly specify them in your configuration: +Starting with v8, the options `unblock` and `unmask` do not add default DOM selectors anymore. If you want to keep the default behavior of previous versions, then you should explicitly specify them in your configuration: ```javascript Sentry.replayIntegration({