RUMM-1765 Collect RUM events during application launch - part 1 #677
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 and why?
📦 This is the first PR on application launch events tracking. It implements the base logic of starting "ApplicationLaunch" view if any RUM event is received before tracking the first view:
How?
It was known that this feature will collide with existing Background Events Tracking option, which creates "Background" view for capturing off-view events. Most of the effort in this PR is focused on decoupling both and implementing a clear separation of following cases:
This required introducing a notion of "initial RUM session" - the very first session in current app process. If session times out, next RUM session is not marked as "initial".
To make code more readable and the implementation more explicit, I added two values to the
RUMCommand
interface, so we can clearly know if a given event should result with a side effect in off-view tracking:Next PRs
There are two key elements missing in this PR, which will be delivered in separate PRs:
More on these edge cases can be read in "RFC - Collecting App Launch Crashes in Mobile SDKs".
Review checklist