Skip to content

Commit cd0dd5a

Browse files
authored
ref(replay): Remove deprecated replay options (#6370)
This removes the (deprecated) options: * `replaysSamplingRate` * `captureOnlyOnError` ## Migration * `replaysSamplingRate` can be replaced with `sessionSampleRate` * `captureOnlyOnError` can be replaced with `errorSampleRate`
1 parent a9a9547 commit cd0dd5a

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

packages/replay/src/index.ts

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ export class Replay implements Integration {
149149
ignoreClass = 'sentry-ignore',
150150
maskTextClass = 'sentry-mask',
151151
blockSelector = '[data-sentry-block]',
152-
// eslint-disable-next-line deprecation/deprecation
153-
replaysSamplingRate,
154-
// eslint-disable-next-line deprecation/deprecation
155-
captureOnlyOnError,
156152
...recordingOptions
157153
}: ReplayConfiguration = {}) {
158154
this.recordingOptions = {
@@ -164,36 +160,18 @@ export class Replay implements Integration {
164160
...recordingOptions,
165161
};
166162

167-
const usingDeprecatedReplaysSamplingRate = replaysSamplingRate !== undefined;
168-
const usingDeprecatedCaptureOnlyOnError = captureOnlyOnError !== undefined;
169-
170163
this.options = {
171164
flushMinDelay,
172165
flushMaxDelay,
173166
stickySession,
174167
initialFlushDelay,
175-
sessionSampleRate: usingDeprecatedReplaysSamplingRate ? (replaysSamplingRate as number) : sessionSampleRate,
176-
errorSampleRate: usingDeprecatedCaptureOnlyOnError ? 1.0 : errorSampleRate,
168+
sessionSampleRate,
169+
errorSampleRate,
177170
useCompression,
178171
maskAllText,
179172
blockAllMedia,
180173
};
181174

182-
// TODO(deprecated): Maintain backwards compatibility for alpha users
183-
if (usingDeprecatedCaptureOnlyOnError) {
184-
// eslint-disable-next-line no-console
185-
console.warn(
186-
'[@sentry/replay]: The `captureOnlyOnError` option is deprecated! Please configure `errorSampleRate` instead.',
187-
);
188-
}
189-
190-
if (usingDeprecatedReplaysSamplingRate) {
191-
// eslint-disable-next-line no-console
192-
console.warn(
193-
'[@sentry/replay]: The `replaysSamplingRate` option is deprecated! Please configure `sessionSampleRate` instead.',
194-
);
195-
}
196-
197175
if (this.options.maskAllText) {
198176
// `maskAllText` is a more user friendly option to configure
199177
// `maskTextSelector`. This means that all nodes will have their text

0 commit comments

Comments
 (0)