Skip to content

Fix internal telemetry on invalid loading time usage#2468

Merged
xgouchet merged 1 commit into
developfrom
xgouchet/view_loading_time_telemetry
Dec 20, 2024
Merged

Fix internal telemetry on invalid loading time usage#2468
xgouchet merged 1 commit into
developfrom
xgouchet/view_loading_time_telemetry

Conversation

@xgouchet

Copy link
Copy Markdown
Contributor

What does this PR do?

The way our telemetry was set up, we could send warnings when there shouldn't have been :

  • if a previous RumViewScope was stopped but kept to wait for children event to be sent, it would always send a warning saying there's no active view, even if an actual active view would actually handle the event.

@xgouchet
xgouchet requested review from a team as code owners December 20, 2024 10:26
@codecov-commenter

codecov-commenter commented Dec 20, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 69.98%. Comparing base (3adfe60) to head (f6ff29b).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...d/rum/internal/domain/scope/RumViewManagerScope.kt 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2468      +/-   ##
===========================================
+ Coverage    69.92%   69.98%   +0.07%     
===========================================
  Files          786      786              
  Lines        29301    29299       -2     
  Branches      4889     4891       +2     
===========================================
+ Hits         20486    20504      +18     
+ Misses        7442     7434       -8     
+ Partials      1373     1361      -12     
Files with missing lines Coverage Δ
.../android/rum/internal/domain/scope/RumViewScope.kt 95.08% <100.00%> (+0.44%) ⬆️
...d/rum/internal/domain/scope/RumViewManagerScope.kt 90.66% <85.71%> (-1.34%) ⬇️

... and 37 files with indirect coverage changes

InternalTelemetryEvent.ApiUsage.AddViewLoadingTime(
overwrite = event.overwrite,
noView = hasNoView,
noActiveView = !hasNoView

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit confusing to me. If we get here then it means we're inside a block where hasActiveView is necessarily false, but we could end up passing false to AddViewLoading time for noActiveView indicating that there is actually an active view?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I'm replicating the intended usage of this telemetry, where only one of the two attributes can be true at a time.

@xgouchet
xgouchet merged commit f61a42c into develop Dec 20, 2024
@xgouchet
xgouchet deleted the xgouchet/view_loading_time_telemetry branch December 20, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants