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

feat: maintain a harvestCount for use later with harvestId #922

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

metal-messiah
Copy link
Member

Add a counter which increments after every harvest. This will be used in a future effort to curate a unique harvest ID for API paging purposes.

Overview

This PR adds a harvestCount int to the runtime object, which increments every time _send is completed. _send is used under the hood by all harvest methods to send data. The plan for the future will be to concat this harvestCount with the ptid and session values to create a unique harvest identifier on blob-consumer payloads.

Related Issue(s)

https://new-relic.atlassian.net/browse/NR-238623
https://new-relic.atlassian.net/browse/NR-238628

Testing

A new, simple jest test has been added to confirm this behavior. WDIO test should be added later when implemented in outgoing harvests

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 32.46 kB / 11.31 kB (gzip) 32.48 kB / 11.32 kB (gzip) 0.05% / 0.06% (gzip)
lite async-chunk 46.45 kB / 15.27 kB (gzip) 46.51 kB / 15.29 kB (gzip) 0.13% / 0.08% (gzip)
pro loader 51.63 kB / 17.54 kB (gzip) 51.64 kB / 17.54 kB (gzip) 0.03% / 0.02% (gzip)
pro async-chunk 87.67 kB / 26.96 kB (gzip) 87.73 kB / 26.97 kB (gzip) 0.07% / 0.04% (gzip)
spa loader 60.2 kB / 20.16 kB (gzip) 60.21 kB / 20.17 kB (gzip) 0.02% / 0.05% (gzip)
spa async-chunk 101.79 kB / 31.1 kB (gzip) 101.85 kB / 31.11 kB (gzip) 0.06% / 0.05% (gzip)
lite-polyfills loader 128.8 kB / 41.08 kB (gzip) 128.82 kB / 41.1 kB (gzip) 0.01% / 0.03% (gzip)
lite-polyfills async-chunk 58.81 kB / 17.4 kB (gzip) 58.87 kB / 17.41 kB (gzip) 0.1% / 0.06% (gzip)
pro-polyfills loader 148.83 kB / 47.04 kB (gzip) 148.85 kB / 47.04 kB (gzip) 0.01% / 0.01% (gzip)
pro-polyfills async-chunk 121.11 kB / 31.83 kB (gzip) 121.17 kB / 31.84 kB (gzip) 0.05% / 0.05% (gzip)
spa-polyfills loader 156.85 kB / 49.14 kB (gzip) 156.87 kB / 49.15 kB (gzip) 0.01% / 0.02% (gzip)
spa-polyfills async-chunk 136.46 kB / 36.5 kB (gzip) 136.52 kB / 36.51 kB (gzip) 0.04% / 0.04% (gzip)

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.42%. Comparing base (4081c03) to head (25bafe6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #922   +/-   ##
=======================================
  Coverage   80.42%   80.42%           
=======================================
  Files         154      154           
  Lines        7044     7046    +2     
  Branches     1386     1386           
=======================================
+ Hits         5665     5667    +2     
  Misses       1163     1163           
  Partials      216      216           
Flag Coverage Δ
unit-tests 58.40% <100.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 merged commit d0b5b7d into main Mar 20, 2024
17 checks passed
@metal-messiah metal-messiah deleted the harvest-id branch March 20, 2024 15:09
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