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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [RUMF-1485] Flush event when page becomes frozen #2015

Merged
merged 4 commits into from Feb 15, 2023

Conversation

amortemousque
Copy link
Contributor

@amortemousque amortemousque commented Feb 14, 2023

Motivation

When the browser freezes the page to preserve resources beforeunload is not triggered. Later on if the browser decides to discard the tab, the batch won鈥檛 be flushed. This PR flush the batch on freeze to prevent it.

Changes

listen to freeze event in page exit observable

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@codecov-commenter
Copy link

Codecov Report

Merging #2015 (417a832) into main (c1e1a91) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2015      +/-   ##
==========================================
+ Coverage   93.49%   93.54%   +0.04%     
==========================================
  Files         145      145              
  Lines        5507     5512       +5     
  Branches     1249     1250       +1     
==========================================
+ Hits         5149     5156       +7     
+ Misses        358      356       -2     
Impacted Files Coverage 螖
packages/core/src/browser/pageExitObservable.ts 100.00% <100.00%> (酶)
.../src/domain/segmentCollection/segmentCollection.ts 100.00% <100.00%> (酶)
...rum-core/src/domain/contexts/foregroundContexts.ts 93.84% <0.00%> (+3.07%) 猬嗭笍

馃摚 We鈥檙e building smart automated test selection to slash your CI/CD build times. Learn more

@amortemousque amortemousque merged commit f83a99c into main Feb 15, 2023
@amortemousque amortemousque deleted the aymeric/flush-batch-on-freeze branch February 15, 2023 15:44
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.

None yet

3 participants