[Feature Request]: SessionID and UUID should be part of all logs #5341
Labels
enhancement
End user-perceivable enhancements.
Impact: Medium
Moderate perceived user impact (non-blocking bugs and general improvements).
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Milestone
Is your feature request related to a problem? Please describe.
When merged, #5240 will introduce the ability to log feature flags at the beginning of every app session. Each unique session and feature flag log is identified by a unique UUID and an app session ID.
Currently, a UUID does not exist and will need to be created as per the rules dictated in the section below.
Once that is done, in order to track logs and crashes during the session, we will need to add an app session ID and a UUID to each log made on the app.
UUID Generation
In order to uniquely track each individual user, we will need to generate a statistically unique UUID for every user. This is because UUIDs will be generated on each user's device and we have to ensure that each UUID is unique enough to avoid collisions. In order to to this, we will create a custom algorithm based on the Twitter Snowflake algorithm.
For this purpose, we will generate a 64-bit UUID with the following bit division;
UUID Persistence
It is also important to persist the UUID once it has been generated on a per-user basis. Once a UUID has been generated, it should be persisted in the Cache Store. A check should be made every time a profile is launched to retrieve the UUID and optionally generate one if it does not exist.
Describe the solution you'd like
Every log should include an app session ID and a UUID. The two will be created using the modified Twitter Snowflake algorithm as detailed above. The UUID will help collect logs made in the same session by the same user.
It is important to note that the app session ID is already being populated with a pseudo-random value generated by the LoggingIdentifierController and the generation of this value will need to be switched to the modified Twitter Snowflake algorithm once it has been implemented.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: