[RUM-8061] RUM View Ended Telemetry now includes TNS and INV#2495
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2495 +/- ##
===========================================
+ Coverage 69.95% 70.11% +0.16%
===========================================
Files 788 791 +3
Lines 29647 29795 +148
Branches 4962 4987 +25
===========================================
+ Hits 20739 20889 +150
+ Misses 7536 7526 -10
- Partials 1372 1380 +8
|
| networkSettledMetricResolver.viewWasStopped() | ||
|
|
||
| viewEndedMetricDispatcher.sendViewEnded( |
There was a problem hiding this comment.
Is it intentional that we are using a different lingvo: ended vs stopped? Shouldn't we align?
View may be stopped, but still be in the list of the scopes (but not active ones), waiting for the child scopes to finish.
Once all childs scopes finish, the view is considered as complete (see
Is ended here an equivalent of stopped or complete?
There was a problem hiding this comment.
Nice catch here - changes followed from this note lead me to found potential issue.
The ended here comes from metric name rather than android sdk notation so I prefer to keep it as it is ( to be aligned with SessionEndedMetric), but entire method call now checks for child scopes
| ) | ||
|
|
||
| val viewEndedMetricDispatcher = ViewEndedMetricDispatcher( | ||
| viewType = ViewMetricDispatcher.ViewType.CUSTOM, |
There was a problem hiding this comment.
shouldn't we inherit it as an argument of fromEvent call and it is up to the caller to provide a relevant value?
There was a problem hiding this comment.
I found that there is RumViewType enum that does actually the same so removed duplication and reusing RumViewType instead. There is no reason to get the value from method parameters because RumViewType is not provided at this moment, but thanks for spotting - it helped to reduce code duplication
ncreated
left a comment
There was a problem hiding this comment.
I only validated the spec values, finding a problem around loading_time key - requesting a change. Other that this, it looks very good, well done 🙂 💪.
f8fbc88 to
fae6587
Compare
733fdbd to
2f6ed12
Compare
| // Second, if there is no previous view information, we are either on the very first screen of the app or | ||
| // lost the previous view information for some reason | ||
| val previousViewId = resolvePreviousViewId(viewId) | ||
| ?: return NoValueReason.InteractionToNextView.NO_PREVIOUS_VIEW | ||
|
|
||
| // Third - the case where there is no interaction from the previous view. | ||
| if (lastInteractions[previousViewId] == null) { | ||
| return NoValueReason.InteractionToNextView.NO_ACTION | ||
| } | ||
| return null | ||
|
|
||
| // Finally - checking that the previous view interaction is eligible | ||
| resolveLastInteraction(previousViewId, currentViewCreatedTimestamp) | ||
| ?: return NoValueReason.InteractionToNextView.NO_ELIGIBLE_ACTION |
There was a problem hiding this comment.
There is a corner case when view ID may change if session ID has changed
, but it is hard to address it anyway.
What does this PR do?
Adds mandatory telemetry events for TTNS and ITNV
Spec
Review checklist (to be filled by reviewers)