Skip to content

Commit 97784ed

Browse files
committed
ref: Do not keep previousSessionId
We do not need it right now
1 parent 6887454 commit 97784ed

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

packages/replay/src/replay.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ export class ReplayContainer implements ReplayContainerInterface {
107107
private _debouncedFlush: ReturnType<typeof debounce>;
108108
private _flushLock: Promise<unknown> | null = null;
109109

110-
/** We keep this here in order to be able to connect sessions after .stop() is called. */
111-
private _previousSessionId: string | undefined;
112-
113110
/**
114111
* Is the integration currently active?
115112
*/
@@ -327,7 +324,6 @@ export class ReplayContainer implements ReplayContainerInterface {
327324
this.eventBuffer = null;
328325

329326
// Clear session from session storage
330-
this._previousSessionId = this.getSessionId();
331327
clearSession(this);
332328
} catch (err) {
333329
this._handleException(err);
@@ -570,7 +566,6 @@ export class ReplayContainer implements ReplayContainerInterface {
570566
*/
571567
private _initializeSession(sampled: Sampled, { forceSampled = false }: { forceSampled?: boolean } = {}): void {
572568
const { stickySession } = this._options;
573-
const previousSessionId = this._previousSessionId;
574569

575570
// If neither sample rate is > 0, then do nothing - user will need to call one of
576571
// `start()` or `startBuffering` themselves.
@@ -586,14 +581,6 @@ export class ReplayContainer implements ReplayContainerInterface {
586581
}
587582

588583
this.session = session;
589-
590-
// If previously a session was stopped, we temp. store the previousSessionId on the replay container.
591-
// If this is set, we restore it when initializing a new session
592-
if (previousSessionId) {
593-
this.session.previousSessionId = previousSessionId;
594-
this._maybeSaveSession();
595-
}
596-
597584
this.recordingMode = this.session.sampled === 'buffer' ? 'buffer' : 'session';
598585

599586
return;

packages/replay/src/types/replay.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,6 @@ export interface Session {
338338
*/
339339
segmentId: number;
340340

341-
/**
342-
* The ID of the previous session.
343-
* If this is empty, there was no previous session.
344-
*/
345-
previousSessionId?: string;
346-
347341
/**
348342
* Is the session sampled? `false` if not sampled, otherwise, `session` or `buffer`
349343
*/

0 commit comments

Comments
 (0)