newrelic 8.4.0 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NEWS.md CHANGED
@@ -1,37 +1,91 @@
1
- ### v8.4.0 (2021-09-28)
1
+ ### v8.6.0 (2021-11-17)
2
2
 
3
- * **Deprecation Warning**: Cross Application Tracing (CAT) has been deprecated and will be removed in a future major release. For applications that explicitly disable Distributed Tracing (DT) to leverage CAT, we recommend migrating to DT to avoid loss of cross-service visibility.
4
- * Disables CAT by default. You must explicitly enable CAT along with turning off DT.
5
- * Adds a deprecation warning when CAT is enabled and active (DT disabled).
6
-
7
- * Fixed issue with `clearTimeout` that could result in dropping parent segments or spans.
3
+ * Added `onResolved` instrumentation hook to apply instrumentation prior to module load.
8
4
 
9
- This bug resulted in some MongoDB calls being dropped from Transaction Traces and Distributed Traces (spans): https://github.com/newrelic/node-newrelic/issues/922.
10
-
11
- * Removed warnings from agent tests for `no-var` eslint rule.
12
-
13
- * Added support for Cassandra driver v4.0.0 and above.
5
+ This hook fires after the module filepath has been resolved just prior to the module being loaded by the CommonJS module loader.
14
6
 
15
- * Fixed issue where DT headers would not be processed by `transaction-shim.handleCATHeaders()` when CAT was explicitly disabled. This primarily impacts `amqplib` instrumentation.
7
+ * Fixed issue where `recordConsume` was not binding consumer if it was a promise
16
8
 
17
- * Transitioned aws-lambda.test.js to use Tap over Mocha.
9
+ * Pinned mongo versioned tests to `<4.2.0` until we can address https://github.com/newrelic/node-newrelic/issues/982
18
10
 
19
- * Removed warnings from agent for `no-var` eslint rule.
11
+ * Introduced a context management API to be used in place of manually calling tracer.segment get/set.
20
12
 
21
- * Refactored `transaction-shim`, `http` and `http-outbound` to use centralized CAT methods in `util/cat`
13
+ ### v8.5.2 (2021-11-09)
22
14
 
23
- * Replaced http-outbound test call to use example.com to avoid unpredictable connection resets.
24
-
25
- * Migrated sql query parser tests to tap
15
+ * Fixed issue where unhandled promise rejections were not getting logged as errors in a lambda execution
26
16
 
