MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / setSession

Method setSession

packages/core/src/scope.ts:472–480  ·  view source on GitHub ↗

* Set the session for the scope.

(session?: Session)

Source from the content-addressed store, hash-verified

470 * Set the session for the scope.
471 */
472 public setSession(session?: Session): this {
473 if (!session) {
474 delete this._session;
475 } else {
476 this._session = session;
477 }
478 this._notifyScopeListeners();
479 return this;
480 }
481
482 /**
483 * Get the session from the scope.

Callers 5

client.test.tsFile · 0.80
startSessionFunction · 0.80
endSessionFunction · 0.80
_startWorkerFunction · 0.80

Calls 1

_notifyScopeListenersMethod · 0.95

Tested by

no test coverage detected