-
Notifications
You must be signed in to change notification settings - Fork 168
♻️ Async session manager #4131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thomas-lebeau
wants to merge
43
commits into
v7
Choose a base branch
from
thomas.lebeau/asyc-session-manager-with-telemetry-merge-main
base: v7
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
♻️ Async session manager #4131
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
43a563e
async Logs session manager initialization
BenoitZugmeyer 400b5bd
async RUM session manager initialization
BenoitZugmeyer 496a142
make sessionManager start asynchronously
BenoitZugmeyer 7ecaca8
test: adding async tests
mormubis fe8b848
fix: linter warnings
mormubis 7774008
fix: tracking consent notify
mormubis 10d191d
fix: create waitFor to await for falsy expressions
mormubis 6e0e1f7
fix: linter warnings
mormubis 79dbce0
fix: schemas
mormubis 7b34e55
fix: monitor functions before the initialization
mormubis 70449f2
fix: schema format
mormubis f65e8ba
refactor: move telemetry to preStart
mormubis 2abcba7
fix: test
mormubis e77381e
fix: format
mormubis 177a0b4
fix: schema
mormubis 6a1c77e
fix: better types
mormubis cebd232
fix: already const value
mormubis c053665
⏪️ revert rum-events-format update
BenoitZugmeyer fd5293b
✅ refactor spec files
BenoitZugmeyer 62302f5
♻️ make telemetry required in `startLogs` and `startRum`
BenoitZugmeyer e52a2d5
♻️ make hooks required when starting telemetry
BenoitZugmeyer f2dbf43
♻️ start telemetry transport when starting telemetry
BenoitZugmeyer 20d12a1
✅ don't actually start telemetry in spec
BenoitZugmeyer c150bcd
🔥 remove unrelated changes
BenoitZugmeyer 6f1bec7
🐛 fix telemetry crash in Workers
BenoitZugmeyer b72c3ff
✅ telemetry is sent uncompressed, adjust e2e tests
BenoitZugmeyer 772576d
🐛 make sure telemetry isn't sent until consent is given
BenoitZugmeyer 8c2d52c
merge main
BenoitZugmeyer 9122763
Merge branch 'adlrb/earlier-telemetry' into thomas.lebeau/asyc-sessio…
thomas-lebeau 15c3871
✅ fix preStartRum tests to handle async session manager
thomas-lebeau 5ded0ca
🐛 refactor telemetry initialization to ensure it starts only after co…
thomas-lebeau 7a5263d
🐛 remove safePersist function
thomas-lebeau 4d5bb57
🔧 clean up imports in logs and rum core test files
thomas-lebeau 68408ab
✅ replace waitFor with collectAsyncCalls in test files
thomas-lebeau 36cba1f
🔧 add async testing best practices to AGENTS.md
thomas-lebeau fc052aa
Merge branch 'main' into thomas.lebeau/asyc-session-manager-with-tele…
thomas-lebeau 3b4ec11
🐛 check consent before completing async session init
thomas-lebeau 545b8c9
🔥 remove unused waitFor test utility
thomas-lebeau 25ce603
✅ fix flaky preStartRum tests for async session manager
thomas-lebeau e0264d7
✅ fix remaining flaky preStartRum tests for async session manager
thomas-lebeau f43dcdc
✨ add resetSessionStoreOperations function to clear session store state
thomas-lebeau 8d5792e
♻️ move trackingConsentContext initialization to pre-start step
thomas-lebeau 1183c6f
♻️ move trackingConsentContext initialization to pre-start step for logs
thomas-lebeau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
285 changes: 185 additions & 100 deletions
285
packages/core/src/domain/session/sessionManager.spec.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The consent change handler is registered only inside the
expandOrRenewSessioncallback. If the session store is locked (e.g., Chromium cookie locking) and that callback is delayed, atrackingConsentState.update(NOT_GRANTED)during that window will be missed, sosessionStore.expire(false)never runs and the session can stay active despite revoked consent. This is a regression from the previous synchronous subscription and can leak data in the lock-wait scenario.Useful? React with 👍 / 👎.