Skip to content

Commit b04c8ea

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 9e3390d commit b04c8ea

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
@@ -56,6 +56,9 @@ export class Replay implements Integration {
5656
blockClass = 'sentry-block',
5757
ignoreClass = 'sentry-ignore',
5858
maskTextClass = 'sentry-mask',
59+
maskInputSelector = '.sentry-mask',
60+
unmaskInputSelector = '.sentry-unmask',
61+
unmaskTextSelector = '.sentry-unmask',
5962
blockSelector = '[data-sentry-block]',
6063
..._recordingOptions
6164
}: ReplayConfiguration = {}) {
@@ -65,6 +68,9 @@ export class Replay implements Integration {
6568
ignoreClass,
6669
maskTextClass,
6770
maskTextSelector,
71+
unmaskTextSelector,
72+
unmaskInputSelector,
73+
maskInputSelector,
6874
blockSelector,
6975
..._recordingOptions,
7076
};

0 commit comments

Comments
 (0)