17
+ ### v8.5.1 (2021-11-03)
18
+
19
+ * Fixed bug where failure to retrieve CPU/Memory details for certain Linux distros could result in a crash.
20
+
21
+ `parseProcCPUInfo` and `parseProcMeminfo` now check for `null` input prior to processing.
22
+
23
+ * Updated README to favor using `-r` to load the agent vs `require('newrelic')`.
24
+
25
+ * Updated `@newrelic/test-utilities` to 6.1.1 and applied a global sampling value of 10 for versioned tests.
26
+
27
+ * Migrated utilization unit tests from mocha to tap.
28
+
29
+ * Migrated logger unit tests from mocha to tap.
30
+
31
+ * Cleaned up or added future removal comments for several deprecation warnings.
32
+
33
+ * Added a script and corresponding CI job that will check for PRs that have been merged and not release and notify the team in a private slack channel.
34
+
35
+ * Updated the versioned test runner to always run against minor versions.
36
+
37
+ * Fixed a high severity npm audit failure.
38
+
39
+ ### v8.5.0 (2021-10-12)
40
+
41
+ * Added full support for Fastify v2 and v3. Fastify instrumentation is now GA.
42
+ * Removed fastify feature flag.
43
+ * Instrumented Fastify routes by wrapping `addHook`.
44
+ * Added middleware mounting for fastify v3.
45
+ * Fixed capturing of mount point for middleware naming.
46
+ * Fixed the WebFramework spec definitions for Fastify middleware and route handlers to properly retrieve the IncomingMessage from a request object.
47
+ * Added proper definition to middleware handlers so that the relationship to consecutive middleware and route handler are siblings and not direct children.
48
+
49
+ * Added experimental instrumentation for the [undici](https://github.com/nodejs/undici) http client behind a feature flag.
50
+
51
+ To enable undici support, add the following into your config: `{ feature_flag: { undici_instrumentation: true } }`. The support for undici client is Node.js 16.x as it takes advantage of the [diagnostics_channel](https://nodejs.org/dist/latest-v16.x/docs/api/diagnostics_channel.html). Lastly, you must be using [v4.7.0+](https://github.com/nodejs/undici/releases/tag/v4.7.0) of the undici client for any of the instrumentation to work.
52
+
53
+ Note: There are currently some state issues if requests to an app are made with keep alive and you have multiple undici requests being made in parallel. In this case, set feature_flag: `{ undici_async_tracking: false }` which avoids these state issues at the cost of some broken segment nesting.
54
+
55
+ ### v8.4.0 (2021-09-28)
56
+
57
+ * **Deprecation Warning**: Cross Application Tracing (CAT) has been deprecated and will be removed in a future major release. For applications that explicitly disable Distributed Tracing (DT) to leverage CAT, we recommend migrating to DT to avoid loss of cross-service visibility.
58
+ * Disables CAT by default. You must explicitly enable CAT along with turning off DT.
59
+ * Adds a deprecation warning when CAT is enabled and active (DT disabled).
60
+
61
+ * Fixed issue with `clearTimeout` that could result in dropping parent segments or spans.
62
+
63
+ This bug resulted in some MongoDB calls being dropped from Transaction Traces and Distributed Traces (spans): https://github.com/newrelic/node-newrelic/issues/922.
64
+
65
+ * Removed warnings from agent tests for `no-var` eslint rule.
66
+
67
+ * Added support for Cassandra driver v4.0.0 and above.
68
+
69
+ * Fixed issue where DT headers would not be processed by `transaction-shim.handleCATHeaders()` when CAT was explicitly disabled. This primarily impacts `amqplib` instrumentation.
70
+
71
+ * Transitioned aws-lambda.test.js to use Tap over Mocha.
72
+
73
+ * Removed warnings from agent for `no-var` eslint rule.
74
+
75
+ * Refactored `transaction-shim`, `http` and `http-outbound` to use centralized CAT methods in `util/cat`
76
+
77
+ * Replaced http-outbound test call to use example.com to avoid unpredictable connection resets.
78
+
79
+ * Migrated sql query parser tests to tap
80
+
27
81
  * Added more API usage examples.
28
-
29
- * Added a README to the `examples/` folder discussing how to use the examples.
30
-
31
- * Fixed `message-shim` test assertion to avoid flakiness based on precision differences(ms vs ns)
32
-
33
- * Applied new lint rules barring the use of `var` and preferring the use of `const` wherever possible.
34
-
82
+
83
+ * Added a README to the `examples/` folder discussing how to use the examples.
84
+
85
+ * Fixed `message-shim` test assertion to avoid flakiness based on precision differences(ms vs ns)
86
+
87
+ * Applied new lint rules barring the use of `var` and preferring the use of `const` wherever possible.
88
+
35
89
  ### v8.3.0 (2021-09-09)
36
90
 
37
91
  * Enabled Distributed Tracing (DT) by default.
package/README.md CHANGED
@@ -44,7 +44,13 @@ To use New Relic's Node.js agent entails these three steps, which are described
44
44
  }
45
45
  ```
46
46
 
47
- 4. Finally, load the `newrelic` module _before any other module_ in your program.
47
+ 4. Finally, run your program with the `newrelic` module loaded first by using node's `-r/--require` flag.
48
+
49
+ ```
50
+ $ node -r newrelic your-program.js
51
+ ```
52
+
53
+ If you cannot control how your program is run, you can load the `newrelic` module _before any other module_ in your program.
48
54
 
49
55
  ```js
50
56
  const newrelic = require('newrelic')
@@ -52,11 +58,6 @@ To use New Relic's Node.js agent entails these three steps, which are described
52
58
  /* ... the rest of your program ... */
53
59
  ```
54
60
 
55
- If you're compiling your JavaScript and can't control the final `require` order, the Node.js agent will work with node's `-r/--require` flag.
56
-
57
- $ node -r newrelic your-program.js
58
- $ node --require newrelic your-program.js
59
-
60
61
  ## Getting Started
61
62
 
62
63
  For more information on getting started, [check the Node.js docs](https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/introduction-new-relic-nodejs).
@@ -34,6 +34,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
34
34
  * [@newrelic/proxy](#newrelicproxy)
35
35
  * [@newrelic/test-utilities](#newrelictest-utilities)
36
36
  * [@octokit/rest](#octokitrest)
37
+ * [@slack/bolt](#slackbolt)
37
38
  * [ajv](#ajv)
38
39
  * [architect](#architect)
39
40
  * [benchmark](#benchmark)
@@ -41,7 +42,9 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
41
42
  * [chai](#chai)
42
43
  * [commander](#commander)
43
44
  * [eslint-config-prettier](#eslint-config-prettier)
45
+ * [eslint-plugin-disable](#eslint-plugin-disable)
44
46
  * [eslint-plugin-header](#eslint-plugin-header)
47
+ * [eslint-plugin-jsdoc](#eslint-plugin-jsdoc)
45
48
  * [eslint-plugin-node](#eslint-plugin-node)
46
49
  * [eslint-plugin-prettier](#eslint-plugin-prettier)
47
50
  * [eslint](#eslint)
@@ -49,7 +52,6 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
49
52
  * [generic-pool](#generic-pool)
50
53
  * [glob](#glob)
51
54
  * [got](#got)
52
- * [http-errors](#http-errors)
53
55
  * [husky](#husky)
54
56
  * [jsdoc](#jsdoc)
55
57
  * [lint-staged](#lint-staged)
@@ -1768,7 +1770,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1768
1770
 
1769
1771
  ### @newrelic/test-utilities
1770
1772
 
1771
- This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v6.0.0](https://github.com/newrelic/node-test-utilities/tree/v6.0.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v6.0.0/LICENSE):
1773
+ This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v6.1.1](https://github.com/newrelic/node-test-utilities/tree/v6.1.1)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v6.1.1/LICENSE):
1772
1774
 
1773
1775
  ```
1774
1776
  Apache License
@@ -2005,6 +2007,36 @@ THE SOFTWARE.
2005
2007
 
2006
2008
  ```
2007
2009
 
2010
+ ### @slack/bolt
2011
+
2012
+ This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.7.0](https://github.com/slackapi/bolt/tree/v3.7.0)), distributed under the [MIT License](https://github.com/slackapi/bolt/blob/v3.7.0/LICENSE):
2013
+
2014
+ ```
2015
+ The MIT License (MIT)
2016
+
2017
+ Copyright (c) 2016-2018 Robots & Pencils
2018
+ Copyright (c) 2019- Slack Technologies, LLC
2019
+
2020
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2021
+ of this software and associated documentation files (the "Software"), to deal
2022
+ in the Software without restriction, including without limitation the rights
2023
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2024
+ copies of the Software, and to permit persons to whom the Software is
2025
+ furnished to do so, subject to the following conditions:
2026
+
2027
+ The above copyright notice and this permission notice shall be included in all
2028
+ copies or substantial portions of the Software.
2029
+
2030
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2031
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2032
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2033
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2034
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2035
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2036
+ SOFTWARE.
2037
+
2038
+ ```
2039
+
2008
2040
  ### ajv
2009
2041
 
2010
2042
  This product includes source derived from [ajv](https://github.com/ajv-validator/ajv) ([v6.12.6](https://github.com/ajv-validator/ajv/tree/v6.12.6)), distributed under the [MIT License](https://github.com/ajv-validator/ajv/blob/v6.12.6/LICENSE):
@@ -2210,6 +2242,33 @@ THE SOFTWARE.
2210
2242
 
2211
2243
  ```
2212
2244
 
2245
+ ### eslint-plugin-disable
2246
+
2247
+ This product includes source derived from [eslint-plugin-disable](https://github.com/mradionov/eslint-plugin-disable) ([v2.0.1](https://github.com/mradionov/eslint-plugin-disable/tree/v2.0.1)), distributed under the [MIT License](https://github.com/mradionov/eslint-plugin-disable/blob/v2.0.1/LICENSE):
2248
+
2249
+ ```
2250
+ Copyright (c) 2015 Michael Radionov (https://github.com/mradionov)
2251
+
2252
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2253
+ of this software and associated documentation files (the "Software"), to deal
2254
+ in the Software without restriction, including without limitation the rights
2255
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2256
+ copies of the Software, and to permit persons to whom the Software is
2257
+ furnished to do so, subject to the following conditions:
2258
+
2259
+ The above copyright notice and this permission notice shall be included in
2260
+ all copies or substantial portions of the Software.
2261
+
2262
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2263
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2264
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2265
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2266
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2267
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2268
+ THE SOFTWARE.
2269
+
2270
+ ```
2271
+
2213
2272
  ### eslint-plugin-header
2214
2273
 
2215
2274
  This product includes source derived from [eslint-plugin-header](https://github.com/Stuk/eslint-plugin-header) ([v3.1.1](https://github.com/Stuk/eslint-plugin-header/tree/v3.1.1)), distributed under the [MIT License](https://github.com/Stuk/eslint-plugin-header/blob/v3.1.1/README.md):
@@ -2226,6 +2285,38 @@ The above copyright notice and this permission notice shall be included in all c
2226
2285
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2227
2286
  ```
2228
2287
 
2288
+ ### eslint-plugin-jsdoc
2289
+
2290
+ This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v36.1.0](https://github.com/gajus/eslint-plugin-jsdoc/tree/v36.1.0)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v36.1.0/LICENSE):
2291
+
2292
+ ```
2293
+ Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/)
2294
+ All rights reserved.
2295
+
2296
+ Redistribution and use in source and binary forms, with or without
2297
+ modification, are permitted provided that the following conditions are met:
2298
+ * Redistributions of source code must retain the above copyright
2299
+ notice, this list of conditions and the following disclaimer.
2300
+ * Redistributions in binary form must reproduce the above copyright
2301
+ notice, this list of conditions and the following disclaimer in the
2302
+ documentation and/or other materials provided with the distribution.
2303
+ * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the
2304
+ names of its contributors may be used to endorse or promote products
2305
+ derived from this software without specific prior written permission.
2306
+
2307
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2308
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2309
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2310
+ DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY
2311
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2312
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2313
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2314
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2315
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2316
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2317
+
2318
+ ```
2319
+
2229
2320
  ### eslint-plugin-node
2230
2321
 
2231
2322
  This product includes source derived from [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) ([v11.1.0](https://github.com/mysticatea/eslint-plugin-node/tree/v11.1.0)), distributed under the [MIT License](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/LICENSE):
@@ -2409,37 +2500,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
2409
2500
 
2410
2501
  ```
2411
2502
 
2412
- ### http-errors
2413
-
2414
- This product includes source derived from [http-errors](https://github.com/jshttp/http-errors) ([v1.8.0](https://github.com/jshttp/http-errors/tree/v1.8.0)), distributed under the [MIT License](https://github.com/jshttp/http-errors/blob/v1.8.0/LICENSE):
2415
-
2416
- ```
2417
-
2418
- The MIT License (MIT)
2419
-
2420
- Copyright (c) 2014 Jonathan Ong me@jongleberry.com
2421
- Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com
2422
-
2423
- Permission is hereby granted, free of charge, to any person obtaining a copy
2424
- of this software and associated documentation files (the "Software"), to deal
2425
- in the Software without restriction, including without limitation the rights
2426
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2427
- copies of the Software, and to permit persons to whom the Software is
2428
- furnished to do so, subject to the following conditions:
2429
-
2430
- The above copyright notice and this permission notice shall be included in
2431
- all copies or substantial portions of the Software.
2432
-
2433
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2434
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2435
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2436
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2437
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2438
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2439
- THE SOFTWARE.
2440
-
2441
- ```
2442
-
2443
2503
  ### husky
2444
2504
 
2445
2505
  This product includes source derived from [husky](https://github.com/typicode/husky) ([v6.0.0](https://github.com/typicode/husky/tree/v6.0.0)), distributed under the [MIT License](https://github.com/typicode/husky/blob/v6.0.0/LICENSE):
@@ -3232,7 +3292,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
3292
 
3233
3293
  ### tap
3234
3294
 
3235
- This product includes source derived from [tap](https://github.com/tapjs/node-tap) ([v15.0.9](https://github.com/tapjs/node-tap/tree/v15.0.9)), distributed under the [ISC License](https://github.com/tapjs/node-tap/blob/v15.0.9/LICENSE):
3295
+ This product includes source derived from [tap](https://github.com/tapjs/node-tap) ([v15.0.10](https://github.com/tapjs/node-tap/tree/v15.0.10)), distributed under the [ISC License](https://github.com/tapjs/node-tap/blob/v15.0.10/LICENSE):
3236
3296
 
3237
3297
  ```
3238
3298
  The ISC License