-
Notifications
You must be signed in to change notification settings - Fork 144
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
👷♀️ [RUM-8295] Change anonymous id format to uuid #3306
Conversation
/to-staging |
Devflow running:
|
Integrated commit sha: 4f471c6 Co-authored-by: zcy <[email protected]>
@@ -103,33 +101,3 @@ describe('session in cookie strategy', () => { | |||
}) | |||
}) | |||
}) | |||
describe('session in cookie strategy when opt-out anonymous user tracking', () => { |
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.
❓ question: Why removing these tests?
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.
Sorry, this one is wrongly removed. I put them back.
4f471c6
to
9ddb7cc
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3306 +/- ##
==========================================
- Coverage 92.96% 92.96% -0.01%
==========================================
Files 297 297
Lines 7851 7849 -2
Branches 1791 1791
==========================================
- Hits 7299 7297 -2
Misses 552 552 ☔ View full report in Codecov by Sentry. |
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
@@ -78,16 +80,6 @@ describe('rum sessions', () => { | |||
|
|||
expect((await findSessionCookie())?.aid).toEqual(anonymousId) | |||
}) | |||
|
|||
createTest('generated when cookie is cleared') |
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.
This is removed as renewSession
is basically putting the id back manually. So the test is not much meaningful. Plus, we should not restart a session when the cookie cleared by third party.
await expireSession() | ||
await browser.execute(() => { | ||
window.DD_RUM!.stopSession() | ||
}) |
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.
Avoid calling manual expireSession
here to test the anonymous id logic fully.
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.
I think the expireSession helper could be improve to actually expire the session.
I think with playwright we could use await page.clock.runFor(SESSION_TIME_OUT_DELAY)
maybe you can add a not and we can revert this change when we have migrated to playwright fully
Motivation
Change anonymous id format to uuid so we achieve:
Changes
Use
generateUUID()
for anonymous id generationUpdate e2e tests and unit tests to test effectively.
Testing
I have gone over the contributing documentation.