newrelic 12.9.0 → 12.11.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 +68 -8
- package/THIRD_PARTY_NOTICES.md +771 -313
- package/api.js +45 -27
- package/bin/test-naming-rules.js +2 -3
- package/index.js +0 -4
- package/lib/agent.js +31 -17
- package/lib/aggregators/base-aggregator.js +2 -2
- package/lib/aggregators/trace-aggregator.js +1 -5
- package/lib/attributes.js +5 -5
- package/lib/collector/api.js +1 -3
- package/lib/collector/facts.js +2 -2
- package/lib/collector/http-agents.js +2 -2
- package/lib/collector/remote-method.js +4 -4
- package/lib/config/attribute-filter.js +1 -1
- package/lib/config/default.js +2 -2
- package/lib/config/harvest-config-validator.js +2 -2
- package/lib/config/index.js +9 -11
- package/lib/config/merge-server-config.js +1 -2
- package/lib/context-manager/async-local-context-manager.js +3 -7
- package/lib/context-manager/context.js +29 -0
- package/lib/custom-events/custom-event-aggregator.js +0 -1
- package/lib/db/query-parsers/elasticsearch.js +102 -0
- package/lib/db/query-parsers/mongodb.js +29 -0
- package/lib/db/query-parsers/sql.js +2 -0
- package/lib/db/query-sample.js +3 -3
- package/lib/db/query-trace-aggregator.js +4 -4
- package/lib/db/slow-query.js +3 -1
- package/lib/db/statement-matcher.js +3 -2
- package/lib/db/utils.js +4 -0
- package/lib/environment.js +2 -2
- package/lib/errors/error-collector.js +2 -2
- package/lib/errors/error-event-aggregator.js +1 -0
- package/lib/errors/helper.js +4 -4
- package/lib/errors/index.js +5 -6
- package/lib/grpc/connection.js +1 -1
- package/lib/header-attributes.js +21 -20
- package/lib/instrumentation/@elastic/elasticsearch.js +1 -96
- package/lib/instrumentation/@nestjs/core.js +1 -2
- package/lib/instrumentation/@opensearch-project/opensearch.js +66 -0
- package/lib/instrumentation/@prisma/client.js +4 -3
- package/lib/instrumentation/amqplib/utils.js +1 -1
- package/lib/instrumentation/aws-sdk/v3/bedrock.js +33 -15
- package/lib/instrumentation/aws-sdk/v3/common.js +4 -7
- package/lib/instrumentation/aws-sdk/v3/lambda.js +2 -3
- package/lib/instrumentation/bluebird.js +1 -0
- package/lib/instrumentation/connect.js +1 -1
- package/lib/instrumentation/core/globals.js +1 -3
- package/lib/instrumentation/core/http-outbound.js +42 -25
- package/lib/instrumentation/core/http.js +20 -8
- package/lib/instrumentation/core/net.js +14 -5
- package/lib/instrumentation/core/timers.js +0 -1
- package/lib/instrumentation/express.js +1 -1
- package/lib/instrumentation/grpc-js/grpc.js +7 -7
- package/lib/instrumentation/kafkajs/consumer.js +4 -5
- package/lib/instrumentation/koa/instrumentation.js +2 -4
- package/lib/instrumentation/langchain/runnable.js +28 -9
- package/lib/instrumentation/langchain/tools.js +4 -3
- package/lib/instrumentation/langchain/vectorstore.js +29 -6
- package/lib/instrumentation/mongodb/v4-mongo.js +1 -21
- package/lib/instrumentation/mysql/mysql.js +2 -2
- package/lib/instrumentation/nextjs/next-server.js +2 -4
- package/lib/instrumentation/nextjs/utils.js +0 -13
- package/lib/instrumentation/openai.js +27 -14
- package/lib/instrumentation/restify.js +3 -3
- package/lib/instrumentation/superagent.js +3 -3
- package/lib/instrumentation/undici.js +38 -27
- package/lib/instrumentation/when/contextualizer.js +21 -9
- package/lib/instrumentation/when/index.js +34 -20
- package/lib/instrumentations.js +27 -26
- package/lib/llm-events/aws-bedrock/bedrock-response.js +0 -2
- package/lib/llm-events/aws-bedrock/chat-completion-summary.js +1 -0
- package/lib/llm-events/aws-bedrock/embedding.js +1 -0
- package/lib/llm-events/aws-bedrock/event.js +5 -6
- package/lib/llm-events/aws-bedrock/stream-handler.js +6 -6
- package/lib/llm-events/event.js +1 -0
- package/lib/llm-events/langchain/chat-completion-summary.js +2 -2
- package/lib/llm-events/langchain/event.js +5 -5
- package/lib/llm-events/langchain/vector-search.js +2 -2
- package/lib/llm-events/openai/chat-completion-message.js +11 -2
- package/lib/llm-events/openai/chat-completion-summary.js +2 -2
- package/lib/llm-events/openai/embedding.js +2 -2
- package/lib/llm-events/openai/event.js +2 -2
- package/lib/logger.js +0 -2
- package/lib/metrics/index.js +0 -1
- package/lib/metrics/mapper.js +2 -2
- package/lib/metrics/names.js +1 -1
- package/lib/metrics/normalizer/rule.js +2 -1
- package/lib/metrics/normalizer/tx_segment.js +4 -2
- package/lib/metrics/normalizer.js +5 -5
- package/lib/metrics/recorders/custom.js +2 -3
- package/lib/metrics/recorders/database-operation.js +2 -7
- package/lib/metrics/recorders/database.js +9 -4
- package/lib/metrics/recorders/generic.js +2 -3
- package/lib/metrics/recorders/http.js +3 -4
- package/lib/metrics/recorders/http_external.js +2 -3
- package/lib/metrics/recorders/message-transaction.js +3 -4
- package/lib/metrics/recorders/middleware.js +2 -3
- package/lib/metrics/recorders/other.js +3 -4
- package/lib/otel/rules.js +241 -0
- package/lib/otel/rules.json +500 -0
- package/lib/otel/segment-synthesis.js +68 -0
- package/lib/otel/segments/consumer.js +50 -0
- package/lib/otel/segments/database.js +68 -0
- package/lib/otel/segments/http-external.js +20 -0
- package/lib/otel/segments/index.js +22 -0
- package/lib/otel/segments/internal.js +17 -0
- package/lib/otel/segments/producer.js +29 -0
- package/lib/otel/segments/server.js +85 -0
- package/lib/prioritized-attributes.js +3 -2
- package/lib/priority-queue.js +1 -1
- package/lib/reservoir.js +1 -1
- package/lib/sampler.js +5 -5
- package/lib/serverless/api-gateway.js +13 -79
- package/lib/serverless/aws-lambda.js +6 -1
- package/lib/shim/conglomerate-shim.js +5 -0
- package/lib/shim/datastore-shim.js +4 -4
- package/lib/shim/message-shim/consume.js +2 -1
- package/lib/shim/message-shim/index.js +1 -1
- package/lib/shim/message-shim/subscribe-consume.js +14 -15
- package/lib/shim/promise-shim.js +46 -19
- package/lib/shim/shim.js +199 -104
- package/lib/shim/transaction-shim.js +30 -25
- package/lib/shim/webframework-shim/index.js +1 -1
- package/lib/shim/webframework-shim/middleware.js +3 -3
- package/lib/shimmer.js +2 -3
- package/lib/spans/base-span-streamer.js +1 -1
- package/lib/spans/map-to-streaming-type.js +0 -3
- package/lib/spans/span-event-aggregator.js +9 -8
- package/lib/spans/span-event.js +14 -15
- package/lib/spans/span-streamer.js +0 -4
- package/lib/spans/streaming-span-event-aggregator.js +9 -8
- package/lib/spans/streaming-span-event.js +2 -3
- package/lib/system-info.js +1 -2
- package/lib/timer.js +0 -1
- package/lib/transaction/index.js +24 -31
- package/lib/transaction/name-state.js +6 -5
- package/lib/transaction/trace/exclusive-time-calculator.js +20 -26
- package/lib/transaction/trace/index.js +169 -58
- package/lib/transaction/trace/segment-tree.js +50 -0
- package/lib/transaction/trace/segment.js +31 -207
- package/lib/transaction/tracecontext.js +3 -3
- package/lib/transaction/tracer/index.js +124 -93
- package/lib/util/cat.js +10 -8
- package/lib/util/copy.js +1 -1
- package/lib/util/deep-equal.js +1 -1
- package/lib/util/hashes.js +2 -0
- package/lib/util/label-parser.js +1 -0
- package/lib/util/logger.js +2 -4
- package/lib/util/sql/obfuscate.js +7 -4
- package/lib/util/trace-stacks.js +25 -0
- package/lib/util/urltils.js +3 -3
- package/lib/utilization/aws-info.js +1 -0
- package/lib/utilization/azure-info.js +1 -0
- package/lib/utilization/docker-info.js +4 -4
- package/lib/utilization/index.js +1 -1
- package/package.json +10 -8
- package/stub_api.js +1 -2
- package/lib/context-manager/create-context-manager.js +0 -29
package/NEWS.md
CHANGED
|
@@ -1,24 +1,84 @@
|
|
|
1
|
-
### v12.
|
|
1
|
+
### v12.11.0 (2025-01-14)
|
|
2
2
|
|
|
3
3
|
#### Features
|
|
4
4
|
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Removed transaction from segment. Introduced a new `enterSegment` and `enterTransaction` to make context propagation more clear ([#2646](https://github.com/newrelic/node-newrelic/pull/2646)) ([d84531a](https://github.com/newrelic/node-newrelic/commit/d84531a9035387b997cb2b3c6bc7895e232f87e2))
|
|
6
|
+
* Removed children from segments. ([#2689](https://github.com/newrelic/node-newrelic/pull/2689)) ([66f140f](https://github.com/newrelic/node-newrelic/commit/66f140f36b0cf5ed1028a4cbda672bc603573ae7))
|
|
7
|
+
* Added segment tree to transaction trace ([#2717](https://github.com/newrelic/node-newrelic/pull/2717)) ([8fcc239](https://github.com/newrelic/node-newrelic/commit/8fcc239b37d7ece569de0bd19406e4d62904bcd3))
|
|
8
|
+
* Added segment synthesizer and provided ability to convert http client otel spans to external http trace segments ([#2745](https://github.com/newrelic/node-newrelic/pull/2745)) ([c42f8e6](https://github.com/newrelic/node-newrelic/commit/c42f8e646acaf50d5878a891f7b062ea46094091))
|
|
9
|
+
* Added otel consumer span processing ([#2854](https://github.com/newrelic/node-newrelic/pull/2854)) ([82fe9d5](https://github.com/newrelic/node-newrelic/commit/82fe9d5017d042234472c5d05c2c9c05d8a45091))
|
|
10
|
+
* Added segment and transaction synthesis for http server spans ([#2833](https://github.com/newrelic/node-newrelic/pull/2833)) ([8fa4d05](https://github.com/newrelic/node-newrelic/commit/8fa4d055b27a0494d7021bc3a284f4c4752a3cee))
|
|
11
|
+
* Added segment synthesis for db client otel spans to db trace ([#2820](https://github.com/newrelic/node-newrelic/pull/2820)) ([1ad1858](https://github.com/newrelic/node-newrelic/commit/1ad1858dcec71fa13065c2c80000055e206cb53a))
|
|
12
|
+
* Added segment synthesis for internal spans ([#2840](https://github.com/newrelic/node-newrelic/pull/2840)) ([436c63d](https://github.com/newrelic/node-newrelic/commit/436c63d0447bce6ddae77eaf032a4ddb65c7e07f))
|
|
13
|
+
* Added segment synthesis for otel producer spans ([#2839](https://github.com/newrelic/node-newrelic/pull/2839)) ([30f4995](https://github.com/newrelic/node-newrelic/commit/30f49955aa60fe4ef87c1bc82fe7faec3d756ccd))
|
|
14
|
+
|
|
15
|
+
#### Bug fixes
|
|
16
|
+
|
|
17
|
+
* Updated `shim.createSegment` and `shim.handleMqTracingHeaders` to be backwards compatible with the changes to context manager ([#2844](https://github.com/newrelic/node-newrelic/pull/2844)) ([554b4bf](https://github.com/newrelic/node-newrelic/commit/554b4bf0ae77dfa1e5a324f17622bc1c49b5f4f7))
|
|
18
|
+
|
|
19
|
+
#### Code refactoring
|
|
20
|
+
|
|
21
|
+
* Removed class construction on the segment synthesis and instrumentation ([#2837](https://github.com/newrelic/node-newrelic/pull/2837)) ([4b7ec0f](https://github.com/newrelic/node-newrelic/commit/4b7ec0f669cd936e86816bc24768727ba5067c88))
|
|
7
22
|
|
|
8
23
|
#### Documentation
|
|
9
24
|
|
|
10
|
-
* Updated compatibility report ([#
|
|
25
|
+
* Updated compatibility report ([#2869](https://github.com/newrelic/node-newrelic/pull/2869)) ([4bde427](https://github.com/newrelic/node-newrelic/commit/4bde427f67aa1e1699e7ab12c4f96e83f70850a6))
|
|
11
26
|
|
|
12
27
|
#### Miscellaneous chores
|
|
13
28
|
|
|
14
|
-
*
|
|
15
|
-
* Updated
|
|
29
|
+
* Added rules engine to match OTEL spans ([#2694](https://github.com/newrelic/node-newrelic/pull/2694)) ([2c93c68](https://github.com/newrelic/node-newrelic/commit/2c93c68b8563a07c450b8bd84d442c5ac18df3d8))
|
|
30
|
+
* Updated rules engine to account for fallbacks ([#2831](https://github.com/newrelic/node-newrelic/pull/2831)) ([19fbdfb](https://github.com/newrelic/node-newrelic/commit/19fbdfb4ec71fc5f6041d4ac8435d69a5f88ae9a))
|
|
31
|
+
* Updated versioned tests docs ([#2874](https://github.com/newrelic/node-newrelic/pull/2874)) ([73a84d7](https://github.com/newrelic/node-newrelic/commit/73a84d76be655a8cca88a47de177f1dfa4faa6e7))
|
|
16
32
|
|
|
17
33
|
#### Tests
|
|
18
34
|
|
|
19
|
-
*
|
|
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))
|
|
35
|
+
* Updated a langchain test to be less rigid on asserting the tracking metric by `@langchain/core` version ([#2876](https://github.com/newrelic/node-newrelic/pull/2876)) ([73985ea](https://github.com/newrelic/node-newrelic/commit/73985ea45634478133a0ac6437b16758cfd775b2))
|
|
21
36
|
|
|
37
|
+
### v12.10.0 (2025-01-09)
|
|
38
|
+
|
|
39
|
+
#### Features
|
|
40
|
+
|
|
41
|
+
* Added instrumentation for `@opensearch-projects/opensearch` v2.1.0+ ([#2850](https://github.com/newrelic/node-newrelic/pull/2850)) ([763c0e6](https://github.com/newrelic/node-newrelic/commit/763c0e6ad50f15677b5f535999f93f122c84b583))
|
|
42
|
+
|
|
43
|
+
#### Bug fixes
|
|
44
|
+
|
|
45
|
+
* Fixed event matcher to use properties specific to web requests (v1/ALB and v2) ([#2863](https://github.com/newrelic/node-newrelic/pull/2863)) ([a93fe6e](https://github.com/newrelic/node-newrelic/commit/a93fe6e68e5b8047cc7c3bca8b9f50a0a7ffddd6))
|
|
46
|
+
|
|
47
|
+
#### Miscellaneous chores
|
|
48
|
+
|
|
49
|
+
* Fixed mysql2 tests for new mysql2 version ([#2853](https://github.com/newrelic/node-newrelic/pull/2853)) ([30a6de0](https://github.com/newrelic/node-newrelic/commit/30a6de00d22b92332009d7127bf52fbd10310214))
|
|
50
|
+
* Updated eslint configuration ([#2851](https://github.com/newrelic/node-newrelic/pull/2851)) ([d2fba9d](https://github.com/newrelic/node-newrelic/commit/d2fba9da8b9ba28d94e50c24fa494a35c442f0a5))
|
|
51
|
+
* Utilize updated @newrelic/eslint-config ([#2865](https://github.com/newrelic/node-newrelic/pull/2865)) ([f53d4fc](https://github.com/newrelic/node-newrelic/commit/f53d4fc8d911a998759cae90a9cd0bf09ff17828))
|
|
52
|
+
|
|
53
|
+
#### Tests
|
|
54
|
+
|
|
55
|
+
* Removed `t.diagnostic` from tests ([#2858](https://github.com/newrelic/node-newrelic/pull/2858)) ([23ca237](https://github.com/newrelic/node-newrelic/commit/23ca237731d4fd94b13d03eab9feb645aabe36d0))
|
|
56
|
+
|
|
57
|
+
#### Continuous integration
|
|
58
|
+
|
|
59
|
+
* Updated codecov-action to latest released version sha ([#2866](https://github.com/newrelic/node-newrelic/pull/2866)) ([75f8902](https://github.com/newrelic/node-newrelic/commit/75f8902e2dd9e1946666db6b1cf8617a5360d757))
|
|
60
|
+
|
|
61
|
+
### v12.9.0 (2024-12-18)
|
|
62
|
+
|
|
63
|
+
#### Features
|
|
64
|
+
|
|
65
|
+
* 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))
|
|
66
|
+
* 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))
|
|
67
|
+
|
|
68
|
+
#### Documentation
|
|
69
|
+
|
|
70
|
+
* Updated compatibility report ([#2828](https://github.com/newrelic/node-newrelic/pull/2828)) ([d5fe8e3](https://github.com/newrelic/node-newrelic/commit/d5fe8e323c34464e8cc10be3f5c968a96357b6f6))
|
|
71
|
+
|
|
72
|
+
#### Miscellaneous chores
|
|
73
|
+
|
|
74
|
+
* **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))
|
|
75
|
+
* 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))
|
|
76
|
+
|
|
77
|
+
#### Tests
|
|
78
|
+
|
|
79
|
+
* 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))
|
|
80
|
+
* 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))
|
|
81
|
+
|
|
22
82
|
### v12.8.2 (2024-12-09)
|
|
23
83
|
|
|
24
84
|
#### Bug fixes
|