File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11import { getCurrentHub } from '@sentry/core' ;
22import type { BrowserClientReplayOptions , Integration } from '@sentry/types' ;
3+ import { logger } from '@sentry/utils' ;
34
45import { DEFAULT_FLUSH_MAX_DELAY , DEFAULT_FLUSH_MIN_DELAY , MASK_ALL_TEXT_SELECTOR } from './constants' ;
56import { ReplayContainer } from './replay' ;
@@ -192,6 +193,11 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
192193 // Client is not available in constructor, so we need to wait until setupOnce
193194 this . _loadReplayOptionsFromClient ( ) ;
194195
196+ if ( ! this . _options . sessionSampleRate && ! this . _options . errorSampleRate ) {
197+ // eslint-disable-next-line no-console
198+ console . warn ( 'Replay is disabled because both `replaysSessionSampleRate` and `replaysOnErrorSampleRate` are 0' ) ;
199+ }
200+
195201 this . _replay = new ReplayContainer ( {
196202 options : this . _options ,
197203 recordingOptions : this . _recordingOptions ,
You can’t perform that action at this time.
0 commit comments