microsoft / microsoft/ApplicationInsights-JS
Definition of session_Id and user_Id
- Dominant language
- TypeScript
- Stars
- 685
- Forks
- 261
- Avg merge
- 21h 33m
- Merged PRs (30d)
- 5
Description
**Is your feature request related to a problem? Please describe.**
We currently use session_Id and user_Id in application insights to correlate events for a user's session. We are having a problem with what session_Id and user_Id represents in terms of different tabs (sessions) and different browser instances and also across different browsers. It can get confusing to debug logs if the session_Id changes mid session, we are not sure what it means.
Our current understanding:
session_Id: unique across browser tabs as each browser tab is a new session
user_Id: unique across browsers (not across different browser windows) - for example different id in firefox and edge
What we are observing:
session_Id: is not unique across browser tabs. Each browser tab actually shares the same session_Id. Session_Id also has some default expiration so even if user is still using the same browser tab, there may be multiple session_Ids
user_Id: consistent with our understanding, it is unique across different browsers
And of course if user chooses to clear cookies and/or storage, we expect the ids to not persist
**Describe the solution you'd like**
I couldn't find documentation on the readme for what session_Id and user_Id represents but I did find some configuration for session_Id expiration and renewal.
I would like a clearer explanation on what session_Id and user_Id represent and are designed for so we atleast can align our understanding. As a stretch (and probably breaking change), we would want session_Id to unique across browser tabs and does not change within each browser tab
**Describe alternatives you've considered**
Have not considered much yet, I will look into seeing if we can do this ourselves by changing some config
**Additional context**
Contributor guide
Research direction
Review the README and the session_Id expiration and renewal configuration referenced in the issue. Document what session_Id and user_Id represent across tabs, browser instances, browsers, and cleared storage, including when identifiers change; clarify whether the requested per-tab behavior is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, observability
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100