We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3de88c3 commit 0b9a8b2Copy full SHA for 0b9a8b2
packages/replay/src/replay.ts
@@ -243,7 +243,15 @@ export class ReplayContainer implements ReplayContainerInterface {
243
return;
244
}
245
246
- this.recordingMode = this.session.sampled === 'buffer' ? 'buffer' : 'session';
+ let recordingMode: ReplayRecordingMode = 'session';
247
+
248
+ // If segmentId > 0, it means we've previously already captured this session
249
+ // In this case, we still want to continue in `session` recording mode
250
+ if (this.session.sampled === 'buffer' && this.session.segmentId === 0) {
251
+ recordingMode = 'buffer';
252
+ }
253
254
+ this.recordingMode = recordingMode;
255
256
logInfoNextTick(
257
`[Replay] Starting replay in ${this.recordingMode} mode`,
0 commit comments