newrelic / newrelic-browser-agent

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

feat: Pass logging API args as object for better extensibility #1074

Closed metal-messiah closed 3 months ago

metal-messiah commented 3 months ago

Pass logging API arguments an object to allow for better extensibility later without requiring so many arguments for options.

Overview

Related Issue(s)

Testing

Tests have been added, existing logging tests modified to match new pattern

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.09 kB (gzip) 34.69 kB / 12.11 kB (gzip) -0.01% / 0.17% (gzip)
lite async-chunk 49.95 kB / 16.13 kB (gzip) 49.95 kB / 16.13 kB (gzip) 0% / 0% (gzip)
pro loader 55.35 kB / 18.7 kB (gzip) 55.35 kB / 18.72 kB (gzip) 0% / 0.1% (gzip)
pro async-chunk 95.88 kB / 28.82 kB (gzip) 95.88 kB / 28.82 kB (gzip) 0% / 0% (gzip)
spa loader 63.51 kB / 21.2 kB (gzip) 63.5 kB / 21.22 kB (gzip) 0% / 0.08% (gzip)
spa async-chunk 111.14 kB / 33.26 kB (gzip) 111.14 kB / 33.26 kB (gzip) 0% / 0% (gzip)
lite-polyfills loader 128.66 kB / 41.42 kB (gzip) 128.81 kB / 41.47 kB (gzip) 0.12% / 0.12% (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 151.08 kB / 47.69 kB (gzip) 151.23 kB / 47.74 kB (gzip) 0.1% / 0.1% (gzip)
pro-polyfills async-chunk 118.15 kB / 31.21 kB (gzip) 118.15 kB / 31.21 kB (gzip) 0% / 0% (gzip)
spa-polyfills loader 159.33 kB / 49.85 kB (gzip) 159.48 kB / 49.89 kB (gzip) 0.09% / 0.1% (gzip)
spa-polyfills async-chunk 135.15 kB / 35.84 kB (gzip) 135.15 kB / 35.84 kB (gzip) 0% / 0% (gzip)
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.66%. Comparing base (d20d289) to head (0f0e5fe).

Files Patch % Lines
src/loaders/agent-base.js 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1074 +/- ## ========================================== - Coverage 87.68% 87.66% -0.03% ========================================== Files 162 162 Lines 7242 7246 +4 Branches 1417 1419 +2 ========================================== + Hits 6350 6352 +2 - Misses 776 778 +2 Partials 116 116 ``` | [Flag](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1074/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/1074/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `91.55% <100.00%> (-0.05%)` | :arrow_down: | | [unit-tests](https://app.codecov.io/gh/newrelic/newrelic-browser-agent/pull/1074/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=newrelic) | `76.43% <50.00%> (+<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.

github-actions[bot] commented 3 months ago

Static Badge

Last ran on June 17, 2024 22:03:50 CDT Checking merge of (0f0e5fe20d7bc3c91137a587de269fc277b211b8) into main (d20d2894b4b11662db1f93513da99694ffa3bc5c)