Our notion of session as implemented in sessionTick needs to be the same as the notion of session that governs the lifespan of a Session ID memoized by mw.user.sessionId.
Currently this is not the case, as the value of mw.user.sessionId is a session cookie and consequently has a different TTL (one not based on user inactivity).
Potential solutions involve finding a home for the code dedicated to detecting a session boundary from sessionTick (as discussed on the patch).
Considerations
- Placing this code in mw.user may be weird
- Placing the code in ext.WikimediaEvents or ext.EventLogging would restrict usage of this session ID to clients with those modules loaded
- Relocating the relevant code from sessionTick is going to (rightly so) trigger a new review
Acceptance Criteria
- As a data scientist, I am able to change the sampling rate as defined by sessionTick (aka end of a "session" = inactivity for 30 minutes)