newrelic 11.1.0 → 11.2.1
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 +50 -18
- package/THIRD_PARTY_NOTICES.md +42 -12
- package/api.js +3 -1
- package/index.js +27 -27
- package/lib/instrumentation/@elastic/elasticsearch.js +144 -0
- package/lib/instrumentations.js +1 -0
- package/lib/shim/datastore-shim.js +1 -0
- package/lib/shimmer.js +102 -46
- package/package.json +9 -4
package/NEWS.md
CHANGED
|
@@ -1,21 +1,53 @@
|
|
|
1
|
-
### v11.1
|
|
2
|
-
|
|
3
|
-
####
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
####
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* Updated
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
### v11.2.1 (2023-10-12)
|
|
2
|
+
|
|
3
|
+
#### Bug fixes
|
|
4
|
+
|
|
5
|
+
* Updated initialization to return the api on start up to the security agent properly ([#1807](https://github.com/newrelic/node-newrelic/pull/1807)) ([99e5792](https://github.com/newrelic/node-newrelic/commit/99e5792024263a61751b73976ed707ed51815388))
|
|
6
|
+
|
|
7
|
+
### v11.2.0 (2023-10-11)
|
|
8
|
+
|
|
9
|
+
#### Features
|
|
10
|
+
|
|
11
|
+
* Added instrumentation for ElasticSearch ([#1785](https://github.com/newrelic/node-newrelic/pull/1785)) ([a748b84](https://github.com/newrelic/node-newrelic/commit/a748b84c6a706ed0cea2e07c9fae8807a82dbc95))
|
|
12
|
+
|
|
13
|
+
#### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Updated agent to create a stub api when running in a worker thread to avoid Next.js early return errors ([#1800](https://github.com/newrelic/node-newrelic/pull/1800)) ([636e8f0](https://github.com/newrelic/node-newrelic/commit/636e8f068a2ec2f989e28f6646f844b951ee636d))
|
|
16
|
+
* Updated shimmer to allow registering instrumentation for different versions of the same module ([#1799](https://github.com/newrelic/node-newrelic/pull/1799)) ([30f0b16](https://github.com/newrelic/node-newrelic/commit/30f0b16e13e9621c86481c5d5409a799dbbb8d57))
|
|
17
|
+
|
|
18
|
+
#### Miscellaneous Chores
|
|
19
|
+
|
|
20
|
+
* **deps:** Updated @newrelic/security-agent to v0.3.0 ([#1786](https://github.com/newrelic/node-newrelic/pull/1786)) ([9ca78ae](https://github.com/newrelic/node-newrelic/commit/9ca78aede72ddecd3eb8271d349ad35cc4ce05f9))
|
|
21
|
+
* Separated running versioned tests between local and external ([#1792](https://github.com/newrelic/node-newrelic/pull/1792)) ([6ffe2f6](https://github.com/newrelic/node-newrelic/commit/6ffe2f6e16c769c3fb8de767e9336992b1cca797))
|
|
22
|
+
* **dev-deps** Updated get-func-name to fix CVE ([#1790](https://github.com/newrelic/node-newrelic/pull/1790)) ([f378c77](https://github.com/newrelic/node-newrelic/commit/f378c77eb09fcd3453850a1d177faea41422f637))
|
|
23
|
+
|
|
24
|
+
#### Tests
|
|
25
|
+
|
|
26
|
+
* Updated elasticsearch container to ignore highwatermark to function on a constrained environment ([#1803](https://github.com/newrelic/node-newrelic/pull/1803)) ([8380e9d](https://github.com/newrelic/node-newrelic/commit/8380e9d527f3ffc61d1f3e32199e81ed25837185))
|
|
27
|
+
* Updated invalid json pino test as this was fixed in 8.15.1 of the pino library. ([#1782](https://github.com/newrelic/node-newrelic/pull/1782)) ([3e65fdc](https://github.com/newrelic/node-newrelic/commit/3e65fdcc68999e09d9ef3c341ff7c1159b65ab37))
|
|
28
|
+
|
|
29
|
+
#### Continuous Integration
|
|
30
|
+
|
|
31
|
+
* Added steps to zip up container logs on versioned test failure ([#1804](https://github.com/newrelic/node-newrelic/pull/1804)) ([0a54729](https://github.com/newrelic/node-newrelic/commit/0a54729f1d8187bb50508659716ec55349e9ee31))
|
|
32
|
+
|
|
33
|
+
### v11.1.0 (2023-09-07)
|
|
34
|
+
|
|
35
|
+
#### Features
|
|
36
|
+
|
|
37
|
+
* Added instrumentation for fetch. ([#1776](https://github.com/newrelic/node-newrelic/pull/1776)) ([980b4dc](https://github.com/newrelic/node-newrelic/commit/980b4dc31d085cafc45961a157f76cb73768741a))
|
|
38
|
+
* Removed undici feature flag. This will now instrument undici by default. ([#1772](https://github.com/newrelic/node-newrelic/pull/1772)) ([683b254](https://github.com/newrelic/node-newrelic/commit/683b254c1c4686527a37e628f80eed9fcc03cb37))
|
|
39
|
+
* Updated undici instrumentation to create segment on request create instead of after connection and opening socket to more accurately record time it takes to make an undici request. ([#1770](https://github.com/newrelic/node-newrelic/pull/1770)) ([3f494f8](https://github.com/newrelic/node-newrelic/commit/3f494f8ad8dd1350fbe034e9c4a582a40228bc45))
|
|
40
|
+
|
|
41
|
+
#### Performance Improvements
|
|
42
|
+
|
|
43
|
+
* **Trace:** optimise getTotalTimeDurationInMillis function to push to an array instead of concat arrays. ([#1774](https://github.com/newrelic/node-newrelic/pull/1774)) ([6ecde97](https://github.com/newrelic/node-newrelic/commit/6ecde97a5efeef4d816b2e82ba762f2130914658))
|
|
44
|
+
* Thanks @infinity-naveen for your contribution 🎉
|
|
45
|
+
|
|
46
|
+
#### Miscellaneous Chores
|
|
47
|
+
|
|
48
|
+
* Updated Next.js plugin versioned tests to use main now that require-in-the-middle fixes have been merged. ([#1768](https://github.com/newrelic/node-newrelic/pull/1768)) ([6a72d1f](https://github.com/newrelic/node-newrelic/commit/6a72d1fb452ea2655c35d7cd008fa78935821ab8))
|
|
49
|
+
* Upgraded `@newrelic/test-utilities` and removed unused shimmer.patchModule and shimmer.unpatchModule ([#1769](https://github.com/newrelic/node-newrelic/pull/1769)) ([96620ef](https://github.com/newrelic/node-newrelic/commit/96620efa725f0f548b683825cb3cefff270fb252))
|
|
50
|
+
|
|
19
51
|
### v11.0.0 (2023-08-28)
|
|
20
52
|
|
|
21
53
|
#### ⚠ BREAKING CHANGES
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -26,6 +26,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
|
|
|
26
26
|
* [import-in-the-middle](#import-in-the-middle)
|
|
27
27
|
* [json-bigint](#json-bigint)
|
|
28
28
|
* [json-stringify-safe](#json-stringify-safe)
|
|
29
|
+
* [module-details-from-path](#module-details-from-path)
|
|
29
30
|
* [readable-stream](#readable-stream)
|
|
30
31
|
* [require-in-the-middle](#require-in-the-middle)
|
|
31
32
|
* [semver](#semver)
|
|
@@ -91,7 +92,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
|
|
|
91
92
|
|
|
92
93
|
### @grpc/grpc-js
|
|
93
94
|
|
|
94
|
-
This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.
|
|
95
|
+
This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.9.2](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.9.2)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.9.2/LICENSE):
|
|
95
96
|
|
|
96
97
|
```
|
|
97
98
|
Apache License
|
|
@@ -300,7 +301,7 @@ This product includes source derived from [@grpc/grpc-js](https://github.com/grp
|
|
|
300
301
|
|
|
301
302
|
### @grpc/proto-loader
|
|
302
303
|
|
|
303
|
-
This product includes source derived from [@grpc/proto-loader](https://github.com/grpc/grpc-node) ([v0.7.
|
|
304
|
+
This product includes source derived from [@grpc/proto-loader](https://github.com/grpc/grpc-node) ([v0.7.9](https://github.com/grpc/grpc-node/tree/v0.7.9)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/blob/v0.7.9/LICENSE):
|
|
304
305
|
|
|
305
306
|
```
|
|
306
307
|
Apache License
|
|
@@ -926,7 +927,7 @@ Apache License
|
|
|
926
927
|
|
|
927
928
|
### @newrelic/security-agent
|
|
928
929
|
|
|
929
|
-
This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v0.
|
|
930
|
+
This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v0.3.0](https://github.com/newrelic/csec-node-agent/tree/v0.3.0)), distributed under the [New Relic Pre-Release License](https://github.com/newrelic/csec-node-agent/blob/v0.3.0/LICENSE):
|
|
930
931
|
|
|
931
932
|
```
|
|
932
933
|
## New Relic Pre-Release Software Notice
|
|
@@ -1246,7 +1247,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
1246
1247
|
|
|
1247
1248
|
### https-proxy-agent
|
|
1248
1249
|
|
|
1249
|
-
This product includes source derived from [https-proxy-agent](https://github.com/TooTallNate/proxy-agents) ([v7.0.
|
|
1250
|
+
This product includes source derived from [https-proxy-agent](https://github.com/TooTallNate/proxy-agents) ([v7.0.2](https://github.com/TooTallNate/proxy-agents/tree/v7.0.2)), distributed under the [MIT License](https://github.com/TooTallNate/proxy-agents/blob/v7.0.2/README.md):
|
|
1250
1251
|
|
|
1251
1252
|
```
|
|
1252
1253
|
MIT License
|
|
@@ -1332,6 +1333,35 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
1332
1333
|
|
|
1333
1334
|
```
|
|
1334
1335
|
|
|
1336
|
+
### module-details-from-path
|
|
1337
|
+
|
|
1338
|
+
This product includes source derived from [module-details-from-path](https://github.com/watson/module-details-from-path) ([v1.0.3](https://github.com/watson/module-details-from-path/tree/v1.0.3)), distributed under the [MIT License](https://github.com/watson/module-details-from-path/blob/v1.0.3/LICENSE):
|
|
1339
|
+
|
|
1340
|
+
```
|
|
1341
|
+
The MIT License (MIT)
|
|
1342
|
+
|
|
1343
|
+
Copyright (c) 2016 Thomas Watson Steen
|
|
1344
|
+
|
|
1345
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1346
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1347
|
+
in the Software without restriction, including without limitation the rights
|
|
1348
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1349
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1350
|
+
furnished to do so, subject to the following conditions:
|
|
1351
|
+
|
|
1352
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1353
|
+
copies or substantial portions of the Software.
|
|
1354
|
+
|
|
1355
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1356
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1357
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1358
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1359
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1360
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1361
|
+
SOFTWARE.
|
|
1362
|
+
|
|
1363
|
+
```
|
|
1364
|
+
|
|
1335
1365
|
### readable-stream
|
|
1336
1366
|
|
|
1337
1367
|
This product includes source derived from [readable-stream](https://github.com/nodejs/readable-stream) ([v3.6.2](https://github.com/nodejs/readable-stream/tree/v3.6.2)), distributed under the [MIT License](https://github.com/nodejs/readable-stream/blob/v3.6.2/LICENSE):
|
|
@@ -2131,7 +2161,7 @@ THE SOFTWARE.
|
|
|
2131
2161
|
|
|
2132
2162
|
### @slack/bolt
|
|
2133
2163
|
|
|
2134
|
-
This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.13.
|
|
2164
|
+
This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.13.3](https://github.com/slackapi/bolt/tree/v3.13.3)), distributed under the [MIT License](https://github.com/slackapi/bolt/blob/v3.13.3/LICENSE):
|
|
2135
2165
|
|
|
2136
2166
|
```
|
|
2137
2167
|
The MIT License (MIT)
|
|
@@ -2240,7 +2270,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
2240
2270
|
|
|
2241
2271
|
### chai
|
|
2242
2272
|
|
|
2243
|
-
This product includes source derived from [chai](https://github.com/chaijs/chai) ([v4.3.
|
|
2273
|
+
This product includes source derived from [chai](https://github.com/chaijs/chai) ([v4.3.8](https://github.com/chaijs/chai/tree/v4.3.8)), distributed under the [MIT License](https://github.com/chaijs/chai/blob/v4.3.8/LICENSE):
|
|
2244
2274
|
|
|
2245
2275
|
```
|
|
2246
2276
|
MIT License
|
|
@@ -2269,7 +2299,7 @@ SOFTWARE.
|
|
|
2269
2299
|
|
|
2270
2300
|
### clean-jsdoc-theme
|
|
2271
2301
|
|
|
2272
|
-
This product includes source derived from [clean-jsdoc-theme](https://github.com/ankitskvmdam/clean-jsdoc-theme) ([v4.2.
|
|
2302
|
+
This product includes source derived from [clean-jsdoc-theme](https://github.com/ankitskvmdam/clean-jsdoc-theme) ([v4.2.10](https://github.com/ankitskvmdam/clean-jsdoc-theme/tree/v4.2.10)), distributed under the [MIT License](https://github.com/ankitskvmdam/clean-jsdoc-theme/blob/v4.2.10/LICENSE):
|
|
2273
2303
|
|
|
2274
2304
|
```
|
|
2275
2305
|
MIT License
|
|
@@ -2409,7 +2439,7 @@ SOFTWARE.
|
|
|
2409
2439
|
|
|
2410
2440
|
### eslint-config-prettier
|
|
2411
2441
|
|
|
2412
|
-
This product includes source derived from [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) ([v8.
|
|
2442
|
+
This product includes source derived from [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) ([v8.10.0](https://github.com/prettier/eslint-config-prettier/tree/v8.10.0)), distributed under the [MIT License](https://github.com/prettier/eslint-config-prettier/blob/v8.10.0/LICENSE):
|
|
2413
2443
|
|
|
2414
2444
|
```
|
|
2415
2445
|
The MIT License (MIT)
|
|
@@ -2748,7 +2778,7 @@ Library.
|
|
|
2748
2778
|
|
|
2749
2779
|
### eslint
|
|
2750
2780
|
|
|
2751
|
-
This product includes source derived from [eslint](https://github.com/eslint/eslint) ([v8.
|
|
2781
|
+
This product includes source derived from [eslint](https://github.com/eslint/eslint) ([v8.48.0](https://github.com/eslint/eslint/tree/v8.48.0)), distributed under the [MIT License](https://github.com/eslint/eslint/blob/v8.48.0/LICENSE):
|
|
2752
2782
|
|
|
2753
2783
|
```
|
|
2754
2784
|
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
|
@@ -3050,7 +3080,7 @@ SOFTWARE.
|
|
|
3050
3080
|
|
|
3051
3081
|
### lockfile-lint
|
|
3052
3082
|
|
|
3053
|
-
This product includes source derived from [lockfile-lint](https://github.com/lirantal/lockfile-lint) ([v4.
|
|
3083
|
+
This product includes source derived from [lockfile-lint](https://github.com/lirantal/lockfile-lint) ([v4.12.1](https://github.com/lirantal/lockfile-lint/tree/v4.12.1)), distributed under the [Apache-2.0 License](https://github.com/lirantal/lockfile-lint/blob/v4.12.1/LICENSE):
|
|
3054
3084
|
|
|
3055
3085
|
```
|
|
3056
3086
|
|
|
@@ -9440,7 +9470,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
9440
9470
|
|
|
9441
9471
|
### tap
|
|
9442
9472
|
|
|
9443
|
-
This product includes source derived from [tap](https://github.com/tapjs/node-tap) ([v16.3.
|
|
9473
|
+
This product includes source derived from [tap](https://github.com/tapjs/node-tap) ([v16.3.8](https://github.com/tapjs/node-tap/tree/v16.3.8)), distributed under the [ISC License](https://github.com/tapjs/node-tap/blob/v16.3.8/LICENSE):
|
|
9444
9474
|
|
|
9445
9475
|
```
|
|
9446
9476
|
The ISC License
|
|
@@ -9525,7 +9555,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
9525
9555
|
|
|
9526
9556
|
### @contrast/fn-inspect
|
|
9527
9557
|
|
|
9528
|
-
This product includes source derived from [@contrast/fn-inspect](https://github.com/Contrast-Security-Inc/node-fn-inspect) ([v3.
|
|
9558
|
+
This product includes source derived from [@contrast/fn-inspect](https://github.com/Contrast-Security-Inc/node-fn-inspect) ([v3.4.0](https://github.com/Contrast-Security-Inc/node-fn-inspect/tree/v3.4.0)), distributed under the [MIT License](https://github.com/Contrast-Security-Inc/node-fn-inspect/blob/v3.4.0/LICENSE):
|
|
9529
9559
|
|
|
9530
9560
|
```
|
|
9531
9561
|
Copyright 2022 Contrast Security, Inc
|
package/api.js
CHANGED
|
@@ -29,6 +29,7 @@ const MODULE_TYPE = require('./lib/shim/constants').MODULE_TYPE
|
|
|
29
29
|
const NAMES = require('./lib/metrics/names')
|
|
30
30
|
const obfuscate = require('./lib/util/sql/obfuscate')
|
|
31
31
|
const { DESTINATIONS } = require('./lib/config/attribute-filter')
|
|
32
|
+
const parse = require('module-details-from-path')
|
|
32
33
|
|
|
33
34
|
/*
|
|
34
35
|
*
|
|
@@ -1495,8 +1496,9 @@ API.prototype.instrumentLoadedModule = function instrumentLoadedModule(moduleNam
|
|
|
1495
1496
|
|
|
1496
1497
|
try {
|
|
1497
1498
|
const resolvedName = require.resolve(moduleName)
|
|
1499
|
+
const parsed = parse(resolvedName)
|
|
1498
1500
|
|
|
1499
|
-
return shimmer.instrumentPostLoad(this.agent, module, moduleName,
|
|
1501
|
+
return shimmer.instrumentPostLoad(this.agent, module, moduleName, parsed.basedir)
|
|
1500
1502
|
} catch (error) {
|
|
1501
1503
|
logger.error('instrumentLoadedModule encountered an error, module not instrumented: %s', error)
|
|
1502
1504
|
}
|
package/index.js
CHANGED
|
@@ -20,28 +20,36 @@ const NAMES = require('./lib/metrics/names')
|
|
|
20
20
|
const isESMSupported = psemver.satisfies('>=16.2.0')
|
|
21
21
|
|
|
22
22
|
const pkgJSON = require('./package.json')
|
|
23
|
-
if (
|
|
23
|
+
if (isMainThread) {
|
|
24
|
+
logger.info(
|
|
25
|
+
'Using New Relic for Node.js. Agent version: %s; Node version: %s.',
|
|
26
|
+
pkgJSON.version,
|
|
27
|
+
process.version
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
if (require.cache.__NR_cache) {
|
|
31
|
+
logger.warn(
|
|
32
|
+
'Attempting to load a second copy of newrelic from %s, using cache instead',
|
|
33
|
+
__dirname
|
|
34
|
+
)
|
|
35
|
+
if (require.cache.__NR_cache.agent) {
|
|
36
|
+
require.cache.__NR_cache.agent.recordSupportability('Agent/DoubleLoad')
|
|
37
|
+
}
|
|
38
|
+
module.exports = require.cache.__NR_cache
|
|
39
|
+
} else {
|
|
40
|
+
initialize()
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
24
43
|
logger.warn('Using New Relic for Node.js in worker_threads is not supported. Not starting!')
|
|
25
|
-
|
|
44
|
+
initApi({ apiPath: './stub_api' })
|
|
26
45
|
}
|
|
27
46
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
pkgJSON.version,
|
|
31
|
-
process.version
|
|
32
|
-
)
|
|
47
|
+
function initApi({ agent, apiPath }) {
|
|
48
|
+
const API = require(apiPath)
|
|
33
49
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
__dirname
|
|
38
|
-
)
|
|
39
|
-
if (require.cache.__NR_cache.agent) {
|
|
40
|
-
require.cache.__NR_cache.agent.recordSupportability('Agent/DoubleLoad')
|
|
41
|
-
}
|
|
42
|
-
module.exports = require.cache.__NR_cache
|
|
43
|
-
} else {
|
|
44
|
-
initialize()
|
|
50
|
+
const api = new API(agent)
|
|
51
|
+
require.cache.__NR_cache = module.exports = api
|
|
52
|
+
return api
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
function initialize() {
|
|
@@ -103,15 +111,7 @@ function initialize() {
|
|
|
103
111
|
/* eslint-enable no-console */
|
|
104
112
|
}
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
if (agent) {
|
|
108
|
-
API = require('./api')
|
|
109
|
-
} else {
|
|
110
|
-
API = require('./stub_api')
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const api = new API(agent)
|
|
114
|
-
require.cache.__NR_cache = module.exports = api
|
|
114
|
+
const api = agent ? initApi({ agent, apiPath: './api' }) : initApi({ apiPath: './stub_api' })
|
|
115
115
|
|
|
116
116
|
// If we loaded an agent, record a startup time for the agent.
|
|
117
117
|
// NOTE: Metrics are recorded in seconds, so divide the value by 1000.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 New Relic Corporation. All rights reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict'
|
|
7
|
+
const logger = require('../../logger').child({ component: 'ElasticSearch' })
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Instruments the `@elastic/elasticsearch` module. This function is
|
|
11
|
+
* passed to `onRequire` when instantiating instrumentation.
|
|
12
|
+
*
|
|
13
|
+
* @param {object} _agent New Relic agent
|
|
14
|
+
* @param {object} elastic resolved module
|
|
15
|
+
* @param {string} _moduleName string representation of require/import path
|
|
16
|
+
* @param {object} shim New Relic shim
|
|
17
|
+
* @returns {void}
|
|
18
|
+
*/
|
|
19
|
+
module.exports = function initialize(_agent, elastic, _moduleName, shim) {
|
|
20
|
+
shim.setDatastore(shim.ELASTICSEARCH)
|
|
21
|
+
shim.setParser(queryParser)
|
|
22
|
+
|
|
23
|
+
shim.recordQuery(elastic.Transport.prototype, 'request', function wrapQuery(shim, _, __, args) {
|
|
24
|
+
const ctx = this
|
|
25
|
+
return {
|
|
26
|
+
query: JSON.stringify(args?.[0]),
|
|
27
|
+
promise: true,
|
|
28
|
+
opaque: true,
|
|
29
|
+
inContext: function inContext() {
|
|
30
|
+
getConnection.call(ctx, shim)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Parses the parameters sent to elasticsearch for collection,
|
|
38
|
+
* method, and query
|
|
39
|
+
*
|
|
40
|
+
* @param {object} params Query object received by the datashim.
|
|
41
|
+
* Required properties: path {string}, method {string}.
|
|
42
|
+
* Optional properties: querystring {string}, body {object}, and
|
|
43
|
+
* bulkBody {object}
|
|
44
|
+
* @returns {object} consisting of collection {string}, operation {string},
|
|
45
|
+
* and query {string}
|
|
46
|
+
*/
|
|
47
|
+
function queryParser(params) {
|
|
48
|
+
params = JSON.parse(params)
|
|
49
|
+
|
|
50
|
+
const { collection, operation } = parsePath(params.path, params.method)
|
|
51
|
+
|
|
52
|
+
// the substance of the query may be in querystring or in body.
|
|
53
|
+
let queryParam = {}
|
|
54
|
+
if (typeof params.querystring === 'object' && Object.keys(params.querystring).length > 0) {
|
|
55
|
+
queryParam = params.querystring
|
|
56
|
+
}
|
|
57
|
+
// let body or bulkBody override querystring, as some requests have both
|
|
58
|
+
if (typeof params.body === 'object' && Object.keys(params.body).length > 0) {
|
|
59
|
+
queryParam = params.body
|
|
60
|
+
} else if (typeof params.bulkBody === 'object' && Object.keys(params.bulkBody).length > 0) {
|
|
61
|
+
queryParam = params.bulkBody
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const query = JSON.stringify(queryParam)
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
collection,
|
|
68
|
+
operation,
|
|
69
|
+
query
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Convenience function for parsing the params.path sent to the queryParser
|
|
75
|
+
* for normalized collection and operation
|
|
76
|
+
*
|
|
77
|
+
* @param {string} pathString params.path supplied to the query parser
|
|
78
|
+
* @param {string} method http method called by @elastic/elasticsearch
|
|
79
|
+
* @returns {object} consisting of collection {string} and operation {string}
|
|
80
|
+
*/
|
|
81
|
+
function parsePath(pathString, method) {
|
|
82
|
+
let collection
|
|
83
|
+
let operation
|
|
84
|
+
const defaultCollection = 'any'
|
|
85
|
+
const actions = {
|
|
86
|
+
GET: 'get',
|
|
87
|
+
PUT: 'create',
|
|
88
|
+
POST: 'create',
|
|
89
|
+
DELETE: 'delete',
|
|
90
|
+
HEAD: 'exists'
|
|
91
|
+
}
|
|
92
|
+
const suffix = actions[method]
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
const path = pathString.split('/')
|
|
96
|
+
if (method === 'PUT' && path.length === 2) {
|
|
97
|
+
collection = path?.[1] || defaultCollection
|
|
98
|
+
operation = `index.create`
|
|
99
|
+
return { collection, operation }
|
|
100
|
+
}
|
|
101
|
+
path.forEach((segment, idx) => {
|
|
102
|
+
const prev = idx - 1
|
|
103
|
+
let opname
|
|
104
|
+
if (segment === '_search') {
|
|
105
|
+
collection = path?.[prev] || defaultCollection
|
|
106
|
+
operation = `search`
|
|
107
|
+
} else if (segment[0] === '_') {
|
|
108
|
+
opname = segment.substring(1)
|
|
109
|
+
collection = path?.[prev] || defaultCollection
|
|
110
|
+
operation = `${opname}.${suffix}`
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
if (!operation && !collection) {
|
|
114
|
+
// likely creating an index--no underscore segments
|
|
115
|
+
collection = path?.[1] || defaultCollection
|
|
116
|
+
operation = `index.${suffix}`
|
|
117
|
+
}
|
|
118
|
+
} catch (e) {
|
|
119
|
+
logger.warn('Failed to parse path for operation and collection. Using defaults')
|
|
120
|
+
logger.warn(e)
|
|
121
|
+
collection = defaultCollection
|
|
122
|
+
operation = 'unknown'
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return { collection, operation }
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Convenience function for deriving connection information from
|
|
130
|
+
* elasticsearch
|
|
131
|
+
*
|
|
132
|
+
* @param {object} shim The New Relic datastore-shim
|
|
133
|
+
* @returns {Function} captureInstanceAttributes method of shim
|
|
134
|
+
*/
|
|
135
|
+
function getConnection(shim) {
|
|
136
|
+
const connectionPool = this.connectionPool.connections[0]
|
|
137
|
+
const host = connectionPool.url.host.split(':')
|
|
138
|
+
const port = connectionPool.url.port || host?.[1]
|
|
139
|
+
return shim.captureInstanceAttributes(host[0], port)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
module.exports.queryParser = queryParser
|
|
143
|
+
module.exports.parsePath = parsePath
|
|
144
|
+
module.exports.getConnection = getConnection
|
package/lib/instrumentations.js
CHANGED
|
@@ -17,6 +17,7 @@ module.exports = function instrumentations() {
|
|
|
17
17
|
'bluebird': { type: MODULE_TYPE.PROMISE },
|
|
18
18
|
'bunyan': { type: MODULE_TYPE.GENERIC },
|
|
19
19
|
'director': { type: MODULE_TYPE.WEB_FRAMEWORK },
|
|
20
|
+
'@elastic/elasticsearch': { type: MODULE_TYPE.DATASTORE },
|
|
20
21
|
'express': { type: MODULE_TYPE.WEB_FRAMEWORK },
|
|
21
22
|
'fastify': { type: MODULE_TYPE.WEB_FRAMEWORK },
|
|
22
23
|
'generic-pool': { type: MODULE_TYPE.GENERIC },
|
package/lib/shimmer.js
CHANGED
|
@@ -10,7 +10,6 @@ const semver = require('semver')
|
|
|
10
10
|
const fs = require('./util/unwrapped-core').fs
|
|
11
11
|
const logger = require('./logger').child({ component: 'shimmer' })
|
|
12
12
|
const INSTRUMENTATIONS = require('./instrumentations')()
|
|
13
|
-
const properties = require('./util/properties')
|
|
14
13
|
const shims = require('./shim')
|
|
15
14
|
const { Hook } = require('require-in-the-middle')
|
|
16
15
|
const IitmHook = require('import-in-the-middle')
|
|
@@ -92,7 +91,7 @@ const shimmer = (module.exports = {
|
|
|
92
91
|
* Detects if the given function has already been wrapped.
|
|
93
92
|
*
|
|
94
93
|
* @param {Function} fn - The function to look for a wrapper on.
|
|
95
|
-
* @returns {
|
|
94
|
+
* @returns {boolean} True if `fn` exists and has an attached original, else false.
|
|
96
95
|
*/
|
|
97
96
|
isWrapped: function isWrapped(fn) {
|
|
98
97
|
return !!(fn && fn[symbols.original])
|
|
@@ -183,7 +182,7 @@ const shimmer = (module.exports = {
|
|
|
183
182
|
* helpful than you'd think.
|
|
184
183
|
* @param {string} property The property to replace with the accessor.
|
|
185
184
|
* @param {Function} options Optional getter and setter to use for the accessor.
|
|
186
|
-
* @returns {object}
|
|
185
|
+
* @returns {object|undefined} returns original function
|
|
187
186
|
*/
|
|
188
187
|
wrapDeprecated: function wrapDeprecated(nodule, noduleName, property, options) {
|
|
189
188
|
if (!property) {
|
|
@@ -396,6 +395,8 @@ const shimmer = (module.exports = {
|
|
|
396
395
|
}
|
|
397
396
|
}
|
|
398
397
|
|
|
398
|
+
opts[symbols.instrumented] = new Set()
|
|
399
|
+
opts[symbols.instrumentedErrored] = new Set()
|
|
399
400
|
shimmer.registeredInstrumentations[opts.moduleName].push({ ...opts })
|
|
400
401
|
},
|
|
401
402
|
|
|
@@ -418,8 +419,9 @@ const shimmer = (module.exports = {
|
|
|
418
419
|
*
|
|
419
420
|
* Use this to re-apply any applicable instrumentation.
|
|
420
421
|
*
|
|
421
|
-
* @param agent
|
|
422
|
-
* @param modulePath
|
|
422
|
+
* @param {object} agent NR agent
|
|
423
|
+
* @param {string} modulePath path to module getting required
|
|
424
|
+
* @returns {object} exported module
|
|
423
425
|
*/
|
|
424
426
|
reinstrument: function reinstrument(agent, modulePath) {
|
|
425
427
|
return _postLoad(agent, require(modulePath), modulePath)
|
|
@@ -430,7 +432,8 @@ const shimmer = (module.exports = {
|
|
|
430
432
|
* instrumentation. These two things are usually, but not always,
|
|
431
433
|
* the same.
|
|
432
434
|
*
|
|
433
|
-
* @param moduleName
|
|
435
|
+
* @param {string} moduleName name of module getting instrumented
|
|
436
|
+
* @returns {string} name unless pg.js and then returns pg
|
|
434
437
|
*/
|
|
435
438
|
getInstrumentationNameFromModuleName(moduleName) {
|
|
436
439
|
// XXX When updating these special cases, also update `uninstrumented`.
|
|
@@ -447,12 +450,13 @@ const shimmer = (module.exports = {
|
|
|
447
450
|
* only if every hook succeeded.
|
|
448
451
|
*
|
|
449
452
|
* @param {string} moduleName name of registered instrumentation
|
|
450
|
-
* @returns {boolean}
|
|
453
|
+
* @returns {boolean} if all instrumentation hooks ran for a given version
|
|
451
454
|
*/
|
|
452
455
|
isInstrumented(moduleName) {
|
|
456
|
+
const pkgVersion = shimmer.getPackageVersion(moduleName)
|
|
453
457
|
const instrumentations = shimmer.registeredInstrumentations[moduleName]
|
|
454
|
-
const didInstrument = instrumentations.filter(
|
|
455
|
-
|
|
458
|
+
const didInstrument = instrumentations.filter((instrumentation) =>
|
|
459
|
+
instrumentation[symbols.instrumented].has(pkgVersion)
|
|
456
460
|
)
|
|
457
461
|
return didInstrument.length === instrumentations.length
|
|
458
462
|
},
|
|
@@ -463,6 +467,23 @@ const shimmer = (module.exports = {
|
|
|
463
467
|
// previously it would just call instrumentation
|
|
464
468
|
// and not check the result
|
|
465
469
|
return returnModule ? result : shimmer.isInstrumented(moduleName)
|
|
470
|
+
},
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Gets the version of a given package by parsing it from package.json
|
|
474
|
+
*
|
|
475
|
+
* @param {string} moduleName name of module
|
|
476
|
+
* @returns {string} version, defaults to Node.js version when it cannot parse
|
|
477
|
+
*/
|
|
478
|
+
getPackageVersion(moduleName) {
|
|
479
|
+
try {
|
|
480
|
+
const { basedir } = shimmer.registeredInstrumentations[moduleName]
|
|
481
|
+
const pkg = require(path.resolve(basedir, 'package.json'))
|
|
482
|
+
return pkg.version
|
|
483
|
+
} catch (err) {
|
|
484
|
+
logger.debug('Failed to get version for `%s`, reason: %s', moduleName, err.message)
|
|
485
|
+
return process.version
|
|
486
|
+
}
|
|
466
487
|
}
|
|
467
488
|
})
|
|
468
489
|
|
|
@@ -486,23 +507,23 @@ function applyDebugState(shim, nodule, inEsm) {
|
|
|
486
507
|
* initialization function that takes the agent and the module to be
|
|
487
508
|
* instrumented.
|
|
488
509
|
*
|
|
489
|
-
* @param agent
|
|
490
|
-
* @param nodule
|
|
491
|
-
* @param moduleName
|
|
492
|
-
* @param resolvedName
|
|
493
|
-
* @param esmResolver
|
|
510
|
+
* @param {object} agent NR agent
|
|
511
|
+
* @param {object} nodule Class or module containing the function to wrap.
|
|
512
|
+
* @param {string} moduleName name of module
|
|
513
|
+
* @param {string} resolvedName fully qualified path to module
|
|
514
|
+
* @param {boolean} esmResolver indicates if it came from esm loader
|
|
515
|
+
* @returns {object|undefined} returns exported module unless already instrumented
|
|
494
516
|
*/
|
|
495
517
|
function instrumentPostLoad(agent, nodule, moduleName, resolvedName, esmResolver) {
|
|
518
|
+
// default to Node.js version, this occurs for core libraries
|
|
519
|
+
const pkgVersion = resolvedName ? shimmer.getPackageVersion(moduleName) : process.version
|
|
496
520
|
const instrumentations = shimmer.registeredInstrumentations[moduleName]
|
|
497
521
|
instrumentations.forEach((instrumentation) => {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
logger.trace(
|
|
503
|
-
'Already instrumented or failed to instrument %s, skipping redundant instrumentation',
|
|
504
|
-
moduleName
|
|
505
|
-
)
|
|
522
|
+
const isInstrumented = instrumentation[symbols.instrumented].has(pkgVersion)
|
|
523
|
+
const failedInstrumentation = instrumentation[symbols.instrumentedErrored].has(pkgVersion)
|
|
524
|
+
if (isInstrumented || failedInstrumentation) {
|
|
525
|
+
const msg = isInstrumented ? 'Already instrumented' : 'Failed to instrument'
|
|
526
|
+
logger.trace(`${msg} ${moduleName}@${pkgVersion}, skipping registering instrumentation`)
|
|
506
527
|
return
|
|
507
528
|
}
|
|
508
529
|
|
|
@@ -530,38 +551,71 @@ function instrumentPostLoad(agent, nodule, moduleName, resolvedName, esmResolver
|
|
|
530
551
|
// that occur directly above this. No reason to attempt to load instrumentation
|
|
531
552
|
// as it does not exist.
|
|
532
553
|
if (instrumentation.type === MODULE_TYPE.TRACKING) {
|
|
533
|
-
instrumentation[symbols.instrumented]
|
|
554
|
+
instrumentation[symbols.instrumented].add(pkgVersion)
|
|
534
555
|
return
|
|
535
556
|
}
|
|
536
557
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
instrumentation
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
558
|
+
nodule = loadInstrumentation({
|
|
559
|
+
shim,
|
|
560
|
+
resolvedNodule,
|
|
561
|
+
pkgVersion,
|
|
562
|
+
moduleName,
|
|
563
|
+
nodule,
|
|
564
|
+
instrumentation
|
|
565
|
+
})
|
|
566
|
+
})
|
|
567
|
+
|
|
568
|
+
return nodule
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Attempts to execute an onRequire hook for a given module.
|
|
573
|
+
* If it fails it will call an onError hook and log warnings accordingly
|
|
574
|
+
*
|
|
575
|
+
* @param {object} params wrapping object to function
|
|
576
|
+
* @param {*} params.shim The instance of the shim used to instrument the module.
|
|
577
|
+
* @param {object} params.nodule Class or module containing the function to wrap.
|
|
578
|
+
* @param {object} params.resolvedNodule returns xport of the default property
|
|
579
|
+
* @param {string} params.pkgVersion version of module
|
|
580
|
+
* @param {string} params.moduleName module name
|
|
581
|
+
* @param {object} params.instrumentation hooks for a give module
|
|
582
|
+
* @returns {object} updated xport module
|
|
583
|
+
*/
|
|
584
|
+
function loadInstrumentation({
|
|
585
|
+
shim,
|
|
586
|
+
resolvedNodule,
|
|
587
|
+
pkgVersion,
|
|
588
|
+
moduleName,
|
|
589
|
+
nodule,
|
|
590
|
+
instrumentation
|
|
591
|
+
}) {
|
|
592
|
+
try {
|
|
593
|
+
if (instrumentation.onRequire(shim, resolvedNodule, moduleName) !== false) {
|
|
594
|
+
nodule = shim.getExport(nodule)
|
|
595
|
+
instrumentation[symbols.instrumented].add(pkgVersion)
|
|
596
|
+
}
|
|
597
|
+
} catch (instrumentationError) {
|
|
598
|
+
instrumentation[symbols.instrumentedErrored].add(pkgVersion)
|
|
599
|
+
if (instrumentation.onError) {
|
|
600
|
+
try {
|
|
601
|
+
instrumentation.onError(instrumentationError)
|
|
602
|
+
} catch (e) {
|
|
556
603
|
logger.warn(
|
|
604
|
+
e,
|
|
557
605
|
instrumentationError,
|
|
558
|
-
'Custom instrumentation for %s failed
|
|
559
|
-
'maintainers of the custom instrumentation.',
|
|
606
|
+
'Custom instrumentation for %s failed, then the onError handler threw an error',
|
|
560
607
|
moduleName
|
|
561
608
|
)
|
|
562
609
|
}
|
|
610
|
+
} else {
|
|
611
|
+
logger.warn(
|
|
612
|
+
instrumentationError,
|
|
613
|
+
'Custom instrumentation for %s failed. Please report this to the ' +
|
|
614
|
+
'maintainers of the custom instrumentation.',
|
|
615
|
+
moduleName
|
|
616
|
+
)
|
|
563
617
|
}
|
|
564
|
-
}
|
|
618
|
+
}
|
|
565
619
|
|
|
566
620
|
return nodule
|
|
567
621
|
}
|
|
@@ -589,10 +643,12 @@ function _postLoad(agent, nodule, name, resolvedName, esmResolver) {
|
|
|
589
643
|
const hasPostLoadInstrumentation =
|
|
590
644
|
registeredInstrumentation &&
|
|
591
645
|
registeredInstrumentation.length &&
|
|
592
|
-
registeredInstrumentation.filter((
|
|
646
|
+
registeredInstrumentation.filter((hook) => hook.onRequire).length
|
|
593
647
|
|
|
594
648
|
// Check if this is a known instrumentation and then run it.
|
|
595
649
|
if (hasPostLoadInstrumentation) {
|
|
650
|
+
// Add the basedir to the instrumentation to be used later to parse version from package.json
|
|
651
|
+
registeredInstrumentation.basedir = resolvedName
|
|
596
652
|
logger.trace('Instrumenting %s with onRequire (module loaded) hook.', name)
|
|
597
653
|
return instrumentPostLoad(agent, nodule, instrumentation, resolvedName, esmResolver)
|
|
598
654
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newrelic",
|
|
3
|
-
"version": "11.1
|
|
3
|
+
"version": "11.2.1",
|
|
4
4
|
"author": "New Relic Node.js agent team <nodejs@newrelic.com>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"contributors": [
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"lint:lockfile": "lockfile-lint --path package-lock.json --type npm --allowed-hosts npm --validate-https --validate-integrity",
|
|
154
154
|
"public-docs": "jsdoc -c ./jsdoc-conf.json --tutorials examples/shim api.js lib/shim/ lib/transaction/handle.js && cp examples/shim/*.png out/",
|
|
155
155
|
"publish-docs": "./bin/publish-docs.sh",
|
|
156
|
-
"services": "
|
|
156
|
+
"services": "docker compose up -d --wait",
|
|
157
157
|
"smoke": "npm run ssl && time tap test/smoke/**/**/*.tap.js --timeout=180 --no-coverage",
|
|
158
158
|
"ssl": "./bin/ssl.sh",
|
|
159
159
|
"sub-install": "node test/bin/install_sub_deps",
|
|
@@ -165,8 +165,12 @@
|
|
|
165
165
|
"versioned-tests": "./bin/run-versioned-tests.sh",
|
|
166
166
|
"update-changelog-version": "node ./bin/update-changelog-version",
|
|
167
167
|
"checkout-external-versioned": "node ./test/versioned-external/checkout-external-tests.js",
|
|
168
|
+
"versioned:internal:major": "VERSIONED_MODE=--major npm run versioned:internal",
|
|
169
|
+
"versioned:internal": "npm run prepare-test && EXTERNAL_MODE=none time ./bin/run-versioned-tests.sh",
|
|
170
|
+
"versioned:external:major": "VERSIONED_MODE=--major npm run versioned:external",
|
|
171
|
+
"versioned:external": "npm run checkout-external-versioned && SKIP_C8=true EXTERNAL_MODE=only time ./bin/run-versioned-tests.sh",
|
|
168
172
|
"versioned:major": "VERSIONED_MODE=--major npm run versioned",
|
|
169
|
-
"versioned": "npm run checkout-external-versioned && npm run prepare-test &&
|
|
173
|
+
"versioned": "npm run checkout-external-versioned && npm run prepare-test && time ./bin/run-versioned-tests.sh",
|
|
170
174
|
"versioned:legacy-context": "NEW_RELIC_FEATURE_FLAG_LEGACY_CONTEXT_MANAGER=1 npm run versioned",
|
|
171
175
|
"versioned:legacy_context:major": "NEW_RELIC_FEATURE_FLAG_LEGACY_CONTEXT_MANAGER=1 npm run versioned:major",
|
|
172
176
|
"versioned:security": "NEW_RELIC_SECURITY_AGENT_ENABLED=true npm run versioned",
|
|
@@ -181,7 +185,7 @@
|
|
|
181
185
|
"@grpc/proto-loader": "^0.7.5",
|
|
182
186
|
"@newrelic/aws-sdk": "^7.0.0",
|
|
183
187
|
"@newrelic/koa": "^8.0.0",
|
|
184
|
-
"@newrelic/security-agent": "0.
|
|
188
|
+
"@newrelic/security-agent": "0.3.0",
|
|
185
189
|
"@newrelic/superagent": "^7.0.0",
|
|
186
190
|
"@tyriar/fibonacci-heap": "^2.0.7",
|
|
187
191
|
"concat-stream": "^2.0.0",
|
|
@@ -189,6 +193,7 @@
|
|
|
189
193
|
"import-in-the-middle": "^1.4.2",
|
|
190
194
|
"json-bigint": "^1.0.0",
|
|
191
195
|
"json-stringify-safe": "^5.0.0",
|
|
196
|
+
"module-details-from-path": "^1.0.3",
|
|
192
197
|
"readable-stream": "^3.6.1",
|
|
193
198
|
"require-in-the-middle": "^7.2.0",
|
|
194
199
|
"semver": "^7.5.2",
|