Skip to content

Commit 257dd8e

Browse files
committed
ref(core): Stop setting session on current scope
This is more behavioural breaking, for general usage this should not change anything.
1 parent 9030f37 commit 257dd8e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

packages/core/src/exports.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,6 @@ export function startSession(context?: SessionContext): Session {
287287
// Afterwards we set the new session on the scope
288288
isolationScope.setSession(session);
289289

290-
// TODO (v8): Remove this and only use the isolation scope(?).
291-
// For v7 though, we can't "soft-break" people using getCurrentHub().getScope().setSession()
292-
currentScope.setSession(session);
293-
294290
return session;
295291
}
296292

@@ -309,22 +305,15 @@ export function endSession(): void {
309305

310306
// the session is over; take it off of the scope
311307
isolationScope.setSession();
312-
313-
// TODO (v8): Remove this and only use the isolation scope(?).
314-
// For v7 though, we can't "soft-break" people using getCurrentHub().getScope().setSession()
315-
currentScope.setSession();
316308
}
317309

318310
/**
319311
* Sends the current Session on the scope
320312
*/
321313
function _sendSessionUpdate(): void {
322314
const isolationScope = getIsolationScope();
323-
const currentScope = getCurrentScope();
324315
const client = getClient();
325-
// TODO (v8): Remove currentScope and only use the isolation scope(?).
326-
// For v7 though, we can't "soft-break" people using getCurrentHub().getScope().setSession()
327-
const session = currentScope.getSession() || isolationScope.getSession();
316+
const session = isolationScope.getSession();
328317
if (session && client) {
329318
client.captureSession(session);
330319
}

0 commit comments

Comments
 (0)