Skip to content

Commit 71f91bc

Browse files
authored
feat(js/replay): Opt-in options for unmask and unblock (#9422)
* change default option values * change text * change text
1 parent ba6e2d3 commit 71f91bc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

platform-includes/replay/privacy-configuration/javascript.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ Sentry.replayIntegration({
88
});
99
```
1010

11+
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:
12+
13+
```javascript
14+
Sentry.replayIntegration({
15+
unblock: ['.sentry-unblock, [data-sentry-unblock]'],
16+
unmask: ['.sentry-unmask, [data-sentry-unmask]'],
17+
})
18+
```
19+
1120
The following is a complete list of options that can be used in `replayIntegration({})`:
1221

1322
| key | type | default | description |
@@ -19,5 +28,5 @@ The following is a complete list of options that can be used in `replayIntegrati
1928
| blockAllMedia | `boolean` | `true` | Block _all_ media elements (`img`, `svg`, `video`, `object`, `picture`, `embed`, `map`, `audio`). |
2029
| ignore | `string[]` | `['.sentry-ignore', '[data-sentry-ignore]']` | Ignores all events on the matching input fields. See [Ignoring](#ignoring) above for an example. |
2130
| 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 `*`. |
22-
| 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`. |
23-
| 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`. |
31+
| 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`. |
32+
| unmask | `string[]` | `[]` | Unmask all elements that match the given DOM selectors. Used to unmask specific elements that are masked with `maskAllText`. |

0 commit comments

Comments
 (0)