Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [RUM-94] ignore performance resource timings with negative duration #2958

Merged

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Aug 30, 2024

Motivation

Starting with Chrome 128, blob URLs are reported as PerformanceResourceTiming entries. Those entries have (always?) negative durations, which is unexpected. The intake rejects RUM Resource events with negative duration already, so sending them is useless and breaks our e2e tests when validating the events against the rum-events-format.

Changes

Let's ignore resource entries with negative duration.

Note: I opened a Chromium issue about this, but in the meantime, there is absolutely no value in sending those entries to the intake.

This PR also rename a bunch of "PerformanceResourceTiming"-related function to have consistent naming.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@BenoitZugmeyer
Copy link
Member Author

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Aug 30, 2024

🚂 Branch Integration: starting soon, median merge time is 0s

Commit a32799d88a will soon be integrated into staging-35.

Use /to-staging -c to cancel this operation!

dd-mergequeue bot added a commit that referenced this pull request Aug 30, 2024
…2958) into staging-35

Integrated commit sha: a32799d

Co-authored-by: Benoît Zugmeyer <benoit.zugmeyer@datadoghq.com>
@dd-devflow
Copy link
Contributor

dd-devflow bot commented Aug 30, 2024

🚂 Branch Integration: This commit was successfully integrated

Commit a32799d88a has been merged into staging-35 in merge commit a4509b1255.

Check out the triggered pipeline on Gitlab 🦊

@BenoitZugmeyer BenoitZugmeyer changed the title 🐛 [RUM-96] ignore performance resource timings with negative duration 🐛 [RUM-94] ignore performance resource timings with negative duration Aug 30, 2024
@BenoitZugmeyer BenoitZugmeyer marked this pull request as ready for review August 30, 2024 10:26
@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner August 30, 2024 10:26
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.43%. Comparing base (e74e435) to head (3f1a692).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
...ages/rum-core/src/domain/resource/resourceUtils.ts 92.85% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2958   +/-   ##
=======================================
  Coverage   93.42%   93.43%           
=======================================
  Files         271      271           
  Lines        7637     7641    +4     
  Branches     1704     1706    +2     
=======================================
+ Hits         7135     7139    +4     
  Misses        502      502           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cit-pr-commenter bot commented Sep 4, 2024

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 160.86 KiB 160.95 KiB 88 B +0.05%
Logs 55.98 KiB 55.98 KiB 0 B 0.00%
Rum Slim 109.47 KiB 109.56 KiB 88 B +0.08%
Worker 25.21 KiB 25.21 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.001 0.001 0.000
addaction 0.032 0.035 0.003
addtiming 0.001 0.001 0.000
adderror 0.033 0.033 0.001
startstopsessionreplayrecording 0.973 1.033 0.060
startview 0.931 0.919 -0.012
logmessage 0.020 0.021 0.001
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 8.35 KiB 8.25 KiB -103 B
addaction 39.97 KiB 40.94 KiB 995 B
addtiming 7.50 KiB 7.75 KiB 257 B
adderror 46.69 KiB 45.08 KiB -1647 B
startstopsessionreplayrecording 5.11 KiB 6.55 KiB 1.44 KiB
startview 316.61 KiB 321.83 KiB 5.22 KiB
logmessage 41.45 KiB 41.15 KiB -314 B

🔗 RealWorld

@BenoitZugmeyer BenoitZugmeyer merged commit 677e59a into main Sep 9, 2024
20 checks passed
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/ignore-performance-timings-with-negative-duration branch September 9, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants