newrelic 11.15.0 → 11.17.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.
Files changed (57) hide show
  1. package/NEWS.md +94 -32
  2. package/THIRD_PARTY_NOTICES.md +1138 -541
  3. package/api.js +20 -0
  4. package/lib/collector/serverless.js +2 -1
  5. package/lib/instrumentation/amqplib/nr-hooks.js +3 -2
  6. package/lib/instrumentation/aws-sdk/nr-hooks.js +29 -0
  7. package/lib/instrumentation/aws-sdk/util.js +38 -0
  8. package/lib/instrumentation/aws-sdk/v2/core.js +105 -0
  9. package/lib/instrumentation/aws-sdk/v2/dynamodb.js +103 -0
  10. package/lib/instrumentation/aws-sdk/v2/instrumentation-helper.js +31 -0
  11. package/lib/instrumentation/aws-sdk/v2/instrumentation.js +34 -0
  12. package/lib/instrumentation/aws-sdk/v2/sns.js +42 -0
  13. package/lib/instrumentation/aws-sdk/v2/sqs.js +50 -0
  14. package/lib/instrumentation/aws-sdk/v3/bedrock.js +301 -0
  15. package/lib/instrumentation/aws-sdk/v3/common.js +101 -0
  16. package/lib/instrumentation/aws-sdk/v3/dynamodb.js +92 -0
  17. package/lib/instrumentation/aws-sdk/v3/smithy-client.js +65 -0
  18. package/lib/instrumentation/aws-sdk/v3/sns.js +74 -0
  19. package/lib/instrumentation/aws-sdk/v3/sqs.js +70 -0
  20. package/lib/instrumentation/core/http-outbound.js +54 -37
  21. package/lib/instrumentation/fastify.js +1 -1
  22. package/lib/instrumentation/grpc-js/grpc.js +12 -7
  23. package/lib/instrumentation/grpc-js/nr-hooks.js +4 -3
  24. package/lib/instrumentation/http-methods.js +9 -0
  25. package/lib/instrumentation/koa/instrumentation.js +197 -0
  26. package/lib/instrumentation/koa/nr-hooks.js +35 -0
  27. package/lib/instrumentation/koa/route-instrumentation.js +33 -0
  28. package/lib/instrumentation/koa/router-instrumentation.js +120 -0
  29. package/lib/instrumentation/langchain/nr-hooks.js +5 -4
  30. package/lib/instrumentation/mysql/nr-hooks.js +4 -3
  31. package/lib/instrumentation/pino/nr-hooks.js +2 -1
  32. package/lib/instrumentation/superagent.js +68 -0
  33. package/lib/instrumentation/undici.js +17 -6
  34. package/lib/instrumentation/when/nr-hooks.js +2 -1
  35. package/lib/instrumentation-tracker.js +17 -0
  36. package/lib/instrumentations.js +19 -18
  37. package/lib/llm-events/aws-bedrock/bedrock-command.js +137 -0
  38. package/lib/llm-events/aws-bedrock/bedrock-response.js +152 -0
  39. package/lib/llm-events/aws-bedrock/chat-completion-message.js +77 -0
  40. package/lib/llm-events/aws-bedrock/chat-completion-summary.js +42 -0
  41. package/lib/llm-events/aws-bedrock/embedding.js +36 -0
  42. package/lib/llm-events/aws-bedrock/error.js +29 -0
  43. package/lib/llm-events/aws-bedrock/event.js +97 -0
  44. package/lib/llm-events/aws-bedrock/index.js +17 -0
  45. package/lib/llm-events/aws-bedrock/stream-handler.js +281 -0
  46. package/lib/metrics/names.js +4 -0
  47. package/lib/serverless/api-gateway.js +46 -3
  48. package/lib/serverless/event-sources.json +28 -1
  49. package/lib/shim/shim.js +7 -4
  50. package/lib/shimmer.js +17 -0
  51. package/lib/spans/span-event.js +15 -1
  52. package/lib/spans/streaming-span-event.js +52 -38
  53. package/lib/symbols.js +4 -0
  54. package/lib/transaction/index.js +6 -0
  55. package/lib/transaction/trace/segment.js +36 -43
  56. package/lib/util/is-absolute-path.js +28 -0
  57. package/package.json +14 -5
