newrelic 12.8.1 → 12.9.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 +70 -29
- package/THIRD_PARTY_NOTICES.md +12 -36
- package/lib/config/index.js +3 -1
- package/lib/instrumentation/aws-sdk/v3/lambda.js +57 -0
- package/lib/instrumentation/aws-sdk/v3/smithy-client.js +2 -0
- package/lib/instrumentation/mysql/mysql.js +4 -4
- package/lib/serverless/api-gateway.js +2 -2
- package/lib/serverless/aws-lambda.js +1 -3
- package/package.json +4 -5
package/NEWS.md
CHANGED
|
@@ -1,41 +1,82 @@
|
|
|
1
|
-
### v12.
|
|
1
|
+
### v12.9.0 (2024-12-18)
|
|
2
2
|
|
|
3
|
-
####
|
|
3
|
+
#### Features
|
|
4
4
|
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Added entity linking attributes to aws-sdk v3 Lambda segments ([#2845](https://github.com/newrelic/node-newrelic/pull/2845)) ([8820265](https://github.com/newrelic/node-newrelic/commit/882026502dbc12b700b893485458176bcd03f68e))
|
|
6
|
+
* Provided ability to define newrelic config as `newrelic.mjs` ([#2836](https://github.com/newrelic/node-newrelic/pull/2836)) ([972b59d](https://github.com/newrelic/node-newrelic/commit/972b59d4c4bd5f212d5fd695ce1007802354b7a0))
|
|
7
7
|
|
|
8
8
|
#### Documentation
|
|
9
9
|
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
* Updated compatibility report ([#2828](https://github.com/newrelic/node-newrelic/pull/2828)) ([d5fe8e3](https://github.com/newrelic/node-newrelic/commit/d5fe8e323c34464e8cc10be3f5c968a96357b6f6))
|
|
11
|
+
|
|
12
|
+
#### Miscellaneous chores
|
|
13
|
+
|
|
14
|
+
* **deps:** Updated @newrelic/security-agent to v2.2.0 ([#2842](https://github.com/newrelic/node-newrelic/pull/2842)) ([170941e](https://github.com/newrelic/node-newrelic/commit/170941e2f16d7e84edabfff40fd31906612b393e))
|
|
15
|
+
* Updated borp configs to target tests correctly ([#2835](https://github.com/newrelic/node-newrelic/pull/2835)) ([66ae59d](https://github.com/newrelic/node-newrelic/commit/66ae59d1e047dead092b3fa681017e3d42ce9474))
|
|
13
16
|
|
|
14
17
|
#### Tests
|
|
15
18
|
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* Migrated `test/integration/instrumentation` tests to `node:test` ([#2784](https://github.com/newrelic/node-newrelic/pull/2784)) ([963fb30](https://github.com/newrelic/node-newrelic/commit/963fb30087e1b9a7bf12c4ae71b8252a872e90e5))
|
|
19
|
-
* Migrated `test/integration/transaction` tests to `node:test` ([#2783](https://github.com/newrelic/node-newrelic/pull/2783)) ([68e1a0c](https://github.com/newrelic/node-newrelic/commit/68e1a0c8c529702fafb29a7684f6982b0d3c48cb))
|
|
20
|
-
* Migrated `test/integration/utilization` tests to node `node:test` ([#2794](https://github.com/newrelic/node-newrelic/pull/2794)) ([db237e9](https://github.com/newrelic/node-newrelic/commit/db237e9b8811554472b4f83100b3266ce52dc38b))
|
|
21
|
-
* Migrated `test/smoke/api` tests to `node:test` ([#2772](https://github.com/newrelic/node-newrelic/pull/2772)) ([af3bbcd](https://github.com/newrelic/node-newrelic/commit/af3bbcddd1e9ed28fdea32b2837bf509737181cc))
|
|
22
|
-
* Migrated CAT integration tests to `node:test` ([#2778](https://github.com/newrelic/node-newrelic/pull/2778)) ([bd9df5f](https://github.com/newrelic/node-newrelic/commit/bd9df5f0def633391762a191c16886735cddf9d2))
|
|
23
|
-
* Migrated integration tests at root to `node:test` ([#2803](https://github.com/newrelic/node-newrelic/pull/2803)) ([a7ef080](https://github.com/newrelic/node-newrelic/commit/a7ef080296b79d5fb8d313aa2bd9d474904e0a22))
|
|
24
|
-
* Migrated root smoke tests to `node:test` ([#2771](https://github.com/newrelic/node-newrelic/pull/2771)) ([78f2709](https://github.com/newrelic/node-newrelic/commit/78f2709a24328225f0c3c2392cf0a3b8072a877f))
|
|
25
|
-
* Migrated smoke tests in `test/smoke/agent`, `test/smoke/e2e`, and `test/smoke/index` to `node:test` ([#2774](https://github.com/newrelic/node-newrelic/pull/2774)) ([440a0af](https://github.com/newrelic/node-newrelic/commit/440a0af5545c0585d1bb5036b950f201444566db))
|
|
26
|
-
* Removed `t.diagnostic` as they are better suited as code comments ([#2786](https://github.com/newrelic/node-newrelic/pull/2786)) ([ee24027](https://github.com/newrelic/node-newrelic/commit/ee24027539aa2a6b5c8ab4c49529ff7f4fb8f269))
|
|
27
|
-
* Fixed flaky test on macOS ([#2790](https://github.com/newrelic/node-newrelic/pull/2790)) ([eebf06b](https://github.com/newrelic/node-newrelic/commit/eebf06b16c86cd40402c8d5566e01ca140802b24))
|
|
28
|
-
* Removed reference to `pino` internals ([#2805](https://github.com/newrelic/node-newrelic/pull/2805)) ([0382ee2](https://github.com/newrelic/node-newrelic/commit/0382ee26342546467f2f3b93be1c82d74e9d0123))
|
|
29
|
-
* Restricted `mysql2` version to get CI working ([#2808](https://github.com/newrelic/node-newrelic/pull/2808)) ([ad60ed4](https://github.com/newrelic/node-newrelic/commit/ad60ed4faf69d7c7938d63f335186323327e350f))
|
|
30
|
-
* Updated agent integration tests to `node:test` ([#2782](https://github.com/newrelic/node-newrelic/pull/2782)) ([d556512](https://github.com/newrelic/node-newrelic/commit/d556512ffebe3f38887aae65706dc5f1da4122d8))
|
|
31
|
-
* Updated config integration tests to `node:test` ([#2777](https://github.com/newrelic/node-newrelic/pull/2777)) ([fe8d2df](https://github.com/newrelic/node-newrelic/commit/fe8d2df36ccc7d818bbc7350985034767ca221b5))
|
|
32
|
-
* Updated distributed-tracing integration tests to `node:test` ([#2798](https://github.com/newrelic/node-newrelic/pull/2798)) ([83ad1f3](https://github.com/newrelic/node-newrelic/commit/83ad1f3e72f06211993b5dcbc2a5af4a27b259fe))
|
|
33
|
-
* Updated `grpc` integration tests to `node:test` ([#2789](https://github.com/newrelic/node-newrelic/pull/2789)) ([ea8f743](https://github.com/newrelic/node-newrelic/commit/ea8f743c7ef0d8bad0aa25f77b239ea18da59368))
|
|
34
|
-
* Updated index, issue-2155, and metric integration tests to `node:test` ([#2801](https://github.com/newrelic/node-newrelic/pull/2801)) ([80b55c2](https://github.com/newrelic/node-newrelic/commit/80b55c211aa9712ba79e39b236257583d4ccffd3))
|
|
35
|
-
* Updated `q`, `superagent`, and `when` tests to `node:test` ([#2773](https://github.com/newrelic/node-newrelic/pull/2773)) ([ff2d8d0](https://github.com/newrelic/node-newrelic/commit/ff2d8d02df8f602adbed3e361763ed406b891d21))
|
|
36
|
-
* Updated shimmer, uninstrumented, environment, flatten, and logger integration tests to `node:test` ([#2802](https://github.com/newrelic/node-newrelic/pull/2802)) ([83fd7ee](https://github.com/newrelic/node-newrelic/commit/83fd7ee912f5548b651bfa4c1ad7d7cbbc304092))
|
|
37
|
-
* Added per test file timing to test reporter ([#2785](https://github.com/newrelic/node-newrelic/pull/2785)) ([00d9940](https://github.com/newrelic/node-newrelic/commit/00d994086a228a096aaabb1f7f8af1f2f5ffc954))
|
|
19
|
+
* Removed `tap` and cleaned up left over tap helpers ([#2804](https://github.com/newrelic/node-newrelic/pull/2804)) ([37407b6](https://github.com/newrelic/node-newrelic/commit/37407b6d14c2bd6a1c577cce811277753eb8069e))
|
|
20
|
+
* Updated `match` to fail if you pass in an object that lacks the expected keys ([#2843](https://github.com/newrelic/node-newrelic/pull/2843)) ([a3db8bd](https://github.com/newrelic/node-newrelic/commit/a3db8bd993d82a3c1c8873f9e552ba5fdf7cb5f4))
|
|
38
21
|
|
|
22
|
+
### v12.8.2 (2024-12-09)
|
|
23
|
+
|
|
24
|
+
#### Bug fixes
|
|
25
|
+
|
|
26
|
+
* Fixed `mysql2` promise instrumentation to properly handle `createPool` and `createPoolCluster` ([#2823](https://github.com/newrelic/node-newrelic/pull/2823)) ([a679872](https://github.com/newrelic/node-newrelic/commit/a6798723b7d282d56a01f7ad9f7c8deb70ca525d))
|
|
27
|
+
* Fixed matching for Lambda events containing resource but which aren't API Gateway ([#2825](https://github.com/newrelic/node-newrelic/pull/2825)) ([64d2042](https://github.com/newrelic/node-newrelic/commit/64d2042e673aae9ea65ecca3b6d122d0a303ad0f))
|
|
28
|
+
|
|
29
|
+
#### Documentation
|
|
30
|
+
|
|
31
|
+
* Updated compatibility report ([#2814](https://github.com/newrelic/node-newrelic/pull/2814)) ([580a27f](https://github.com/newrelic/node-newrelic/commit/580a27fb7bda92b55748a0dc54baf07dd91aecb6))
|
|
32
|
+
|
|
33
|
+
#### Miscellaneous chores
|
|
34
|
+
|
|
35
|
+
* Improved documentation for `assertSegments` ([#2819](https://github.com/newrelic/node-newrelic/pull/2819)) ([298473c](https://github.com/newrelic/node-newrelic/commit/298473ca4a3c3219dba9d007bbcb0287ca60e264))
|
|
36
|
+
|
|
37
|
+
#### Tests
|
|
38
|
+
|
|
39
|
+
* Added `test/custom-assertions.js` to the apollo-server external versioned tests config ([#2817](https://github.com/newrelic/node-newrelic/pull/2817)) ([568525a](https://github.com/newrelic/node-newrelic/commit/568525ae174f02365b9868a1fe3c7fb0dac3977f))
|
|
40
|
+
* Fixed flakey `when` versioned test ([#2821](https://github.com/newrelic/node-newrelic/pull/2821)) ([54f034b](https://github.com/newrelic/node-newrelic/commit/54f034bbf6918420874f10ed87656dcd0171317e))
|
|
41
|
+
|
|
42
|
+
### v12.8.1 (2024-12-04)
|
|
43
|
+
|
|
44
|
+
#### Bug fixes
|
|
45
|
+
|
|
46
|
+
* Fixed matching for ALB and API Gateway (v1 & v2) events for Lambda ([#2780](https://github.com/newrelic/node-newrelic/pull/2780)) ([2f1a6c6](https://github.com/newrelic/node-newrelic/commit/2f1a6c6dc6e4408c62b074d71a95b67cc0926785))
|
|
47
|
+
* Updated `mysql2` instrumentation to work with 3.11.5+ ([#2811](https://github.com/newrelic/node-newrelic/pull/2811)) ([3ec4fee](https://github.com/newrelic/node-newrelic/commit/3ec4fee486c6f609426deddb7cee8372e4dc1192))
|
|
48
|
+
|
|
49
|
+
#### Documentation
|
|
50
|
+
|
|
51
|
+
* Fixed changelog to group the labels in logs work ([#2776](https://github.com/newrelic/node-newrelic/pull/2776)) ([04271da](https://github.com/newrelic/node-newrelic/commit/04271dae2306f54d885aa723eebc3041edee2575))
|
|
52
|
+
* Fixed links to next.js apps ([#2812](https://github.com/newrelic/node-newrelic/pull/2812)) ([834440c](https://github.com/newrelic/node-newrelic/commit/834440caee017fe632b354d20112c3016587064b))
|
|
53
|
+
* Updated compatibility report ([#2809](https://github.com/newrelic/node-newrelic/pull/2809)) ([fc1fbda](https://github.com/newrelic/node-newrelic/commit/fc1fbdaf69c82caf4d7933c7fdd4eec395648e63))
|
|
54
|
+
|
|
55
|
+
#### Tests
|
|
56
|
+
|
|
57
|
+
* Migrated `test/integration/api` tests to `node:test` ([#2787](https://github.com/newrelic/node-newrelic/pull/2787)) ([03b01a3](https://github.com/newrelic/node-newrelic/commit/03b01a3bf40c8902c29c772aee4d70af8020ae62))
|
|
58
|
+
* Migrated `test/integration/core` tests to `node:test` ([#2781](https://github.com/newrelic/node-newrelic/pull/2781)) ([36bc0e7](https://github.com/newrelic/node-newrelic/commit/36bc0e7f97f1bbde522031942ec0cc7c1d4c1349))
|
|
59
|
+
* Migrated `test/integration/instrumentation` tests to `node:test` ([#2784](https://github.com/newrelic/node-newrelic/pull/2784)) ([963fb30](https://github.com/newrelic/node-newrelic/commit/963fb30087e1b9a7bf12c4ae71b8252a872e90e5))
|
|
60
|
+
* Migrated `test/integration/transaction` tests to `node:test` ([#2783](https://github.com/newrelic/node-newrelic/pull/2783)) ([68e1a0c](https://github.com/newrelic/node-newrelic/commit/68e1a0c8c529702fafb29a7684f6982b0d3c48cb))
|
|
61
|
+
* Migrated `test/integration/utilization` tests to node `node:test` ([#2794](https://github.com/newrelic/node-newrelic/pull/2794)) ([db237e9](https://github.com/newrelic/node-newrelic/commit/db237e9b8811554472b4f83100b3266ce52dc38b))
|
|
62
|
+
* Migrated `test/smoke/api` tests to `node:test` ([#2772](https://github.com/newrelic/node-newrelic/pull/2772)) ([af3bbcd](https://github.com/newrelic/node-newrelic/commit/af3bbcddd1e9ed28fdea32b2837bf509737181cc))
|
|
63
|
+
* Migrated CAT integration tests to `node:test` ([#2778](https://github.com/newrelic/node-newrelic/pull/2778)) ([bd9df5f](https://github.com/newrelic/node-newrelic/commit/bd9df5f0def633391762a191c16886735cddf9d2))
|
|
64
|
+
* Migrated integration tests at root to `node:test` ([#2803](https://github.com/newrelic/node-newrelic/pull/2803)) ([a7ef080](https://github.com/newrelic/node-newrelic/commit/a7ef080296b79d5fb8d313aa2bd9d474904e0a22))
|
|
65
|
+
* Migrated root smoke tests to `node:test` ([#2771](https://github.com/newrelic/node-newrelic/pull/2771)) ([78f2709](https://github.com/newrelic/node-newrelic/commit/78f2709a24328225f0c3c2392cf0a3b8072a877f))
|
|
66
|
+
* Migrated smoke tests in `test/smoke/agent`, `test/smoke/e2e`, and `test/smoke/index` to `node:test` ([#2774](https://github.com/newrelic/node-newrelic/pull/2774)) ([440a0af](https://github.com/newrelic/node-newrelic/commit/440a0af5545c0585d1bb5036b950f201444566db))
|
|
67
|
+
* Removed `t.diagnostic` as they are better suited as code comments ([#2786](https://github.com/newrelic/node-newrelic/pull/2786)) ([ee24027](https://github.com/newrelic/node-newrelic/commit/ee24027539aa2a6b5c8ab4c49529ff7f4fb8f269))
|
|
68
|
+
* Fixed flaky test on macOS ([#2790](https://github.com/newrelic/node-newrelic/pull/2790)) ([eebf06b](https://github.com/newrelic/node-newrelic/commit/eebf06b16c86cd40402c8d5566e01ca140802b24))
|
|
69
|
+
* Removed reference to `pino` internals ([#2805](https://github.com/newrelic/node-newrelic/pull/2805)) ([0382ee2](https://github.com/newrelic/node-newrelic/commit/0382ee26342546467f2f3b93be1c82d74e9d0123))
|
|
70
|
+
* Restricted `mysql2` version to get CI working ([#2808](https://github.com/newrelic/node-newrelic/pull/2808)) ([ad60ed4](https://github.com/newrelic/node-newrelic/commit/ad60ed4faf69d7c7938d63f335186323327e350f))
|
|
71
|
+
* Updated agent integration tests to `node:test` ([#2782](https://github.com/newrelic/node-newrelic/pull/2782)) ([d556512](https://github.com/newrelic/node-newrelic/commit/d556512ffebe3f38887aae65706dc5f1da4122d8))
|
|
72
|
+
* Updated config integration tests to `node:test` ([#2777](https://github.com/newrelic/node-newrelic/pull/2777)) ([fe8d2df](https://github.com/newrelic/node-newrelic/commit/fe8d2df36ccc7d818bbc7350985034767ca221b5))
|
|
73
|
+
* Updated distributed-tracing integration tests to `node:test` ([#2798](https://github.com/newrelic/node-newrelic/pull/2798)) ([83ad1f3](https://github.com/newrelic/node-newrelic/commit/83ad1f3e72f06211993b5dcbc2a5af4a27b259fe))
|
|
74
|
+
* Updated `grpc` integration tests to `node:test` ([#2789](https://github.com/newrelic/node-newrelic/pull/2789)) ([ea8f743](https://github.com/newrelic/node-newrelic/commit/ea8f743c7ef0d8bad0aa25f77b239ea18da59368))
|
|
75
|
+
* Updated index, issue-2155, and metric integration tests to `node:test` ([#2801](https://github.com/newrelic/node-newrelic/pull/2801)) ([80b55c2](https://github.com/newrelic/node-newrelic/commit/80b55c211aa9712ba79e39b236257583d4ccffd3))
|
|
76
|
+
* Updated `q`, `superagent`, and `when` tests to `node:test` ([#2773](https://github.com/newrelic/node-newrelic/pull/2773)) ([ff2d8d0](https://github.com/newrelic/node-newrelic/commit/ff2d8d02df8f602adbed3e361763ed406b891d21))
|
|
77
|
+
* Updated shimmer, uninstrumented, environment, flatten, and logger integration tests to `node:test` ([#2802](https://github.com/newrelic/node-newrelic/pull/2802)) ([83fd7ee](https://github.com/newrelic/node-newrelic/commit/83fd7ee912f5548b651bfa4c1ad7d7cbbc304092))
|
|
78
|
+
* Added per test file timing to test reporter ([#2785](https://github.com/newrelic/node-newrelic/pull/2785)) ([00d9940](https://github.com/newrelic/node-newrelic/commit/00d994086a228a096aaabb1f7f8af1f2f5ffc954))
|
|
79
|
+
|
|
39
80
|
### v12.8.0 (2024-11-19)
|
|
40
81
|
|
|
41
82
|
#### Features
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -74,7 +74,6 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
|
|
|
74
74
|
* [should](#should)
|
|
75
75
|
* [sinon](#sinon)
|
|
76
76
|
* [superagent](#superagent)
|
|
77
|
-
* [tap](#tap)
|
|
78
77
|
|
|
79
78
|
**[optionalDependencies](#optionalDependencies)**
|
|
80
79
|
|
|
@@ -509,7 +508,7 @@ This product includes source derived from [@grpc/proto-loader](https://github.co
|
|
|
509
508
|
|
|
510
509
|
### @newrelic/security-agent
|
|
511
510
|
|
|
512
|
-
This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v2.
|
|
511
|
+
This product includes source derived from [@newrelic/security-agent](https://github.com/newrelic/csec-node-agent) ([v2.2.0](https://github.com/newrelic/csec-node-agent/tree/v2.2.0)), distributed under the [UNKNOWN License](https://github.com/newrelic/csec-node-agent/blob/v2.2.0/LICENSE):
|
|
513
512
|
|
|
514
513
|
```
|
|
515
514
|
## New Relic Software License v1.0
|
|
@@ -1041,7 +1040,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
1041
1040
|
|
|
1042
1041
|
### winston-transport
|
|
1043
1042
|
|
|
1044
|
-
This product includes source derived from [winston-transport](https://github.com/winstonjs/winston-transport) ([v4.
|
|
1043
|
+
This product includes source derived from [winston-transport](https://github.com/winstonjs/winston-transport) ([v4.8.0](https://github.com/winstonjs/winston-transport/tree/v4.8.0)), distributed under the [MIT License](https://github.com/winstonjs/winston-transport/blob/v4.8.0/LICENSE):
|
|
1045
1044
|
|
|
1046
1045
|
```
|
|
1047
1046
|
The MIT License (MIT)
|
|
@@ -1074,7 +1073,7 @@ SOFTWARE.
|
|
|
1074
1073
|
|
|
1075
1074
|
### @aws-sdk/client-s3
|
|
1076
1075
|
|
|
1077
|
-
This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.
|
|
1076
|
+
This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.668.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.668.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.668.0/LICENSE):
|
|
1078
1077
|
|
|
1079
1078
|
```
|
|
1080
1079
|
Apache License
|
|
@@ -1283,7 +1282,7 @@ This product includes source derived from [@aws-sdk/client-s3](https://github.co
|
|
|
1283
1282
|
|
|
1284
1283
|
### @aws-sdk/s3-request-presigner
|
|
1285
1284
|
|
|
1286
|
-
This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.
|
|
1285
|
+
This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.668.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.668.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.668.0/LICENSE):
|
|
1287
1286
|
|
|
1288
1287
|
```
|
|
1289
1288
|
Apache License
|
|
@@ -1492,7 +1491,7 @@ This product includes source derived from [@aws-sdk/s3-request-presigner](https:
|
|
|
1492
1491
|
|
|
1493
1492
|
### @koa/router
|
|
1494
1493
|
|
|
1495
|
-
This product includes source derived from [@koa/router](https://github.com/koajs/router) ([v12.0.
|
|
1494
|
+
This product includes source derived from [@koa/router](https://github.com/koajs/router) ([v12.0.2](https://github.com/koajs/router/tree/v12.0.2)), distributed under the [MIT License](https://github.com/koajs/router/blob/v12.0.2/LICENSE):
|
|
1496
1495
|
|
|
1497
1496
|
```
|
|
1498
1497
|
The MIT License (MIT)
|
|
@@ -2206,7 +2205,7 @@ THE SOFTWARE.
|
|
|
2206
2205
|
|
|
2207
2206
|
### @slack/bolt
|
|
2208
2207
|
|
|
2209
|
-
This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.
|
|
2208
|
+
This product includes source derived from [@slack/bolt](https://github.com/slackapi/bolt) ([v3.22.0](https://github.com/slackapi/bolt/tree/v3.22.0)), distributed under the [MIT License](https://github.com/slackapi/bolt/blob/v3.22.0/LICENSE):
|
|
2210
2209
|
|
|
2211
2210
|
```
|
|
2212
2211
|
The MIT License (MIT)
|
|
@@ -2683,7 +2682,7 @@ SOFTWARE.
|
|
|
2683
2682
|
|
|
2684
2683
|
### async
|
|
2685
2684
|
|
|
2686
|
-
This product includes source derived from [async](https://github.com/caolan/async) ([v3.2.
|
|
2685
|
+
This product includes source derived from [async](https://github.com/caolan/async) ([v3.2.6](https://github.com/caolan/async/tree/v3.2.6)), distributed under the [MIT License](https://github.com/caolan/async/blob/v3.2.6/LICENSE):
|
|
2687
2686
|
|
|
2688
2687
|
```
|
|
2689
2688
|
Copyright (c) 2010-2018 Caolan McMahon
|
|
@@ -2710,7 +2709,7 @@ THE SOFTWARE.
|
|
|
2710
2709
|
|
|
2711
2710
|
### aws-sdk
|
|
2712
2711
|
|
|
2713
|
-
This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.
|
|
2712
|
+
This product includes source derived from [aws-sdk](https://github.com/aws/aws-sdk-js) ([v2.1691.0](https://github.com/aws/aws-sdk-js/tree/v2.1691.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js/blob/v2.1691.0/LICENSE.txt):
|
|
2714
2713
|
|
|
2715
2714
|
```
|
|
2716
2715
|
|
|
@@ -3138,7 +3137,7 @@ THE SOFTWARE.
|
|
|
3138
3137
|
|
|
3139
3138
|
### eslint-plugin-jsdoc
|
|
3140
3139
|
|
|
3141
|
-
This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.
|
|
3140
|
+
This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v48.11.0](https://github.com/gajus/eslint-plugin-jsdoc/tree/v48.11.0)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v48.11.0/LICENSE):
|
|
3142
3141
|
|
|
3143
3142
|
```
|
|
3144
3143
|
Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/)
|
|
@@ -3343,7 +3342,7 @@ Library.
|
|
|
3343
3342
|
|
|
3344
3343
|
### eslint
|
|
3345
3344
|
|
|
3346
|
-
This product includes source derived from [eslint](https://github.com/eslint/eslint) ([v8.57.
|
|
3345
|
+
This product includes source derived from [eslint](https://github.com/eslint/eslint) ([v8.57.1](https://github.com/eslint/eslint/tree/v8.57.1)), distributed under the [MIT License](https://github.com/eslint/eslint/blob/v8.57.1/LICENSE):
|
|
3347
3346
|
|
|
3348
3347
|
```
|
|
3349
3348
|
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
|
@@ -3370,7 +3369,7 @@ THE SOFTWARE.
|
|
|
3370
3369
|
|
|
3371
3370
|
### express
|
|
3372
3371
|
|
|
3373
|
-
This product includes source derived from [express](https://github.com/expressjs/express) ([v4.
|
|
3372
|
+
This product includes source derived from [express](https://github.com/expressjs/express) ([v4.21.1](https://github.com/expressjs/express/tree/v4.21.1)), distributed under the [MIT License](https://github.com/expressjs/express/blob/v4.21.1/LICENSE):
|
|
3374
3373
|
|
|
3375
3374
|
```
|
|
3376
3375
|
(The MIT License)
|
|
@@ -4001,7 +4000,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
4001
4000
|
|
|
4002
4001
|
### self-cert
|
|
4003
4002
|
|
|
4004
|
-
This product includes source derived from [self-cert](https://github.com/jsumners/self-cert) ([v2.0.
|
|
4003
|
+
This product includes source derived from [self-cert](https://github.com/jsumners/self-cert) ([v2.0.1](https://github.com/jsumners/self-cert/tree/v2.0.1)), distributed under the [MIT License](https://github.com/jsumners/self-cert/blob/v2.0.1/Readme.md):
|
|
4005
4004
|
|
|
4006
4005
|
```
|
|
4007
4006
|
MIT License
|
|
@@ -4108,29 +4107,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
4108
4107
|
|
|
4109
4108
|
```
|
|
4110
4109
|
|
|
4111
|
-
### tap
|
|
4112
|
-
|
|
4113
|
-
This product includes source derived from [tap](https://github.com/tapjs/node-tap) ([v16.3.10](https://github.com/tapjs/node-tap/tree/v16.3.10)), distributed under the [ISC License](https://github.com/tapjs/node-tap/blob/v16.3.10/LICENSE):
|
|
4114
|
-
|
|
4115
|
-
```
|
|
4116
|
-
The ISC License
|
|
4117
|
-
|
|
4118
|
-
Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
|
|
4119
|
-
|
|
4120
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4121
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
4122
|
-
copyright notice and this permission notice appear in all copies.
|
|
4123
|
-
|
|
4124
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
4125
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
4126
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
4127
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
4128
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
4129
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
4130
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
4131
|
-
|
|
4132
|
-
```
|
|
4133
|
-
|
|
4134
4110
|
|
|
4135
4111
|
## optionalDependencies
|
|
4136
4112
|
|
package/lib/config/index.js
CHANGED
|
@@ -45,7 +45,9 @@ let logger = null // Lazy-loaded in `initialize`.
|
|
|
45
45
|
let _configInstance = null
|
|
46
46
|
|
|
47
47
|
const getConfigFileNames = () =>
|
|
48
|
-
[process.env.NEW_RELIC_CONFIG_FILENAME, 'newrelic.js', 'newrelic.cjs'].filter(
|
|
48
|
+
[process.env.NEW_RELIC_CONFIG_FILENAME, 'newrelic.js', 'newrelic.cjs', 'newrelic.mjs'].filter(
|
|
49
|
+
Boolean
|
|
50
|
+
)
|
|
49
51
|
|
|
50
52
|
const getConfigFileLocations = () =>
|
|
51
53
|
[
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 New Relic Corporation. All rights reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict'
|
|
7
|
+
const InstrumentationDescriptor = require('../../../instrumentation-descriptor')
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Defines a deserialize middleware to add the
|
|
11
|
+
* cloud.resource_id segment attributes for the AWS command
|
|
12
|
+
*
|
|
13
|
+
* @param {Shim} shim New Relic agent shim
|
|
14
|
+
* @param {Object} config AWS command configuration
|
|
15
|
+
* @param {function} next next function in middleware chain
|
|
16
|
+
* @returns {function} wrapped version of middleware function
|
|
17
|
+
*/
|
|
18
|
+
function resourceIdMiddleware(shim, config, next) {
|
|
19
|
+
return async function wrappedResourceIdMiddleware(args) {
|
|
20
|
+
let result
|
|
21
|
+
try {
|
|
22
|
+
const region = await config.region()
|
|
23
|
+
result = await next(args)
|
|
24
|
+
const { response } = result
|
|
25
|
+
const segment = shim.getSegment(response.body.req)
|
|
26
|
+
// We can't derive account ID, so we have to consume it from config
|
|
27
|
+
const accountId = shim.agent.config.cloud.aws.account_id
|
|
28
|
+
const functionName = args?.input?.FunctionName // have to get function from params
|
|
29
|
+
if (accountId && functionName) {
|
|
30
|
+
segment.addAttribute(
|
|
31
|
+
'cloud.resource_id',
|
|
32
|
+
`arn:aws:lambda:${region}:${accountId}:function:${functionName}`
|
|
33
|
+
)
|
|
34
|
+
segment.addAttribute('cloud.platform', `aws_lambda`)
|
|
35
|
+
}
|
|
36
|
+
} catch (err) {
|
|
37
|
+
shim.logger.debug(err, 'Failed to add AWS cloud resource id to segment')
|
|
38
|
+
} finally {
|
|
39
|
+
return result
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const lambdaMiddlewareConfig = {
|
|
45
|
+
middleware: resourceIdMiddleware,
|
|
46
|
+
type: InstrumentationDescriptor.TYPE_GENERIC,
|
|
47
|
+
config: {
|
|
48
|
+
name: 'NewRelicGetResourceId',
|
|
49
|
+
step: 'deserialize',
|
|
50
|
+
priority: 'low',
|
|
51
|
+
override: true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = {
|
|
56
|
+
lambdaMiddlewareConfig
|
|
57
|
+
}
|
|
@@ -9,12 +9,14 @@ const { middlewareConfig } = require('./common')
|
|
|
9
9
|
const { snsMiddlewareConfig } = require('./sns')
|
|
10
10
|
const { sqsMiddlewareConfig } = require('./sqs')
|
|
11
11
|
const { dynamoMiddlewareConfig } = require('./dynamodb')
|
|
12
|
+
const { lambdaMiddlewareConfig } = require('./lambda')
|
|
12
13
|
const { bedrockMiddlewareConfig } = require('./bedrock')
|
|
13
14
|
const MIDDLEWARE = Symbol('nrMiddleware')
|
|
14
15
|
|
|
15
16
|
const middlewareByClient = {
|
|
16
17
|
Client: middlewareConfig,
|
|
17
18
|
BedrockRuntime: [...middlewareConfig, bedrockMiddlewareConfig],
|
|
19
|
+
Lambda: [...middlewareConfig, lambdaMiddlewareConfig],
|
|
18
20
|
SNS: [...middlewareConfig, snsMiddlewareConfig],
|
|
19
21
|
SQS: [...middlewareConfig, sqsMiddlewareConfig],
|
|
20
22
|
DynamoDB: [...middlewareConfig, ...dynamoMiddlewareConfig],
|
|
@@ -54,8 +54,8 @@ function promiseInitialize(shim, mysql2) {
|
|
|
54
54
|
)
|
|
55
55
|
|
|
56
56
|
shim.wrap(mysql2, 'createPool', function wrapPromiseCreatePool(shim, createPool) {
|
|
57
|
-
return
|
|
58
|
-
const promisePool =
|
|
57
|
+
return function wrappedPromiseCreatePool() {
|
|
58
|
+
const promisePool = createPool.apply(this, arguments)
|
|
59
59
|
wrapCreatePool(shim, createPool, 'createPool', promisePool.pool)
|
|
60
60
|
return promisePool
|
|
61
61
|
}
|
|
@@ -65,8 +65,8 @@ function promiseInitialize(shim, mysql2) {
|
|
|
65
65
|
mysql2,
|
|
66
66
|
'createPoolCluster',
|
|
67
67
|
function wrapPromiseCreatePoolCluster(shim, createPoolCluster) {
|
|
68
|
-
return
|
|
69
|
-
const promisePoolCluster =
|
|
68
|
+
return function wrappedPromiseCreatePoolCluster() {
|
|
69
|
+
const promisePoolCluster = createPoolCluster.apply(this, arguments)
|
|
70
70
|
wrapCreatePoolCluster(
|
|
71
71
|
shim,
|
|
72
72
|
createPoolCluster,
|
|
@@ -158,7 +158,7 @@ const requiredHttpApiV1Keys = [
|
|
|
158
158
|
|
|
159
159
|
// See https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
160
160
|
function isGatewayV1Event(event) {
|
|
161
|
-
if (event?.requestContext?.elb !== undefined) {
|
|
161
|
+
if (event?.requestContext === undefined || event?.requestContext?.elb !== undefined) {
|
|
162
162
|
return false
|
|
163
163
|
}
|
|
164
164
|
const hasKeys = eventHasRequiredKeys(event, requiredHttpApiV1Keys)
|
|
@@ -173,7 +173,7 @@ function isGatewayV1Event(event) {
|
|
|
173
173
|
const requiredHttpApiV2Keys = ['rawPath', 'rawQueryString', 'routeKey', 'cookies']
|
|
174
174
|
|
|
175
175
|
function isGatewayV2Event(event) {
|
|
176
|
-
if (event?.requestContext?.elb !== undefined) {
|
|
176
|
+
if (event?.requestContext === undefined || event?.requestContext?.elb !== undefined) {
|
|
177
177
|
return false
|
|
178
178
|
}
|
|
179
179
|
return eventHasRequiredKeys(event, requiredHttpApiV2Keys) && event?.version === '2.0'
|
|
@@ -249,9 +249,7 @@ class AwsLambda {
|
|
|
249
249
|
_getAwsAgentAttributes(event, context) {
|
|
250
250
|
const attributes = {
|
|
251
251
|
'aws.lambda.arn': context.invokedFunctionArn,
|
|
252
|
-
'aws.requestId': context.awsRequestId
|
|
253
|
-
'cloud.resource_id': context.invokedFunctionArn,
|
|
254
|
-
'cloud.platform': 'aws_lambda'
|
|
252
|
+
'aws.requestId': context.awsRequestId
|
|
255
253
|
}
|
|
256
254
|
|
|
257
255
|
const eventSourceInfo = this._detectEventType(event)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newrelic",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.9.0",
|
|
4
4
|
"author": "New Relic Node.js agent team <nodejs@newrelic.com>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"contributors": [
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"bench": "node ./bin/run-bench.js",
|
|
162
162
|
"docker-env": "./bin/docker-env-vars.sh",
|
|
163
163
|
"docs": "rm -rf ./out && jsdoc -c ./jsdoc-conf.jsonc --private -r .",
|
|
164
|
-
"integration": "npm run
|
|
164
|
+
"integration": "npm run sub-install && BORP_CONF_FILE=.borp.int.yaml time c8 -o ./coverage/integration borp --timeout 600000 --reporter ./test/lib/test-reporter.mjs",
|
|
165
165
|
"integration:esm": "NODE_OPTIONS='--loader=./esm-loader.mjs' BORP_CONF_FILE=.borp.int-esm.yaml time c8 -o ./coverage/integration-esm borp --reporter ./test/lib/test-reporter.mjs",
|
|
166
166
|
"prepare-test": "npm run docker-env",
|
|
167
167
|
"lint": "eslint ./*.{js,mjs} lib test bin",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"dependencies": {
|
|
197
197
|
"@grpc/grpc-js": "^1.12.2",
|
|
198
198
|
"@grpc/proto-loader": "^0.7.5",
|
|
199
|
-
"@newrelic/security-agent": "^2.
|
|
199
|
+
"@newrelic/security-agent": "^2.2.0",
|
|
200
200
|
"@tyriar/fibonacci-heap": "^2.0.7",
|
|
201
201
|
"concat-stream": "^2.0.0",
|
|
202
202
|
"https-proxy-agent": "^7.0.1",
|
|
@@ -257,8 +257,7 @@
|
|
|
257
257
|
"self-cert": "^2.0.0",
|
|
258
258
|
"should": "*",
|
|
259
259
|
"sinon": "^5.1.1",
|
|
260
|
-
"superagent": "^9.0.1"
|
|
261
|
-
"tap": "^16.3.4"
|
|
260
|
+
"superagent": "^9.0.1"
|
|
262
261
|
},
|
|
263
262
|
"repository": {
|
|
264
263
|
"type": "git",
|