Skip to content

Commit ffa222a

Browse files
committed
remove old maskAllText logic
1 parent 20b8c68 commit ffa222a

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

packages/replay/src/constants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ export const VISIBILITY_CHANGE_TIMEOUT = SESSION_IDLE_DURATION;
2020
// The maximum length of a session
2121
export const MAX_SESSION_LIFE = 3_600_000; // 60 minutes
2222

23-
/** The select to use for the `maskAllText` option */
24-
export const MASK_ALL_TEXT_SELECTOR = 'body *:not(style), body *:not(script)';
25-
2623
/** Default flush delays */
2724
export const DEFAULT_FLUSH_MIN_DELAY = 5_000;
2825
export const DEFAULT_FLUSH_MAX_DELAY = 5_000;

packages/replay/src/integration.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getCurrentHub } from '@sentry/core';
22
import type { BrowserClientReplayOptions, Integration } from '@sentry/types';
33
import { dropUndefinedKeys } from '@sentry/utils';
44

5-
import { DEFAULT_FLUSH_MAX_DELAY, DEFAULT_FLUSH_MIN_DELAY, MASK_ALL_TEXT_SELECTOR } from './constants';
5+
import { DEFAULT_FLUSH_MAX_DELAY, DEFAULT_FLUSH_MIN_DELAY } from './constants';
66
import { ReplayContainer } from './replay';
77
import type { RecordingOptions, ReplayConfiguration, ReplayPluginOptions } from './types';
88
import { getPrivacyOptions } from './util/getPrivacyOptions';
@@ -53,7 +53,7 @@ export class Replay implements Integration {
5353
_experiments = {},
5454
sessionSampleRate,
5555
errorSampleRate,
56-
maskAllText,
56+
maskAllText = true,
5757
maskAllInputs = true,
5858
blockAllMedia = true,
5959

@@ -113,7 +113,7 @@ export class Replay implements Integration {
113113
sessionSampleRate,
114114
errorSampleRate,
115115
useCompression,
116-
maskAllText: typeof maskAllText === 'boolean' ? maskAllText : !maskTextSelector,
116+
maskAllText,
117117
blockAllMedia,
118118
_experiments,
119119
};
@@ -142,13 +142,6 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
142142
this._initialOptions.errorSampleRate = errorSampleRate;
143143
}
144144

145-
if (this._initialOptions.maskAllText) {
146-
// `maskAllText` is a more user friendly option to configure
147-
// `maskTextSelector`. This means that all nodes will have their text
148-
// content masked.
149-
this._recordingOptions.maskTextSelector = MASK_ALL_TEXT_SELECTOR;
150-
}
151-
152145
if (this._initialOptions.blockAllMedia) {
153146
// `blockAllMedia` is a more user friendly option to configure blocking
154147
// embedded media elements

0 commit comments

Comments
 (0)