-
Notifications
You must be signed in to change notification settings - Fork 46
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: Capture metrics for usage of MooTools and certain polyfills #539
Conversation
Asset Size ReportMerging this pull request will result in the following CDN asset size changes:
Merging this pull request will result in the following NPM package consumer size changes:
Other Standard CDN AssetsReleased Assets
Built Assets
Other Polyfill CDN AssetsReleased Assets
Built Assets
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By testing I've verified that the agent now identifies all the specified polyfills, as well as MooTools (1.5.1 nocompat and 1.6.0 nocompat). We can't know how many pages use incompatible MooTools builds because the agent breaks before it can capture the SM, but this does give us some idea of the relative popularity of compatible MooTools. In conjunction with other metrics sources about usage of frameworks, we may be able to extrapolate what percentage of MooTools instrumentation we aren't seeing due to breakage of our agent. E.g. MooTools is A% as popular as JQuery but we see only B% as much of MooTools as JQuery. Similarly, the polyfill metrics tell us how many non-breaking polyfill instances we run into, but not the instances that break our agent. Just noting these known limitations.
Codecov Report
@@ Coverage Diff @@
## main #539 +/- ##
==========================================
+ Coverage 18.78% 20.03% +1.25%
==========================================
Files 130 132 +2
Lines 4318 4347 +29
Branches 1089 1109 +20
==========================================
+ Hits 811 871 +60
+ Misses 2759 2745 -14
+ Partials 748 731 -17
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Test run passes except Safari 15. |
* Capture metrics for usage of MooTools and certain polyfills (#539) (903a7e1) * Update agent internals in early preparation for new features (#532) (1ee675d) * Address "configurable" warnings arising from user-agent module (#546) (7a7dace) * Ensure runtime is preserved for late-configuration cases (#538) (229b8ed) * Refactor usage of Array.from to address MooTools conflict (#544) (f1e6336)
* Capture metrics for usage of MooTools and certain polyfills (#539) (903a7e1) * Update agent internals in early preparation for new features (#532) (1ee675d) * Address "configurable" warnings arising from user-agent module (#546) (7a7dace) * Ensure runtime is preserved for late-configuration cases (#538) (229b8ed) * Refactor usage of Array.from to address MooTools conflict (#544) (f1e6336)
New supportability metrics have been added to capture MooTools library usage and presence of customer-defined polyfills for certain native JavaScript features, such as function binding and ES6 Array prototype methods.
Overview
Related Issue(s)
https://issues.newrelic.com/browse/NR-119275
Testing
Build the agent and start the local test server. The test server already has a few pages for the different frameworks to demonstrate the framework supportability metrics.
The easiest way to test the polyfill metrics is to disable the file swap for the ES5 build in
babel.config.js
and rebuild the agent. Launch the test server and use IE11 in SauceLabs to test the polyfill metrics.