@@ -181,12 +181,14 @@ export class Replay implements Integration {
181
181
182
182
// TODO(deprecated): Maintain backwards compatibility for alpha users
183
183
if ( usingDeprecatedCaptureOnlyOnError ) {
184
+ // eslint-disable-next-line no-console
184
185
console . warn (
185
186
'[@sentry/replay]: The `captureOnlyOnError` option is deprecated! Please configure `errorSampleRate` instead.' ,
186
187
) ;
187
188
}
188
189
189
190
if ( usingDeprecatedReplaysSamplingRate ) {
191
+ // eslint-disable-next-line no-console
190
192
console . warn (
191
193
'[@sentry/replay]: The `replaysSamplingRate` option is deprecated! Please configure `sessionSampleRate` instead.' ,
192
194
) ;
@@ -1084,7 +1086,7 @@ export class Replay implements Integration {
1084
1086
*/
1085
1087
async runFlush ( ) : Promise < void > {
1086
1088
if ( ! this . session ) {
1087
- console . error ( new Error ( '[Sentry]: No transaction, no replay' ) ) ;
1089
+ __DEBUG_BUILD__ && logger . error ( '[Replay] No session found to flush.' ) ;
1088
1090
return ;
1089
1091
}
1090
1092
@@ -1117,8 +1119,8 @@ export class Replay implements Integration {
1117
1119
eventContext,
1118
1120
} ) ;
1119
1121
} catch ( err ) {
1122
+ __DEBUG_BUILD__ && logger . error ( err ) ;
1120
1123
captureInternalException ( err ) ;
1121
- console . error ( err ) ;
1122
1124
}
1123
1125
}
1124
1126
@@ -1139,7 +1141,7 @@ export class Replay implements Integration {
1139
1141
}
1140
1142
1141
1143
if ( ! this . session ?. id ) {
1142
- console . error ( '[Replay]: No transaction, no replay ' ) ;
1144
+ __DEBUG_BUILD__ && logger . error ( '[Replay] No session found to flush. ' ) ;
1143
1145
return ;
1144
1146
}
1145
1147
@@ -1165,7 +1167,7 @@ export class Replay implements Integration {
1165
1167
try {
1166
1168
await this . flushLock ;
1167
1169
} catch ( err ) {
1168
- console . error ( err ) ;
1170
+ __DEBUG_BUILD__ && logger . error ( err ) ;
1169
1171
} finally {
1170
1172
this . debouncedFlush ( ) ;
1171
1173
}
@@ -1310,13 +1312,13 @@ export class Replay implements Integration {
1310
1312
} ) ;
1311
1313
this . resetRetries ( ) ;
1312
1314
return true ;
1313
- } catch ( ex ) {
1314
- console . error ( ex ) ;
1315
+ } catch ( err ) {
1316
+ __DEBUG_BUILD__ && logger . error ( err ) ;
1315
1317
// Capture error for every failed replay
1316
1318
setContext ( 'Replays' , {
1317
1319
retryCount : this . retryCount ,
1318
1320
} ) ;
1319
- captureInternalException ( ex ) ;
1321
+ captureInternalException ( err ) ;
1320
1322
1321
1323
// If an error happened here, it's likely that uploading the attachment
1322
1324
// failed, we'll can retry with the same events payload
0 commit comments