newrelic 14.1.2 → 14.2.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 +28 -0
- package/THIRD_PARTY_NOTICES.md +15 -15
- package/index.js +2 -2
- package/lib/collector/http-agents.js +5 -2
- package/lib/config/default.js +162 -139
- package/lib/config/index.js +22 -2
- package/lib/instrumentations.js +0 -1
- package/lib/profiling/index.js +2 -1
- package/lib/profiling/profilers/cpu.js +225 -3
- package/lib/subscriber-configs.js +1 -0
- package/lib/subscribers/base.js +14 -7
- package/lib/subscribers/db.js +11 -2
- package/lib/subscribers/mongodb/bulk.js +79 -0
- package/lib/subscribers/mongodb/collection.js +113 -0
- package/lib/subscribers/mongodb/config.js +72 -0
- package/lib/subscribers/mongodb/cursor.js +76 -0
- package/lib/subscribers/mongodb/db.js +101 -0
- package/lib/subscribers/mongodb/utils/admin-commands.js +19 -0
- package/lib/subscribers/mongodb/utils/get-host-details.js +85 -0
- package/lib/subscribers/mongodb/wrapper.js +109 -0
- package/lib/subscribers/resolve-package-version.js +42 -12
- package/lib/transaction/tracecontext.js +6 -19
- package/lib/transaction/tracer/index.js +16 -0
- package/package.json +4 -4
- package/lib/instrumentation/mongodb/common.js +0 -272
- package/lib/instrumentation/mongodb/constants.js +0 -87
- package/lib/instrumentation/mongodb/v4-mongo.js +0 -75
- package/lib/instrumentation/mongodb.js +0 -46
package/NEWS.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
### v14.2.0 (2026-07-07)
|
|
2
|
+
|
|
3
|
+
#### Features
|
|
4
|
+
|
|
5
|
+
* Added Node.js 26 support ([#4084](https://github.com/newrelic/node-newrelic/pull/4084)) ([4a7f777](https://github.com/newrelic/node-newrelic/commit/4a7f7775d8598656f84bd1590a80e56458feb185))
|
|
6
|
+
* 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))
|
|
7
|
+
* 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))
|
|
8
|
+
* 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))
|
|
9
|
+
* Removed `spanId` in outgoing `tracestate` header ([#4091](https://github.com/newrelic/node-newrelic/pull/4091)) ([40a8bf1](https://github.com/newrelic/node-newrelic/commit/40a8bf1682860d11f2bf46fbfdaae840b6f3fa18))
|
|
10
|
+
|
|
11
|
+
#### Code refactoring
|
|
12
|
+
|
|
13
|
+
* 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))
|
|
14
|
+
|
|
15
|
+
#### Documentation
|
|
16
|
+
|
|
17
|
+
* Updated compatibility report ([#4078](https://github.com/newrelic/node-newrelic/pull/4078)) ([047a063](https://github.com/newrelic/node-newrelic/commit/047a063dd9e21097d2995dbd7f14ee564b96efcd))
|
|
18
|
+
|
|
19
|
+
#### Miscellaneous chores
|
|
20
|
+
|
|
21
|
+
* Addressed long standing CI flakes ([#4093](https://github.com/newrelic/node-newrelic/pull/4093)) ([ae973a0](https://github.com/newrelic/node-newrelic/commit/ae973a0d7bfd7da54bd0fe5e68d79fa77b180cfe))
|
|
22
|
+
* 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))
|
|
23
|
+
|
|
24
|
+
#### Continuous integration
|
|
25
|
+
|
|
26
|
+
* 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))
|
|
27
|
+
* 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))
|
|
28
|
+
|
|
1
29
|
### v14.1.2 (2026-06-25)
|
|
2
30
|
|
|
3
31
|
#### Bug fixes
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
73
|
-
if (psemver.satisfies('>=
|
|
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
|
-
|
|
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,
|