package/NEWS.md CHANGED
@@ -1,35 +1,97 @@
1
- ### v11.15.0 (2024-04-09)
2
-
3
- #### Bug fixes
4
-
5
- * Fixed instrumenting the same module installed in different locations ([#2104](https://github.com/newrelic/node-newrelic/pull/2104)) ([88bdace](https://github.com/newrelic/node-newrelic/commit/88bdace6489c7d258ed3200f1550367f35824bc1))
6
-
7
- #### Code refactoring
8
-
9
- * **mongodb:** Removed instrumentation that handles connecting via unix domain socket. ([#2129](https://github.com/newrelic/node-newrelic/pull/2129)) ([808323f](https://github.com/newrelic/node-newrelic/commit/808323f0832952870fd1e94474b3fd3e0ab1b8c4))
10
- * Updated shim classes to no longer construct specs. ([#2096](https://github.com/newrelic/node-newrelic/pull/2096)) ([158c295](https://github.com/newrelic/node-newrelic/commit/158c29566f6a5993ec77f84aeaa266ceab0bf4f0))
11
-
12
- #### Miscellaneous chores
13
-
14
- * **deps-dev:** Bumped express from 4.18.2 to 4.19.2 ([#2101](https://github.com/newrelic/node-newrelic/pull/2101)) ([639cb78](https://github.com/newrelic/node-newrelic/commit/639cb785dff7568ad227091512013c2dfb81e5f9))
15
- * **deps:** Updated @newrelic/security-agent to v1.1.1 ([#2092](https://github.com/newrelic/node-newrelic/pull/2092)) ([3272aa3](https://github.com/newrelic/node-newrelic/commit/3272aa3da2260ce18c71c24608ffdda512ca6817))
16
- * Fixed incorrect pinning of @elastic/transport ([#2120](https://github.com/newrelic/node-newrelic/pull/2120)) ([7b5bdaa](https://github.com/newrelic/node-newrelic/commit/7b5bdaac1b1081636636cd7ca7c6b484f5251f76))
17
- * Removed scrollbar styling in generated API docs ([#2091](https://github.com/newrelic/node-newrelic/pull/2091)) ([cb0fa11](https://github.com/newrelic/node-newrelic/commit/cb0fa11c81290bb93cb30e974fdb1ece82a1e80e))
18
- * Removed transaction_id and legacy token count attributes from llm events for openai and langchain ([#2093](https://github.com/newrelic/node-newrelic/pull/2093)) ([df2a0fd](https://github.com/newrelic/node-newrelic/commit/df2a0fd7c99a7bbf024c1e33c7fdff512b45c970))
19
-
20
- #### Tests
21
-
22
- * Updated test/integration/core/dns reverse test to remove flakiness ([#2121](https://github.com/newrelic/node-newrelic/pull/2121)) ([c32cb27](https://github.com/newrelic/node-newrelic/commit/c32cb2739ece3adcf5bd42e646071b3f59e691ba))
23
- * Updated elastic tests to skip broken version ([#2119](https://github.com/newrelic/node-newrelic/pull/2119)) ([5d0d1bb](https://github.com/newrelic/node-newrelic/commit/5d0d1bb4994b41d43ab9b4eb110fea036ac307bc))
24
-
25
- #### Continuous integration
26
-
27
- * Removed usage of `use_new_release` from prepare release workflow ([#2124](https://github.com/newrelic/node-newrelic/pull/2124)) ([007ddb4](https://github.com/newrelic/node-newrelic/commit/007ddb4dce6cf5ab463a1868fe4cfa203d3e9ff2))
28
- * Updated `prepare-release.js` to not require changelog.json ([#2106](https://github.com/newrelic/node-newrelic/pull/2106)) ([328a570](https://github.com/newrelic/node-newrelic/commit/328a570bbe9f359d23a21317ccd8a8bc52b473b4))
29
- * Updated prepare release to provide a drop down for release type ([#2133](https://github.com/newrelic/node-newrelic/pull/2133)) ([846269b](https://github.com/newrelic/node-newrelic/commit/846269bb256f287c5fb9be32bdb62e9786e3cfe4))
30
- * Updated versioned security agent workflow ([#2100](https://github.com/newrelic/node-newrelic/pull/2100)) ([f787b15](https://github.com/newrelic/node-newrelic/commit/f787b15f94c416d547af1ab4b2d7c31665b417b7))
31
- * Fixed typo in constant name for prepare release script ([#2094](https://github.com/newrelic/node-newrelic/pull/2094)) ([3b887d9](https://github.com/newrelic/node-newrelic/commit/3b887d96c70a2cc5e3833cdc8b65de99b643f7a1))
32
-
1
+ ### v11.17.0 (2024-05-15)
2
+
3
+ #### Features
4
+
5
+ * Added otel compliant `server.address`, `server.port`, and `http.request.method` to external http spans ([#2169](https://github.com/newrelic/node-newrelic/pull/2169)) ([b0a3e6d](https://github.com/newrelic/node-newrelic/commit/b0a3e6def7d1ffc1d033842c58eb71979ab208eb))
6
+ * Added otel compliant `db.system`, `server.address`, and `server.port` attributes to database spans ([#2173](https://github.com/newrelic/node-newrelic/pull/2173)) ([3fdcab4](https://github.com/newrelic/node-newrelic/commit/3fdcab42196e5c870fd5dddd136daa9b01e9617d))
7
+
8
+ #### Bug fixes
9
+
10
+ * Added support for AWS API Gateway v2 payloads ([#2191](https://github.com/newrelic/node-newrelic/pull/2191)) ([0ccdc6a](https://github.com/newrelic/node-newrelic/commit/0ccdc6ada757291dc020feb88bf30addb7a4f47b))
11
+
12
+ #### Code refactoring
13
+
14
+ * Updated instrumentation for http, undici, grpc to use a new `segment.captureExternalAttributes` to centralize the necessary data needed to create segment and span attributes ([#2179](https://github.com/newrelic/node-newrelic/pull/2179)) ([ddb6356](https://github.com/newrelic/node-newrelic/commit/ddb6356528ca3d8ec8433512c2f44263d29452c2))
15
+
16
+ #### Documentation
17
+
18
+ * Updated compatibility report ([#2185](https://github.com/newrelic/node-newrelic/pull/2185)) ([eb986c9](https://github.com/newrelic/node-newrelic/commit/eb986c9c97f938bbb50ad2dfb70c5d7f97261249))
19
+
20
+ #### Miscellaneous chores
21
+
22
+ * Added workflow for generating compatibility doc ([#2183](https://github.com/newrelic/node-newrelic/pull/2183)) ([9b1d5cb](https://github.com/newrelic/node-newrelic/commit/9b1d5cbd82bb8df98ebccf98e068989b35c9964d))
23
+ * Fixed conditionals in CI workflow ([#2188](https://github.com/newrelic/node-newrelic/pull/2188)) ([6b733c0](https://github.com/newrelic/node-newrelic/commit/6b733c0fff3b8ed9d25bdb3b95d48580d2c81686))
24
+ * Fixed superagent versioned tests ([#2190](https://github.com/newrelic/node-newrelic/pull/2190)) ([297bc01](https://github.com/newrelic/node-newrelic/commit/297bc0107bcd2f79d65acb8871ccd1322b056a99))
25
+ * Made pre-commit hook require dependency changes ([#2172](https://github.com/newrelic/node-newrelic/pull/2172)) ([e7bd356](https://github.com/newrelic/node-newrelic/commit/e7bd356b84e8b526825fd84bf04017928cc53e4a))
26
+ * Updated CI to skip expensive actions when not needed ([#2184](https://github.com/newrelic/node-newrelic/pull/2184)) ([8639fb9](https://github.com/newrelic/node-newrelic/commit/8639fb90845de12076f04d58bac7aff048407a09))
27
+ * Updated validate-pr workflow ([#2186](https://github.com/newrelic/node-newrelic/pull/2186)) ([6ff4497](https://github.com/newrelic/node-newrelic/commit/6ff4497fd3857259d2cb2c6e0dac009df7a6e582))
28
+
29
+ #### Continuous integration
30
+
31
+ * Updated minimum version of lib-dynamo to work around peer dependency resolution ([#2174](https://github.com/newrelic/node-newrelic/pull/2174)) ([7ddf2c9](https://github.com/newrelic/node-newrelic/commit/7ddf2c9473be180151e64f9b35beb6c5593883c5))
32
+
33
+ ### v11.16.0 (2024-04-29)
34
+
35
+ #### Features
36
+
37
+ * Added API `ignoreApdex` to ignore calculating apdex for the active transaction ([#2166](https://github.com/newrelic/node-newrelic/pull/2166)) ([cb21d2c](https://github.com/newrelic/node-newrelic/commit/cb21d2c95e5bb0de7e16535ecd4b2f5a77dc6fb7))
38
+
39
+ #### Bug fixes
40
+
41
+ * Fixed issue with CJS being imported as ESM ([#2168](https://github.com/newrelic/node-newrelic/pull/2168)) ([9a14cb0](https://github.com/newrelic/node-newrelic/commit/9a14cb02dce5bfbe7830aaa25d71edb38447250b))
42
+
43
+ #### Security improvements
44
+
45
+ * **deps:** bump formidable and superagent ([#2162](https://github.com/newrelic/node-newrelic/pull/2162)) ([260f16b](https://github.com/newrelic/node-newrelic/commit/260f16bba6822cfadbf8648bba38a1013b2d19de))
46
+
47
+ #### Documentation
48
+
49
+ * Fixed images in markdown tutorials ([#2153](https://github.com/newrelic/node-newrelic/pull/2153)) ([ef14948](https://github.com/newrelic/node-newrelic/commit/ef14948a0068e21d7c5aa569b8f2862f07a7f941))
50
+ * Includes api.js in jsdoc generation ([#2139](https://github.com/newrelic/node-newrelic/pull/2139)) ([3883348](https://github.com/newrelic/node-newrelic/commit/3883348bd0aab54efdbb5e876a4e4c867f5df2e3))
51
+
52
+ #### Miscellaneous chores
53
+
54
+ * Migrated @newrelic/superagent into agent repo ([#2141](https://github.com/newrelic/node-newrelic/pull/2141))
55
+ * Migrated @newrelic/aws-sdk into agent repo ([#2161](https://github.com/newrelic/node-newrelic/pull/2161)) ([a9eb593](https://github.com/newrelic/node-newrelic/commit/a9eb593c1a6b44b770de92c1b2ca2acdf8e2f222))
56
+ * Migrated @newrelic/koa into mainline agent repo ([#2148](https://github.com/newrelic/node-newrelic/pull/2148)) ([33af646](https://github.com/newrelic/node-newrelic/commit/33af646878994d7f12d3cb42680e21410b34322f))
57
+ * Removed repetitive cache busting ([#2160](https://github.com/newrelic/node-newrelic/pull/2160)) ([5ac870e](https://github.com/newrelic/node-newrelic/commit/5ac870e7a75ba791060dfaffd49cfa400d60e910))
58
+ * Updated instrumentation to use type constants instead of raw strings ([#2165](https://github.com/newrelic/node-newrelic/pull/2165)) ([c5b42cd](https://github.com/newrelic/node-newrelic/commit/c5b42cd7b2df6bb1054a589ad666890550a01d43))
59
+ * Updated versioned tests readme ([#2159](https://github.com/newrelic/node-newrelic/pull/2159)) ([a957304](https://github.com/newrelic/node-newrelic/commit/a9573041f44462d6ccb287f7dccf672f54b0d7b3))
60
+ * Updated versioned tests to support upcoming tooling ([#2147](https://github.com/newrelic/node-newrelic/pull/2147)) ([38e47d9](https://github.com/newrelic/node-newrelic/commit/38e47d9d7ffadbea3103c77686e031c4cf954d2c))
61
+ * Updated versioned tests to use quiet output mode ([#2145](https://github.com/newrelic/node-newrelic/pull/2145)) ([63a5ddc](https://github.com/newrelic/node-newrelic/commit/63a5ddcb6c0040918189db17ee236007dba9f993))
62
+
63
+ ### v11.15.0 (2024-04-09)
64
+
65
+ #### Bug fixes
66
+
67
+ * Fixed instrumenting the same module installed in different locations ([#2104](https://github.com/newrelic/node-newrelic/pull/2104)) ([88bdace](https://github.com/newrelic/node-newrelic/commit/88bdace6489c7d258ed3200f1550367f35824bc1))
68
+
69
+ #### Code refactoring
70
+
71
+ * **mongodb:** Removed instrumentation that handles connecting via unix domain socket. ([#2129](https://github.com/newrelic/node-newrelic/pull/2129)) ([808323f](https://github.com/newrelic/node-newrelic/commit/808323f0832952870fd1e94474b3fd3e0ab1b8c4))
72
+ * Updated shim classes to no longer construct specs. ([#2096](https://github.com/newrelic/node-newrelic/pull/2096)) ([158c295](https://github.com/newrelic/node-newrelic/commit/158c29566f6a5993ec77f84aeaa266ceab0bf4f0))
73
+
74
+ #### Miscellaneous chores
75
+
76
+ * **deps-dev:** Bumped express from 4.18.2 to 4.19.2 ([#2101](https://github.com/newrelic/node-newrelic/pull/2101)) ([639cb78](https://github.com/newrelic/node-newrelic/commit/639cb785dff7568ad227091512013c2dfb81e5f9))
77
+ * **deps:** Updated @newrelic/security-agent to v1.1.1 ([#2092](https://github.com/newrelic/node-newrelic/pull/2092)) ([3272aa3](https://github.com/newrelic/node-newrelic/commit/3272aa3da2260ce18c71c24608ffdda512ca6817))
78
+ * Fixed incorrect pinning of @elastic/transport ([#2120](https://github.com/newrelic/node-newrelic/pull/2120)) ([7b5bdaa](https://github.com/newrelic/node-newrelic/commit/7b5bdaac1b1081636636cd7ca7c6b484f5251f76))
79
+ * Removed scrollbar styling in generated API docs ([#2091](https://github.com/newrelic/node-newrelic/pull/2091)) ([cb0fa11](https://github.com/newrelic/node-newrelic/commit/cb0fa11c81290bb93cb30e974fdb1ece82a1e80e))
80
+ * Removed transaction_id and legacy token count attributes from llm events for openai and langchain ([#2093](https://github.com/newrelic/node-newrelic/pull/2093)) ([df2a0fd](https://github.com/newrelic/node-newrelic/commit/df2a0fd7c99a7bbf024c1e33c7fdff512b45c970))
81
+
82
+ #### Tests
83
+
84
+ * Updated test/integration/core/dns reverse test to remove flakiness ([#2121](https://github.com/newrelic/node-newrelic/pull/2121)) ([c32cb27](https://github.com/newrelic/node-newrelic/commit/c32cb2739ece3adcf5bd42e646071b3f59e691ba))
85
+ * Updated elastic tests to skip broken version ([#2119](https://github.com/newrelic/node-newrelic/pull/2119)) ([5d0d1bb](https://github.com/newrelic/node-newrelic/commit/5d0d1bb4994b41d43ab9b4eb110fea036ac307bc))
86
+
87
+ #### Continuous integration
88
+
89
+ * Removed usage of `use_new_release` from prepare release workflow ([#2124](https://github.com/newrelic/node-newrelic/pull/2124)) ([007ddb4](https://github.com/newrelic/node-newrelic/commit/007ddb4dce6cf5ab463a1868fe4cfa203d3e9ff2))
90
+ * Updated `prepare-release.js` to not require changelog.json ([#2106](https://github.com/newrelic/node-newrelic/pull/2106)) ([328a570](https://github.com/newrelic/node-newrelic/commit/328a570bbe9f359d23a21317ccd8a8bc52b473b4))
91
+ * Updated prepare release to provide a drop down for release type ([#2133](https://github.com/newrelic/node-newrelic/pull/2133)) ([846269b](https://github.com/newrelic/node-newrelic/commit/846269bb256f287c5fb9be32bdb62e9786e3cfe4))
92
+ * Updated versioned security agent workflow ([#2100](https://github.com/newrelic/node-newrelic/pull/2100)) ([f787b15](https://github.com/newrelic/node-newrelic/commit/f787b15f94c416d547af1ab4b2d7c31665b417b7))
93
+ * Fixed typo in constant name for prepare release script ([#2094](https://github.com/newrelic/node-newrelic/pull/2094)) ([3b887d9](https://github.com/newrelic/node-newrelic/commit/3b887d96c70a2cc5e3833cdc8b65de99b643f7a1))
94
+
33
95
  ### v11.14.0 (2024-03-20)
34
96
 
35
97
  #### Features