Skip to content

New session API endSession doesn't include did from initialScope #10146

@timfish

Description

@timfish

SDK Version

7.93.0

Steps to Reproduce

The new session API endSession uses the isolationScope session but this does not include the initialScope passed to init.

Expected Result

If initialScope passed to init is set to {user:{username:'some_user'}}, the session did should be some_user.

Actual Result

did is empty.

This is likely because the initialScope is only added to the current hub scope in initAndBind:

const hub = getCurrentHub();
// eslint-disable-next-line deprecation/deprecation
const scope = hub.getScope();
scope.update(options.initialScope);

Metadata

Metadata

Assignees

Labels

BugPackage: coreIssues related to the Sentry Core SDK
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions