newrelic 14.1.2 → 14.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 CHANGED
@@ -1,3 +1,54 @@
1
+ ### v14.2.1 (2026-07-09)
2
+
3
+ #### Bug fixes
4
+
5
+ * Updated `winston` instrumenting to assign `handleExceptions` to the first NrTransport to avoid registering duplicate `uncaughtException` handlers ([#4108](https://github.com/newrelic/node-newrelic/pull/4108)) ([d60a48d](https://github.com/newrelic/node-newrelic/commit/d60a48d3b9399d3a084c64cf53c3a62c7a4cab0b))
6
+ * This would create a linear memory leak because the `NrTransport` objects for loggers no longer in use, would not be freed because of the global `process.on('uncaughtException')` handler
7
+
8
+ #### Documentation
9
+
10
+ * Updated compatibility report ([#4099](https://github.com/newrelic/node-newrelic/pull/4099)) ([058fde6](https://github.com/newrelic/node-newrelic/commit/058fde6d64e3606b82875380ba51f9bc44a4b994))
11
+
12
+ #### Continuous integration
13
+
14
+ * Pinned CI npm to 11 so native versioned suites build on Node 22 ([#4114](https://github.com/newrelic/node-newrelic/pull/4114)) ([b844e94](https://github.com/newrelic/node-newrelic/commit/b844e94317e573410d96f8971308b2d1535570ca))
15
+ * Removed the 8 minute versioned shard timeout ([#4111](https://github.com/newrelic/node-newrelic/pull/4111)) ([0ef6374](https://github.com/newrelic/node-newrelic/commit/0ef63749b2739d7c7446a6b7c6d3ee80d2d360e5))
16
+ * Attempted to fix memcached CI issue again ([#4098](https://github.com/newrelic/node-newrelic/pull/4098)) ([f67fef5](https://github.com/newrelic/node-newrelic/commit/f67fef5febe71ffab853164aba06c76cd2c6c26d))
17
+ * Shard versioned tests across CI runners ([#4101](https://github.com/newrelic/node-newrelic/pull/4101)) ([1471734](https://github.com/newrelic/node-newrelic/commit/14717345d87ec46a4eba18c513e10e3caed40f7c))
18
+
19
+ #### Tests
20
+
21
+ * Added `samples` to prisma and next to cut down on versions under test on packages we recommend using hybrid ageninstrumentation ([#4112](https://github.com/newrelic/node-newrelic/pull/4112)) ([7d8bd7c](https://github.com/newrelic/node-newrelic/commit/7d8bd7cd2e3076d17ad25b75628956d1158fc23a))
22
+ * Resolved `grpc` `proto-loader` from the running suite's `node_modules` ([#4110](https://github.com/newrelic/node-newrelic/pull/4110)) ([5b5a9f8](https://github.com/newrelic/node-newrelic/commit/5b5a9f8d8e0f17557b9f202b0098e2ec84c9e028))
23
+
24
+ ### v14.2.0 (2026-07-07)
25
+
26
+ #### Features
27
+
28
+ * Added Node.js 26 support ([#4084](https://github.com/newrelic/node-newrelic/pull/4084)) ([4a7f777](https://github.com/newrelic/node-newrelic/commit/4a7f7775d8598656f84bd1590a80e56458feb185))
29
+ * Added `span_id` and `trace_id` labels to `CpuProfiler` sample data ([#4049](https://github.com/newrelic/node-newrelic/pull/4049)) ([c2b1737](https://github.com/newrelic/node-newrelic/commit/c2b1737ac87a26b7fce6d170597301cf97d26b22))
30
+ * Added new GCP Cloud Run hostname logic to include `K_REVISION` ([#4069](https://github.com/newrelic/node-newrelic/pull/4069)) ([02855dc](https://github.com/newrelic/node-newrelic/commit/02855dc82b636c655e9808b50897b4dc5c7b1bba))
31
+ * Added `profiling.source_mapping.enabled` config option ([#4090](https://github.com/newrelic/node-newrelic/pull/4090)) ([43add80](https://github.com/newrelic/node-newrelic/commit/43add80d07cccb1fd48190a60895d88cbde17b00))
32
+ * Removed `spanId` in outgoing `tracestate` header ([#4091](https://github.com/newrelic/node-newrelic/pull/4091)) ([40a8bf1](https://github.com/newrelic/node-newrelic/commit/40a8bf1682860d11f2bf46fbfdaae840b6f3fa18))
33
+
34
+ #### Code refactoring
35
+
36
+ * Refactored `mongodb` instrumentation to subscribe to events emitted ([#4059](https://github.com/newrelic/node-newrelic/pull/4059)) ([d2777ba](https://github.com/newrelic/node-newrelic/commit/d2777ba6b29ab30f1a158e993283029bf40cff86))
37
+
38
+ #### Documentation
39
+
40
+ * Updated compatibility report ([#4078](https://github.com/newrelic/node-newrelic/pull/4078)) ([047a063](https://github.com/newrelic/node-newrelic/commit/047a063dd9e21097d2995dbd7f14ee564b96efcd))
41
+
42
+ #### Miscellaneous chores
43
+
44
+ * Addressed long standing CI flakes ([#4093](https://github.com/newrelic/node-newrelic/pull/4093)) ([ae973a0](https://github.com/newrelic/node-newrelic/commit/ae973a0d7bfd7da54bd0fe5e68d79fa77b180cfe))
45
+ * Fixed package version resolution on Node 26 ([#4094](https://github.com/newrelic/node-newrelic/pull/4094)) ([73d14a9](https://github.com/newrelic/node-newrelic/commit/73d14a98c3bd678be499e14533e66f86b7b9996b))
46
+
47
+ #### Continuous integration
48
+
49
+ * Updated `release-creation` to use `lts/*` for node-version ([#4080](https://github.com/newrelic/node-newrelic/pull/4080)) ([7eaed22](https://github.com/newrelic/node-newrelic/commit/7eaed22f92af2da5db31232b60b5bf35f0ca3e02))
50
+ * Updated `setup-node` job to include `check-latest` to ensure we are getting the latest version of node ([#4079](https://github.com/newrelic/node-newrelic/pull/4079)) ([4a425f6](https://github.com/newrelic/node-newrelic/commit/4a425f692c8eacac1e4967e7517c34605f67ad82))
51
+
1
52
  ### v14.1.2 (2026-06-25)
2
53
 
3
54
  #### Bug fixes
@@ -1184,7 +1184,7 @@ This product includes source derived from [@opentelemetry/api](https://github.co
1184
1184
 
1185
1185
  ### @opentelemetry/core
1186
1186
 
1187
- This product includes source derived from [@opentelemetry/core](https://github.com/open-telemetry/opentelemetry-js) ([v2.8.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.8.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.8.0/LICENSE):
1187
+ This product includes source derived from [@opentelemetry/core](https://github.com/open-telemetry/opentelemetry-js) ([v2.9.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.9.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.9.0/LICENSE):
1188
1188
 
1189
1189
  ```
1190
1190
  Apache License
@@ -2020,7 +2020,7 @@ This product includes source derived from [@opentelemetry/otlp-transformer](http
2020
2020
 
2021
2021
  ### @opentelemetry/resources
2022
2022
 
2023
- This product includes source derived from [@opentelemetry/resources](https://github.com/open-telemetry/opentelemetry-js) ([v2.8.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.8.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.8.0/LICENSE):
2023
+ This product includes source derived from [@opentelemetry/resources](https://github.com/open-telemetry/opentelemetry-js) ([v2.9.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.9.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.9.0/LICENSE):
2024
2024
 
2025
2025
  ```
2026
2026
  Apache License
@@ -2438,7 +2438,7 @@ This product includes source derived from [@opentelemetry/sdk-logs](https://gith
2438
2438
 
2439
2439
  ### @opentelemetry/sdk-metrics
2440
2440
 
2441
- This product includes source derived from [@opentelemetry/sdk-metrics](https://github.com/open-telemetry/opentelemetry-js) ([v2.8.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.8.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.8.0/LICENSE):
2441
+ This product includes source derived from [@opentelemetry/sdk-metrics](https://github.com/open-telemetry/opentelemetry-js) ([v2.9.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.9.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.9.0/LICENSE):
2442
2442
 
2443
2443
  ```
2444
2444
  Apache License
@@ -2647,7 +2647,7 @@ This product includes source derived from [@opentelemetry/sdk-metrics](https://g
2647
2647
 
2648
2648
  ### @opentelemetry/sdk-trace-base
2649
2649
 
2650
- This product includes source derived from [@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js) ([v2.8.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.8.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.8.0/LICENSE):
2650
+ This product includes source derived from [@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js) ([v2.9.0](https://github.com/open-telemetry/opentelemetry-js/tree/v2.9.0)), distributed under the [Apache-2.0 License](https://github.com/open-telemetry/opentelemetry-js/blob/v2.9.0/LICENSE):
2651
2651
 
2652
2652
  ```
2653
2653
  Apache License
@@ -2945,7 +2945,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2945
2945
 
2946
2946
  ### import-in-the-middle
2947
2947
 
2948
- This product includes source derived from [import-in-the-middle](https://github.com/nodejs/import-in-the-middle) ([v3.1.0](https://github.com/nodejs/import-in-the-middle/tree/v3.1.0)), distributed under the [Apache-2.0 License](https://github.com/nodejs/import-in-the-middle/blob/v3.1.0/LICENSE):
2948
+ This product includes source derived from [import-in-the-middle](https://github.com/nodejs/import-in-the-middle) ([v3.2.0](https://github.com/nodejs/import-in-the-middle/tree/v3.2.0)), distributed under the [Apache-2.0 License](https://github.com/nodejs/import-in-the-middle/blob/v3.2.0/LICENSE):
2949
2949
 
2950
2950
  ```
2951
2951
  Apache License
@@ -3321,7 +3321,7 @@ SOFTWARE.
3321
3321
 
3322
3322
  ### @aws-sdk/client-s3
3323
3323
 
3324
- This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.1073.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.1073.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.1073.0/LICENSE):
3324
+ This product includes source derived from [@aws-sdk/client-s3](https://github.com/aws/aws-sdk-js-v3) ([v3.1079.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.1079.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.1079.0/LICENSE):
3325
3325
 
3326
3326
  ```
3327
3327
  Apache License
@@ -3530,7 +3530,7 @@ This product includes source derived from [@aws-sdk/client-s3](https://github.co
3530
3530
 
3531
3531
  ### @aws-sdk/s3-request-presigner
3532
3532
 
3533
- This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.1073.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.1073.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.1073.0/LICENSE):
3533
+ This product includes source derived from [@aws-sdk/s3-request-presigner](https://github.com/aws/aws-sdk-js-v3) ([v3.1079.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.1079.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.1079.0/LICENSE):
3534
3534
 
3535
3535
  ```
3536
3536
  Apache License
@@ -4454,7 +4454,7 @@ SOFTWARE.
4454
4454
 
4455
4455
  ### @smithy/eventstream-codec
4456
4456
 
4457
- This product includes source derived from [@smithy/eventstream-codec](https://github.com/smithy-lang/smithy-typescript) ([v4.4.1](https://github.com/smithy-lang/smithy-typescript/tree/v4.4.1)), distributed under the [Apache-2.0 License](https://github.com/smithy-lang/smithy-typescript/blob/v4.4.1/LICENSE):
4457
+ This product includes source derived from [@smithy/eventstream-codec](https://github.com/smithy-lang/smithy-typescript) ([v4.4.6](https://github.com/smithy-lang/smithy-typescript/tree/v4.4.6)), distributed under the [Apache-2.0 License](https://github.com/smithy-lang/smithy-typescript/blob/v4.4.6/LICENSE):
4458
4458
 
4459
4459
  ```
4460
4460
  Apache License
@@ -4663,7 +4663,7 @@ This product includes source derived from [@smithy/eventstream-codec](https://gi
4663
4663
 
4664
4664
  ### @smithy/util-utf8
4665
4665
 
4666
- This product includes source derived from [@smithy/util-utf8](https://github.com/smithy-lang/smithy-typescript) ([v4.4.1](https://github.com/smithy-lang/smithy-typescript/tree/v4.4.1)), distributed under the [Apache-2.0 License](https://github.com/smithy-lang/smithy-typescript/blob/v4.4.1/LICENSE):
4666
+ This product includes source derived from [@smithy/util-utf8](https://github.com/smithy-lang/smithy-typescript) ([v4.4.6](https://github.com/smithy-lang/smithy-typescript/tree/v4.4.6)), distributed under the [Apache-2.0 License](https://github.com/smithy-lang/smithy-typescript/blob/v4.4.6/LICENSE):
4667
4667
 
4668
4668
  ```
4669
4669
  Apache License
@@ -5215,7 +5215,7 @@ SOFTWARE.
5215
5215
 
5216
5216
  ### got
5217
5217
 
5218
- This product includes source derived from [got](https://github.com/sindresorhus/got) ([v15.0.5](https://github.com/sindresorhus/got/tree/v15.0.5)), distributed under the [MIT License](https://github.com/sindresorhus/got/blob/v15.0.5/license):
5218
+ This product includes source derived from [got](https://github.com/sindresorhus/got) ([v15.1.0](https://github.com/sindresorhus/got/tree/v15.1.0)), distributed under the [MIT License](https://github.com/sindresorhus/got/blob/v15.1.0/license):
5219
5219
 
5220
5220
  ```
5221
5221
  MIT License
@@ -5586,7 +5586,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
5586
5586
 
5587
5587
  ### nock
5588
5588
 
5589
- This product includes source derived from [nock](https://github.com/nock/nock) ([v14.0.15](https://github.com/nock/nock/tree/v14.0.15)), distributed under the [MIT License](https://github.com/nock/nock/blob/v14.0.15/LICENSE):
5589
+ This product includes source derived from [nock](https://github.com/nock/nock) ([v14.0.16](https://github.com/nock/nock/tree/v14.0.16)), distributed under the [MIT License](https://github.com/nock/nock/blob/v14.0.16/LICENSE):
5590
5590
 
5591
5591
  ```
5592
5592
  MIT License
@@ -5615,7 +5615,7 @@ SOFTWARE.
5615
5615
 
5616
5616
  ### protobufjs
5617
5617
 
5618
- This product includes source derived from [protobufjs](https://github.com/protobufjs/protobuf.js) ([v8.6.4](https://github.com/protobufjs/protobuf.js/tree/v8.6.4)), distributed under the [BSD-3-Clause License](https://github.com/protobufjs/protobuf.js/blob/v8.6.4/LICENSE):
5618
+ This product includes source derived from [protobufjs](https://github.com/protobufjs/protobuf.js) ([v8.6.5](https://github.com/protobufjs/protobuf.js/tree/v8.6.5)), distributed under the [BSD-3-Clause License](https://github.com/protobufjs/protobuf.js/blob/v8.6.5/LICENSE):
5619
5619
 
5620
5620
  ```
5621
5621
  This license applies to all parts of protobuf.js except those files
@@ -5792,7 +5792,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5792
5792
 
5793
5793
  ### @datadog/pprof
5794
5794
 
5795
- This product includes source derived from [@datadog/pprof](https://github.com/DataDog/pprof-nodejs) ([v5.15.0](https://github.com/DataDog/pprof-nodejs/tree/v5.15.0)), distributed under the [Apache-2.0 License](https://github.com/DataDog/pprof-nodejs/blob/v5.15.0/LICENSE):
5795
+ This product includes source derived from [@datadog/pprof](https://github.com/DataDog/pprof-nodejs) ([v5.16.0](https://github.com/DataDog/pprof-nodejs/tree/v5.16.0)), distributed under the [Apache-2.0 License](https://github.com/DataDog/pprof-nodejs/blob/v5.16.0/LICENSE):
5796
5796
 
5797
5797
  ```
5798
5798
 
@@ -6002,7 +6002,7 @@ This product includes source derived from [@datadog/pprof](https://github.com/Da
6002
6002
 
6003
6003
  ### @newrelic/fn-inspect
6004
6004
 
6005
- This product includes source derived from [@newrelic/fn-inspect](https://github.com/newrelic-forks/node-fn-inspect) ([v5.0.0](https://github.com/newrelic-forks/node-fn-inspect/tree/v5.0.0)), distributed under the [MIT License](https://github.com/newrelic-forks/node-fn-inspect/blob/v5.0.0/LICENSE):
6005
+ This product includes source derived from [@newrelic/fn-inspect](https://github.com/newrelic-forks/node-fn-inspect) ([v5.1.0](https://github.com/newrelic-forks/node-fn-inspect/tree/v5.1.0)), distributed under the [MIT License](https://github.com/newrelic-forks/node-fn-inspect/blob/v5.1.0/LICENSE):
6006
6006
 
6007
6007
  ```
6008
6008
  Copyright 2022 Contrast Security, Inc
@@ -6028,7 +6028,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6028
6028
 
6029
6029
  ### @newrelic/native-metrics
6030
6030
 
6031
- This product includes source derived from [@newrelic/native-metrics](https://github.com/newrelic/node-native-metrics) ([v13.0.0](https://github.com/newrelic/node-native-metrics/tree/v13.0.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-native-metrics/blob/v13.0.0/LICENSE):
6031
+ This product includes source derived from [@newrelic/native-metrics](https://github.com/newrelic/node-native-metrics) ([v13.1.0](https://github.com/newrelic/node-native-metrics/tree/v13.1.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-native-metrics/blob/v13.1.0/LICENSE):
6032
6032
 
6033
6033
  ```
6034
6034
  Apache License
package/index.js CHANGED
@@ -69,8 +69,8 @@ function initialize() {
69
69
  throw new Error(message)
70
70
  }
71
71
 
72
- // TODO: Update this check when Node v26 support is added
73
- if (psemver.satisfies('>=25.0.0')) {
72
+ // TODO: Update this check when Node v27 support is added
73
+ if (psemver.satisfies('>=27.0.0')) {
74
74
  logger.warn(
75
75
  'New Relic for Node.js %s has not been tested on Node.js %s. Please ' +
76
76
  'update the agent or downgrade your version of Node.js',
@@ -5,8 +5,9 @@
5
5
 
6
6
  'use strict'
7
7
 
8
+ const https = require('node:https')
9
+ const net = require('node:net')
8
10
  const logger = require('../logger').child({ component: 'http-agent' })
9
- const https = require('https')
10
11
 
11
12
  // poor person's single-instance-objects. We
12
13
  // only ever instantiate one of each HTTP-agent
@@ -57,7 +58,9 @@ exports.proxyAgent = function proxyAgent(config) {
57
58
  const proxyUrl = buildProxyUrl(config)
58
59
 
59
60
  // Tests may supply 127.0.0.1 as the host, but SNI requires a hostname.
60
- const servername = config.host
61
+ // This is especially true with Node.js >=26, where the requirement has
62
+ // been strictly enforced.
63
+ const servername = net.isIP(config.host) ? 'localhost' : config.host
61
64
  const proxyOpts = {
62
65
  secureEndpoint: config.ssl,
63
66
  auth: proxyUrl.auth,