Skip to content

Commit 368e29e

Browse files
committed
feat(replay): Patch rrweb to add maskInputSelector and unmaskTextSelector
These options will allow users to mask inputs with class name `sentry-mask`, and optionally unmask elements (input and other elements) with class name `sentry-unmask`. This way users can have privacy by default and selectively unmask elements.
1 parent 36488ec commit 368e29e

File tree

2 files changed

+264
-14
lines changed

2 files changed

+264
-14
lines changed

packages/replay/src/integration.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ export class Replay implements Integration {
5454
blockClass = 'sentry-block',
5555
ignoreClass = 'sentry-ignore',
5656
maskTextClass = 'sentry-mask',
57+
maskInputSelector = '.sentry-mask',
58+
unmaskInputSelector = '.sentry-unmask',
59+
unmaskTextSelector = '.sentry-unmask',
5760
blockSelector = '[data-sentry-block]',
5861
...recordingOptions
5962
}: ReplayConfiguration = {}) {
@@ -62,6 +65,9 @@ export class Replay implements Integration {
6265
blockClass,
6366
ignoreClass,
6467
maskTextClass,
68+
unmaskTextSelector,
69+
unmaskInputSelector,
70+
maskInputSelector,
6571
blockSelector,
6672
...recordingOptions,
6773
};

0 commit comments

Comments
 (0)