Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/replay/src/util/addGlobalListeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export function addGlobalListeners(replay: ReplayContainer): void {
const replayId = replay.getSessionId();
// We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)
if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {
dsc.replay_id = replayId;
// Ensure to check that the session is still active - it could have expired in the meanwhile
const isSessionActive = replay.checkAndHandleExpiredSession();
if (isSessionActive) {
dsc.replay_id = replayId;
}
}
});

Expand Down