RUM-1336 Add session start reason to events#1755
Merged
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1755 +/- ##
===========================================
+ Coverage 83.34% 83.40% +0.06%
===========================================
Files 468 468
Lines 16304 16383 +79
Branches 2431 2442 +11
===========================================
+ Hits 13587 13663 +76
Misses 2050 2050
- Partials 667 670 +3
|
0xnm
reviewed
Dec 11, 2023
| val sessionState = RumSessionScope.State.fromString( | ||
| featureContext[SESSION_STATE] as? String | ||
| ) | ||
| val sessionStartReason = RumSessionScope.StartReason.fromString( |
Member
There was a problem hiding this comment.
we need to update toMap method then as well, to write it to the context.
| } else if (isExpired) { | ||
| if (backgroundTrackingEnabled && isBackgroundEvent) { | ||
| renewSession(nanoTime) | ||
| renewSession(nanoTime, StartReason.INACTIVITY_TIMEOUT) |
Member
There was a problem hiding this comment.
I think here we can qualify it as background_launch, maybe? If I'm not wrong, we can hit this line in case if application/session was started by some background event (but I may have outdated memories of this logic).
Contributor
Author
There was a problem hiding this comment.
As per the ticket:
Note
The following will not be implemented yet because we don’t track non-interactive sessions.
0xnm
approved these changes
Dec 11, 2023
jonathanmos
approved these changes
Dec 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a
session_preconditionattribute to all RUM event to track the reason the session was created.Motivation
Get more information on what leads to a new session starting, as part of our Session Management work