Skip to content

fix: Don't warn about missing view on PerformanceMetric events#2454

Merged
fuzzybinary merged 1 commit into
developfrom
jward/RUM-6138-silence-performance-metric-spam
Dec 16, 2024
Merged

fix: Don't warn about missing view on PerformanceMetric events#2454
fuzzybinary merged 1 commit into
developfrom
jward/RUM-6138-silence-performance-metric-spam

Conversation

@fuzzybinary

Copy link
Copy Markdown
Member

What does this PR do?

PerformanceMetric events are triggered automatically by some of the cross platform frameworks, and can result in log spam as views transition or if no view is active. Fix it so that the performance metric event is considered a silent orphaned event type.

refs: RUM-6138

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

PerformanceMetric events are triggered automatically by some of the cross platform frameworks, and can result in log spam as views transition or if no view is active.  Fix it so that the performance metric event is considered a silent orphaned event type.

refs: RUM-6138
@fuzzybinary
fuzzybinary requested review from a team as code owners December 13, 2024 16:27
@codecov-commenter

codecov-commenter commented Dec 13, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.31%. Comparing base (551b859) to head (33b0656).
Report is 8 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2454      +/-   ##
===========================================
+ Coverage    70.27%   70.31%   +0.03%     
===========================================
  Files          780      780              
  Lines        28823    28822       -1     
  Branches      4824     4824              
===========================================
+ Hits         20255    20264       +9     
+ Misses        7226     7220       -6     
+ Partials      1342     1338       -4     
Files with missing lines Coverage Δ
...d/rum/internal/domain/scope/RumViewManagerScope.kt 92.00% <ø> (ø)

... and 28 files with indirect coverage changes

@0xnm 0xnm left a comment

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.

What is the case when it is sent while there is no active view?

@fuzzybinary

Copy link
Copy Markdown
Member Author

What is the case when it is sent while there is no active view?

There are a few:

  • Transitions between views. Our router plugin stops views when they're pop'd and I've seen instances where there can be a frame or two sometimes when a new view isn't started yet so Flutter sends the rendering information even though there's no view.
  • Web views have the same problem as above, but worse. We kill the current Flutter view while loading the browser, but don't get a new view until the Browser SDK tells us a new view is loaded.
  • A bug or intentionally not tracked view in user code. But because these events are sent with almost every frame render and because they're sent automatically, this just becomes log spam.

@fuzzybinary
fuzzybinary merged commit e4c4bcc into develop Dec 16, 2024
@fuzzybinary
fuzzybinary deleted the jward/RUM-6138-silence-performance-metric-spam branch December 16, 2024 14:29
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.

4 participants