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: Expose MicroLoader in the npm package #589

Merged
merged 9 commits into from
Jun 21, 2023
Merged

feat: Expose MicroLoader in the npm package #589

merged 9 commits into from
Jun 21, 2023

Conversation

metal-messiah
Copy link
Member

@metal-messiah metal-messiah commented Jun 19, 2023

The npm package now exposes an entry-point called MicroLoader, which may be used to instantiate multiple agents on one page. This loader type, which is smaller than the Lite loader, captures a distinct PageView event per instance but does not auto-instrument the page. Instead, manual API calls may be used to capture JavaScriptError and PageAction events via the noticeError and addPageAction methods.

Overview

This PR finalizes and exposes the Micro Agent entry point in the npm interface.

Related Issue(s)

NEWRELIC-9401

Testing

A smoke test (wdio) has been added that validates that the loader can be instantiated multiple times on one page and report to distinct application configurations.

Other

README.md has been updated with example usage of the MicroAgent entry point.

@metal-messiah metal-messiah added small Small Engineering Effort Innovation labels Jun 19, 2023
@metal-messiah metal-messiah marked this pull request as ready for review June 19, 2023 20:58
@github-actions
Copy link

github-actions bot commented Jun 20, 2023

Pull Request Checks

Last ran on June 20, 2023 15:41:23 CDT
Checking merge of (5b8dac5) into main (3d49a65)

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #589 (5b8dac5) into main (3d49a65) will decrease coverage by 0.21%.
The diff coverage is 0.00%.

❗ Current head 5b8dac5 differs from pull request most recent head b9de409. Consider uploading reports for the commit b9de409 to get more accurate results

@@            Coverage Diff             @@
##             main     #589      +/-   ##
==========================================
- Coverage   67.00%   66.79%   -0.21%     
==========================================
  Files         131      131              
  Lines        5988     6017      +29     
  Branches     1104     1120      +16     
==========================================
+ Hits         4012     4019       +7     
- Misses       1609     1623      +14     
- Partials      367      375       +8     
Flag Coverage Δ
integration-tests 82.42% <ø> (-0.36%) ⬇️
jest-component 22.37% <0.00%> (-0.11%) ⬇️
jest-unit 18.38% <0.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/loaders/micro-agent.js 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bjfield bjfield changed the title feat: NPM Micro Loader feat: Expose a MicroLoader entry point in the NPM package Jun 21, 2023
@bjfield bjfield changed the title feat: Expose a MicroLoader entry point in the NPM package feat: Expose MicroLoader in the npm package Jun 21, 2023
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
metal-messiah and others added 2 commits June 21, 2023 15:51
Co-authored-by: Ben Field <[email protected]>
Co-authored-by: Ben Field <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Innovation small Small Engineering Effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants