newrelic / newrelic-browser-agent

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

chore: Enforce no re-wrapping with log wrappers #1080

Closed metal-messiah closed 3 months ago

metal-messiah commented 3 months ago

Adding a fix after observing an issue internally where re-wrapping a logging function after the agent has already wrapped it will break the scoped context.

Overview

Related Issue(s)

Testing

A new test has been added to confirm this behavior

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 34.69 kB / 12.12 kB (gzip) 34.65 kB / 12.1 kB (gzip) -0.12% / -0.12% (gzip)
lite async-chunk 50.03 kB / 16.16 kB (gzip) 50.03 kB / 16.16 kB (gzip) 0% / 0% (gzip)
pro loader 55.25 kB / 18.71 kB (gzip) 55.21 kB / 18.69 kB (gzip) -0.07% / -0.06% (gzip)
pro async-chunk 95.93 kB / 28.81 kB (gzip) 95.93 kB / 28.81 kB (gzip) 0% / 0% (gzip)
spa loader 63.19 kB / 21.15 kB (gzip) 63.15 kB / 21.13 kB (gzip) -0.06% / -0.06% (gzip)
spa async-chunk 111.04 kB / 33.18 kB (gzip) 111.04 kB / 33.18 kB (gzip) 0% / 0% (gzip)
lite-polyfills loader 128.4 kB / 41.45 kB (gzip) 128.35 kB / 41.43 kB (gzip) -0.04% / -0.04% (gzip)
lite-polyfills async-chunk 63.93 kB / 18.43 kB (gzip) 63.93 kB / 18.43 kB (gzip) 0% / 0% (gzip)
pro-polyfills loader 150.59 kB / 47.69 kB (gzip) 150.54 kB / 47.67 kB (gzip) -0.03% / -0.04% (gzip)
pro-polyfills async-chunk 116.08 kB / 31.03 kB (gzip) 116.08 kB / 31.03 kB (gzip) 0% / 0% (gzip)
spa-polyfills loader 158.78 kB / 49.85 kB (gzip) 158.73 kB / 49.83 kB (gzip) -0.03% / -0.03% (gzip)
spa-polyfills async-chunk 133.04 kB / 35.73 kB (gzip) 133.04 kB / 35.73 kB (gzip) 0% / 0% (gzip)
codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 87.64%. Comparing base (f5b9bc9) to head (69857cc). Report is 1 commits behind head on main.

:exclamation: Current head 69857cc differs from pull request most recent head 0ee9e3b

Please upload reports for the commit 0ee9e3b to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1080 +/- ## ========================================== - Coverage 87.68% 87.64% -0.05% ========================================== Files 162 162 Lines 7246 7245 -1 Branches 1419 1419 ========================================== - Hits 6354 6350 -4 - Misses 776 779 +3 Partials 116 116 ``` | [Flag](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1080/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/1080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `91.52% <100.00%> (-0.07%)` | :arrow_down: | | [unit-tests](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `76.43% <100.00%> (-0.01%)` | :arrow_down: | 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 3 months ago

Static Badge

Last ran on June 24, 2024 15:54:30 CDT Checking merge of (69857cc08ee55a5b3feb89fe4833d7f0869f9188) into main (f5b9bc9e6996ca3f22331f39184373e402130124)