newrelic / newrelic-browser-agent

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

feat: Create logging feature #1059

Closed metal-messiah closed 4 months ago

metal-messiah commented 4 months ago

Add basis of logging feature for handling and buffering observed log data

Overview

Add various parts necessary to enable a new feature for capturing logs in the agent. Harvesting mechanisms will be added in a future PR.

Related Issue(s)

NR-251152 NR-251160

Testing

Tests have been updated to account for tweaks to event emitter patterns

github-actions[bot] commented 4 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.61 kB / 11.74 kB (gzip) 33.86 kB / 11.86 kB (gzip) 0.75% / 0.99% (gzip)
lite async-chunk 49.88 kB / 16.12 kB (gzip) 50.03 kB / 16.14 kB (gzip) 0.31% / 0.12% (gzip)
pro loader 53.79 kB / 18.2 kB (gzip) 54.53 kB / 18.49 kB (gzip) 1.38% / 1.56% (gzip)
pro async-chunk 93.81 kB / 28.31 kB (gzip) 95.06 kB / 28.64 kB (gzip) 1.33% / 1.15% (gzip)
spa loader 61.95 kB / 20.7 kB (gzip) 62.69 kB / 20.98 kB (gzip) 1.19% / 1.33% (gzip)
spa async-chunk 109.07 kB / 32.74 kB (gzip) 110.32 kB / 33.08 kB (gzip) 1.15% / 1.03% (gzip)
lite-polyfills loader 128.3 kB / 41.1 kB (gzip) 127.83 kB / 41.15 kB (gzip) -0.36% / 0.12% (gzip)
lite-polyfills async-chunk 64.61 kB / 18.46 kB (gzip) 64.77 kB / 18.48 kB (gzip) 0.24% / 0.09% (gzip)
pro-polyfills loader 148.93 kB / 46.97 kB (gzip) 149.97 kB / 47.25 kB (gzip) 0.7% / 0.6% (gzip)
pro-polyfills async-chunk 114.33 kB / 30.27 kB (gzip) 117.37 kB / 30.98 kB (gzip) 2.65% / 2.35% (gzip)
spa-polyfills loader 157.18 kB / 49.12 kB (gzip) 158.22 kB / 49.42 kB (gzip) 0.66% / 0.62% (gzip)
spa-polyfills async-chunk 131.33 kB / 34.9 kB (gzip) 134.37 kB / 35.61 kB (gzip) 2.31% / 2.03% (gzip)
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.63%. Comparing base (3c4ea26) to head (b73377e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1059 +/- ## ========================================== + Coverage 87.50% 87.63% +0.12% ========================================== Files 157 161 +4 Lines 7148 7171 +23 Branches 1404 1407 +3 ========================================== + Hits 6255 6284 +29 + Misses 778 772 -6 Partials 115 115 ``` | [Flag](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1059/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | Coverage Δ | | |---|---|---| | [unit-tests](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1059/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `76.42% <100.00%> (+0.13%)` | :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.

github-actions[bot] commented 4 months ago

Static Badge

Last ran on June 04, 2024 13:29:17 CDT Checking merge of (c8dfa50c27dfd09b6ea1524f74d7af52da216eb7) into main (3713d73716f24c9bfb4154a664c2696296f7150e)