newrelic / newrelic-browser-agent

New Relic Browser Agent
Apache License 2.0
77 stars 40 forks source link

feat: Logging feature harvesting and optimizations #1064

Closed metal-messiah closed 3 months ago

metal-messiah commented 3 months ago

Allow the new logging feature to process and send harvests while optimizing log capture mechanisms

Overview

this contains fixes for PR comments from the closed #1061

Related Issue(s)

See issues from #1061

Testing

Lots of tests have been implemented to test harvest and local file behaviors. run through them locally with npm test and npm wdio -- --lt

github-actions[bot] commented 3 months ago

Asset Size Report

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

Agent Asset Previous Size New Size Diff
lite loader 33.86 kB / 11.85 kB (gzip) 34.59 kB / 12.05 kB (gzip) 2.14% / 1.65% (gzip)
lite async-chunk 49.95 kB / 16.13 kB (gzip) 49.95 kB / 16.13 kB (gzip) 0% / 0% (gzip)
pro loader 54.53 kB / 18.49 kB (gzip) 55.24 kB / 18.66 kB (gzip) 1.29% / 0.9% (gzip)
pro async-chunk 95.02 kB / 28.64 kB (gzip) 95.87 kB / 28.82 kB (gzip) 0.9% / 0.64% (gzip)
spa loader 62.69 kB / 20.98 kB (gzip) 63.39 kB / 21.14 kB (gzip) 1.12% / 0.76% (gzip)
spa async-chunk 110.29 kB / 33.08 kB (gzip) 111.14 kB / 33.25 kB (gzip) 0.77% / 0.54% (gzip)
lite-polyfills loader 127.83 kB / 41.14 kB (gzip) 128.55 kB / 41.37 kB (gzip) 0.56% / 0.56% (gzip)
lite-polyfills async-chunk 64.69 kB / 18.46 kB (gzip) 64.69 kB / 18.46 kB (gzip) 0% / 0% (gzip)
pro-polyfills loader 149.97 kB / 47.25 kB (gzip) 150.96 kB / 47.64 kB (gzip) 0.66% / 0.82% (gzip)
pro-polyfills async-chunk 117.29 kB / 30.96 kB (gzip) 118.12 kB / 31.2 kB (gzip) 0.71% / 0.77% (gzip)
spa-polyfills loader 158.22 kB / 49.42 kB (gzip) 159.21 kB / 49.79 kB (gzip) 0.63% / 0.75% (gzip)
spa-polyfills async-chunk 134.29 kB / 35.59 kB (gzip) 135.12 kB / 35.83 kB (gzip) 0.62% / 0.66% (gzip)
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 87.69231% with 8 lines in your changes missing coverage. Please review.

Project coverage is 87.71%. Comparing base (9c43d2c) to head (0f54685).

Files Patch % Lines
src/loaders/agent-base.js 0.00% 6 Missing :warning:
src/features/logging/aggregate/index.js 93.33% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1064 +/- ## ========================================== + Coverage 87.59% 87.71% +0.11% ========================================== Files 162 162 Lines 7181 7234 +53 Branches 1406 1415 +9 ========================================== + Hits 6290 6345 +55 + Misses 776 773 -3 - Partials 115 116 +1 ``` | [Flag](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1064/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | Coverage Δ | | |---|---|---| | [integration-tests](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1064/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `91.62% <94.59%> (+0.66%)` | :arrow_up: | | [unit-tests](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1064/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `76.44% <87.75%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

metal-messiah commented 3 months ago
Screenshot 2024-06-12 at 4 25 57 PM Screenshot 2024-06-12 at 4 16 30 PM Screenshot 2024-06-12 at 4 09 20 PM Screenshot 2024-06-12 at 3 55 49 PM

LambdaTest results for big 4

github-actions[bot] commented 3 months ago

Static Badge

Last ran on June 14, 2024 13:35:59 CDT Checking merge of (0f54685b0da3db60dd234b5c66990b2f41d350e6) into main (9c43d2c7a124c92fe8eaf181999b4b309d619e16)