Skip to content

fix: Force generic events feature to clear buffer when unloading #1202

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

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

metal-messiah
Copy link
Member

Fixed an issue where the generic events buffer was not clearing when unloading. This affected a small portion of experiences where the agent was "unloading" due to the page losing focus, but not actually closing. Subsequent harvests when the page was re-focused would have the potential for duplicated data.

Overview

Related Issue(s)

NR-319565

Testing

Existing tests should continue to pass

Copy link

Asset Size Report

Merging this pull request will result in the following asset size changes:

Agent Asset Previous Size New Size Diff
lite loader 30.48 kB / 11.03 kB (gzip) 30.48 kB / 11.03 kB (gzip) 0% / 0% (gzip)
lite async-chunk 51.57 kB / 16.73 kB (gzip) 51.57 kB / 16.73 kB (gzip) 0% / 0% (gzip)
pro loader 51.48 kB / 17.79 kB (gzip) 51.48 kB / 17.78 kB (gzip) 0% / -0.02% (gzip)
pro async-chunk 97.9 kB / 29.73 kB (gzip) 97.92 kB / 29.73 kB (gzip) 0.02% / 0% (gzip)
spa loader 59.13 kB / 20.15 kB (gzip) 59.13 kB / 20.15 kB (gzip) 0% / 0% (gzip)
spa async-chunk 112.96 kB / 34.08 kB (gzip) 112.98 kB / 34.08 kB (gzip) 0.02% / 0% (gzip)

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

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

Project coverage is 88.42%. Comparing base (1b0bb1d) to head (acb9266).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/features/generic_events/aggregate/index.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1202      +/-   ##
==========================================
- Coverage   88.45%   88.42%   -0.03%     
==========================================
  Files         164      164              
  Lines        7221     7234      +13     
  Branches     1472     1478       +6     
==========================================
+ Hits         6387     6397      +10     
- Misses        710      713       +3     
  Partials      124      124              
Flag Coverage Δ
unit-tests 78.68% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@metal-messiah metal-messiah changed the title fix: Fix behavior where the generic events buffer would not clear if unloading fix: Force generic events feature to clear buffer when unloading Sep 27, 2024
@metal-messiah metal-messiah merged commit d3fac07 into main Sep 27, 2024
16 of 19 checks passed
@metal-messiah metal-messiah deleted the fix-generic-events-buffer branch September 27, 2024 17:30
jspivack pushed a commit to jspivack/newrelic-browser-agent that referenced this pull request Oct 8, 2024
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.

2 participants