-
Notifications
You must be signed in to change notification settings - Fork 34
Bug 1862955 - Gleanjs session implementation #1850
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
Conversation
chutten
left a comment
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.
We're firm on 30mins? Might make testing difficult (btw, where are the tests?) unless we make that parametrized. (in addition to the existing testing difficulties with using Date)
Based on everything that Abhishek found when researching sessions, it seems like 30 minutes is the standard here. I believe we can make 30 minutes the default.
Tests are on their way (after I fix the last part)
I agree this should be parameterized. I think 30 will be the default value unless someone provides a different value when initializing Glean. I will make some changes and push that up. |
b30774d to
7666d1d
Compare
Add checks in `internal_metrics` to determine when a session has expired and we should create a new one. We use a timestamp in LocalStorage for keeping track of the last active date.
changelog - move updateSessionInfo call during init so it is always triggered - add isWindowObjectUnavailable check to updateSessionInfo
b88c065 to
2593389
Compare
quiiver
left a comment
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.
![]()
Probably best to disallow session tracking if client_id is disabled |
chutten
left a comment
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 don't know how easy it'll be, but if we want to support pings without client_id we need to ensure we aren't making it trivially obtainable via session_id
|
@chutten |
I don't know of a strong reason to exclude But, yes, if there's no |
bd1ac38 to
ed6be67
Compare
|
@chutten A ping for reference: https://debug-ping-preview.firebaseapp.com/pings/glean-from-website/fa376d6f-f83d-45c6-a697-9fecdcfededf#L18 |
PR for updating Glean schema: mozilla-services/mozilla-pipeline-schemas#795
Pull Request checklist
glean/folder, run:npm run testRuns all testsnpm run lintRuns all lintersCHANGELOG.mdor an explanation of why it does not need onemozilla/gleanrepository