newrelic 12.25.0 → 13.0.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,3 +1,32 @@
1
+ ### v13.0.0 (2025-07-23)
2
+ #### ⚠ BREAKING CHANGES
3
+
4
+ This version of the Node.js agent is a SemVer MAJOR update and contains the following breaking changes. MAJOR versions may drop support for language runtimes that have reached End-of-Life according to the maintainer. Additionally, MAJOR versions may drop support for and remove certain instrumentation. For more details on these changes please see the [migration guide](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/update-nodejs-agent/).
5
+
6
+ * Dropped support for Node.js 18
7
+ * Updated min supported version for `fastify` to 3.0.0, `pino` to 8.0.0, and `koa-router` to 12.0.0
8
+
9
+ #### Features
10
+
11
+ * Dropped support for Node.js 18 ([#3097](https://github.com/newrelic/node-newrelic/pull/3097)) ([cb7c080](https://github.com/newrelic/node-newrelic/commit/cb7c080aadb0afbf6a894c1abbd1c77bd6b11e31))
12
+ * Updated min supported version for `fastify`, `pino`, and `koa-router` ([#3108](https://github.com/newrelic/node-newrelic/pull/3108)) ([ae9e21d](https://github.com/newrelic/node-newrelic/commit/ae9e21d94896e5c540927477b91113b5a38dc31c))
13
+
14
+ #### Documentation
15
+
16
+ * Updated AI Monitoring compatibility docs with new AWS Bedrock APIs ([#3230](https://github.com/newrelic/node-newrelic/pull/3230)) ([e1ff0d3](https://github.com/newrelic/node-newrelic/commit/e1ff0d3e2b1d3481f0c85e5c0b7d32bacae332ab))
17
+ * Updated compatibility report ([#3237](https://github.com/newrelic/node-newrelic/pull/3237)) ([dc85e4e](https://github.com/newrelic/node-newrelic/commit/dc85e4e196f67038492deb5c13ecf76cd8161025))
18
+
19
+
20
+ #### Tests
21
+
22
+ * Fixed `assertSegments` to insert all expected segments ([#3239](https://github.com/newrelic/node-newrelic/pull/3239)) ([de183fb](https://github.com/newrelic/node-newrelic/commit/de183fbe608fbf6fb97ad3508f506957b784d868))
23
+ * Updated tests to mock outgoing calls to avoid issues in CI ([#3234](https://github.com/newrelic/node-newrelic/pull/3234)) ([66694c6](https://github.com/newrelic/node-newrelic/commit/66694c6885cd384967d0402bf6a2cfe6910f3d95))
24
+
25
+ #### Continuous integration
26
+
27
+ * Updated prepare release to exclude semver major copy for repos other than `node-newrelic` ([#3242](https://github.com/newrelic/node-newrelic/pull/3242)) ([82d9689](https://github.com/newrelic/node-newrelic/commit/82d968921b5fa6e4e7b3961285237e60a69b4dee))
28
+ * Updated release prep to add copy around breaking changes ([#3199](https://github.com/newrelic/node-newrelic/pull/3199)) ([ca1131c](https://github.com/newrelic/node-newrelic/commit/ca1131cb3b2cea27b91a7b76ddbe39484bf9e032))
29
+
1
30
  ### v12.25.0 (2025-07-09)
2
31
 
3
32
  #### Features
@@ -82,7 +82,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
82
82
 
83
83
  **[optionalDependencies](#optionalDependencies)**
84
84
 
85
- * [@contrast/fn-inspect](#contrastfn-inspect)
85
+ * [@newrelic/fn-inspect](#newrelicfn-inspect)
86
86
  * [@newrelic/native-metrics](#newrelicnative-metrics)
87
87
  * [@prisma/prisma-fmt-wasm](#prismaprisma-fmt-wasm)
88
88
 
@@ -95,7 +95,7 @@ code, the source code can be found at [https://github.com/newrelic/node-newrelic
95
95
 
96
96
  ### @grpc/grpc-js
97
97
 
98
- This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.13.4](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.13.4)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.13.4/LICENSE):
98
+ This product includes source derived from [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js) ([v1.13.3](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/tree/v1.13.3)), distributed under the [Apache-2.0 License](https://github.com/grpc/grpc-node/tree/master/packages/grpc-js/blob/v1.13.3/LICENSE):
99
99
 
100
100
  ```
101
101
  Apache License
@@ -1902,7 +1902,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1902
1902
 
1903
1903
  ### import-in-the-middle
1904
1904
 
1905
- This product includes source derived from [import-in-the-middle](https://github.com/nodejs/import-in-the-middle) ([v1.14.0](https://github.com/nodejs/import-in-the-middle/tree/v1.14.0)), distributed under the [Apache-2.0 License](https://github.com/nodejs/import-in-the-middle/blob/v1.14.0/LICENSE):
1905
+ This product includes source derived from [import-in-the-middle](https://github.com/nodejs/import-in-the-middle) ([v1.13.2](https://github.com/nodejs/import-in-the-middle/tree/v1.13.2)), distributed under the [Apache-2.0 License](https://github.com/nodejs/import-in-the-middle/blob/v1.13.2/LICENSE):
1906
1906
 
1907
1907
  ```
1908
1908
  Apache License
@@ -2333,7 +2333,7 @@ SOFTWARE.
2333
2333
 
2334
2334
  ### @aws-sdk/client-s3
2335
2335
 
2336
- This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.821.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.821.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.821.0/LICENSE):
2336
+ This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.808.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.808.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.808.0/LICENSE):
2337
2337
 
2338
2338
  ```
2339
2339
  Apache License
@@ -2542,7 +2542,7 @@ This product includes source derived from [@aws-sdk/client-s3](https://github.co
2542
2542
 
2543
2543
  ### @aws-sdk/s3-request-presigner
2544
2544
 
2545
- This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.821.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.821.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.821.0/LICENSE):
2545
+ This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.808.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.808.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.808.0/LICENSE):
2546
2546
 
2547
2547
  ```
2548
2548
  Apache License
@@ -4370,7 +4370,7 @@ SOFTWARE.
4370
4370
 
4371
4371
  ### eslint-plugin-jsdoc
4372
4372
 
4373
- This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v50.7.1](https://github.com/gajus/eslint-plugin-jsdoc/tree/v50.7.1)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v50.7.1/LICENSE):
4373
+ This product includes source derived from [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) ([v50.6.14](https://github.com/gajus/eslint-plugin-jsdoc/tree/v50.6.14)), distributed under the [BSD-3-Clause License](https://github.com/gajus/eslint-plugin-jsdoc/blob/v50.6.14/LICENSE):
4374
4374
 
4375
4375
  ```
4376
4376
  Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/)
@@ -4402,7 +4402,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4402
4402
 
4403
4403
  ### eslint
4404
4404
 
4405
- This product includes source derived from [eslint](https://github.com/eslint/eslint) ([v9.28.0](https://github.com/eslint/eslint/tree/v9.28.0)), distributed under the [MIT License](https://github.com/eslint/eslint/blob/v9.28.0/LICENSE):
4405
+ This product includes source derived from [eslint](https://github.com/eslint/eslint) ([v9.26.0](https://github.com/eslint/eslint/tree/v9.26.0)), distributed under the [MIT License](https://github.com/eslint/eslint/blob/v9.26.0/LICENSE):
4406
4406
 
4407
4407
  ```
4408
4408
  Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
@@ -5235,9 +5235,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5235
5235
 
5236
5236
  ## optionalDependencies
5237
5237
 
5238
- ### @contrast/fn-inspect
5238
+ ### @newrelic/fn-inspect
5239
5239
 
5240
- This product includes source derived from [@contrast/fn-inspect](https://github.com/Contrast-Security-Inc/node-fn-inspect) ([v4.3.0](https://github.com/Contrast-Security-Inc/node-fn-inspect/tree/v4.3.0)), distributed under the [MIT License](https://github.com/Contrast-Security-Inc/node-fn-inspect/blob/v4.3.0/LICENSE):
5240
+ This product includes source derived from [@newrelic/fn-inspect](https://github.com/newrelic-forks/node-fn-inspect) ([v4.4.0](https://github.com/newrelic-forks/node-fn-inspect/tree/v4.4.0)), distributed under the [MIT License](https://github.com/newrelic-forks/node-fn-inspect/blob/v4.4.0/LICENSE):
5241
5241
 
5242
5242
  ```
5243
5243
  Copyright 2022 Contrast Security, Inc
@@ -12,7 +12,6 @@ const logger = require('./logger').child({ component: 'environment' })
12
12
  const stringify = require('json-stringify-safe')
13
13
  const asyncEachLimit = require('./util/async-each-limit')
14
14
  const DISPATCHER_VERSION = 'Dispatcher Version'
15
- const semver = require('semver')
16
15
 
17
16
  // As of 1.7.0 you can no longer dynamically link v8
18
17
  // https://github.com/nodejs/io.js/commit/d726a177ed
@@ -293,7 +292,7 @@ function remapConfigSettings() {
293
292
  }
294
293
  })
295
294
 
296
- maybeAddMissingProcessVars()
295
+ addMissingProcessVars()
297
296
  }
298
297
  }
299
298
 
@@ -301,11 +300,9 @@ function remapConfigSettings() {
301
300
  * As of Node 19 DTrace and ETW are no longer bundled
302
301
  * see: https://nodejs.org/en/blog/announcements/v19-release-announce#dtrace/systemtap/etw-support
303
302
  */
304
- function maybeAddMissingProcessVars() {
305
- if (semver.gte(process.version, '19.0.0')) {
306
- addSetting(remapping.node_use_dtrace, 'no')
307
- addSetting(remapping.node_use_etw, 'no')
308
- }
303
+ function addMissingProcessVars() {
304
+ addSetting(remapping.node_use_dtrace, 'no')
305
+ addSetting(remapping.node_use_etw, 'no')
309
306
  }
310
307
 
311
308
  async function getOtherPackages() {
@@ -16,10 +16,10 @@ const synthetics = require('../synthetics')
16
16
  const urltils = require('../util/urltils')
17
17
 
18
18
  const channels = [
19
- { channel: diagnosticsChannel.channel('undici:request:create'), hook: requestCreateHook },
20
- { channel: diagnosticsChannel.channel('undici:request:headers'), hook: requestHeadersHook },
21
- { channel: diagnosticsChannel.channel('undici:request:trailers'), hook: endAndRestoreSegment },
22
- { channel: diagnosticsChannel.channel('undici:request:error'), hook: endAndRestoreSegment }
19
+ { channel: 'undici:request:create', hook: requestCreateHook },
20
+ { channel: 'undici:request:headers', hook: requestHeadersHook },
21
+ { channel: 'undici:request:trailers', hook: endAndRestoreSegment },
22
+ { channel: 'undici:request:error', hook: endAndRestoreSegment }
23
23
  ]
24
24
 
25
25
  /**
@@ -32,18 +32,17 @@ const channels = [
32
32
  * @param shim
33
33
  */
34
34
  module.exports = function addUndiciChannels(agent, _undici, _modName, shim) {
35
- channels.forEach(({ channel, hook }) => {
36
- if (!channel.hasSubscribers) {
37
- channel.subscribe(hook.bind(null, shim))
38
- }
35
+ channels.forEach(({ channel, hook }, index) => {
36
+ const boundHook = hook.bind(null, shim)
37
+ diagnosticsChannel.subscribe(channel, boundHook)
38
+ // store the bound hook for unsubscription later
39
+ channels[index].boundHook = boundHook
39
40
  })
40
41
  }
41
42
 
42
43
  module.exports.unsubscribe = function unsubscribe() {
43
- channels.forEach(({ channel, hook }) => {
44
- if (channel.hasSubscribers) {
45
- channel.unsubscribe(hook)
46
- }
44
+ channels.forEach(({ channel, boundHook }) => {
45
+ diagnosticsChannel.unsubscribe(channel, boundHook)
47
46
  })
48
47
  }
49
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newrelic",
3
- "version": "12.25.0",
3
+ "version": "13.0.0",
4
4
  "author": "New Relic Node.js agent team <nodejs@newrelic.com>",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [
@@ -151,7 +151,7 @@
151
151
  ],
152
152
  "homepage": "https://github.com/newrelic/node-newrelic",
153
153
  "engines": {
154
- "node": ">=18",
154
+ "node": ">=20",
155
155
  "npm": ">=6.0.0"
156
156
  },
157
157
  "directories": {
@@ -224,7 +224,7 @@
224
224
  },
225
225
  "optionalDependencies": {
226
226
  "@newrelic/fn-inspect": "^4.4.0",
227
- "@newrelic/native-metrics": "^11.1.0",
227
+ "@newrelic/native-metrics": "^12.0.0",
228
228
  "@prisma/prisma-fmt-wasm": "^4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085"
229
229
  },
230
230
  "devDependencies": {
@@ -234,7 +234,7 @@
234
234
  "@matteo.collina/tspl": "^0.1.1",
235
235
  "@newrelic/eslint-config": "^0.5.0",
236
236
  "@newrelic/newrelic-oss-cli": "^0.1.2",
237
- "@newrelic/test-utilities": "^9.1.0",
237
+ "@newrelic/test-utilities": "^10.0.0",
238
238
  "@octokit/rest": "^18.0.15",
239
239
  "@slack/bolt": "^3.7.0",
240
240
  "@smithy/eventstream-codec": "^2.2.0",