Skip to content

fix: initialize anonymous ID on load#1674

Merged
Joozty merged 1 commit intomainfrom
fix/multiple-anonymous-user-ids
Mar 2, 2026
Merged

fix: initialize anonymous ID on load#1674
Joozty merged 1 commit intomainfrom
fix/multiple-anonymous-user-ids

Conversation

@Joozty
Copy link
Member

@Joozty Joozty commented Mar 2, 2026

Description

The anonymous user ID was persisted lazily — only when the first span fired. This asymmetry created a race window: if a second tab opened after the session was written to storage but before the first span in the first tab, the second tab would find no anonymous ID in storage and generate its own, resulting in a single session having multiple anonymous user IDs.

Type of change

Delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Delete options that are not relevant.

  • Manual testing

@Joozty Joozty self-assigned this Mar 2, 2026
@Joozty Joozty marked this pull request as ready for review March 2, 2026 17:02
@Joozty Joozty requested review from a team as code owners March 2, 2026 17:02
@Joozty Joozty merged commit 7d00722 into main Mar 2, 2026
9 of 10 checks passed
@Joozty Joozty deleted the fix/multiple-anonymous-user-ids branch March 2, 2026 18:33
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants