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

⚗️ [RUMF-1499] Don't send duration for resources crossing a page frozen state #2255

Merged
merged 4 commits into from
May 22, 2023

Conversation

amortemousque
Copy link
Collaborator

Motivation

The resource duration for XHR and fetch is computed by the SDK if the corresponding resource timing isn’t found. If during the resource a page frozen state happens, we will wrongfully compute the duration:

image

In these cases the browser SDK will now send resources without duration.

Changes

Check if the request crossed a frozen state in resourceCollection.ts

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@amortemousque amortemousque requested a review from a team as a code owner May 17, 2023 11:37
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2023

Codecov Report

Merging #2255 (0e82f5f) into main (6ac666e) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2255      +/-   ##
==========================================
+ Coverage   94.02%   94.08%   +0.05%     
==========================================
  Files         201      201              
  Lines        6095     6103       +8     
  Branches     1349     1353       +4     
==========================================
+ Hits         5731     5742      +11     
+ Misses        364      361       -3     
Impacted Files Coverage Δ
packages/core/src/tools/experimentalFeatures.ts 100.00% <100.00%> (ø)
...rumEventsCollection/resource/resourceCollection.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

it should probably be a ⚗️ instead of 🐛

@amortemousque amortemousque changed the title 🐛 [RUMF-1499] Don't send duration for resources crossing a page frozen state ⚗️ [RUMF-1499] Don't send duration for resources crossing a page frozen state May 22, 2023
@amortemousque amortemousque merged commit 94aa161 into main May 22, 2023
@amortemousque amortemousque deleted the aymeric/no-duration-resources-frozen branch May 22, 2023 14:31
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