Skip to content

Commit be11ca5

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 371d42d commit be11ca5

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
@@ -55,6 +55,9 @@ export class Replay implements Integration {
5555
blockClass = 'sentry-block',
5656
ignoreClass = 'sentry-ignore',
5757
maskTextClass = 'sentry-mask',
58+
maskInputSelector = '.sentry-mask',
59+
unmaskInputSelector = '.sentry-unmask',
60+
unmaskTextSelector = '.sentry-unmask',
5861
blockSelector = '[data-sentry-block]',
5962
...recordingOptions
6063
}: ReplayConfiguration = {}) {
@@ -64,6 +67,9 @@ export class Replay implements Integration {
6467
ignoreClass,
6568
maskTextClass,
6669
maskTextSelector,
70+
unmaskTextSelector,
71+
unmaskInputSelector,
72+
maskInputSelector,
6773
blockSelector,
6874
...recordingOptions,
6975
};

0 commit comments

Comments
 (0)