From 17a0bc1da3baa472ba9b867eee3c60730cc130fb Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 3 Apr 2024 12:35:18 -0400 Subject: [PATCH 01/14] chore: release main (#2007) * chore: release main * chore: release main * chore: sync package-lock.json --------- Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- .../CHANGELOG.md | 9 + .../package.json | 4 +- .../CHANGELOG.md | 9 + .../package.json | 4 +- .../CHANGELOG.md | 9 + .../package.json | 4 +- .../CHANGELOG.md | 9 + .../package.json | 4 +- .../CHANGELOG.md | 9 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../auto-instrumentations-node/CHANGELOG.md | 52 +++ .../auto-instrumentations-node/package.json | 80 ++-- .../auto-instrumentations-web/CHANGELOG.md | 15 + .../auto-instrumentations-web/package.json | 6 +- package-lock.json | 376 +++++++++--------- .../CHANGELOG.md | 9 + .../package.json | 4 +- .../opentelemetry-test-utils/CHANGELOG.md | 7 + .../opentelemetry-test-utils/package.json | 2 +- packages/winston-transport/CHANGELOG.md | 9 + packages/winston-transport/package.json | 2 +- .../node/instrumentation-amqplib/CHANGELOG.md | 14 + .../node/instrumentation-amqplib/package.json | 4 +- .../instrumentation-cucumber/CHANGELOG.md | 7 + .../instrumentation-cucumber/package.json | 2 +- .../instrumentation-dataloader/CHANGELOG.md | 7 + .../instrumentation-dataloader/package.json | 2 +- plugins/node/instrumentation-fs/CHANGELOG.md | 7 + plugins/node/instrumentation-fs/package.json | 2 +- .../instrumentation-lru-memoizer/CHANGELOG.md | 14 + .../instrumentation-lru-memoizer/package.json | 4 +- .../instrumentation-mongoose/CHANGELOG.md | 14 + .../instrumentation-mongoose/package.json | 4 +- .../instrumentation-runtime-node/CHANGELOG.md | 12 + .../instrumentation-runtime-node/package.json | 2 +- .../instrumentation-socket.io/CHANGELOG.md | 14 + .../instrumentation-socket.io/package.json | 4 +- .../node/instrumentation-tedious/CHANGELOG.md | 14 + .../node/instrumentation-tedious/package.json | 4 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 16 + .../package.json | 6 +- .../CHANGELOG.md | 8 + .../package.json | 2 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 15 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 19 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 19 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 14 + .../package.json | 4 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 15 + .../package.json | 4 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- 102 files changed, 892 insertions(+), 308 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5dc8b7e1bb..a58a58e654 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.28.7","detectors/node/opentelemetry-resource-detector-aws":"1.4.0","detectors/node/opentelemetry-resource-detector-azure":"0.2.5","detectors/node/opentelemetry-resource-detector-container":"0.3.7","detectors/node/opentelemetry-resource-detector-gcp":"0.29.7","detectors/node/opentelemetry-resource-detector-github":"0.28.1","detectors/node/opentelemetry-resource-detector-instana":"0.7.0","metapackages/auto-instrumentations-node":"0.43.0","metapackages/auto-instrumentations-web":"0.37.0","packages/opentelemetry-host-metrics":"0.35.0","packages/opentelemetry-id-generator-aws-xray":"1.2.1","packages/opentelemetry-propagation-utils":"0.30.7","packages/opentelemetry-redis-common":"0.36.1","packages/opentelemetry-sql-common":"0.40.0","packages/opentelemetry-test-utils":"0.37.0","packages/winston-transport": "0.1.0","plugins/node/instrumentation-amqplib":"0.35.0","plugins/node/instrumentation-cucumber":"0.4.0","plugins/node/instrumentation-dataloader":"0.7.0","plugins/node/instrumentation-fs":"0.10.0","plugins/node/instrumentation-lru-memoizer":"0.35.0","plugins/node/instrumentation-mongoose":"0.36.0","plugins/node/instrumentation-runtime-node":"0.2.1","plugins/node/instrumentation-socket.io":"0.37.0","plugins/node/instrumentation-tedious":"0.8.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.39.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.39.1","plugins/node/opentelemetry-instrumentation-bunyan":"0.36.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.36.0","plugins/node/opentelemetry-instrumentation-connect":"0.34.0","plugins/node/opentelemetry-instrumentation-dns":"0.34.0","plugins/node/opentelemetry-instrumentation-express":"0.36.1","plugins/node/opentelemetry-instrumentation-fastify":"0.34.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.34.0","plugins/node/opentelemetry-instrumentation-graphql":"0.38.1","plugins/node/opentelemetry-instrumentation-hapi":"0.35.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.38.0","plugins/node/opentelemetry-instrumentation-knex":"0.34.0","plugins/node/opentelemetry-instrumentation-koa":"0.38.0","plugins/node/opentelemetry-instrumentation-memcached":"0.34.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.41.0","plugins/node/opentelemetry-instrumentation-mysql":"0.36.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.36.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.35.0","plugins/node/opentelemetry-instrumentation-net":"0.34.0","plugins/node/opentelemetry-instrumentation-pg":"0.39.1","plugins/node/opentelemetry-instrumentation-pino":"0.36.0","plugins/node/opentelemetry-instrumentation-redis":"0.37.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.37.0","plugins/node/opentelemetry-instrumentation-restify":"0.36.0","plugins/node/opentelemetry-instrumentation-router":"0.35.0","plugins/node/opentelemetry-instrumentation-winston":"0.35.0","plugins/web/opentelemetry-instrumentation-document-load":"0.36.0","plugins/web/opentelemetry-instrumentation-long-task":"0.36.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.36.0","plugins/web/opentelemetry-plugin-react-load":"0.30.0","propagators/opentelemetry-propagator-aws-xray":"1.3.1","propagators/opentelemetry-propagator-grpc-census-binary":"0.27.1","propagators/opentelemetry-propagator-instana":"0.3.1","propagators/opentelemetry-propagator-ot-trace":"0.27.1"} +{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.28.8","detectors/node/opentelemetry-resource-detector-aws":"1.4.1","detectors/node/opentelemetry-resource-detector-azure":"0.2.6","detectors/node/opentelemetry-resource-detector-container":"0.3.8","detectors/node/opentelemetry-resource-detector-gcp":"0.29.8","detectors/node/opentelemetry-resource-detector-github":"0.28.1","detectors/node/opentelemetry-resource-detector-instana":"0.8.0","metapackages/auto-instrumentations-node":"0.44.0","metapackages/auto-instrumentations-web":"0.38.0","packages/opentelemetry-host-metrics":"0.35.0","packages/opentelemetry-id-generator-aws-xray":"1.2.1","packages/opentelemetry-propagation-utils":"0.30.8","packages/opentelemetry-redis-common":"0.36.1","packages/opentelemetry-sql-common":"0.40.0","packages/opentelemetry-test-utils":"0.38.0","packages/winston-transport":"0.2.0","plugins/node/instrumentation-amqplib":"0.36.0","plugins/node/instrumentation-cucumber":"0.5.0","plugins/node/instrumentation-dataloader":"0.8.0","plugins/node/instrumentation-fs":"0.11.0","plugins/node/instrumentation-lru-memoizer":"0.36.0","plugins/node/instrumentation-mongoose":"0.37.0","plugins/node/instrumentation-runtime-node":"0.3.0","plugins/node/instrumentation-socket.io":"0.38.0","plugins/node/instrumentation-tedious":"0.9.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.40.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.40.0","plugins/node/opentelemetry-instrumentation-bunyan":"0.37.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.37.0","plugins/node/opentelemetry-instrumentation-connect":"0.35.0","plugins/node/opentelemetry-instrumentation-dns":"0.35.0","plugins/node/opentelemetry-instrumentation-express":"0.37.0","plugins/node/opentelemetry-instrumentation-fastify":"0.35.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.35.0","plugins/node/opentelemetry-instrumentation-graphql":"0.39.0","plugins/node/opentelemetry-instrumentation-hapi":"0.36.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.39.0","plugins/node/opentelemetry-instrumentation-knex":"0.35.0","plugins/node/opentelemetry-instrumentation-koa":"0.39.0","plugins/node/opentelemetry-instrumentation-memcached":"0.35.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.42.0","plugins/node/opentelemetry-instrumentation-mysql":"0.37.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.37.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.36.0","plugins/node/opentelemetry-instrumentation-net":"0.35.0","plugins/node/opentelemetry-instrumentation-pg":"0.40.0","plugins/node/opentelemetry-instrumentation-pino":"0.37.0","plugins/node/opentelemetry-instrumentation-redis":"0.38.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.38.0","plugins/node/opentelemetry-instrumentation-restify":"0.37.0","plugins/node/opentelemetry-instrumentation-router":"0.36.0","plugins/node/opentelemetry-instrumentation-winston":"0.36.0","plugins/web/opentelemetry-instrumentation-document-load":"0.37.0","plugins/web/opentelemetry-instrumentation-long-task":"0.37.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.37.0","plugins/web/opentelemetry-plugin-react-load":"0.30.0","propagators/opentelemetry-propagator-aws-xray":"1.3.1","propagators/opentelemetry-propagator-grpc-census-binary":"0.27.1","propagators/opentelemetry-propagator-instana":"0.3.1","propagators/opentelemetry-propagator-ot-trace":"0.27.1"} diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md index 99376f45be..7036542f0d 100644 --- a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md @@ -72,6 +72,15 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.28.8](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.7...resource-detector-alibaba-cloud-v0.28.8) (2024-04-03) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.28.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.0...resource-detector-alibaba-cloud-v0.28.1) (2023-08-14) diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json index 5009697401..6463fc2337 100644 --- a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json +++ b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resource-detector-alibaba-cloud", - "version": "0.28.7", + "version": "0.28.8", "description": "OpenTelemetry resource detector for Alibaba Cloud", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -40,7 +40,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", diff --git a/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md index 90e952f512..18ac8f2c17 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md @@ -66,6 +66,15 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.35.1 to ^0.36.0 +## [1.4.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-aws-v1.4.0...resource-detector-aws-v1.4.1) (2024-04-03) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [1.4.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-aws-v1.3.6...resource-detector-aws-v1.4.0) (2024-03-06) diff --git a/detectors/node/opentelemetry-resource-detector-aws/package.json b/detectors/node/opentelemetry-resource-detector-aws/package.json index f15b8b5af3..6b611bc099 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/package.json +++ b/detectors/node/opentelemetry-resource-detector-aws/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resource-detector-aws", - "version": "1.4.0", + "version": "1.4.1", "description": "OpenTelemetry SDK resource detector for AWS", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -39,7 +39,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", diff --git a/detectors/node/opentelemetry-resource-detector-azure/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-azure/CHANGELOG.md index c1d19d3b47..b8196ebfbf 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-azure/CHANGELOG.md @@ -12,6 +12,15 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.2.6](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-azure-v0.2.5...resource-detector-azure-v0.2.6) (2024-04-03) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.2.3](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-azure-v0.2.2...resource-detector-azure-v0.2.3) (2024-01-04) diff --git a/detectors/node/opentelemetry-resource-detector-azure/package.json b/detectors/node/opentelemetry-resource-detector-azure/package.json index 32468b8a2c..6e1f51ae42 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/package.json +++ b/detectors/node/opentelemetry-resource-detector-azure/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resource-detector-azure", - "version": "0.2.5", + "version": "0.2.6", "description": "OpenTelemetry SDK resource detector for Azure", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -32,7 +32,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", diff --git a/detectors/node/opentelemetry-resource-detector-container/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-container/CHANGELOG.md index 3f82a14038..182be674b8 100644 --- a/detectors/node/opentelemetry-resource-detector-container/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-container/CHANGELOG.md @@ -60,6 +60,15 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.3.8](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-container-v0.3.7...resource-detector-container-v0.3.8) (2024-04-03) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.3.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-container-v0.3.1...resource-detector-container-v0.3.2) (2023-10-10) diff --git a/detectors/node/opentelemetry-resource-detector-container/package.json b/detectors/node/opentelemetry-resource-detector-container/package.json index 5a90550394..a6fa4c9c85 100644 --- a/detectors/node/opentelemetry-resource-detector-container/package.json +++ b/detectors/node/opentelemetry-resource-detector-container/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resource-detector-container", - "version": "0.3.7", + "version": "0.3.8", "description": "Opentelemetry resource detector to get container resource attributes", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -34,7 +34,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", diff --git a/detectors/node/opentelemetry-resource-detector-gcp/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-gcp/CHANGELOG.md index 8febd065ce..56b1be8e1c 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-gcp/CHANGELOG.md @@ -60,6 +60,15 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.29.8](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-gcp-v0.29.7...resource-detector-gcp-v0.29.8) (2024-04-03) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.29.3](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-gcp-v0.29.2...resource-detector-gcp-v0.29.3) (2023-11-13) diff --git a/detectors/node/opentelemetry-resource-detector-gcp/package.json b/detectors/node/opentelemetry-resource-detector-gcp/package.json index 1a928aec8d..6a3df59b58 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/package.json +++ b/detectors/node/opentelemetry-resource-detector-gcp/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resource-detector-gcp", - "version": "0.29.7", + "version": "0.29.8", "description": "OpenTelemetry SDK resource detector for GCP", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -39,7 +39,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", diff --git a/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md index a0c837a9bf..c0bcedff8a 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.8.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-instana-v0.7.0...resource-detector-instana-v0.8.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.7.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-instana-v0.6.0...resource-detector-instana-v0.7.0) (2024-03-06) diff --git a/detectors/node/opentelemetry-resource-detector-instana/package.json b/detectors/node/opentelemetry-resource-detector-instana/package.json index ba47abdbf1..dd4e3391c7 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/package.json +++ b/detectors/node/opentelemetry-resource-detector-instana/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resource-detector-instana", - "version": "0.7.0", + "version": "0.8.0", "description": "OpenTelemetry SDK resource detector for Instana", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -38,7 +38,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-node": "^0.50.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", diff --git a/metapackages/auto-instrumentations-node/CHANGELOG.md b/metapackages/auto-instrumentations-node/CHANGELOG.md index 31d53c91f1..b69ff3972e 100644 --- a/metapackages/auto-instrumentations-node/CHANGELOG.md +++ b/metapackages/auto-instrumentations-node/CHANGELOG.md @@ -152,6 +152,58 @@ * dependencies * @opentelemetry/instrumentation-aws-sdk bumped from ^0.38.0 to ^0.38.1 +## [0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-node-v0.43.0...auto-instrumentations-node-v0.44.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/instrumentation-amqplib bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-aws-lambda bumped from ^0.39.0 to ^0.40.0 + * @opentelemetry/instrumentation-aws-sdk bumped from ^0.39.1 to ^0.40.0 + * @opentelemetry/instrumentation-bunyan bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-cassandra-driver bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-connect bumped from ^0.34.0 to ^0.35.0 + * @opentelemetry/instrumentation-cucumber bumped from ^0.4.0 to ^0.5.0 + * @opentelemetry/instrumentation-dataloader bumped from ^0.7.0 to ^0.8.0 + * @opentelemetry/instrumentation-dns bumped from ^0.34.0 to ^0.35.0 + * @opentelemetry/instrumentation-express bumped from ^0.36.1 to ^0.37.0 + * @opentelemetry/instrumentation-fastify bumped from ^0.34.0 to ^0.35.0 + * @opentelemetry/instrumentation-fs bumped from ^0.10.0 to ^0.11.0 + * @opentelemetry/instrumentation-generic-pool bumped from ^0.34.0 to ^0.35.0 + * @opentelemetry/instrumentation-graphql bumped from ^0.38.1 to ^0.39.0 + * @opentelemetry/instrumentation-hapi bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-ioredis bumped from ^0.38.0 to ^0.39.0 + * @opentelemetry/instrumentation-knex bumped from ^0.34.0 to ^0.35.0 + * @opentelemetry/instrumentation-koa bumped from ^0.38.0 to ^0.39.0 + * @opentelemetry/instrumentation-lru-memoizer bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-memcached bumped from ^0.34.0 to ^0.35.0 + * @opentelemetry/instrumentation-mongodb bumped from ^0.41.0 to ^0.42.0 + * @opentelemetry/instrumentation-mongoose bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-mysql bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-mysql2 bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-nestjs-core bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-net bumped from ^0.34.0 to ^0.35.0 + * @opentelemetry/instrumentation-pg bumped from ^0.39.1 to ^0.40.0 + * @opentelemetry/instrumentation-pino bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-redis bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-redis-4 bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-restify bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-router bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-socket.io bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-tedious bumped from ^0.8.0 to ^0.9.0 + * @opentelemetry/instrumentation-winston bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/resource-detector-alibaba-cloud bumped from ^0.28.7 to ^0.28.8 + * @opentelemetry/resource-detector-aws bumped from ^1.4.0 to ^1.4.1 + * @opentelemetry/resource-detector-container bumped from ^0.3.7 to ^0.3.8 + * @opentelemetry/resource-detector-gcp bumped from ^0.29.7 to ^0.29.8 + ## [0.43.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-node-v0.42.0...auto-instrumentations-node-v0.43.0) (2024-03-11) diff --git a/metapackages/auto-instrumentations-node/package.json b/metapackages/auto-instrumentations-node/package.json index 2af86896f5..e8c3bbe6b8 100644 --- a/metapackages/auto-instrumentations-node/package.json +++ b/metapackages/auto-instrumentations-node/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/auto-instrumentations-node", - "version": "0.43.0", + "version": "0.44.0", "description": "Metapackage which bundles opentelemetry node core and contrib instrumentations", "author": "OpenTelemetry Authors", "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/metapackages/auto-instrumentations-node#readme", @@ -50,47 +50,47 @@ }, "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-amqplib": "^0.35.0", - "@opentelemetry/instrumentation-aws-lambda": "^0.39.0", - "@opentelemetry/instrumentation-aws-sdk": "^0.39.1", - "@opentelemetry/instrumentation-bunyan": "^0.36.0", - "@opentelemetry/instrumentation-cassandra-driver": "^0.36.0", - "@opentelemetry/instrumentation-connect": "^0.34.0", - "@opentelemetry/instrumentation-cucumber": "^0.4.0", - "@opentelemetry/instrumentation-dataloader": "^0.7.0", - "@opentelemetry/instrumentation-dns": "^0.34.0", - "@opentelemetry/instrumentation-express": "^0.36.1", - "@opentelemetry/instrumentation-fastify": "^0.34.0", - "@opentelemetry/instrumentation-fs": "^0.10.0", - "@opentelemetry/instrumentation-generic-pool": "^0.34.0", - "@opentelemetry/instrumentation-graphql": "^0.38.1", + "@opentelemetry/instrumentation-amqplib": "^0.36.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.40.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.40.0", + "@opentelemetry/instrumentation-bunyan": "^0.37.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.37.0", + "@opentelemetry/instrumentation-connect": "^0.35.0", + "@opentelemetry/instrumentation-cucumber": "^0.5.0", + "@opentelemetry/instrumentation-dataloader": "^0.8.0", + "@opentelemetry/instrumentation-dns": "^0.35.0", + "@opentelemetry/instrumentation-express": "^0.37.0", + "@opentelemetry/instrumentation-fastify": "^0.35.0", + "@opentelemetry/instrumentation-fs": "^0.11.0", + "@opentelemetry/instrumentation-generic-pool": "^0.35.0", + "@opentelemetry/instrumentation-graphql": "^0.39.0", "@opentelemetry/instrumentation-grpc": "^0.50.0", - "@opentelemetry/instrumentation-hapi": "^0.35.0", + "@opentelemetry/instrumentation-hapi": "^0.36.0", "@opentelemetry/instrumentation-http": "^0.50.0", - "@opentelemetry/instrumentation-ioredis": "^0.38.0", - "@opentelemetry/instrumentation-knex": "^0.34.0", - "@opentelemetry/instrumentation-koa": "^0.38.0", - "@opentelemetry/instrumentation-lru-memoizer": "^0.35.0", - "@opentelemetry/instrumentation-memcached": "^0.34.0", - "@opentelemetry/instrumentation-mongodb": "^0.41.0", - "@opentelemetry/instrumentation-mongoose": "^0.36.0", - "@opentelemetry/instrumentation-mysql": "^0.36.0", - "@opentelemetry/instrumentation-mysql2": "^0.36.0", - "@opentelemetry/instrumentation-nestjs-core": "^0.35.0", - "@opentelemetry/instrumentation-net": "^0.34.0", - "@opentelemetry/instrumentation-pg": "^0.39.1", - "@opentelemetry/instrumentation-pino": "^0.36.0", - "@opentelemetry/instrumentation-redis": "^0.37.0", - "@opentelemetry/instrumentation-redis-4": "^0.37.0", - "@opentelemetry/instrumentation-restify": "^0.36.0", - "@opentelemetry/instrumentation-router": "^0.35.0", - "@opentelemetry/instrumentation-socket.io": "^0.37.0", - "@opentelemetry/instrumentation-tedious": "^0.8.0", - "@opentelemetry/instrumentation-winston": "^0.35.0", - "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.7", - "@opentelemetry/resource-detector-aws": "^1.4.0", - "@opentelemetry/resource-detector-container": "^0.3.7", - "@opentelemetry/resource-detector-gcp": "^0.29.7", + "@opentelemetry/instrumentation-ioredis": "^0.39.0", + "@opentelemetry/instrumentation-knex": "^0.35.0", + "@opentelemetry/instrumentation-koa": "^0.39.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.36.0", + "@opentelemetry/instrumentation-memcached": "^0.35.0", + "@opentelemetry/instrumentation-mongodb": "^0.42.0", + "@opentelemetry/instrumentation-mongoose": "^0.37.0", + "@opentelemetry/instrumentation-mysql": "^0.37.0", + "@opentelemetry/instrumentation-mysql2": "^0.37.0", + "@opentelemetry/instrumentation-nestjs-core": "^0.36.0", + "@opentelemetry/instrumentation-net": "^0.35.0", + "@opentelemetry/instrumentation-pg": "^0.40.0", + "@opentelemetry/instrumentation-pino": "^0.37.0", + "@opentelemetry/instrumentation-redis": "^0.38.0", + "@opentelemetry/instrumentation-redis-4": "^0.38.0", + "@opentelemetry/instrumentation-restify": "^0.37.0", + "@opentelemetry/instrumentation-router": "^0.36.0", + "@opentelemetry/instrumentation-socket.io": "^0.38.0", + "@opentelemetry/instrumentation-tedious": "^0.9.0", + "@opentelemetry/instrumentation-winston": "^0.36.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.8", + "@opentelemetry/resource-detector-aws": "^1.4.1", + "@opentelemetry/resource-detector-container": "^0.3.8", + "@opentelemetry/resource-detector-gcp": "^0.29.8", "@opentelemetry/resources": "^1.12.0", "@opentelemetry/sdk-node": "^0.50.0" }, diff --git a/metapackages/auto-instrumentations-web/CHANGELOG.md b/metapackages/auto-instrumentations-web/CHANGELOG.md index bbe2d6390a..145883734e 100644 --- a/metapackages/auto-instrumentations-web/CHANGELOG.md +++ b/metapackages/auto-instrumentations-web/CHANGELOG.md @@ -12,6 +12,21 @@ * dependencies * @opentelemetry/instrumentation-document-load bumped from ^0.31.1 to ^0.31.2 +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-web-v0.37.0...auto-instrumentations-web-v0.38.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/instrumentation-document-load bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-user-interaction bumped from ^0.36.0 to ^0.37.0 + ## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-web-v0.36.0...auto-instrumentations-web-v0.37.0) (2024-03-06) diff --git a/metapackages/auto-instrumentations-web/package.json b/metapackages/auto-instrumentations-web/package.json index bc378454e8..61e875742f 100644 --- a/metapackages/auto-instrumentations-web/package.json +++ b/metapackages/auto-instrumentations-web/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/auto-instrumentations-web", - "version": "0.37.0", + "version": "0.38.0", "description": "Metapackage which bundles opentelemetry node core and contrib instrumentations", "author": "OpenTelemetry Authors", "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/metapackages/auto-instrumentations-web#readme", @@ -62,9 +62,9 @@ }, "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-document-load": "^0.36.0", + "@opentelemetry/instrumentation-document-load": "^0.37.0", "@opentelemetry/instrumentation-fetch": "^0.50.0", - "@opentelemetry/instrumentation-user-interaction": "^0.36.0", + "@opentelemetry/instrumentation-user-interaction": "^0.37.0", "@opentelemetry/instrumentation-xml-http-request": "^0.50.0" }, "files": [ diff --git a/package-lock.json b/package-lock.json index b6ffb22d1c..b86482f96e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ }, "detectors/node/opentelemetry-resource-detector-alibaba-cloud": { "name": "@opentelemetry/resource-detector-alibaba-cloud", - "version": "0.28.7", + "version": "0.28.8", "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.0.0", @@ -45,7 +45,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -72,7 +72,7 @@ }, "detectors/node/opentelemetry-resource-detector-aws": { "name": "@opentelemetry/resource-detector-aws", - "version": "1.4.0", + "version": "1.4.1", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.0.0", @@ -81,7 +81,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -108,7 +108,7 @@ }, "detectors/node/opentelemetry-resource-detector-azure": { "name": "@opentelemetry/resource-detector-azure", - "version": "0.2.5", + "version": "0.2.6", "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.10.1", @@ -116,7 +116,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -142,7 +142,7 @@ }, "detectors/node/opentelemetry-resource-detector-container": { "name": "@opentelemetry/resource-detector-container", - "version": "0.3.7", + "version": "0.3.8", "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.0.0", @@ -150,7 +150,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -178,7 +178,7 @@ }, "detectors/node/opentelemetry-resource-detector-gcp": { "name": "@opentelemetry/resource-detector-gcp", - "version": "0.29.7", + "version": "0.29.8", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.0.0", @@ -188,7 +188,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", @@ -246,7 +246,7 @@ }, "detectors/node/opentelemetry-resource-detector-instana": { "name": "@opentelemetry/resource-detector-instana", - "version": "0.7.0", + "version": "0.8.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.0.0", @@ -254,7 +254,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-node": "^0.50.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -281,51 +281,51 @@ }, "metapackages/auto-instrumentations-node": { "name": "@opentelemetry/auto-instrumentations-node", - "version": "0.43.0", + "version": "0.44.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-amqplib": "^0.35.0", - "@opentelemetry/instrumentation-aws-lambda": "^0.39.0", - "@opentelemetry/instrumentation-aws-sdk": "^0.39.1", - "@opentelemetry/instrumentation-bunyan": "^0.36.0", - "@opentelemetry/instrumentation-cassandra-driver": "^0.36.0", - "@opentelemetry/instrumentation-connect": "^0.34.0", - "@opentelemetry/instrumentation-cucumber": "^0.4.0", - "@opentelemetry/instrumentation-dataloader": "^0.7.0", - "@opentelemetry/instrumentation-dns": "^0.34.0", - "@opentelemetry/instrumentation-express": "^0.36.1", - "@opentelemetry/instrumentation-fastify": "^0.34.0", - "@opentelemetry/instrumentation-fs": "^0.10.0", - "@opentelemetry/instrumentation-generic-pool": "^0.34.0", - "@opentelemetry/instrumentation-graphql": "^0.38.1", + "@opentelemetry/instrumentation-amqplib": "^0.36.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.40.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.40.0", + "@opentelemetry/instrumentation-bunyan": "^0.37.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.37.0", + "@opentelemetry/instrumentation-connect": "^0.35.0", + "@opentelemetry/instrumentation-cucumber": "^0.5.0", + "@opentelemetry/instrumentation-dataloader": "^0.8.0", + "@opentelemetry/instrumentation-dns": "^0.35.0", + "@opentelemetry/instrumentation-express": "^0.37.0", + "@opentelemetry/instrumentation-fastify": "^0.35.0", + "@opentelemetry/instrumentation-fs": "^0.11.0", + "@opentelemetry/instrumentation-generic-pool": "^0.35.0", + "@opentelemetry/instrumentation-graphql": "^0.39.0", "@opentelemetry/instrumentation-grpc": "^0.50.0", - "@opentelemetry/instrumentation-hapi": "^0.35.0", + "@opentelemetry/instrumentation-hapi": "^0.36.0", "@opentelemetry/instrumentation-http": "^0.50.0", - "@opentelemetry/instrumentation-ioredis": "^0.38.0", - "@opentelemetry/instrumentation-knex": "^0.34.0", - "@opentelemetry/instrumentation-koa": "^0.38.0", - "@opentelemetry/instrumentation-lru-memoizer": "^0.35.0", - "@opentelemetry/instrumentation-memcached": "^0.34.0", - "@opentelemetry/instrumentation-mongodb": "^0.41.0", - "@opentelemetry/instrumentation-mongoose": "^0.36.0", - "@opentelemetry/instrumentation-mysql": "^0.36.0", - "@opentelemetry/instrumentation-mysql2": "^0.36.0", - "@opentelemetry/instrumentation-nestjs-core": "^0.35.0", - "@opentelemetry/instrumentation-net": "^0.34.0", - "@opentelemetry/instrumentation-pg": "^0.39.1", - "@opentelemetry/instrumentation-pino": "^0.36.0", - "@opentelemetry/instrumentation-redis": "^0.37.0", - "@opentelemetry/instrumentation-redis-4": "^0.37.0", - "@opentelemetry/instrumentation-restify": "^0.36.0", - "@opentelemetry/instrumentation-router": "^0.35.0", - "@opentelemetry/instrumentation-socket.io": "^0.37.0", - "@opentelemetry/instrumentation-tedious": "^0.8.0", - "@opentelemetry/instrumentation-winston": "^0.35.0", - "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.7", - "@opentelemetry/resource-detector-aws": "^1.4.0", - "@opentelemetry/resource-detector-container": "^0.3.7", - "@opentelemetry/resource-detector-gcp": "^0.29.7", + "@opentelemetry/instrumentation-ioredis": "^0.39.0", + "@opentelemetry/instrumentation-knex": "^0.35.0", + "@opentelemetry/instrumentation-koa": "^0.39.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.36.0", + "@opentelemetry/instrumentation-memcached": "^0.35.0", + "@opentelemetry/instrumentation-mongodb": "^0.42.0", + "@opentelemetry/instrumentation-mongoose": "^0.37.0", + "@opentelemetry/instrumentation-mysql": "^0.37.0", + "@opentelemetry/instrumentation-mysql2": "^0.37.0", + "@opentelemetry/instrumentation-nestjs-core": "^0.36.0", + "@opentelemetry/instrumentation-net": "^0.35.0", + "@opentelemetry/instrumentation-pg": "^0.40.0", + "@opentelemetry/instrumentation-pino": "^0.37.0", + "@opentelemetry/instrumentation-redis": "^0.38.0", + "@opentelemetry/instrumentation-redis-4": "^0.38.0", + "@opentelemetry/instrumentation-restify": "^0.37.0", + "@opentelemetry/instrumentation-router": "^0.36.0", + "@opentelemetry/instrumentation-socket.io": "^0.38.0", + "@opentelemetry/instrumentation-tedious": "^0.9.0", + "@opentelemetry/instrumentation-winston": "^0.36.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.8", + "@opentelemetry/resource-detector-aws": "^1.4.1", + "@opentelemetry/resource-detector-container": "^0.3.8", + "@opentelemetry/resource-detector-gcp": "^0.29.8", "@opentelemetry/resources": "^1.12.0", "@opentelemetry/sdk-node": "^0.50.0" }, @@ -350,13 +350,13 @@ }, "metapackages/auto-instrumentations-web": { "name": "@opentelemetry/auto-instrumentations-web", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-document-load": "^0.36.0", + "@opentelemetry/instrumentation-document-load": "^0.37.0", "@opentelemetry/instrumentation-fetch": "^0.50.0", - "@opentelemetry/instrumentation-user-interaction": "^0.36.0", + "@opentelemetry/instrumentation-user-interaction": "^0.37.0", "@opentelemetry/instrumentation-xml-http-request": "^0.50.0" }, "devDependencies": { @@ -36623,11 +36623,11 @@ }, "packages/opentelemetry-propagation-utils": { "name": "@opentelemetry/propagation-utils", - "version": "0.30.7", + "version": "0.30.8", "license": "Apache-2.0", "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "^9.1.1", "@types/node": "18.6.5", "@types/sinon": "^10.0.11", @@ -36698,7 +36698,7 @@ }, "packages/opentelemetry-test-utils": { "name": "@opentelemetry/contrib-test-utils", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.0.0", @@ -36724,7 +36724,7 @@ }, "packages/winston-transport": { "name": "@opentelemetry/winston-transport", - "version": "0.1.0", + "version": "0.2.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api-logs": "^0.50.0", @@ -36754,7 +36754,7 @@ }, "plugins/node/instrumentation-amqplib": { "name": "@opentelemetry/instrumentation-amqplib", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -36763,7 +36763,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/amqplib": "^0.5.17", "@types/lodash": "4.14.199", "@types/mocha": "8.2.3", @@ -36794,7 +36794,7 @@ }, "plugins/node/instrumentation-cucumber": { "name": "@opentelemetry/instrumentation-cucumber", - "version": "0.4.0", + "version": "0.5.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -36861,7 +36861,7 @@ }, "plugins/node/instrumentation-dataloader": { "name": "@opentelemetry/instrumentation-dataloader", - "version": "0.7.0", + "version": "0.8.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0" @@ -36890,7 +36890,7 @@ }, "plugins/node/instrumentation-fs": { "name": "@opentelemetry/instrumentation-fs", - "version": "0.10.0", + "version": "0.11.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -36922,14 +36922,14 @@ }, "plugins/node/instrumentation-lru-memoizer": { "name": "@opentelemetry/instrumentation-lru-memoizer", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/lru-cache": "7.10.9", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -36957,7 +36957,7 @@ }, "plugins/node/instrumentation-mongoose": { "name": "@opentelemetry/instrumentation-mongoose", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -36966,7 +36966,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -36994,7 +36994,7 @@ }, "plugins/node/instrumentation-runtime-node": { "name": "@opentelemetry/instrumentation-runtime-node", - "version": "0.2.1", + "version": "0.3.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0" @@ -37034,7 +37034,7 @@ }, "plugins/node/instrumentation-socket.io": { "name": "@opentelemetry/instrumentation-socket.io", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37042,7 +37042,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -37283,7 +37283,7 @@ }, "plugins/node/instrumentation-tedious": { "name": "@opentelemetry/instrumentation-tedious", - "version": "0.8.0", + "version": "0.9.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37293,7 +37293,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -37314,7 +37314,7 @@ }, "plugins/node/opentelemetry-instrumentation-aws-lambda": { "name": "@opentelemetry/instrumentation-aws-lambda", - "version": "0.39.0", + "version": "0.40.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37346,12 +37346,12 @@ }, "plugins/node/opentelemetry-instrumentation-aws-sdk": { "name": "@opentelemetry/instrumentation-aws-sdk", - "version": "0.39.1", + "version": "0.40.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/propagation-utils": "^0.30.7", + "@opentelemetry/propagation-utils": "^0.30.8", "@opentelemetry/semantic-conventions": "^1.0.0" }, "devDependencies": { @@ -37362,7 +37362,7 @@ "@aws-sdk/client-sqs": "3.85.0", "@aws-sdk/types": "3.78.0", "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -37394,7 +37394,7 @@ }, "plugins/node/opentelemetry-instrumentation-bunyan": { "name": "@opentelemetry/instrumentation-bunyan", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api-logs": "^0.50.0", @@ -37437,7 +37437,7 @@ }, "plugins/node/opentelemetry-instrumentation-cassandra": { "name": "@opentelemetry/instrumentation-cassandra-driver", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37446,7 +37446,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -37470,7 +37470,7 @@ }, "plugins/node/opentelemetry-instrumentation-connect": { "name": "@opentelemetry/instrumentation-connect", - "version": "0.34.0", + "version": "0.35.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -37509,7 +37509,7 @@ }, "plugins/node/opentelemetry-instrumentation-dns": { "name": "@opentelemetry/instrumentation-dns", - "version": "0.34.0", + "version": "0.35.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37542,7 +37542,7 @@ }, "plugins/node/opentelemetry-instrumentation-express": { "name": "@opentelemetry/instrumentation-express", - "version": "0.36.1", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -37552,7 +37552,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/express": "4.17.18", @@ -37577,7 +37577,7 @@ }, "plugins/node/opentelemetry-instrumentation-fastify": { "name": "@opentelemetry/instrumentation-fastify", - "version": "0.34.0", + "version": "0.35.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -37588,7 +37588,7 @@ "@fastify/express": "^2.0.2", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation-http": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -37626,7 +37626,7 @@ }, "plugins/node/opentelemetry-instrumentation-generic-pool": { "name": "@opentelemetry/instrumentation-generic-pool", - "version": "0.34.0", + "version": "0.35.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37691,7 +37691,7 @@ }, "plugins/node/opentelemetry-instrumentation-graphql": { "name": "@opentelemetry/instrumentation-graphql", - "version": "0.38.1", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0" @@ -37725,7 +37725,7 @@ }, "plugins/node/opentelemetry-instrumentation-hapi": { "name": "@opentelemetry/instrumentation-hapi", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -37757,7 +37757,7 @@ }, "plugins/node/opentelemetry-instrumentation-ioredis": { "name": "@opentelemetry/instrumentation-ioredis", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37768,7 +37768,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -37793,7 +37793,7 @@ }, "plugins/node/opentelemetry-instrumentation-knex": { "name": "@opentelemetry/instrumentation-knex", - "version": "0.34.0", + "version": "0.35.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37823,7 +37823,7 @@ }, "plugins/node/opentelemetry-instrumentation-koa": { "name": "@opentelemetry/instrumentation-koa", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -37836,7 +37836,7 @@ "@koa/router": "12.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation-http": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -37861,7 +37861,7 @@ }, "plugins/node/opentelemetry-instrumentation-memcached": { "name": "@opentelemetry/instrumentation-memcached", - "version": "0.34.0", + "version": "0.35.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37871,7 +37871,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -37893,7 +37893,7 @@ }, "plugins/node/opentelemetry-instrumentation-mongodb": { "name": "@opentelemetry/instrumentation-mongodb", - "version": "0.41.0", + "version": "0.42.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -37903,7 +37903,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/bson": "4.0.5", @@ -38087,7 +38087,7 @@ }, "plugins/node/opentelemetry-instrumentation-mysql": { "name": "@opentelemetry/instrumentation-mysql", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38097,7 +38097,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", @@ -38120,7 +38120,7 @@ }, "plugins/node/opentelemetry-instrumentation-mysql2": { "name": "@opentelemetry/instrumentation-mysql2", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38130,7 +38130,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -38186,7 +38186,7 @@ }, "plugins/node/opentelemetry-instrumentation-nestjs-core": { "name": "@opentelemetry/instrumentation-nestjs-core", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38259,7 +38259,7 @@ }, "plugins/node/opentelemetry-instrumentation-net": { "name": "@opentelemetry/instrumentation-net", - "version": "0.34.0", + "version": "0.35.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38289,7 +38289,7 @@ }, "plugins/node/opentelemetry-instrumentation-pg": { "name": "@opentelemetry/instrumentation-pg", - "version": "0.39.1", + "version": "0.40.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38301,7 +38301,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -38328,7 +38328,7 @@ }, "plugins/node/opentelemetry-instrumentation-pino": { "name": "@opentelemetry/instrumentation-pino", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0" @@ -38336,7 +38336,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -38395,7 +38395,7 @@ }, "plugins/node/opentelemetry-instrumentation-redis": { "name": "@opentelemetry/instrumentation-redis", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38405,7 +38405,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -38429,7 +38429,7 @@ }, "plugins/node/opentelemetry-instrumentation-redis-4": { "name": "@opentelemetry/instrumentation-redis-4", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38439,7 +38439,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -38477,7 +38477,7 @@ }, "plugins/node/opentelemetry-instrumentation-restify": { "name": "@opentelemetry/instrumentation-restify", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -38544,7 +38544,7 @@ }, "plugins/node/opentelemetry-instrumentation-router": { "name": "@opentelemetry/instrumentation-router", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0", @@ -38573,7 +38573,7 @@ }, "plugins/node/opentelemetry-instrumentation-winston": { "name": "@opentelemetry/instrumentation-winston", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.50.0" @@ -38583,7 +38583,7 @@ "@opentelemetry/context-async-hooks": "^1.21.0", "@opentelemetry/sdk-trace-base": "^1.21.0", "@opentelemetry/sdk-trace-node": "^1.21.0", - "@opentelemetry/winston-transport": "^0.1.0", + "@opentelemetry/winston-transport": "^0.2.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -38607,7 +38607,7 @@ }, "plugins/web/opentelemetry-instrumentation-document-load": { "name": "@opentelemetry/instrumentation-document-load", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -38648,7 +38648,7 @@ }, "plugins/web/opentelemetry-instrumentation-long-task": { "name": "@opentelemetry/instrumentation-long-task", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -38694,7 +38694,7 @@ }, "plugins/web/opentelemetry-instrumentation-user-interaction": { "name": "@opentelemetry/instrumentation-user-interaction", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", @@ -45408,47 +45408,47 @@ "requires": { "@opentelemetry/api": "^1.4.1", "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-amqplib": "^0.35.0", - "@opentelemetry/instrumentation-aws-lambda": "^0.39.0", - "@opentelemetry/instrumentation-aws-sdk": "^0.39.1", - "@opentelemetry/instrumentation-bunyan": "^0.36.0", - "@opentelemetry/instrumentation-cassandra-driver": "^0.36.0", - "@opentelemetry/instrumentation-connect": "^0.34.0", - "@opentelemetry/instrumentation-cucumber": "^0.4.0", - "@opentelemetry/instrumentation-dataloader": "^0.7.0", - "@opentelemetry/instrumentation-dns": "^0.34.0", - "@opentelemetry/instrumentation-express": "^0.36.1", - "@opentelemetry/instrumentation-fastify": "^0.34.0", - "@opentelemetry/instrumentation-fs": "^0.10.0", - "@opentelemetry/instrumentation-generic-pool": "^0.34.0", - "@opentelemetry/instrumentation-graphql": "^0.38.1", + "@opentelemetry/instrumentation-amqplib": "^0.36.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.40.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.40.0", + "@opentelemetry/instrumentation-bunyan": "^0.37.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.37.0", + "@opentelemetry/instrumentation-connect": "^0.35.0", + "@opentelemetry/instrumentation-cucumber": "^0.5.0", + "@opentelemetry/instrumentation-dataloader": "^0.8.0", + "@opentelemetry/instrumentation-dns": "^0.35.0", + "@opentelemetry/instrumentation-express": "^0.37.0", + "@opentelemetry/instrumentation-fastify": "^0.35.0", + "@opentelemetry/instrumentation-fs": "^0.11.0", + "@opentelemetry/instrumentation-generic-pool": "^0.35.0", + "@opentelemetry/instrumentation-graphql": "^0.39.0", "@opentelemetry/instrumentation-grpc": "^0.50.0", - "@opentelemetry/instrumentation-hapi": "^0.35.0", + "@opentelemetry/instrumentation-hapi": "^0.36.0", "@opentelemetry/instrumentation-http": "^0.50.0", - "@opentelemetry/instrumentation-ioredis": "^0.38.0", - "@opentelemetry/instrumentation-knex": "^0.34.0", - "@opentelemetry/instrumentation-koa": "^0.38.0", - "@opentelemetry/instrumentation-lru-memoizer": "^0.35.0", - "@opentelemetry/instrumentation-memcached": "^0.34.0", - "@opentelemetry/instrumentation-mongodb": "^0.41.0", - "@opentelemetry/instrumentation-mongoose": "^0.36.0", - "@opentelemetry/instrumentation-mysql": "^0.36.0", - "@opentelemetry/instrumentation-mysql2": "^0.36.0", - "@opentelemetry/instrumentation-nestjs-core": "^0.35.0", - "@opentelemetry/instrumentation-net": "^0.34.0", - "@opentelemetry/instrumentation-pg": "^0.39.1", - "@opentelemetry/instrumentation-pino": "^0.36.0", - "@opentelemetry/instrumentation-redis": "^0.37.0", - "@opentelemetry/instrumentation-redis-4": "^0.37.0", - "@opentelemetry/instrumentation-restify": "^0.36.0", - "@opentelemetry/instrumentation-router": "^0.35.0", - "@opentelemetry/instrumentation-socket.io": "^0.37.0", - "@opentelemetry/instrumentation-tedious": "^0.8.0", - "@opentelemetry/instrumentation-winston": "^0.35.0", - "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.7", - "@opentelemetry/resource-detector-aws": "^1.4.0", - "@opentelemetry/resource-detector-container": "^0.3.7", - "@opentelemetry/resource-detector-gcp": "^0.29.7", + "@opentelemetry/instrumentation-ioredis": "^0.39.0", + "@opentelemetry/instrumentation-knex": "^0.35.0", + "@opentelemetry/instrumentation-koa": "^0.39.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.36.0", + "@opentelemetry/instrumentation-memcached": "^0.35.0", + "@opentelemetry/instrumentation-mongodb": "^0.42.0", + "@opentelemetry/instrumentation-mongoose": "^0.37.0", + "@opentelemetry/instrumentation-mysql": "^0.37.0", + "@opentelemetry/instrumentation-mysql2": "^0.37.0", + "@opentelemetry/instrumentation-nestjs-core": "^0.36.0", + "@opentelemetry/instrumentation-net": "^0.35.0", + "@opentelemetry/instrumentation-pg": "^0.40.0", + "@opentelemetry/instrumentation-pino": "^0.37.0", + "@opentelemetry/instrumentation-redis": "^0.38.0", + "@opentelemetry/instrumentation-redis-4": "^0.38.0", + "@opentelemetry/instrumentation-restify": "^0.37.0", + "@opentelemetry/instrumentation-router": "^0.36.0", + "@opentelemetry/instrumentation-socket.io": "^0.38.0", + "@opentelemetry/instrumentation-tedious": "^0.9.0", + "@opentelemetry/instrumentation-winston": "^0.36.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.8", + "@opentelemetry/resource-detector-aws": "^1.4.1", + "@opentelemetry/resource-detector-container": "^0.3.8", + "@opentelemetry/resource-detector-gcp": "^0.29.8", "@opentelemetry/resources": "^1.12.0", "@opentelemetry/sdk-node": "^0.50.0", "@types/mocha": "7.0.2", @@ -45469,9 +45469,9 @@ "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-document-load": "^0.36.0", + "@opentelemetry/instrumentation-document-load": "^0.37.0", "@opentelemetry/instrumentation-fetch": "^0.50.0", - "@opentelemetry/instrumentation-user-interaction": "^0.36.0", + "@opentelemetry/instrumentation-user-interaction": "^0.37.0", "@opentelemetry/instrumentation-xml-http-request": "^0.50.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -45685,7 +45685,7 @@ "version": "file:plugins/node/instrumentation-amqplib", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -45745,10 +45745,10 @@ "@aws-sdk/client-sqs": "3.85.0", "@aws-sdk/types": "3.78.0", "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/propagation-utils": "^0.30.7", + "@opentelemetry/propagation-utils": "^0.30.8", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", "@types/mocha": "8.2.3", @@ -45815,7 +45815,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -45994,7 +45994,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", @@ -46020,7 +46020,7 @@ "@fastify/express": "^2.0.2", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/instrumentation-http": "^0.50.0", @@ -46209,7 +46209,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/redis-common": "^0.36.1", "@opentelemetry/sdk-trace-base": "^1.8.0", @@ -46256,7 +46256,7 @@ "@koa/router": "12.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/instrumentation-http": "^0.50.0", @@ -46318,7 +46318,7 @@ "version": "file:plugins/node/instrumentation-lru-memoizer", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@types/lru-cache": "7.10.9", "@types/mocha": "8.2.3", @@ -46346,7 +46346,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -46368,7 +46368,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/sdk-trace-base": "^1.8.0", @@ -46497,7 +46497,7 @@ "version": "file:plugins/node/instrumentation-mongoose", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", @@ -46527,7 +46527,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", @@ -46550,7 +46550,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -46675,7 +46675,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -46704,7 +46704,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -46754,7 +46754,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/redis-common": "^0.36.1", "@opentelemetry/sdk-trace-base": "^1.8.0", @@ -46778,7 +46778,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/redis-common": "^0.36.1", @@ -46918,7 +46918,7 @@ "version": "file:plugins/node/instrumentation-socket.io", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -47111,7 +47111,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -47173,7 +47173,7 @@ "@opentelemetry/instrumentation": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.21.0", "@opentelemetry/sdk-trace-node": "^1.21.0", - "@opentelemetry/winston-transport": "^0.1.0", + "@opentelemetry/winston-transport": "^0.2.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -47288,7 +47288,7 @@ "version": "file:packages/opentelemetry-propagation-utils", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "^9.1.1", "@types/node": "18.6.5", "@types/sinon": "^10.0.11", @@ -47595,7 +47595,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-alibaba-cloud", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", @@ -47622,7 +47622,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-aws", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.0.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -47650,7 +47650,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-azure", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/resources": "^1.10.1", "@opentelemetry/semantic-conventions": "^1.0.0", "@types/mocha": "8.2.3", @@ -47676,7 +47676,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-container", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", @@ -47704,7 +47704,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-gcp", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.0.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -47756,7 +47756,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-instana", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/sdk-node": "^0.50.0", "@opentelemetry/semantic-conventions": "^1.0.0", diff --git a/packages/opentelemetry-propagation-utils/CHANGELOG.md b/packages/opentelemetry-propagation-utils/CHANGELOG.md index 5c53afe9c4..48fbd04979 100644 --- a/packages/opentelemetry-propagation-utils/CHANGELOG.md +++ b/packages/opentelemetry-propagation-utils/CHANGELOG.md @@ -60,6 +60,15 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.30.8](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagation-utils-v0.30.7...propagation-utils-v0.30.8) (2024-04-03) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.30.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagation-utils-v0.30.0...propagation-utils-v0.30.1) (2023-08-14) diff --git a/packages/opentelemetry-propagation-utils/package.json b/packages/opentelemetry-propagation-utils/package.json index aefc4537fe..ed5f41dcef 100644 --- a/packages/opentelemetry-propagation-utils/package.json +++ b/packages/opentelemetry-propagation-utils/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagation-utils", - "version": "0.30.7", + "version": "0.30.8", "description": "Propagation utilities for opentelemetry instrumentations", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -43,7 +43,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/mocha": "^9.1.1", "@types/node": "18.6.5", "@types/sinon": "^10.0.11", diff --git a/packages/opentelemetry-test-utils/CHANGELOG.md b/packages/opentelemetry-test-utils/CHANGELOG.md index 5478a2e4e7..1630f64d7c 100644 --- a/packages/opentelemetry-test-utils/CHANGELOG.md +++ b/packages/opentelemetry-test-utils/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/contrib-test-utils-v0.37.0...contrib-test-utils-v0.38.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/contrib-test-utils-v0.36.0...contrib-test-utils-v0.37.0) (2024-03-06) diff --git a/packages/opentelemetry-test-utils/package.json b/packages/opentelemetry-test-utils/package.json index 98f78fa47f..21162672d0 100644 --- a/packages/opentelemetry-test-utils/package.json +++ b/packages/opentelemetry-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/contrib-test-utils", - "version": "0.37.0", + "version": "0.38.0", "description": "Test utilities for opentelemetry components", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/packages/winston-transport/CHANGELOG.md b/packages/winston-transport/CHANGELOG.md index e69de29bb2..e287c877ec 100644 --- a/packages/winston-transport/CHANGELOG.md +++ b/packages/winston-transport/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +## [0.2.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/winston-transport-v0.1.0...winston-transport-v0.2.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) +* **instrumentation-winston:** add log sending to Logs API ([#1837](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1837)) ([358345f](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/358345f1384635ae2cb072082b25907dcbcaebcb)) diff --git a/packages/winston-transport/package.json b/packages/winston-transport/package.json index 133fd3f478..485dfea31e 100644 --- a/packages/winston-transport/package.json +++ b/packages/winston-transport/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/winston-transport", - "version": "0.1.0", + "version": "0.2.0", "description": "OpenTelemetry Transport for winston", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/instrumentation-amqplib/CHANGELOG.md b/plugins/node/instrumentation-amqplib/CHANGELOG.md index e9dcf47ee9..2a1d51fd81 100644 --- a/plugins/node/instrumentation-amqplib/CHANGELOG.md +++ b/plugins/node/instrumentation-amqplib/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-amqplib-v0.35.0...instrumentation-amqplib-v0.36.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-amqplib-v0.34.0...instrumentation-amqplib-v0.35.0) (2024-03-06) diff --git a/plugins/node/instrumentation-amqplib/package.json b/plugins/node/instrumentation-amqplib/package.json index 22dc0e6888..00d8c4fc34 100644 --- a/plugins/node/instrumentation-amqplib/package.json +++ b/plugins/node/instrumentation-amqplib/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-amqplib", - "version": "0.35.0", + "version": "0.36.0", "description": "OpenTelemetry automatic instrumentation for the `amqplib` package", "keywords": [ "amqplib", @@ -50,7 +50,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/amqplib": "^0.5.17", "@types/lodash": "4.14.199", "@types/mocha": "8.2.3", diff --git a/plugins/node/instrumentation-cucumber/CHANGELOG.md b/plugins/node/instrumentation-cucumber/CHANGELOG.md index 867ca6cf2f..62cbee59f7 100644 --- a/plugins/node/instrumentation-cucumber/CHANGELOG.md +++ b/plugins/node/instrumentation-cucumber/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.5.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-cucumber-v0.4.0...instrumentation-cucumber-v0.5.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.4.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-cucumber-v0.3.0...instrumentation-cucumber-v0.4.0) (2024-03-06) diff --git a/plugins/node/instrumentation-cucumber/package.json b/plugins/node/instrumentation-cucumber/package.json index 0f26dfc8a3..0fce8819e6 100644 --- a/plugins/node/instrumentation-cucumber/package.json +++ b/plugins/node/instrumentation-cucumber/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-cucumber", - "version": "0.4.0", + "version": "0.5.0", "description": "OpenTelemetry cucumber automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/instrumentation-dataloader/CHANGELOG.md b/plugins/node/instrumentation-dataloader/CHANGELOG.md index 2ef57c5031..54109c971e 100644 --- a/plugins/node/instrumentation-dataloader/CHANGELOG.md +++ b/plugins/node/instrumentation-dataloader/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.8.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-dataloader-v0.7.0...instrumentation-dataloader-v0.8.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.7.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-dataloader-v0.6.0...instrumentation-dataloader-v0.7.0) (2024-03-06) diff --git a/plugins/node/instrumentation-dataloader/package.json b/plugins/node/instrumentation-dataloader/package.json index bbe813379d..b9e234c949 100644 --- a/plugins/node/instrumentation-dataloader/package.json +++ b/plugins/node/instrumentation-dataloader/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-dataloader", - "version": "0.7.0", + "version": "0.8.0", "description": "OpenTelemetry instrumentation for dataloader", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/instrumentation-fs/CHANGELOG.md b/plugins/node/instrumentation-fs/CHANGELOG.md index b2217c607c..e16b52dfbb 100644 --- a/plugins/node/instrumentation-fs/CHANGELOG.md +++ b/plugins/node/instrumentation-fs/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.11.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-fs-v0.10.0...instrumentation-fs-v0.11.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.10.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-fs-v0.9.0...instrumentation-fs-v0.10.0) (2024-03-06) diff --git a/plugins/node/instrumentation-fs/package.json b/plugins/node/instrumentation-fs/package.json index 90ba11c900..2c41acd685 100644 --- a/plugins/node/instrumentation-fs/package.json +++ b/plugins/node/instrumentation-fs/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-fs", - "version": "0.10.0", + "version": "0.11.0", "description": "OpenTelemetry automatic instrumentation package for fs", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md b/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md index 0a593dd717..94ca8ba5f2 100644 --- a/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md +++ b/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-lru-memoizer-v0.35.0...instrumentation-lru-memoizer-v0.36.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-lru-memoizer-v0.34.0...instrumentation-lru-memoizer-v0.35.0) (2024-03-06) diff --git a/plugins/node/instrumentation-lru-memoizer/package.json b/plugins/node/instrumentation-lru-memoizer/package.json index a3ce6bfcc4..25e412b828 100644 --- a/plugins/node/instrumentation-lru-memoizer/package.json +++ b/plugins/node/instrumentation-lru-memoizer/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-lru-memoizer", - "version": "0.35.0", + "version": "0.36.0", "description": "OpenTelemetry automatic instrumentation package for lru-memoizer", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -43,7 +43,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@types/lru-cache": "7.10.9", "@types/mocha": "8.2.3", "@types/node": "18.6.5", diff --git a/plugins/node/instrumentation-mongoose/CHANGELOG.md b/plugins/node/instrumentation-mongoose/CHANGELOG.md index ea40e26830..a3bbb65de2 100644 --- a/plugins/node/instrumentation-mongoose/CHANGELOG.md +++ b/plugins/node/instrumentation-mongoose/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mongoose-v0.36.0...instrumentation-mongoose-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mongoose-v0.35.0...instrumentation-mongoose-v0.36.0) (2024-03-06) diff --git a/plugins/node/instrumentation-mongoose/package.json b/plugins/node/instrumentation-mongoose/package.json index c3a68f9aa0..1a3d149543 100644 --- a/plugins/node/instrumentation-mongoose/package.json +++ b/plugins/node/instrumentation-mongoose/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-mongoose", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry automatic instrumentation package for mongoose", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", diff --git a/plugins/node/instrumentation-runtime-node/CHANGELOG.md b/plugins/node/instrumentation-runtime-node/CHANGELOG.md index e07cb0a242..2867662028 100644 --- a/plugins/node/instrumentation-runtime-node/CHANGELOG.md +++ b/plugins/node/instrumentation-runtime-node/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.3.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-runtime-node-v0.2.1...instrumentation-runtime-node-v0.3.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Bug Fixes + +* **instrumentation-runtime-node:** mixin default config in constructor ([#2036](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2036)) ([146edfa](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/146edfa89bef0b1405d573c7373af10d90639c2a)) + ## [0.2.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-runtime-node-v0.2.0...instrumentation-runtime-node-v0.2.1) (2024-03-11) diff --git a/plugins/node/instrumentation-runtime-node/package.json b/plugins/node/instrumentation-runtime-node/package.json index cda4b70287..80a1cc46bb 100644 --- a/plugins/node/instrumentation-runtime-node/package.json +++ b/plugins/node/instrumentation-runtime-node/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-runtime-node", - "version": "0.2.1", + "version": "0.3.0", "description": "OpenTelemetry Node.js Performance measurement API automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/instrumentation-socket.io/CHANGELOG.md b/plugins/node/instrumentation-socket.io/CHANGELOG.md index a236e9c851..e1787d28a1 100644 --- a/plugins/node/instrumentation-socket.io/CHANGELOG.md +++ b/plugins/node/instrumentation-socket.io/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-socket.io-v0.37.0...instrumentation-socket.io-v0.38.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-socket.io-v0.36.0...instrumentation-socket.io-v0.37.0) (2024-03-06) diff --git a/plugins/node/instrumentation-socket.io/package.json b/plugins/node/instrumentation-socket.io/package.json index c25d40c100..11ab404b6b 100644 --- a/plugins/node/instrumentation-socket.io/package.json +++ b/plugins/node/instrumentation-socket.io/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-socket.io", - "version": "0.37.0", + "version": "0.38.0", "description": "OpenTelemetry automatic instrumentation package for socket.io", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -43,7 +43,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", diff --git a/plugins/node/instrumentation-tedious/CHANGELOG.md b/plugins/node/instrumentation-tedious/CHANGELOG.md index 2ea8a2cfbe..ea50ad6918 100644 --- a/plugins/node/instrumentation-tedious/CHANGELOG.md +++ b/plugins/node/instrumentation-tedious/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.9.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-tedious-v0.8.0...instrumentation-tedious-v0.9.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.8.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-tedious-v0.7.0...instrumentation-tedious-v0.8.0) (2024-03-06) diff --git a/plugins/node/instrumentation-tedious/package.json b/plugins/node/instrumentation-tedious/package.json index 3b4a956c92..0d73cf1922 100644 --- a/plugins/node/instrumentation-tedious/package.json +++ b/plugins/node/instrumentation-tedious/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-tedious", - "version": "0.8.0", + "version": "0.9.0", "description": "OpenTelemetry instrumentation for `tedious`", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -49,7 +49,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md index d780fc5ffe..6bfef574ff 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-aws-lambda-v0.39.0...instrumentation-aws-lambda-v0.40.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-aws-lambda-v0.38.0...instrumentation-aws-lambda-v0.39.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index 2f966618fa..92b33aefc3 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-aws-lambda", - "version": "0.39.0", + "version": "0.40.0", "description": "OpenTelemetry AWS Lambda automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md index ef8dd20b17..11054375eb 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-aws-sdk-v0.39.1...instrumentation-aws-sdk-v0.40.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/propagation-utils bumped from ^0.30.7 to ^0.30.8 + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.39.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-aws-sdk-v0.39.0...instrumentation-aws-sdk-v0.39.1) (2024-03-11) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json index 979e5872d3..9925809bb1 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-aws-sdk", - "version": "0.39.1", + "version": "0.40.0", "description": "OpenTelemetry automatic instrumentation for the `aws-sdk` package", "keywords": [ "aws", @@ -46,7 +46,7 @@ "dependencies": { "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/propagation-utils": "^0.30.7", + "@opentelemetry/propagation-utils": "^0.30.8", "@opentelemetry/semantic-conventions": "^1.0.0" }, "devDependencies": { @@ -57,7 +57,7 @@ "@aws-sdk/client-sqs": "3.85.0", "@aws-sdk/types": "3.78.0", "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md index 33aa5ae93b..48e001d183 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-bunyan-v0.36.0...instrumentation-bunyan-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) +* **instrumentation-bunyan:** Allow log level to be configured for log sending ([#1919](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1919)) ([4dc812e](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4dc812efed1c26eeab19d9eda7280631a761860e)) + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-bunyan-v0.35.0...instrumentation-bunyan-v0.36.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/package.json b/plugins/node/opentelemetry-instrumentation-bunyan/package.json index fb9f6c09c0..2ba62b7309 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/package.json +++ b/plugins/node/opentelemetry-instrumentation-bunyan/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-bunyan", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry instrumentation for bunyan", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md index 7cd030cf28..9409eb0758 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-cassandra-driver-v0.36.0...instrumentation-cassandra-driver-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-cassandra-driver-v0.35.0...instrumentation-cassandra-driver-v0.36.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/package.json b/plugins/node/opentelemetry-instrumentation-cassandra/package.json index d4faffba2a..ce04542bba 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/package.json +++ b/plugins/node/opentelemetry-instrumentation-cassandra/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-cassandra-driver", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry instrumentation for cassandra-driver", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -45,7 +45,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", diff --git a/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md index d6c870bfbd..b131149ea0 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-connect-v0.34.0...instrumentation-connect-v0.35.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-connect-v0.33.0...instrumentation-connect-v0.34.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-connect/package.json b/plugins/node/opentelemetry-instrumentation-connect/package.json index 25b1b376e3..22a2df2ffc 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/package.json +++ b/plugins/node/opentelemetry-instrumentation-connect/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-connect", - "version": "0.34.0", + "version": "0.35.0", "description": "OpenTelemetry connect automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md index 5199912fa1..532bace379 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-dns-v0.34.0...instrumentation-dns-v0.35.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-dns-v0.33.0...instrumentation-dns-v0.34.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-dns/package.json b/plugins/node/opentelemetry-instrumentation-dns/package.json index 2abd3edd17..6f28ccf5fb 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/package.json +++ b/plugins/node/opentelemetry-instrumentation-dns/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-dns", - "version": "0.34.0", + "version": "0.35.0", "description": "OpenTelemetry dns automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md index 2e33a749f5..1e48aed920 100644 --- a/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-express-v0.36.1...instrumentation-express-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.36.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-express-v0.36.0...instrumentation-express-v0.36.1) (2024-03-11) diff --git a/plugins/node/opentelemetry-instrumentation-express/package.json b/plugins/node/opentelemetry-instrumentation-express/package.json index 570935ee21..6c3aa8a2c0 100644 --- a/plugins/node/opentelemetry-instrumentation-express/package.json +++ b/plugins/node/opentelemetry-instrumentation-express/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-express", - "version": "0.36.1", + "version": "0.37.0", "description": "OpenTelemetry express automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/express": "4.17.18", diff --git a/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md index 6354e5079c..ccca7532ed 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-fastify-v0.34.0...instrumentation-fastify-v0.35.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-fastify-v0.33.0...instrumentation-fastify-v0.34.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-fastify/package.json b/plugins/node/opentelemetry-instrumentation-fastify/package.json index e22ed32332..70b5a4bd0d 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/package.json +++ b/plugins/node/opentelemetry-instrumentation-fastify/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-fastify", - "version": "0.34.0", + "version": "0.35.0", "description": "OpenTelemetry fastify automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ "@fastify/express": "^2.0.2", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation-http": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md index 371dd43f4f..9d9de9fe99 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-generic-pool-v0.34.0...instrumentation-generic-pool-v0.35.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-generic-pool-v0.33.0...instrumentation-generic-pool-v0.34.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json index 4bdb0abd13..05466afff6 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-generic-pool", - "version": "0.34.0", + "version": "0.35.0", "description": "OpenTelemetry Generic Pool automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md index 2fa024d1e7..9a52f6e41b 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-graphql-v0.38.1...instrumentation-graphql-v0.39.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.38.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-graphql-v0.38.0...instrumentation-graphql-v0.38.1) (2024-03-11) diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index 375a198d47..9594358c0a 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/package.json +++ b/plugins/node/opentelemetry-instrumentation-graphql/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-graphql", - "version": "0.38.1", + "version": "0.39.0", "description": "OpenTelemetry @opentelemetry/instrumentation-graphql automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md index e08f6bc3bc..58289a6d2d 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-hapi-v0.35.0...instrumentation-hapi-v0.36.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-hapi-v0.34.0...instrumentation-hapi-v0.35.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-hapi/package.json b/plugins/node/opentelemetry-instrumentation-hapi/package.json index b0df890859..d595016b9b 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/package.json +++ b/plugins/node/opentelemetry-instrumentation-hapi/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-hapi", - "version": "0.35.0", + "version": "0.36.0", "description": "OpenTelemetry Hapi automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md index 2ebb262e77..6750af082e 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-ioredis-v0.38.0...instrumentation-ioredis-v0.39.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-ioredis-v0.37.0...instrumentation-ioredis-v0.38.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/package.json b/plugins/node/opentelemetry-instrumentation-ioredis/package.json index 641b8a6239..688c37abba 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/package.json +++ b/plugins/node/opentelemetry-instrumentation-ioredis/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-ioredis", - "version": "0.38.0", + "version": "0.39.0", "description": "OpenTelemetry ioredis automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -49,7 +49,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", diff --git a/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md index 301d8cfd0c..edb2d1f024 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-knex-v0.34.0...instrumentation-knex-v0.35.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-knex-v0.33.0...instrumentation-knex-v0.34.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-knex/package.json b/plugins/node/opentelemetry-instrumentation-knex/package.json index 4acd76aa27..0248695c58 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/package.json +++ b/plugins/node/opentelemetry-instrumentation-knex/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-knex", - "version": "0.34.0", + "version": "0.35.0", "description": "OpenTelemetry Knex automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md index 0e17f7750f..07c521997f 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-koa-v0.38.0...instrumentation-koa-v0.39.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) +* **koa:** Use exported strings for attributes ([#2033](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2033)) ([70090c1](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/70090c12070b7fa82614b378a27dc38877568d02)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-koa-v0.37.0...instrumentation-koa-v0.38.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-koa/package.json b/plugins/node/opentelemetry-instrumentation-koa/package.json index 90323eaccb..e1a6f4f492 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/package.json +++ b/plugins/node/opentelemetry-instrumentation-koa/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-koa", - "version": "0.38.0", + "version": "0.39.0", "description": "OpenTelemetry Koa automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -48,7 +48,7 @@ "@koa/router": "12.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/instrumentation-http": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", diff --git a/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md index a37fb7db7a..017dfd2c73 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-memcached-v0.34.0...instrumentation-memcached-v0.35.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-memcached-v0.33.0...instrumentation-memcached-v0.34.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-memcached/package.json b/plugins/node/opentelemetry-instrumentation-memcached/package.json index 0272871e94..a329872649 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/package.json +++ b/plugins/node/opentelemetry-instrumentation-memcached/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-memcached", - "version": "0.34.0", + "version": "0.35.0", "description": "OpenTelemetry memcached automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md index 730a7ac5a6..7d67259001 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md @@ -6,6 +6,25 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.42.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mongodb-v0.41.0...instrumentation-mongodb-v0.42.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Bug Fixes + +* **instr-mongodb:** `mongodb` >=v6.4.0 support ([#2001](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2001)) ([20328d4](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/20328d4a655b41b7f5546137c90dbdce1cce4e14)), closes [#1983](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1983) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.41.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mongodb-v0.40.0...instrumentation-mongodb-v0.41.0) (2024-03-11) diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/package.json b/plugins/node/opentelemetry-instrumentation-mongodb/package.json index 4107916706..967c35c088 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/package.json +++ b/plugins/node/opentelemetry-instrumentation-mongodb/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-mongodb", - "version": "0.41.0", + "version": "0.42.0", "description": "OpenTelemetry mongodb automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,7 +50,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/bson": "4.0.5", diff --git a/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md index 1280151aa0..de5e0cfc06 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql-v0.36.0...instrumentation-mysql-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql-v0.35.0...instrumentation-mysql-v0.36.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-mysql/package.json b/plugins/node/opentelemetry-instrumentation-mysql/package.json index df63bd0e7c..fccb9fe6ae 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/package.json +++ b/plugins/node/opentelemetry-instrumentation-mysql/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-mysql", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry mysql automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -44,7 +44,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md index d8453e65a8..2e7ce19c41 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md @@ -6,6 +6,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql2-v0.36.0...instrumentation-mysql2-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql2-v0.35.0...instrumentation-mysql2-v0.36.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/package.json b/plugins/node/opentelemetry-instrumentation-mysql2/package.json index 218eda16af..b20fb7aaf6 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/package.json +++ b/plugins/node/opentelemetry-instrumentation-mysql2/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-mysql2", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry mysql2 automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md index 597586fa7d..20baee6a63 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-nestjs-core-v0.35.0...instrumentation-nestjs-core-v0.36.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-nestjs-core-v0.34.0...instrumentation-nestjs-core-v0.35.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json index a9524dcc9c..b831d12ff9 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-nestjs-core", - "version": "0.35.0", + "version": "0.36.0", "description": "OpenTelemetry NestJS automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md index edb3844abc..d9b707ccae 100644 --- a/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-net-v0.34.0...instrumentation-net-v0.35.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-net-v0.33.0...instrumentation-net-v0.34.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-net/package.json b/plugins/node/opentelemetry-instrumentation-net/package.json index fca4ae84c9..60f25541be 100644 --- a/plugins/node/opentelemetry-instrumentation-net/package.json +++ b/plugins/node/opentelemetry-instrumentation-net/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-net", - "version": "0.34.0", + "version": "0.35.0", "description": "OpenTelemetry net module automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md index 304aa672fb..d7abf286d3 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md @@ -6,6 +6,25 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-pg-v0.39.1...instrumentation-pg-v0.40.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Performance Improvements + +* **instrumentation-pg:** reduce temp objects allocations ([#2019](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2019)) ([84ef980](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/84ef980c0be84ca84e9957bb42254cab94185c99)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.39.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-pg-v0.39.0...instrumentation-pg-v0.39.1) (2024-03-11) diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index 061bb79b46..c99ceeaf68 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/package.json +++ b/plugins/node/opentelemetry-instrumentation-pg/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-pg", - "version": "0.39.1", + "version": "0.40.0", "description": "OpenTelemetry postgres automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -52,7 +52,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", diff --git a/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md index 71cb4e364f..90f157fe24 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-pino-v0.36.0...instrumentation-pino-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-pino-v0.35.0...instrumentation-pino-v0.36.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-pino/package.json b/plugins/node/opentelemetry-instrumentation-pino/package.json index a8b2d535de..6e16aae45d 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/package.json +++ b/plugins/node/opentelemetry-instrumentation-pino/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-pino", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry instrumentation for pino", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md index 2b9db2b538..a8df9ad4aa 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md @@ -12,6 +12,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-redis-4-v0.37.0...instrumentation-redis-4-v0.38.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-redis-4-v0.36.0...instrumentation-redis-4-v0.37.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/package.json b/plugins/node/opentelemetry-instrumentation-redis-4/package.json index bc9101ca8b..08077ae594 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis-4/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-redis-4", - "version": "0.37.0", + "version": "0.38.0", "description": "Automatic OpenTelemetry instrumentation for redis package version 4", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,7 +50,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", diff --git a/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md index b4c8a83845..180b361521 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md @@ -12,6 +12,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-redis-v0.37.0...instrumentation-redis-v0.38.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.37.0 to ^0.38.0 + ## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-redis-v0.36.0...instrumentation-redis-v0.37.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-redis/package.json b/plugins/node/opentelemetry-instrumentation-redis/package.json index 08afb618d2..67d8fc6c1a 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-redis", - "version": "0.37.0", + "version": "0.38.0", "description": "Automatic OpenTelemetry instrumentation for redis package version 2 and 3", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,7 +50,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.37.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", diff --git a/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md index ac53719e08..65e7120fbe 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-restify-v0.36.0...instrumentation-restify-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-restify-v0.35.0...instrumentation-restify-v0.36.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-restify/package.json b/plugins/node/opentelemetry-instrumentation-restify/package.json index 91822577fa..ddd13d9b97 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/package.json +++ b/plugins/node/opentelemetry-instrumentation-restify/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-restify", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry restify automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md index 69d3b9bf4f..45643528b8 100644 --- a/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-router-v0.35.0...instrumentation-router-v0.36.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-router-v0.34.0...instrumentation-router-v0.35.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-router/package.json b/plugins/node/opentelemetry-instrumentation-router/package.json index 0fe968456e..b57544e4de 100644 --- a/plugins/node/opentelemetry-instrumentation-router/package.json +++ b/plugins/node/opentelemetry-instrumentation-router/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-router", - "version": "0.35.0", + "version": "0.36.0", "description": "OpenTelemetry Router automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md index 12c52ecf97..9fbe11524d 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-winston-v0.35.0...instrumentation-winston-v0.36.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) +* **instrumentation-winston:** add log sending to Logs API ([#1837](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1837)) ([358345f](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/358345f1384635ae2cb072082b25907dcbcaebcb)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/winston-transport bumped from ^0.1.0 to ^0.2.0 + ## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-winston-v0.34.0...instrumentation-winston-v0.35.0) (2024-03-06) diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index 7b097640e4..faeb6280f3 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-winston", - "version": "0.35.0", + "version": "0.36.0", "description": "OpenTelemetry instrumentation for winston", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -48,7 +48,7 @@ "@opentelemetry/context-async-hooks": "^1.21.0", "@opentelemetry/sdk-trace-base": "^1.21.0", "@opentelemetry/sdk-trace-node": "^1.21.0", - "@opentelemetry/winston-transport": "^0.1.0", + "@opentelemetry/winston-transport": "^0.2.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", diff --git a/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md b/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md index b83b852577..df45a2651b 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md +++ b/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-document-load-v0.36.0...instrumentation-document-load-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-document-load-v0.35.0...instrumentation-document-load-v0.36.0) (2024-03-06) diff --git a/plugins/web/opentelemetry-instrumentation-document-load/package.json b/plugins/web/opentelemetry-instrumentation-document-load/package.json index a2dee508aa..7d1a1de173 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/package.json +++ b/plugins/web/opentelemetry-instrumentation-document-load/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-document-load", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry document-load automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md b/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md index 318edfa217..5e8311cd24 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md +++ b/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-long-task-v0.36.0...instrumentation-long-task-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-long-task-v0.35.0...instrumentation-long-task-v0.36.0) (2024-03-06) diff --git a/plugins/web/opentelemetry-instrumentation-long-task/package.json b/plugins/web/opentelemetry-instrumentation-long-task/package.json index 8685d9ffd5..0c230f899d 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/package.json +++ b/plugins/web/opentelemetry-instrumentation-long-task/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-long-task", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry long task API automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md b/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md index d2c3a95924..20ecf917d0 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-user-interaction-v0.36.0...instrumentation-user-interaction-v0.37.0) (2024-04-03) + + +### Features + +* **deps:** update otel-js to 1.23.0/0.50.0 ([#2076](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2076)) ([d5f079b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/d5f079b3992395dcfb3b791c9fdaeefd6d6526f8)) + ## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-user-interaction-v0.35.0...instrumentation-user-interaction-v0.36.0) (2024-03-06) diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json index fb7b3f8e77..8f2658f700 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-user-interaction", - "version": "0.36.0", + "version": "0.37.0", "description": "OpenTelemetry UserInteraction automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", From 1c9aec19059c69bc215c547186206d8efb300f6a Mon Sep 17 00:00:00 2001 From: David Luna Date: Thu, 4 Apr 2024 00:31:33 +0200 Subject: [PATCH 02/14] refactor(instr-fastify): use exported strings for attributes (#2078) Refs: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2025 --- package-lock.json | 4 +-- .../README.md | 10 +++++++ .../package.json | 2 +- .../src/instrumentation.ts | 13 +++------ .../test/fixtures/use-fastify.mjs | 1 - .../test/instrumentation.test.ts | 27 +++++++++---------- 6 files changed, 29 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index b86482f96e..c30bea59b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37582,7 +37582,7 @@ "dependencies": { "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@fastify/express": "^2.0.2", @@ -46026,7 +46026,7 @@ "@opentelemetry/instrumentation-http": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/express": "4.17.18", "@types/mocha": "7.0.2", "@types/node": "18.15.3", diff --git a/plugins/node/opentelemetry-instrumentation-fastify/README.md b/plugins/node/opentelemetry-instrumentation-fastify/README.md index a4a30e62cd..9f230b7b5b 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/README.md +++ b/plugins/node/opentelemetry-instrumentation-fastify/README.md @@ -68,6 +68,16 @@ const fastifyInstrumentation = new FastifyInstrumentation({ }); ``` +## Semantic Conventions + +This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) + +Attributes collected: + +| Attribute | Short Description | Notes | +| ------------ | ---------------------------------- | -------------------------- | +| `http.route` | The matched route (path template). | Key: `SEMATTRS_HTTP_ROUTE` | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-fastify/package.json b/plugins/node/opentelemetry-instrumentation-fastify/package.json index 70b5a4bd0d..0f527fc875 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/package.json +++ b/plugins/node/opentelemetry-instrumentation-fastify/package.json @@ -66,7 +66,7 @@ "dependencies": { "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-fastify#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts index dacc257e97..223ed28854 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts @@ -14,19 +14,14 @@ * limitations under the License. */ -import { - context, - SpanAttributes, - SpanStatusCode, - trace, -} from '@opentelemetry/api'; +import { context, Attributes, SpanStatusCode, trace } from '@opentelemetry/api'; import { getRPCMetadata, RPCType } from '@opentelemetry/core'; import { InstrumentationBase, InstrumentationNodeModuleDefinition, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions'; import type { HookHandlerDoneFunction, FastifyInstance, @@ -275,10 +270,10 @@ export class FastifyInstrumentation extends InstrumentationBase { handlerName || this.pluginName || ANONYMOUS_NAME }`; - const spanAttributes: SpanAttributes = { + const spanAttributes: Attributes = { [AttributeNames.PLUGIN_NAME]: this.pluginName, [AttributeNames.FASTIFY_TYPE]: FastifyTypes.REQUEST_HANDLER, - [SemanticAttributes.HTTP_ROUTE]: anyRequest.routeOptions + [SEMATTRS_HTTP_ROUTE]: anyRequest.routeOptions ? anyRequest.routeOptions.url // since fastify@4.10.0 : request.routerPath, }; diff --git a/plugins/node/opentelemetry-instrumentation-fastify/test/fixtures/use-fastify.mjs b/plugins/node/opentelemetry-instrumentation-fastify/test/fixtures/use-fastify.mjs index a0d81bcc38..4b234dcb7b 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/test/fixtures/use-fastify.mjs +++ b/plugins/node/opentelemetry-instrumentation-fastify/test/fixtures/use-fastify.mjs @@ -17,7 +17,6 @@ // Use fastify from an ES module: // node --experimental-loader=@opentelemetry/instrumentation/hook.mjs use-fastify.mjs -import { trace } from '@opentelemetry/api'; import { createTestNodeSdk } from '@opentelemetry/contrib-test-utils'; import { FastifyInstrumentation } from '../../build/src/index.js'; diff --git a/plugins/node/opentelemetry-instrumentation-fastify/test/instrumentation.test.ts b/plugins/node/opentelemetry-instrumentation-fastify/test/instrumentation.test.ts index 3c0f541b06..73fb586da1 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/test/instrumentation.test.ts +++ b/plugins/node/opentelemetry-instrumentation-fastify/test/instrumentation.test.ts @@ -16,7 +16,10 @@ import * as assert from 'assert'; import { context, SpanStatusCode } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_HTTP_ROUTE, + SEMATTRS_HTTP_METHOD, +} from '@opentelemetry/semantic-conventions'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { @@ -157,7 +160,7 @@ describe('fastify', () => { assert.deepStrictEqual(span.attributes, { 'fastify.type': 'request_handler', 'plugin.name': 'fastify -> @fastify/express', - [SemanticAttributes.HTTP_ROUTE]: '/test', + [SEMATTRS_HTTP_ROUTE]: '/test', }); assert.strictEqual( span.name, @@ -183,7 +186,7 @@ describe('fastify', () => { 'fastify.type': 'request_handler', 'fastify.name': 'namedHandler', 'plugin.name': 'fastify -> @fastify/express', - [SemanticAttributes.HTTP_ROUTE]: '/test', + [SEMATTRS_HTTP_ROUTE]: '/test', }); assert.strictEqual(span.name, 'request handler - namedHandler'); @@ -474,10 +477,7 @@ describe('fastify', () => { describe('using requestHook in config', () => { it('calls requestHook provided function when set in config', async () => { const requestHook = (span: Span, info: FastifyRequestInfo) => { - span.setAttribute( - SemanticAttributes.HTTP_METHOD, - info.request.method - ); + span.setAttribute(SEMATTRS_HTTP_METHOD, info.request.method); }; instrumentation.setConfig({ @@ -498,17 +498,14 @@ describe('fastify', () => { assert.deepStrictEqual(span.attributes, { 'fastify.type': 'request_handler', 'plugin.name': 'fastify -> @fastify/express', - [SemanticAttributes.HTTP_ROUTE]: '/test', - [SemanticAttributes.HTTP_METHOD]: 'GET', + [SEMATTRS_HTTP_ROUTE]: '/test', + [SEMATTRS_HTTP_METHOD]: 'GET', }); }); it('does not propagate an error from a requestHook that throws exception', async () => { const requestHook = (span: Span, info: FastifyRequestInfo) => { - span.setAttribute( - SemanticAttributes.HTTP_METHOD, - info.request.method - ); + span.setAttribute(SEMATTRS_HTTP_METHOD, info.request.method); throw Error('error thrown in requestHook'); }; @@ -531,8 +528,8 @@ describe('fastify', () => { assert.deepStrictEqual(span.attributes, { 'fastify.type': 'request_handler', 'plugin.name': 'fastify -> @fastify/express', - [SemanticAttributes.HTTP_ROUTE]: '/test', - [SemanticAttributes.HTTP_METHOD]: 'GET', + [SEMATTRS_HTTP_ROUTE]: '/test', + [SEMATTRS_HTTP_METHOD]: 'GET', }); }); }); From b006f7f4ce466611e437240508b9bc4deb622175 Mon Sep 17 00:00:00 2001 From: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:43:51 -0700 Subject: [PATCH 03/14] fix(winston-transport): Typescript issue with OpenTelemetryTransportV3 not assignable to TransportStream (#2079) Fixes: #2015 --- packages/winston-transport/src/OpenTelemetryTransportV3.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/winston-transport/src/OpenTelemetryTransportV3.ts b/packages/winston-transport/src/OpenTelemetryTransportV3.ts index 9ff40c4929..fe759676e9 100644 --- a/packages/winston-transport/src/OpenTelemetryTransportV3.ts +++ b/packages/winston-transport/src/OpenTelemetryTransportV3.ts @@ -15,14 +15,14 @@ */ import { Logger, logs } from '@opentelemetry/api-logs'; -import * as Transport from 'winston-transport'; +import TransportStream = require('winston-transport'); import { VERSION } from './version'; import { emitLogRecord } from './utils'; -export class OpenTelemetryTransportV3 extends Transport { +export class OpenTelemetryTransportV3 extends TransportStream { private _logger: Logger; - constructor(options?: Transport.TransportStreamOptions) { + constructor(options?: TransportStream.TransportStreamOptions) { super(options); this._logger = logs.getLogger('@opentelemetry/winston-transport', VERSION); } From fe18e2fbb2a6535cb72f314fdb1550a3a4160403 Mon Sep 17 00:00:00 2001 From: David Luna Date: Fri, 5 Apr 2024 00:21:52 +0200 Subject: [PATCH 04/14] feat(instr-undici): add instrumentation for `undici` versions `>=5 <7` and global `fetch` API (#1951) Closes: https://github.com/open-telemetry/opentelemetry-js/issues/4333 Co-authored-by: Jamie Danielson Co-authored-by: Trent Mick Co-authored-by: Marc Pichler --- .github/component_owners.yml | 3 + .release-please-manifest.json | 64 +- package-lock.json | 426 ++++++++++ .../node/instrumentation-undici/.eslintignore | 1 + .../node/instrumentation-undici/.eslintrc.js | 7 + plugins/node/instrumentation-undici/.tav.yml | 8 + plugins/node/instrumentation-undici/LICENSE | 201 +++++ plugins/node/instrumentation-undici/README.md | 100 +++ .../node/instrumentation-undici/package.json | 70 ++ .../src/enums/SemanticAttributes.ts | 168 ++++ .../node/instrumentation-undici/src/index.ts | 25 + .../src/internal-types.ts | 48 ++ .../node/instrumentation-undici/src/types.ts | 75 ++ .../node/instrumentation-undici/src/undici.ts | 483 ++++++++++++ .../instrumentation-undici/test/fetch.test.ts | 414 ++++++++++ .../test/metrics.test.ts | 194 +++++ .../test/undici.test.ts | 746 ++++++++++++++++++ .../test/utils/assertSpan.ts | 191 +++++ .../test/utils/mock-metrics-reader.ts | 47 ++ .../test/utils/mock-propagation.ts | 52 ++ .../test/utils/mock-server.ts | 74 ++ .../node/instrumentation-undici/tsconfig.json | 11 + release-please-config.json | 1 + 23 files changed, 3408 insertions(+), 1 deletion(-) create mode 100644 plugins/node/instrumentation-undici/.eslintignore create mode 100644 plugins/node/instrumentation-undici/.eslintrc.js create mode 100644 plugins/node/instrumentation-undici/.tav.yml create mode 100644 plugins/node/instrumentation-undici/LICENSE create mode 100644 plugins/node/instrumentation-undici/README.md create mode 100644 plugins/node/instrumentation-undici/package.json create mode 100644 plugins/node/instrumentation-undici/src/enums/SemanticAttributes.ts create mode 100644 plugins/node/instrumentation-undici/src/index.ts create mode 100644 plugins/node/instrumentation-undici/src/internal-types.ts create mode 100644 plugins/node/instrumentation-undici/src/types.ts create mode 100644 plugins/node/instrumentation-undici/src/undici.ts create mode 100644 plugins/node/instrumentation-undici/test/fetch.test.ts create mode 100644 plugins/node/instrumentation-undici/test/metrics.test.ts create mode 100644 plugins/node/instrumentation-undici/test/undici.test.ts create mode 100644 plugins/node/instrumentation-undici/test/utils/assertSpan.ts create mode 100644 plugins/node/instrumentation-undici/test/utils/mock-metrics-reader.ts create mode 100644 plugins/node/instrumentation-undici/test/utils/mock-propagation.ts create mode 100644 plugins/node/instrumentation-undici/test/utils/mock-server.ts create mode 100644 plugins/node/instrumentation-undici/tsconfig.json diff --git a/.github/component_owners.yml b/.github/component_owners.yml index be9a44a13b..fdc9c0fc10 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -123,6 +123,9 @@ components: - rauno56 plugins/node/opentelemetry-instrumentation-router: - rauno56 + plugins/node/opentelemetry-instrumentation-undici: + - david-luna + - trentm plugins/node/opentelemetry-instrumentation-winston: - seemk plugins/web/opentelemetry-instrumentation-document-load: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a58a58e654..da8e4144db 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1,63 @@ -{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.28.8","detectors/node/opentelemetry-resource-detector-aws":"1.4.1","detectors/node/opentelemetry-resource-detector-azure":"0.2.6","detectors/node/opentelemetry-resource-detector-container":"0.3.8","detectors/node/opentelemetry-resource-detector-gcp":"0.29.8","detectors/node/opentelemetry-resource-detector-github":"0.28.1","detectors/node/opentelemetry-resource-detector-instana":"0.8.0","metapackages/auto-instrumentations-node":"0.44.0","metapackages/auto-instrumentations-web":"0.38.0","packages/opentelemetry-host-metrics":"0.35.0","packages/opentelemetry-id-generator-aws-xray":"1.2.1","packages/opentelemetry-propagation-utils":"0.30.8","packages/opentelemetry-redis-common":"0.36.1","packages/opentelemetry-sql-common":"0.40.0","packages/opentelemetry-test-utils":"0.38.0","packages/winston-transport":"0.2.0","plugins/node/instrumentation-amqplib":"0.36.0","plugins/node/instrumentation-cucumber":"0.5.0","plugins/node/instrumentation-dataloader":"0.8.0","plugins/node/instrumentation-fs":"0.11.0","plugins/node/instrumentation-lru-memoizer":"0.36.0","plugins/node/instrumentation-mongoose":"0.37.0","plugins/node/instrumentation-runtime-node":"0.3.0","plugins/node/instrumentation-socket.io":"0.38.0","plugins/node/instrumentation-tedious":"0.9.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.40.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.40.0","plugins/node/opentelemetry-instrumentation-bunyan":"0.37.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.37.0","plugins/node/opentelemetry-instrumentation-connect":"0.35.0","plugins/node/opentelemetry-instrumentation-dns":"0.35.0","plugins/node/opentelemetry-instrumentation-express":"0.37.0","plugins/node/opentelemetry-instrumentation-fastify":"0.35.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.35.0","plugins/node/opentelemetry-instrumentation-graphql":"0.39.0","plugins/node/opentelemetry-instrumentation-hapi":"0.36.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.39.0","plugins/node/opentelemetry-instrumentation-knex":"0.35.0","plugins/node/opentelemetry-instrumentation-koa":"0.39.0","plugins/node/opentelemetry-instrumentation-memcached":"0.35.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.42.0","plugins/node/opentelemetry-instrumentation-mysql":"0.37.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.37.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.36.0","plugins/node/opentelemetry-instrumentation-net":"0.35.0","plugins/node/opentelemetry-instrumentation-pg":"0.40.0","plugins/node/opentelemetry-instrumentation-pino":"0.37.0","plugins/node/opentelemetry-instrumentation-redis":"0.38.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.38.0","plugins/node/opentelemetry-instrumentation-restify":"0.37.0","plugins/node/opentelemetry-instrumentation-router":"0.36.0","plugins/node/opentelemetry-instrumentation-winston":"0.36.0","plugins/web/opentelemetry-instrumentation-document-load":"0.37.0","plugins/web/opentelemetry-instrumentation-long-task":"0.37.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.37.0","plugins/web/opentelemetry-plugin-react-load":"0.30.0","propagators/opentelemetry-propagator-aws-xray":"1.3.1","propagators/opentelemetry-propagator-grpc-census-binary":"0.27.1","propagators/opentelemetry-propagator-instana":"0.3.1","propagators/opentelemetry-propagator-ot-trace":"0.27.1"} +{ + "detectors/node/opentelemetry-resource-detector-alibaba-cloud": "0.28.8", + "detectors/node/opentelemetry-resource-detector-aws": "1.4.1", + "detectors/node/opentelemetry-resource-detector-azure": "0.2.6", + "detectors/node/opentelemetry-resource-detector-container": "0.3.8", + "detectors/node/opentelemetry-resource-detector-gcp": "0.29.8", + "detectors/node/opentelemetry-resource-detector-github": "0.28.1", + "detectors/node/opentelemetry-resource-detector-instana": "0.8.0", + "metapackages/auto-instrumentations-node": "0.44.0", + "metapackages/auto-instrumentations-web": "0.38.0", + "packages/opentelemetry-host-metrics": "0.35.0", + "packages/opentelemetry-id-generator-aws-xray": "1.2.1", + "packages/opentelemetry-propagation-utils": "0.30.8", + "packages/opentelemetry-redis-common": "0.36.1", + "packages/opentelemetry-sql-common": "0.40.0", + "packages/opentelemetry-test-utils": "0.38.0", + "packages/winston-transport": "0.2.0", + "plugins/node/instrumentation-amqplib": "0.36.0", + "plugins/node/instrumentation-cucumber": "0.5.0", + "plugins/node/instrumentation-dataloader": "0.8.0", + "plugins/node/instrumentation-fs": "0.11.0", + "plugins/node/instrumentation-lru-memoizer": "0.36.0", + "plugins/node/instrumentation-mongoose": "0.37.0", + "plugins/node/instrumentation-runtime-node": "0.3.0", + "plugins/node/instrumentation-socket.io": "0.38.0", + "plugins/node/instrumentation-tedious": "0.9.0", + "plugins/node/instrumentation-undici": "0.1.0", + "plugins/node/opentelemetry-instrumentation-aws-lambda": "0.40.0", + "plugins/node/opentelemetry-instrumentation-aws-sdk": "0.40.0", + "plugins/node/opentelemetry-instrumentation-bunyan": "0.37.0", + "plugins/node/opentelemetry-instrumentation-cassandra": "0.37.0", + "plugins/node/opentelemetry-instrumentation-connect": "0.35.0", + "plugins/node/opentelemetry-instrumentation-dns": "0.35.0", + "plugins/node/opentelemetry-instrumentation-express": "0.37.0", + "plugins/node/opentelemetry-instrumentation-fastify": "0.35.0", + "plugins/node/opentelemetry-instrumentation-generic-pool": "0.35.0", + "plugins/node/opentelemetry-instrumentation-graphql": "0.39.0", + "plugins/node/opentelemetry-instrumentation-hapi": "0.36.0", + "plugins/node/opentelemetry-instrumentation-ioredis": "0.39.0", + "plugins/node/opentelemetry-instrumentation-knex": "0.35.0", + "plugins/node/opentelemetry-instrumentation-koa": "0.39.0", + "plugins/node/opentelemetry-instrumentation-memcached": "0.35.0", + "plugins/node/opentelemetry-instrumentation-mongodb": "0.42.0", + "plugins/node/opentelemetry-instrumentation-mysql": "0.37.0", + "plugins/node/opentelemetry-instrumentation-mysql2": "0.37.0", + "plugins/node/opentelemetry-instrumentation-nestjs-core": "0.36.0", + "plugins/node/opentelemetry-instrumentation-net": "0.35.0", + "plugins/node/opentelemetry-instrumentation-pg": "0.40.0", + "plugins/node/opentelemetry-instrumentation-pino": "0.37.0", + "plugins/node/opentelemetry-instrumentation-redis": "0.38.0", + "plugins/node/opentelemetry-instrumentation-redis-4": "0.38.0", + "plugins/node/opentelemetry-instrumentation-restify": "0.37.0", + "plugins/node/opentelemetry-instrumentation-router": "0.36.0", + "plugins/node/opentelemetry-instrumentation-winston": "0.36.0", + "plugins/web/opentelemetry-instrumentation-document-load": "0.37.0", + "plugins/web/opentelemetry-instrumentation-long-task": "0.37.0", + "plugins/web/opentelemetry-instrumentation-user-interaction": "0.37.0", + "plugins/web/opentelemetry-plugin-react-load": "0.30.0", + "propagators/opentelemetry-propagator-aws-xray": "1.3.1", + "propagators/opentelemetry-propagator-grpc-census-binary": "0.27.1", + "propagators/opentelemetry-propagator-instana": "0.3.1", + "propagators/opentelemetry-propagator-ot-trace": "0.27.1" +} diff --git a/package-lock.json b/package-lock.json index c30bea59b2..9a502dc61d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8582,6 +8582,10 @@ "resolved": "plugins/node/instrumentation-tedious", "link": true }, + "node_modules/@opentelemetry/instrumentation-undici": { + "resolved": "plugins/node/instrumentation-undici", + "link": true + }, "node_modules/@opentelemetry/instrumentation-user-interaction": { "resolved": "plugins/web/opentelemetry-instrumentation-user-interaction", "link": true @@ -14780,6 +14784,12 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "node_modules/cookiejar": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", + "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==", + "dev": true + }, "node_modules/cookies": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", @@ -19264,6 +19274,15 @@ "node": ">= 0.6.0" } }, + "node_modules/hexoid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", + "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", @@ -32544,6 +32563,42 @@ "node": ">=4" } }, + "node_modules/superagent": { + "version": "8.0.9", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.9.tgz", + "integrity": "sha512-4C7Bh5pyHTvU33KpZgwrNKh/VQnvgtCSqPRfJAUdmrtSYePVzVg4E4OzsrbkhJj9O7SO6Bnv75K/F8XVZT8YHA==", + "dev": true, + "dependencies": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.4", + "debug": "^4.3.4", + "fast-safe-stringify": "^2.1.1", + "form-data": "^4.0.0", + "formidable": "^2.1.2", + "methods": "^1.1.2", + "mime": "2.6.0", + "qs": "^6.11.0", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=6.4.0 <13 || >=14" + } + }, + "node_modules/superagent/node_modules/formidable": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", + "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", + "dev": true, + "dependencies": { + "dezalgo": "^1.0.4", + "hexoid": "^1.0.0", + "once": "^1.4.0", + "qs": "^6.11.0" + }, + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -34373,6 +34428,15 @@ "ieee754": "^1.1.13" } }, + "node_modules/undici": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.10.1.tgz", + "integrity": "sha512-kSzmWrOx3XBKTgPm4Tal8Hyl3yf+hzlA00SAf4goxv8LZYafKmS6gJD/7Fe5HH/DMNiFTRXvkwhLo7mUn5fuQQ==", + "dev": true, + "engines": { + "node": ">=18.0" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -37312,6 +37376,169 @@ "@opentelemetry/api": "^1.3.0" } }, + "plugins/node/instrumentation-undici": { + "name": "@opentelemetry/instrumentation-undici", + "version": "0.1.0", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.49.1" + }, + "devDependencies": { + "@opentelemetry/api": "^1.7.0", + "@opentelemetry/sdk-metrics": "^1.8.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-node": "^1.8.0", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "semver": "^7.6.0", + "superagent": "8.0.9", + "test-all-versions": "6.0.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4", + "undici": "6.10.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.7.0" + } + }, + "plugins/node/instrumentation-undici/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "plugins/node/instrumentation-undici/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "plugins/node/instrumentation-undici/node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "plugins/node/instrumentation-undici/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "plugins/node/instrumentation-undici/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "plugins/node/instrumentation-undici/node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "plugins/node/instrumentation-undici/node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "plugins/node/instrumentation-undici/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "plugins/node/instrumentation-undici/node_modules/test-all-versions": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-all-versions/-/test-all-versions-6.0.0.tgz", + "integrity": "sha512-/9wVTBRa7+arvItGinCYy/8+z7sHTsrs9cwEY/xAnzrkSEM7Tp2Cz49ewYZYuO1YYMLqxEaQp2g7Dnns7n7BGA==", + "dev": true, + "dependencies": { + "after-all-results": "^2.0.0", + "ansi-diff-stream": "^1.2.1", + "cli-spinners": "^2.9.2", + "deepmerge": "^4.3.1", + "import-fresh": "^3.3.0", + "is-ci": "^3.0.1", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimist": "^1.2.8", + "npm-package-versions": "^1.0.1", + "once": "^1.4.0", + "parse-env-string": "^1.0.1", + "resolve": "^1.22.8", + "semver": "^7.5.4", + "spawn-npm-install": "^1.2.0", + "which": "^2.0.2" + }, + "bin": { + "tav": "index.js" + }, + "engines": { + "node": ">=14" + } + }, "plugins/node/opentelemetry-instrumentation-aws-lambda": { "name": "@opentelemetry/instrumentation-aws-lambda", "version": "0.40.0", @@ -38571,6 +38798,39 @@ "@opentelemetry/api": "^1.3.0" } }, + "plugins/node/opentelemetry-instrumentation-undici": { + "name": "@opentelemetry/instrumentation-undici", + "version": "0.33.0", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.49.1" + }, + "devDependencies": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-metrics": "^1.8.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-node": "^1.8.0", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "semver": "^7.6.0", + "superagent": "8.0.9", + "test-all-versions": "6.0.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4", + "undici": "^6.7.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, "plugins/node/opentelemetry-instrumentation-winston": { "name": "@opentelemetry/instrumentation-winston", "version": "0.36.0", @@ -47127,6 +47387,122 @@ "typescript": "4.4.4" } }, + "@opentelemetry/instrumentation-undici": { + "version": "file:plugins/node/instrumentation-undici", + "requires": { + "@opentelemetry/api": "^1.7.0", + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.49.1", + "@opentelemetry/sdk-metrics": "^1.8.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-node": "^1.8.0", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "semver": "^7.6.0", + "superagent": "8.0.9", + "test-all-versions": "6.0.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4", + "undici": "6.10.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "requires": { + "ci-info": "^3.2.0" + } + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "test-all-versions": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-all-versions/-/test-all-versions-6.0.0.tgz", + "integrity": "sha512-/9wVTBRa7+arvItGinCYy/8+z7sHTsrs9cwEY/xAnzrkSEM7Tp2Cz49ewYZYuO1YYMLqxEaQp2g7Dnns7n7BGA==", + "dev": true, + "requires": { + "after-all-results": "^2.0.0", + "ansi-diff-stream": "^1.2.1", + "cli-spinners": "^2.9.2", + "deepmerge": "^4.3.1", + "import-fresh": "^3.3.0", + "is-ci": "^3.0.1", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimist": "^1.2.8", + "npm-package-versions": "^1.0.1", + "once": "^1.4.0", + "parse-env-string": "^1.0.1", + "resolve": "^1.22.8", + "semver": "^7.5.4", + "spawn-npm-install": "^1.2.0", + "which": "^2.0.2" + } + } + } + }, "@opentelemetry/instrumentation-user-interaction": { "version": "file:plugins/web/opentelemetry-instrumentation-user-interaction", "requires": { @@ -52659,6 +53035,12 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "cookiejar": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", + "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==", + "dev": true + }, "cookies": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", @@ -56185,6 +56567,12 @@ } } }, + "hexoid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", + "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==", + "dev": true + }, "highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", @@ -66725,6 +67113,38 @@ "through": "^2.3.4" } }, + "superagent": { + "version": "8.0.9", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.0.9.tgz", + "integrity": "sha512-4C7Bh5pyHTvU33KpZgwrNKh/VQnvgtCSqPRfJAUdmrtSYePVzVg4E4OzsrbkhJj9O7SO6Bnv75K/F8XVZT8YHA==", + "dev": true, + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.4", + "debug": "^4.3.4", + "fast-safe-stringify": "^2.1.1", + "form-data": "^4.0.0", + "formidable": "^2.1.2", + "methods": "^1.1.2", + "mime": "2.6.0", + "qs": "^6.11.0", + "semver": "^7.3.8" + }, + "dependencies": { + "formidable": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", + "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", + "dev": true, + "requires": { + "dezalgo": "^1.0.4", + "hexoid": "^1.0.0", + "once": "^1.4.0", + "qs": "^6.11.0" + } + } + } + }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -68080,6 +68500,12 @@ } } }, + "undici": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.10.1.tgz", + "integrity": "sha512-kSzmWrOx3XBKTgPm4Tal8Hyl3yf+hzlA00SAf4goxv8LZYafKmS6gJD/7Fe5HH/DMNiFTRXvkwhLo7mUn5fuQQ==", + "dev": true + }, "undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", diff --git a/plugins/node/instrumentation-undici/.eslintignore b/plugins/node/instrumentation-undici/.eslintignore new file mode 100644 index 0000000000..378eac25d3 --- /dev/null +++ b/plugins/node/instrumentation-undici/.eslintignore @@ -0,0 +1 @@ +build diff --git a/plugins/node/instrumentation-undici/.eslintrc.js b/plugins/node/instrumentation-undici/.eslintrc.js new file mode 100644 index 0000000000..f756f4488b --- /dev/null +++ b/plugins/node/instrumentation-undici/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + "env": { + "mocha": true, + "node": true + }, + ...require('../../../eslint.config.js') +} diff --git a/plugins/node/instrumentation-undici/.tav.yml b/plugins/node/instrumentation-undici/.tav.yml new file mode 100644 index 0000000000..9ef69e2462 --- /dev/null +++ b/plugins/node/instrumentation-undici/.tav.yml @@ -0,0 +1,8 @@ +undici: + jobs: + - versions: ">=5 <6" + node: '>=14' + commands: npm run test + - versions: ">=6 <7" + node: '>=18' + commands: npm run test diff --git a/plugins/node/instrumentation-undici/LICENSE b/plugins/node/instrumentation-undici/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/plugins/node/instrumentation-undici/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/plugins/node/instrumentation-undici/README.md b/plugins/node/instrumentation-undici/README.md new file mode 100644 index 0000000000..38b6fd6e9e --- /dev/null +++ b/plugins/node/instrumentation-undici/README.md @@ -0,0 +1,100 @@ +# OpenTelemetry Undici/fetch Instrumentation for Node.js + +[![NPM Published Version][npm-img]][npm-url] +[![Apache License][license-image]][license-image] + +**Note: This is an experimental package under active development. New releases may include breaking changes.** + +This module provides automatic instrumentation for [`undici`](https://undici.nodejs.org/) and Node.js global [`fetch`](https://nodejs.org/docs/latest/api/globals.html#fetch) API. +If you're looking the instrumentation for browser's `fetch` API it is located at [https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch/](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch/) + +## Installation + +```bash +npm install --save @opentelemetry/instrumentation-undici +``` + +## Usage + +OpenTelemetry Undici/fetch Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems. + +To load a specific instrumentation (Undici in this case), specify it in the Node Tracer's configuration. + +```js +const { UndiciInstrumentation } = require('@opentelemetry/instrumentation-undici'); +const { + ConsoleSpanExporter, + NodeTracerProvider, + SimpleSpanProcessor, +} = require('@opentelemetry/sdk-trace-node'); +const { registerInstrumentations } = require('@opentelemetry/instrumentation'); + +const provider = new NodeTracerProvider(); + +provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +provider.register(); + +registerInstrumentations({ + instrumentations: [new UndiciInstrumentation()], +}); + +``` + +### Undici/Fetch instrumentation Options + +Undici instrumentation has few options available to choose from. You can set the following: + +| Options | Type | Description | +| ------- | ---- | ----------- | +| [`ignoreRequestHook`](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-undici/src/types.ts#63) | `IgnoreRequestFunction` | Undici instrumentation will not trace all incoming requests that matched with custom function. | +| [`requestHook`](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-undici/src/types.ts#65) | `RequestHookFunction` | Function for adding custom attributes before request is handled. | +| [`startSpanHook`](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-undici/src/types.ts#67) | `StartSpanHookFunction` | Function for adding custom attributes before a span is started. | +| [`requireParentforSpans`](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-undici/src/types.ts#69) | `Boolean` | Require a parent span is present to create new span for outgoing requests. | +| [`headersToSpanAttributes`](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-undici/src/types.ts#71) | `Object` | List of case insensitive HTTP headers to convert to span attributes. Headers will be converted to span attributes in the form of `http.{request\|response}.header.header-name` where the name is only lowercased, e.g. `http.response.header.content-length`| + +### Observations + +This instrumentation subscribes to certain [diagnostics_channel](https://nodejs.org/api/diagnostics_channel.html) to intercept the client requests +and generate traces and metrics. In particular tracing spans are started when [undici:request:create](https://undici.nodejs.org/#/docs/api/DiagnosticsChannel?id=undicirequestcreate) +channel receives a message and ended when [undici:request:trailers](https://undici.nodejs.org/#/docs/api/DiagnosticsChannel?id=undicirequesttrailers) channel receive a message. +This means the full response body has been received when the instrumentation ends the span. + +## Semantic Conventions + +This package uses Semantic Conventions [Version 1.24.0](https://github.com/open-telemetry/semantic-conventions/tree/v1.24.0/docs/http). As for now the Semantic Conventions +are bundled in this package but eventually will be imported from `@opentelemetry/semantic-conventions` package when it is updated to latest version. +Ref: [opentelemetry-js/issues/4235](https://github.com/open-telemetry/opentelemetry-js/issues/4235) + +Attributes collected: + +| Attribute | Short Description | Notes | +| ------------ | ---------------------------------- | ----------------- | +| `http.request.method` | HTTP request method. | Key: `HTTP_REQUEST_METHOD` | +| `http.request.method_original` | Original HTTP method sent by the client in the request line. | Key: `HTTP_REQUEST_METHOD_ORIGINAL` | +| `url.full` | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986). | Key: `URL_FULL` | +| `url.path` | The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component. | Key: `URL_PATH` | +| `url.query` | The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component. | Key: `URL_QUERY` | +| `url.scheme` | HTTP request method. | Key: `URL_SCHEME` | +| `server.address` | Server domain name, IP address or Unix domain socket name. | Key: `HTTP_REQUEST_METHOD` | +| `server.port` | Server port number. | Key: `HTTP_REQUEST_METHOD` | +| `user_agent.original` | Value of the HTTP User-Agent header sent by the client. | Key: `USER_AGENT_ORIGINAL` | +| `network.peer.address` | Peer address of the network connection - IP address or Unix domain socket name. | Key: `NETWORK_PEER_ADDRESS` | +| `network.peer.port` | Peer port number of the network connection. | Key: `NETWORK_PEER_PORT` | +| `http.response.status_code` | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | Key: `HTTP_RESPONSE_STATUS_CODE` | +| `error.type` | Describes a class of error the operation ended with. | Key: `ERROR_TYPE` | + +## Useful links + +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-router +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-router.svg diff --git a/plugins/node/instrumentation-undici/package.json b/plugins/node/instrumentation-undici/package.json new file mode 100644 index 0000000000..b235be769a --- /dev/null +++ b/plugins/node/instrumentation-undici/package.json @@ -0,0 +1,70 @@ +{ + "name": "@opentelemetry/instrumentation-undici", + "version": "0.1.0", + "description": "OpenTelemetry undici/fetch automatic instrumentation package.", + "main": "build/src/index.js", + "types": "build/src/index.d.ts", + "repository": "open-telemetry/opentelemetry-js-contrib", + "scripts": { + "prepublishOnly": "npm run compile", + "compile": "tsc -p .", + "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", + "test-all-versions": "tav", + "tdd": "npm run test -- --watch-extensions ts --watch", + "clean": "rimraf build/*", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix", + "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../", + "watch": "tsc -w", + "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-undici --include-dependencies", + "prewatch": "npm run precompile", + "version:update": "node ../../../scripts/version-update.js" + }, + "keywords": [ + "opentelemetry", + "fetch", + "undici", + "nodejs", + "tracing", + "instrumentation" + ], + "author": "OpenTelemetry Authors", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + }, + "files": [ + "build/src/**/*.js", + "build/src/**/*.js.map", + "build/src/**/*.d.ts" + ], + "publishConfig": { + "access": "public" + }, + "devDependencies": { + "@opentelemetry/api": "^1.7.0", + "@opentelemetry/sdk-metrics": "^1.8.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-node": "^1.8.0", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "semver": "^7.6.0", + "superagent": "8.0.9", + "test-all-versions": "6.0.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4", + "undici": "6.10.1" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.7.0" + }, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.50.0" + }, + "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-undici#readme", + "sideEffects": false +} diff --git a/plugins/node/instrumentation-undici/src/enums/SemanticAttributes.ts b/plugins/node/instrumentation-undici/src/enums/SemanticAttributes.ts new file mode 100644 index 0000000000..0e65b51aeb --- /dev/null +++ b/plugins/node/instrumentation-undici/src/enums/SemanticAttributes.ts @@ -0,0 +1,168 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 +export const SemanticAttributes = { + /** + * State of the HTTP connection in the HTTP connection pool. + */ + HTTP_CONNECTION_STATE: 'http.connection.state', + + /** + * Describes a class of error the operation ended with. + * + * Note: The `error.type` SHOULD be predictable and SHOULD have low cardinality. +Instrumentations SHOULD document the list of errors they report. + +The cardinality of `error.type` within one instrumentation library SHOULD be low. +Telemetry consumers that aggregate data from multiple instrumentation libraries and applications +should be prepared for `error.type` to have high cardinality at query time when no +additional filters are applied. + +If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`. + +If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), +it's RECOMMENDED to: + +* Use a domain-specific attribute +* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. + */ + ERROR_TYPE: 'error.type', + + /** + * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + */ + HTTP_REQUEST_BODY_SIZE: 'http.request.body.size', + + /** + * HTTP request method. + * + * Note: HTTP request method value SHOULD be "known" to the instrumentation. +By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) +and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). + +If the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`. + +If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override +the list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named +OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods +(this list MUST be a full override of the default known method, it is not a list of known methods in addition to the defaults). + +HTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly. +Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent. +Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value. + */ + HTTP_REQUEST_METHOD: 'http.request.method', + + /** + * Original HTTP method sent by the client in the request line. + */ + HTTP_REQUEST_METHOD_ORIGINAL: 'http.request.method_original', + + /** + * The ordinal number of request resending attempt (for any reason, including redirects). + * + * Note: The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). + */ + HTTP_REQUEST_RESEND_COUNT: 'http.request.resend_count', + + /** + * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. + */ + HTTP_RESPONSE_BODY_SIZE: 'http.response.body.size', + + /** + * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). + */ + HTTP_RESPONSE_STATUS_CODE: 'http.response.status_code', + + /** + * The matched route, that is, the path template in the format used by the respective server framework. + * + * Note: MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. +SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. + */ + HTTP_ROUTE: 'http.route', + + /** + * Peer address of the network connection - IP address or Unix domain socket name. + */ + NETWORK_PEER_ADDRESS: 'network.peer.address', + + /** + * Peer port number of the network connection. + */ + NETWORK_PEER_PORT: 'network.peer.port', + + /** + * [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. + * + * Note: The value SHOULD be normalized to lowercase. + */ + NETWORK_PROTOCOL_NAME: 'network.protocol.name', + + /** + * Version of the protocol specified in `network.protocol.name`. + * + * Note: `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`. + */ + NETWORK_PROTOCOL_VERSION: 'network.protocol.version', + + /** + * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. + * + * Note: When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available. + */ + SERVER_ADDRESS: 'server.address', + + /** + * Server port number. + * + * Note: When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available. + */ + SERVER_PORT: 'server.port', + + /** + * Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986). + * + * Note: For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. +`url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password SHOULD be redacted and attribute's value SHOULD be `https://REDACTED:REDACTED@www.example.com/`. +`url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes. + */ + URL_FULL: 'url.full', + + /** + * The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component. + */ + URL_PATH: 'url.path', + + /** + * The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component. + * + * Note: Sensitive content provided in query string SHOULD be scrubbed when instrumentations can identify it. + */ + URL_QUERY: 'url.query', + + /** + * The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. + */ + URL_SCHEME: 'url.scheme', + + /** + * Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. + */ + USER_AGENT_ORIGINAL: 'user_agent.original', +}; diff --git a/plugins/node/instrumentation-undici/src/index.ts b/plugins/node/instrumentation-undici/src/index.ts new file mode 100644 index 0000000000..80c6504fbc --- /dev/null +++ b/plugins/node/instrumentation-undici/src/index.ts @@ -0,0 +1,25 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { UndiciInstrumentation } from './undici'; +export { + UndiciRequest, + UndiciResponse, + IgnoreRequestFunction, + RequestHookFunction, + StartSpanHookFunction, + UndiciInstrumentationConfig, +} from './types'; diff --git a/plugins/node/instrumentation-undici/src/internal-types.ts b/plugins/node/instrumentation-undici/src/internal-types.ts new file mode 100644 index 0000000000..fee0e7294a --- /dev/null +++ b/plugins/node/instrumentation-undici/src/internal-types.ts @@ -0,0 +1,48 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import type { Channel } from 'diagnostics_channel'; + +import { UndiciRequest, UndiciResponse } from './types'; + +export interface ListenerRecord { + name: string; + channel: Channel; + onMessage: (message: any, name: string) => void; +} + +export interface RequestMessage { + request: UndiciRequest; +} + +export interface RequestHeadersMessage { + request: UndiciRequest; + socket: any; +} + +export interface ResponseHeadersMessage { + request: UndiciRequest; + response: UndiciResponse; +} + +export interface RequestTrailersMessage { + request: UndiciRequest; + response: UndiciResponse; +} + +export interface RequestErrorMessage { + request: UndiciRequest; + error: Error; +} diff --git a/plugins/node/instrumentation-undici/src/types.ts b/plugins/node/instrumentation-undici/src/types.ts new file mode 100644 index 0000000000..0d28e1fff9 --- /dev/null +++ b/plugins/node/instrumentation-undici/src/types.ts @@ -0,0 +1,75 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import type { InstrumentationConfig } from '@opentelemetry/instrumentation'; +import type { Attributes, Span } from '@opentelemetry/api'; + +export interface UndiciRequest { + origin: string; + method: string; + path: string; + /** + * Serialized string of headers in the form `name: value\r\n` for v5 + * Array of strings v6 + */ + headers: string | string[]; + /** + * Helper method to add headers (from v6) + */ + addHeader: (name: string, value: string) => void; + throwOnError: boolean; + completed: boolean; + aborted: boolean; + idempotent: boolean; + contentLength: number | null; + contentType: string | null; + body: any; +} + +export interface UndiciResponse { + headers: Buffer[]; + statusCode: number; +} + +export interface IgnoreRequestFunction { + (request: T): boolean; +} + +export interface RequestHookFunction { + (span: Span, request: T): void; +} + +export interface StartSpanHookFunction { + (request: T): Attributes; +} + +// This package will instrument HTTP requests made through `undici` or `fetch` global API +// so it seems logical to have similar options than the HTTP instrumentation +export interface UndiciInstrumentationConfig + extends InstrumentationConfig { + /** Not trace all outgoing requests that matched with custom function */ + ignoreRequestHook?: IgnoreRequestFunction; + /** Function for adding custom attributes before request is handled */ + requestHook?: RequestHookFunction; + /** Function for adding custom attributes before a span is started */ + startSpanHook?: StartSpanHookFunction; + /** Require parent to create span for outgoing requests */ + requireParentforSpans?: boolean; + /** Map the following HTTP headers to span attributes. */ + headersToSpanAttributes?: { + requestHeaders?: string[]; + responseHeaders?: string[]; + }; +} diff --git a/plugins/node/instrumentation-undici/src/undici.ts b/plugins/node/instrumentation-undici/src/undici.ts new file mode 100644 index 0000000000..262bea42cd --- /dev/null +++ b/plugins/node/instrumentation-undici/src/undici.ts @@ -0,0 +1,483 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import * as diagch from 'diagnostics_channel'; +import { URL } from 'url'; + +import { + InstrumentationBase, + safeExecuteInTheMiddle, +} from '@opentelemetry/instrumentation'; +import { + Attributes, + context, + Histogram, + HrTime, + INVALID_SPAN_CONTEXT, + propagation, + Span, + SpanKind, + SpanStatusCode, + trace, + ValueType, +} from '@opentelemetry/api'; + +import { VERSION } from './version'; + +import { + ListenerRecord, + RequestHeadersMessage, + RequestMessage, + RequestTrailersMessage, + ResponseHeadersMessage, +} from './internal-types'; +import { UndiciInstrumentationConfig, UndiciRequest } from './types'; +import { SemanticAttributes } from './enums/SemanticAttributes'; +import { + hrTime, + hrTimeDuration, + hrTimeToMilliseconds, +} from '@opentelemetry/core'; + +interface InstrumentationRecord { + span: Span; + attributes: Attributes; + startTime: HrTime; +} + +// A combination of https://github.com/elastic/apm-agent-nodejs and +// https://github.com/gadget-inc/opentelemetry-instrumentations/blob/main/packages/opentelemetry-instrumentation-undici/src/index.ts +export class UndiciInstrumentation extends InstrumentationBase { + // Keep ref to avoid https://github.com/nodejs/node/issues/42170 bug and for + // unsubscribing. + private _channelSubs!: Array; + private _recordFromReq = new WeakMap(); + + private _httpClientDurationHistogram!: Histogram; + constructor(config?: UndiciInstrumentationConfig) { + super('@opentelemetry/instrumentation-undici', VERSION, config); + this.setConfig(config); + } + + // No need to instrument files/modules + protected override init() { + return undefined; + } + + override disable(): void { + if (!this._config.enabled) { + return; + } + + this._channelSubs.forEach(sub => sub.channel.unsubscribe(sub.onMessage)); + this._channelSubs.length = 0; + this._config.enabled = false; + } + + override enable(): void { + if (this._config.enabled) { + return; + } + this._config.enabled = true; + + // This method is called by the `InstrumentationAbstract` constructor before + // ours is called. So we need to ensure the property is initalized + this._channelSubs = this._channelSubs || []; + this.subscribeToChannel( + 'undici:request:create', + this.onRequestCreated.bind(this) + ); + this.subscribeToChannel( + 'undici:client:sendHeaders', + this.onRequestHeaders.bind(this) + ); + this.subscribeToChannel( + 'undici:request:headers', + this.onResponseHeaders.bind(this) + ); + this.subscribeToChannel('undici:request:trailers', this.onDone.bind(this)); + this.subscribeToChannel('undici:request:error', this.onError.bind(this)); + } + + override setConfig(config?: UndiciInstrumentationConfig): void { + super.setConfig(config); + + if (config?.enabled) { + this.enable(); + } else { + this.disable(); + } + } + + protected override _updateMetricInstruments() { + this._httpClientDurationHistogram = this.meter.createHistogram( + 'http.client.request.duration', + { + description: 'Measures the duration of outbound HTTP requests.', + unit: 's', + valueType: ValueType.DOUBLE, + advice: { + explicitBucketBoundaries: [ + 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, + 7.5, 10, + ], + }, + } + ); + } + + private _getConfig(): UndiciInstrumentationConfig { + return this._config as UndiciInstrumentationConfig; + } + + private subscribeToChannel( + diagnosticChannel: string, + onMessage: ListenerRecord['onMessage'] + ) { + const channel = diagch.channel(diagnosticChannel); + channel.subscribe(onMessage); + this._channelSubs.push({ + name: diagnosticChannel, + channel, + onMessage, + }); + } + + // This is the 1st message we receive for each request (fired after request creation). Here we will + // create the span and populate some atttributes, then link the span to the request for further + // span processing + private onRequestCreated({ request }: RequestMessage): void { + // Ignore if: + // - instrumentation is disabled + // - ignored by config + // - method is 'CONNECT' + const config = this._getConfig(); + const shouldIgnoreReq = safeExecuteInTheMiddle( + () => + !config.enabled || + request.method === 'CONNECT' || + config.ignoreRequestHook?.(request), + e => e && this._diag.error('caught ignoreRequestHook error: ', e), + true + ); + + if (shouldIgnoreReq) { + return; + } + + const startTime = hrTime(); + const requestUrl = new URL(request.origin + request.path); + const urlScheme = requestUrl.protocol.replace(':', ''); + const requestMethod = this.getRequestMethod(request.method); + const attributes: Attributes = { + [SemanticAttributes.HTTP_REQUEST_METHOD]: requestMethod, + [SemanticAttributes.HTTP_REQUEST_METHOD_ORIGINAL]: request.method, + [SemanticAttributes.URL_FULL]: requestUrl.toString(), + [SemanticAttributes.URL_PATH]: requestUrl.pathname, + [SemanticAttributes.URL_QUERY]: requestUrl.search, + [SemanticAttributes.URL_SCHEME]: urlScheme, + }; + + const schemePorts: Record = { https: '443', http: '80' }; + const serverAddress = requestUrl.hostname; + const serverPort = requestUrl.port || schemePorts[urlScheme]; + + attributes[SemanticAttributes.SERVER_ADDRESS] = serverAddress; + if (serverPort && !isNaN(Number(serverPort))) { + attributes[SemanticAttributes.SERVER_PORT] = Number(serverPort); + } + + // Get user agent from headers + let userAgent; + if (Array.isArray(request.headers)) { + const idx = request.headers.findIndex( + h => h.toLowerCase() === 'user-agent' + ); + userAgent = request.headers[idx + 1]; + } else if (typeof request.headers === 'string') { + const headers = request.headers.split('\r\n'); + const uaHeader = headers.find(h => + h.toLowerCase().startsWith('user-agent') + ); + userAgent = + uaHeader && uaHeader.substring(uaHeader.indexOf(':') + 1).trim(); + } + + if (userAgent) { + attributes[SemanticAttributes.USER_AGENT_ORIGINAL] = userAgent; + } + + // Get attributes from the hook if present + const hookAttributes = safeExecuteInTheMiddle( + () => config.startSpanHook?.(request), + e => e && this._diag.error('caught startSpanHook error: ', e), + true + ); + if (hookAttributes) { + Object.entries(hookAttributes).forEach(([key, val]) => { + attributes[key] = val; + }); + } + + // Check if parent span is required via config and: + // - if a parent is required but not present, we use a `NoopSpan` to still + // propagate context without recording it. + // - create a span otherwise + const activeCtx = context.active(); + const currentSpan = trace.getSpan(activeCtx); + let span: Span; + + if (config.requireParentforSpans && !currentSpan) { + span = trace.wrapSpanContext(INVALID_SPAN_CONTEXT); + } else { + span = this.tracer.startSpan( + requestMethod === '_OTHER' ? 'HTTP' : requestMethod, + { + kind: SpanKind.CLIENT, + attributes: attributes, + }, + activeCtx + ); + } + + // Execute the request hook if defined + safeExecuteInTheMiddle( + () => config.requestHook?.(span, request), + e => e && this._diag.error('caught requestHook error: ', e), + true + ); + + // Context propagation goes last so no hook can tamper + // the propagation headers + const requestContext = trace.setSpan(context.active(), span); + const addedHeaders: Record = {}; + propagation.inject(requestContext, addedHeaders); + + const headerEntries = Object.entries(addedHeaders); + + for (let i = 0; i < headerEntries.length; i++) { + const [k, v] = headerEntries[i]; + + if (typeof request.headers === 'string') { + request.headers += `${k}: ${v}\r\n`; + } else { + request.addHeader(k, v); + } + } + this._recordFromReq.set(request, { span, attributes, startTime }); + } + + // This is the 2nd message we receive for each request. It is fired when connection with + // the remote is established and about to send the first byte. Here we do have info about the + // remote address and port so we can populate some `network.*` attributes into the span + private onRequestHeaders({ request, socket }: RequestHeadersMessage): void { + const record = this._recordFromReq.get(request as UndiciRequest); + + if (!record) { + return; + } + + const config = this._getConfig(); + const { span } = record; + const { remoteAddress, remotePort } = socket; + const spanAttributes: Attributes = { + [SemanticAttributes.NETWORK_PEER_ADDRESS]: remoteAddress, + [SemanticAttributes.NETWORK_PEER_PORT]: remotePort, + }; + + // After hooks have been processed (which may modify request headers) + // we can collect the headers based on the configuration + if (config.headersToSpanAttributes?.requestHeaders) { + const headersToAttribs = new Set( + config.headersToSpanAttributes.requestHeaders.map(n => n.toLowerCase()) + ); + + // headers could be in form + // ['name: value', ...] for v5 + // ['name', 'value', ...] for v6 + const rawHeaders = Array.isArray(request.headers) + ? request.headers + : request.headers.split('\r\n'); + rawHeaders.forEach((h, idx) => { + const sepIndex = h.indexOf(':'); + const hasSeparator = sepIndex !== -1; + const name = ( + hasSeparator ? h.substring(0, sepIndex) : h + ).toLowerCase(); + const value = hasSeparator + ? h.substring(sepIndex + 1) + : rawHeaders[idx + 1]; + + if (headersToAttribs.has(name)) { + spanAttributes[`http.request.header.${name}`] = value.trim(); + } + }); + } + + span.setAttributes(spanAttributes); + } + + // This is the 3rd message we get for each request and it's fired when the server + // headers are received, body may not be accessible yet. + // From the response headers we can set the status and content length + private onResponseHeaders({ + request, + response, + }: ResponseHeadersMessage): void { + const record = this._recordFromReq.get(request); + + if (!record) { + return; + } + + const { span, attributes } = record; + const spanAttributes: Attributes = { + [SemanticAttributes.HTTP_RESPONSE_STATUS_CODE]: response.statusCode, + }; + + const config = this._getConfig(); + const headersToAttribs = new Set(); + + if (config.headersToSpanAttributes?.responseHeaders) { + config.headersToSpanAttributes?.responseHeaders.forEach(name => + headersToAttribs.add(name.toLowerCase()) + ); + } + + for (let idx = 0; idx < response.headers.length; idx = idx + 2) { + const name = response.headers[idx].toString().toLowerCase(); + const value = response.headers[idx + 1]; + + if (headersToAttribs.has(name)) { + spanAttributes[`http.response.header.${name}`] = value.toString(); + } + + if (name === 'content-length') { + const contentLength = Number(value.toString()); + if (!isNaN(contentLength)) { + spanAttributes['http.response.header.content-length'] = contentLength; + } + } + } + + span.setAttributes(spanAttributes); + span.setStatus({ + code: + response.statusCode >= 400 + ? SpanStatusCode.ERROR + : SpanStatusCode.UNSET, + }); + record.attributes = Object.assign(attributes, spanAttributes); + } + + // This is the last event we receive if the request went without any errors + private onDone({ request }: RequestTrailersMessage): void { + const record = this._recordFromReq.get(request); + + if (!record) { + return; + } + + const { span, attributes, startTime } = record; + + // End the span + span.end(); + this._recordFromReq.delete(request); + + // Record metrics + this.recordRequestDuration(attributes, startTime); + } + + // This is the event we get when something is wrong in the request like + // - invalid options when calling `fetch` global API or any undici method for request + // - connectivity errors such as unreachable host + // - requests aborted through an `AbortController.signal` + // NOTE: server errors are considered valid responses and it's the lib consumer + // who should deal with that. + private onError({ request, error }: any): void { + const record = this._recordFromReq.get(request); + + if (!record) { + return; + } + + const { span, attributes, startTime } = record; + + // NOTE: in `undici@6.3.0` when request aborted the error type changes from + // a custom error (`RequestAbortedError`) to a built-in `DOMException` carrying + // some differences: + // - `code` is from DOMEXception (ABORT_ERR: 20) + // - `message` changes + // - stacktrace is smaller and contains node internal frames + span.recordException(error); + span.setStatus({ + code: SpanStatusCode.ERROR, + message: error.message, + }); + span.end(); + this._recordFromReq.delete(request); + + // Record metrics (with the error) + attributes[SemanticAttributes.ERROR_TYPE] = error.message; + this.recordRequestDuration(attributes, startTime); + } + + private recordRequestDuration(attributes: Attributes, startTime: HrTime) { + // Time to record metrics + const metricsAttributes: Attributes = {}; + // Get the attribs already in span attributes + const keysToCopy = [ + SemanticAttributes.HTTP_RESPONSE_STATUS_CODE, + SemanticAttributes.HTTP_REQUEST_METHOD, + SemanticAttributes.SERVER_ADDRESS, + SemanticAttributes.SERVER_PORT, + SemanticAttributes.URL_SCHEME, + SemanticAttributes.ERROR_TYPE, + ]; + keysToCopy.forEach(key => { + if (key in attributes) { + metricsAttributes[key] = attributes[key]; + } + }); + + // Take the duration and record it + const durationSeconds = + hrTimeToMilliseconds(hrTimeDuration(startTime, hrTime())) / 1000; + this._httpClientDurationHistogram.record( + durationSeconds, + metricsAttributes + ); + } + + private getRequestMethod(original: string): string { + const knownMethods = { + CONNECT: true, + OPTIONS: true, + HEAD: true, + GET: true, + POST: true, + PUT: true, + PATCH: true, + DELETE: true, + TRACE: true, + }; + + if (original.toUpperCase() in knownMethods) { + return original.toUpperCase(); + } + + return '_OTHER'; + } +} diff --git a/plugins/node/instrumentation-undici/test/fetch.test.ts b/plugins/node/instrumentation-undici/test/fetch.test.ts new file mode 100644 index 0000000000..96fa7090f4 --- /dev/null +++ b/plugins/node/instrumentation-undici/test/fetch.test.ts @@ -0,0 +1,414 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import * as assert from 'assert'; + +import { + SpanKind, + SpanStatusCode, + context, + propagation, + trace, +} from '@opentelemetry/api'; +import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; +import { + InMemorySpanExporter, + SimpleSpanProcessor, +} from '@opentelemetry/sdk-trace-base'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; + +import { UndiciInstrumentation } from '../src/undici'; + +import { MockPropagation } from './utils/mock-propagation'; +import { MockServer } from './utils/mock-server'; +import { assertSpan } from './utils/assertSpan'; + +const instrumentation = new UndiciInstrumentation(); +instrumentation.enable(); +instrumentation.disable(); + +const protocol = 'http'; +const hostname = 'localhost'; +const mockServer = new MockServer(); +const memoryExporter = new InMemorySpanExporter(); +const provider = new NodeTracerProvider(); +provider.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); +instrumentation.setTracerProvider(provider); + +describe('UndiciInstrumentation `fetch` tests', function () { + before(function (done) { + // Do not test if the `fetch` global API is not available + // This applies to nodejs < v18 or nodejs < v16.15 wihtout the flag + // `--experimental-global-fetch` set + // https://nodejs.org/api/globals.html#fetch + if (typeof globalThis.fetch !== 'function') { + this.skip(); + } + + propagation.setGlobalPropagator(new MockPropagation()); + context.setGlobalContextManager(new AsyncHooksContextManager().enable()); + mockServer.start(done); + mockServer.mockListener((req, res) => { + // There are some situations where there is no way to access headers + // for trace propagation asserts like: + // const resp = await fetch('http://host:port') + // so we need to do the assertion here + try { + assert.ok( + req.headers[MockPropagation.TRACE_CONTEXT_KEY], + `trace propagation for ${MockPropagation.TRACE_CONTEXT_KEY} works` + ); + assert.ok( + req.headers[MockPropagation.SPAN_CONTEXT_KEY], + `trace propagation for ${MockPropagation.SPAN_CONTEXT_KEY} works` + ); + } catch (assertErr) { + // The exception will hang the server and the test so we set a header + // back to the test to make an assertion + res.setHeader('propagation-error', (assertErr as Error).message); + } + + // Retur a valid response always + res.statusCode = 200; + res.setHeader('content-type', 'application/json'); + res.setHeader('foo-server', 'bar'); + res.write(JSON.stringify({ success: true })); + res.end(); + }); + }); + + after(function (done) { + context.disable(); + propagation.disable(); + mockServer.mockListener(undefined); + mockServer.stop(done); + }); + + beforeEach(function () { + memoryExporter.reset(); + }); + + describe('disable()', function () { + it('should not create spans when disabled', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Disable via config + instrumentation.setConfig({ enabled: false }); + + const fetchUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const response = await fetch(fetchUrl); + assert.ok( + response.headers.get('propagation-error') != null, + 'propagation is not set if instrumentation disabled' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0, 'no spans are created'); + }); + }); + + describe('enable()', function () { + beforeEach(function () { + instrumentation.enable(); + }); + afterEach(function () { + // Empty configuration & disable + instrumentation.setConfig({ enabled: false }); + }); + + it('should create valid spans even if the configuration hooks fail', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Set the bad configuration + instrumentation.setConfig({ + enabled: true, + ignoreRequestHook: () => { + throw new Error('ignoreRequestHook error'); + }, + requestHook: () => { + throw new Error('requestHook error'); + }, + startSpanHook: () => { + throw new Error('startSpanHook error'); + }, + }); + + const fetchUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const response = await fetch(fetchUrl); + assert.ok( + response.headers.get('propagation-error') == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: response.status, + httpMethod: 'GET', + path: '/', + query: '?query=test', + resHeaders: response.headers, + }); + }); + + it('should create valid spans with empty configuration', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + const fetchUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const response = await fetch(fetchUrl); + assert.ok( + response.headers.get('propagation-error') == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: response.status, + httpMethod: 'GET', + path: '/', + query: '?query=test', + resHeaders: response.headers, + }); + }); + + it('should create valid spans with the given configuration', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Set configuration + instrumentation.setConfig({ + enabled: true, + ignoreRequestHook: req => { + return req.path.indexOf('/ignore/path') !== -1; + }, + requestHook: (span, req) => { + // We should mind the type of headers + if (typeof req.headers === 'string') { + req.headers += 'x-requested-with: undici\r\n'; + } else { + req.headers.push('x-requested-with', 'undici'); + } + }, + startSpanHook: request => { + return { + 'test.hook.attribute': 'hook-value', + }; + }, + headersToSpanAttributes: { + requestHeaders: ['foo-client', 'x-requested-with'], + responseHeaders: ['foo-server'], + }, + }); + + // Do some requests + const ignoreResponse = await fetch( + `${protocol}://${hostname}:${mockServer.port}/ignore/path` + ); + const reqInit = { + headers: new Headers({ + 'user-agent': 'custom', + 'foo-client': 'bar', + }), + }; + assert.ok( + ignoreResponse.headers.get('propagation-error'), + 'propagation is not set for ignored requests' + ); + + const queryResponse = await fetch( + `${protocol}://${hostname}:${mockServer.port}/?query=test`, + reqInit + ); + assert.ok( + queryResponse.headers.get('propagation-error') == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: queryResponse.status, + httpMethod: 'GET', + path: '/', + query: '?query=test', + reqHeaders: reqInit.headers, + resHeaders: queryResponse.headers, + }); + assert.strictEqual( + span.attributes['http.request.header.foo-client'], + 'bar', + 'request headers from fetch options are captured' + ); + assert.strictEqual( + span.attributes['http.request.header.x-requested-with'], + 'undici', + 'request headers from requestHook are captured' + ); + assert.strictEqual( + span.attributes['http.response.header.foo-server'], + 'bar', + 'response headers from the server are captured' + ); + assert.strictEqual( + span.attributes['test.hook.attribute'], + 'hook-value', + 'startSpanHook is called' + ); + }); + + it('should not create spans without parent if required in configuration', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + instrumentation.setConfig({ + enabled: true, + requireParentforSpans: true, + }); + + const fetchUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const response = await fetch(fetchUrl); + assert.ok( + response.headers.get('propagation-error') == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0, 'no spans are created'); + }); + + it('should not create spans with parent if required in configuration', function (done) { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + instrumentation.setConfig({ + enabled: true, + requireParentforSpans: true, + }); + + const tracer = provider.getTracer('default'); + const span = tracer.startSpan('parentSpan', { + kind: SpanKind.INTERNAL, + }); + + context.with(trace.setSpan(context.active(), span), async () => { + const fetchUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const response = await fetch(fetchUrl); + + span.end(); + assert.ok( + response.headers.get('propagation-error') == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2, 'child span is created'); + assert.strictEqual( + spans.filter(span => span.kind === SpanKind.CLIENT).length, + 1, + 'child span is created' + ); + assert.strictEqual( + spans.filter(span => span.kind === SpanKind.INTERNAL).length, + 1, + 'parent span is present' + ); + + done(); + }); + }); + + it('should capture errors using fetch API', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + let fetchError; + try { + const fetchUrl = 'http://unexistent-host-name/path'; + await fetch(fetchUrl); + } catch (err) { + // Expected error + fetchError = err as Error; + } + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'unexistent-host-name', + httpMethod: 'GET', + path: '/path', + error: fetchError, + noNetPeer: true, // do not check network attribs + forceStatus: { + code: SpanStatusCode.ERROR, + message: 'getaddrinfo ENOTFOUND unexistent-host-name', + }, + }); + }); + + it('should capture error if fetch request is aborted', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + let fetchError; + const controller = new AbortController(); + const fetchUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const fetchPromise = fetch(fetchUrl, { signal: controller.signal }); + controller.abort(); + try { + await fetchPromise; + } catch (err) { + // Expected error + fetchError = err as Error; + } + + // Let the error be published to diagnostics channel + await new Promise(r => setTimeout(r, 5)); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpMethod: 'GET', + path: '/', + query: '?query=test', + error: fetchError, + noNetPeer: true, // do not check network attribs + forceStatus: { + code: SpanStatusCode.ERROR, + message: 'The operation was aborted.', + }, + }); + }); + }); +}); diff --git a/plugins/node/instrumentation-undici/test/metrics.test.ts b/plugins/node/instrumentation-undici/test/metrics.test.ts new file mode 100644 index 0000000000..0fc633ef19 --- /dev/null +++ b/plugins/node/instrumentation-undici/test/metrics.test.ts @@ -0,0 +1,194 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import * as assert from 'assert'; + +import { context, propagation } from '@opentelemetry/api'; +import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; +import { + AggregationTemporality, + DataPointType, + InMemoryMetricExporter, + MeterProvider, +} from '@opentelemetry/sdk-metrics'; + +import { UndiciInstrumentation } from '../src/undici'; + +import { MockServer } from './utils/mock-server'; +import { MockMetricsReader } from './utils/mock-metrics-reader'; +import { SemanticAttributes } from '../src/enums/SemanticAttributes'; + +const instrumentation = new UndiciInstrumentation(); +instrumentation.enable(); +instrumentation.disable(); + +const protocol = 'http'; +const hostname = 'localhost'; +const mockServer = new MockServer(); +const provider = new NodeTracerProvider(); +const meterProvider = new MeterProvider(); +const metricsMemoryExporter = new InMemoryMetricExporter( + AggregationTemporality.DELTA +); +const metricReader = new MockMetricsReader(metricsMemoryExporter); +meterProvider.addMetricReader(metricReader); +instrumentation.setTracerProvider(provider); +instrumentation.setMeterProvider(meterProvider); + +describe('UndiciInstrumentation metrics tests', function () { + before(function (done) { + // Do not test if the `fetch` global API is not available + // This applies to nodejs < v18 or nodejs < v16.15 without the flag + // `--experimental-global-fetch` set + // https://nodejs.org/api/globals.html#fetch + if (typeof globalThis.fetch !== 'function') { + this.skip(); + } + + context.setGlobalContextManager(new AsyncHooksContextManager().enable()); + mockServer.start(done); + mockServer.mockListener((req, res) => { + // Return a valid response always + res.statusCode = 200; + res.setHeader('content-type', 'application/json'); + res.write(JSON.stringify({ success: true })); + res.end(); + }); + + // enable instrumentation for all tests + instrumentation.enable(); + }); + + after(function (done) { + instrumentation.disable(); + context.disable(); + propagation.disable(); + mockServer.mockListener(undefined); + mockServer.stop(done); + }); + + beforeEach(function () { + metricsMemoryExporter.reset(); + }); + + describe('with fetch API', function () { + before(function (done) { + // Do not test if the `fetch` global API is not available + // This applies to nodejs < v18 or nodejs < v16.15 without the flag + // `--experimental-global-fetch` set + // https://nodejs.org/api/globals.html#fetch + if (typeof globalThis.fetch !== 'function') { + this.skip(); + } + + done(); + }); + + it('should report "http.client.request.duration" metric', async () => { + const fetchUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + await fetch(fetchUrl); + + await metricReader.collectAndExport(); + const resourceMetrics = metricsMemoryExporter.getMetrics(); + const scopeMetrics = resourceMetrics[0].scopeMetrics; + const metrics = scopeMetrics[0].metrics; + + assert.strictEqual(scopeMetrics.length, 1, 'scopeMetrics count'); + assert.strictEqual(metrics.length, 1, 'metrics count'); + assert.strictEqual( + metrics[0].descriptor.name, + 'http.client.request.duration' + ); + assert.strictEqual( + metrics[0].descriptor.description, + 'Measures the duration of outbound HTTP requests.' + ); + assert.strictEqual(metrics[0].descriptor.unit, 's'); + assert.strictEqual(metrics[0].dataPointType, DataPointType.HISTOGRAM); + assert.strictEqual(metrics[0].dataPoints.length, 1); + + const metricAttributes = metrics[0].dataPoints[0].attributes; + assert.strictEqual( + metricAttributes[SemanticAttributes.URL_SCHEME], + 'http' + ); + assert.strictEqual( + metricAttributes[SemanticAttributes.HTTP_REQUEST_METHOD], + 'GET' + ); + assert.strictEqual( + metricAttributes[SemanticAttributes.SERVER_ADDRESS], + 'localhost' + ); + assert.strictEqual( + metricAttributes[SemanticAttributes.SERVER_PORT], + mockServer.port + ); + assert.strictEqual( + metricAttributes[SemanticAttributes.HTTP_RESPONSE_STATUS_CODE], + 200 + ); + }); + + it('should have error.type in "http.client.request.duration" metric', async () => { + const fetchUrl = 'http://unknownhost/'; + + try { + await fetch(fetchUrl); + } catch (err) { + // Expected error, do nothing + } + + await metricReader.collectAndExport(); + const resourceMetrics = metricsMemoryExporter.getMetrics(); + const scopeMetrics = resourceMetrics[0].scopeMetrics; + const metrics = scopeMetrics[0].metrics; + + assert.strictEqual(scopeMetrics.length, 1, 'scopeMetrics count'); + assert.strictEqual(metrics.length, 1, 'metrics count'); + assert.strictEqual( + metrics[0].descriptor.name, + 'http.client.request.duration' + ); + assert.strictEqual( + metrics[0].descriptor.description, + 'Measures the duration of outbound HTTP requests.' + ); + assert.strictEqual(metrics[0].descriptor.unit, 's'); + assert.strictEqual(metrics[0].dataPointType, DataPointType.HISTOGRAM); + assert.strictEqual(metrics[0].dataPoints.length, 1); + + const metricAttributes = metrics[0].dataPoints[0].attributes; + assert.strictEqual( + metricAttributes[SemanticAttributes.URL_SCHEME], + 'http' + ); + assert.strictEqual( + metricAttributes[SemanticAttributes.HTTP_REQUEST_METHOD], + 'GET' + ); + assert.strictEqual( + metricAttributes[SemanticAttributes.SERVER_ADDRESS], + 'unknownhost' + ); + assert.strictEqual(metricAttributes[SemanticAttributes.SERVER_PORT], 80); + assert.ok( + metricAttributes[SemanticAttributes.ERROR_TYPE], + `the metric contains "${SemanticAttributes.ERROR_TYPE}" attribute if request failed` + ); + }); + }); +}); diff --git a/plugins/node/instrumentation-undici/test/undici.test.ts b/plugins/node/instrumentation-undici/test/undici.test.ts new file mode 100644 index 0000000000..fd48803a3f --- /dev/null +++ b/plugins/node/instrumentation-undici/test/undici.test.ts @@ -0,0 +1,746 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import * as assert from 'assert'; +import { Writable } from 'stream'; + +import { + SpanKind, + SpanStatusCode, + context, + propagation, + trace, +} from '@opentelemetry/api'; +import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; +import { + InMemorySpanExporter, + SimpleSpanProcessor, +} from '@opentelemetry/sdk-trace-base'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; + +import { UndiciInstrumentation } from '../src/undici'; + +import { MockPropagation } from './utils/mock-propagation'; +import { MockServer } from './utils/mock-server'; +import { assertSpan } from './utils/assertSpan'; + +import type { fetch, stream, request, Client, Dispatcher } from 'undici'; + +type PromisedValue = T extends Promise ? R : never; + +const instrumentation = new UndiciInstrumentation(); +instrumentation.enable(); +instrumentation.disable(); + +// Reference to the `undici` module +let undici: { + fetch: typeof fetch; + request: typeof request; + stream: typeof stream; + Client: typeof Client; +}; + +const protocol = 'http'; +const hostname = 'localhost'; +const mockServer = new MockServer(); +const memoryExporter = new InMemorySpanExporter(); +const provider = new NodeTracerProvider(); +provider.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); +instrumentation.setTracerProvider(provider); + +// Undici docs (https://github.com/nodejs/undici#garbage-collection) suggest +// that an undici response body should always be consumed. +async function consumeResponseBody(body: Dispatcher.ResponseData['body']) { + return new Promise(resolve => { + const devNull = new Writable({ + write(_chunk, _encoding, cb) { + setImmediate(cb); + }, + }); + body.pipe(devNull); + body.on('end', resolve); + }); +} + +describe('UndiciInstrumentation `undici` tests', function () { + before(function (done) { + // Load `undici`. It may fail if nodejs version is <18 because the module uses + // features only available from that version. In that case skip the test. + try { + undici = require('undici'); + } catch (loadErr) { + this.skip(); + } + + propagation.setGlobalPropagator(new MockPropagation()); + context.setGlobalContextManager(new AsyncHooksContextManager().enable()); + mockServer.start(done); + mockServer.mockListener((req, res) => { + // There are some situations where there is no way to access headers + // for trace propagation asserts like: + // const resp = await fetch('http://host:port') + // so we need to do the assertion here + try { + assert.ok( + req.headers[MockPropagation.TRACE_CONTEXT_KEY], + `trace propagation for ${MockPropagation.TRACE_CONTEXT_KEY} works` + ); + assert.ok( + req.headers[MockPropagation.SPAN_CONTEXT_KEY], + `trace propagation for ${MockPropagation.SPAN_CONTEXT_KEY} works` + ); + } catch (assertErr) { + // The exception will hang the server and the test so we set a header + // back to the test to make an assertion + res.setHeader('propagation-error', (assertErr as Error).message); + } + + // Retur a valid response always + res.statusCode = 200; + res.setHeader('content-type', 'application/json'); + res.setHeader('foo-server', 'bar'); + res.write(JSON.stringify({ success: true })); + res.end(); + }); + }); + + after(function (done) { + context.disable(); + propagation.disable(); + mockServer.mockListener(undefined); + mockServer.stop(done); + }); + + beforeEach(function () { + memoryExporter.reset(); + }); + + describe('disable()', function () { + it('should not create spans when disabled', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Disable via config + instrumentation.setConfig({ enabled: false }); + + const requestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const { headers, body } = await undici.request(requestUrl); + await consumeResponseBody(body); + + assert.ok( + headers['propagation-error'] != null, + 'propagation is not set if instrumentation disabled' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0, 'no spans are created'); + }); + }); + + describe('enable()', function () { + beforeEach(function () { + instrumentation.enable(); + // Set configuration + instrumentation.setConfig({ + enabled: true, + ignoreRequestHook: req => { + return req.path.indexOf('/ignore/path') !== -1; + }, + requestHook: (span, req) => { + // We should mind the type of headers + if (typeof req.headers === 'string') { + req.headers += 'x-requested-with: undici\r\n'; + } else { + req.headers.push('x-requested-with', 'undici'); + } + }, + startSpanHook: request => { + return { + 'test.hook.attribute': 'hook-value', + }; + }, + headersToSpanAttributes: { + requestHeaders: ['foo-client', 'x-requested-with'], + responseHeaders: ['foo-server'], + }, + }); + }); + afterEach(function () { + // Empty configuration & disable + instrumentation.setConfig({ enabled: false }); + }); + + it('should ignore requests based on the result of ignoreRequestHook', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Do some requests + const headers = { + 'user-agent': 'custom', + 'foo-client': 'bar', + }; + + const ignoreRequestUrl = `${protocol}://${hostname}:${mockServer.port}/ignore/path`; + const ignoreResponse = await undici.request(ignoreRequestUrl, { + headers, + }); + await consumeResponseBody(ignoreResponse.body); + + assert.ok( + ignoreResponse.headers['propagation-error'], + 'propagation is not set for ignored requests' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.ok(spans.length === 0, 'ignoreRequestHook is filtering requests'); + }); + + it('should create valid spans for different request methods', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Do some requests + const headers = { + 'user-agent': 'custom', + 'foo-client': 'bar', + }; + + // In version v5 if `undici` you get the following error when requesting with a method + // that is not one of the known ones in uppercase. Using + // + // SocketError: other side closed + // at Socket.onSocketEnd (node_modules/undici/lib/client.js:1118:22) + // at endReadableNT (internal/streams/readable.js:1333:12) + // at processTicksAndRejections (internal/process/task_queues.js:82:21) + let firstQueryResponse: PromisedValue>; + let secondQueryResponse: PromisedValue>; + try { + const queryRequestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + firstQueryResponse = await undici.request(queryRequestUrl, { + headers, + // @ts-expect-error - method type expects in uppercase + method: 'get', + }); + await consumeResponseBody(firstQueryResponse.body); + + secondQueryResponse = await undici.request(queryRequestUrl, { + headers, + // @ts-expect-error - method type expects known HTTP method (GET, POST, PUT, ...) + method: 'custom', + }); + await consumeResponseBody(secondQueryResponse.body); + } catch (undiciErr) { + const { stack } = undiciErr as Error; + + if (stack?.startsWith('SocketError: other side closed')) { + this.skip(); + } + } + + assert.ok( + firstQueryResponse!.headers['propagation-error'] === undefined, + 'propagation is set for instrumented requests' + ); + assert.ok( + secondQueryResponse!.headers['propagation-error'] === undefined, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2); + assertSpan(spans[0], { + hostname: 'localhost', + httpStatusCode: firstQueryResponse!.statusCode, + httpMethod: 'GET', + path: '/', + query: '?query=test', + reqHeaders: headers, + resHeaders: firstQueryResponse!.headers, + }); + assert.strictEqual( + spans[0].attributes['http.request.method_original'], + 'get', + 'request original method is captured' + ); + + assertSpan(spans[1], { + hostname: 'localhost', + httpStatusCode: secondQueryResponse!.statusCode, + spanName: 'HTTP', + httpMethod: '_OTHER', + path: '/', + query: '?query=test', + reqHeaders: headers, + resHeaders: secondQueryResponse!.headers, + }); + assert.strictEqual( + spans[1].attributes['http.request.method_original'], + 'custom', + 'request original method is captured' + ); + }); + + it('should create valid spans for "request" method', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Do some requests + const headers = { + 'user-agent': 'custom', + 'foo-client': 'bar', + }; + + const ignoreRequestUrl = `${protocol}://${hostname}:${mockServer.port}/ignore/path`; + const ignoreResponse = await undici.request(ignoreRequestUrl, { + headers, + }); + await consumeResponseBody(ignoreResponse.body); + + assert.ok( + ignoreResponse.headers['propagation-error'], + 'propagation is not set for ignored requests' + ); + + const queryRequestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const queryResponse = await undici.request(queryRequestUrl, { headers }); + await consumeResponseBody(queryResponse.body); + + assert.ok( + queryResponse.headers['propagation-error'] == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: queryResponse.statusCode, + httpMethod: 'GET', + path: '/', + query: '?query=test', + reqHeaders: headers, + resHeaders: queryResponse.headers, + }); + assert.strictEqual( + span.attributes['http.request.header.foo-client'], + 'bar', + 'request headers from fetch options are captured' + ); + assert.strictEqual( + span.attributes['http.request.header.x-requested-with'], + 'undici', + 'request headers from requestHook are captured' + ); + assert.strictEqual( + span.attributes['http.response.header.foo-server'], + 'bar', + 'response headers from the server are captured' + ); + assert.strictEqual( + span.attributes['test.hook.attribute'], + 'hook-value', + 'startSpanHook is called' + ); + }); + + it('should create valid spans for "fetch" method', async function () { + // Fetch method is available from node v16.5 + // we want to skip this test for lowe versions + // https://github.com/nodejs/undici/blob/08839e450aa6dd1b0e2c019d6e5869cd5b966be1/index.js#L95 + if (typeof undici.fetch === 'undefined') { + this.skip(); + } + + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Do some requests + const headers = { + 'user-agent': 'custom', + 'foo-client': 'bar', + }; + const queryRequestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const queryResponse = await undici.fetch(queryRequestUrl, { headers }); + await queryResponse.text(); + + assert.ok( + queryResponse.headers.get('propagation-error') == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: queryResponse.status, + httpMethod: 'GET', + path: '/', + query: '?query=test', + reqHeaders: headers, + resHeaders: queryResponse.headers as unknown as Headers, + }); + assert.strictEqual( + span.attributes['http.request.header.foo-client'], + 'bar', + 'request headers from fetch options are captured' + ); + assert.strictEqual( + span.attributes['http.request.header.x-requested-with'], + 'undici', + 'request headers from requestHook are captured' + ); + assert.strictEqual( + span.attributes['http.response.header.foo-server'], + 'bar', + 'response headers from the server are captured' + ); + assert.strictEqual( + span.attributes['test.hook.attribute'], + 'hook-value', + 'startSpanHook is called' + ); + }); + + it('should create valid spans for "stream" method', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Do some requests + const headers = { + 'user-agent': 'custom', + 'foo-client': 'bar', + }; + // https://undici.nodejs.org/#/docs/api/Dispatcher?id=example-1-basic-get-stream-request + const queryRequestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const queryResponse: Record = {}; + const bufs: any[] = []; + await undici.stream( + queryRequestUrl, + { opaque: { bufs }, headers } as any, + ({ statusCode, headers, opaque }) => { + queryResponse.statusCode = statusCode; + queryResponse.headers = headers; + return new Writable({ + write(chunk, encoding, callback) { + (opaque as any).bufs.push(chunk); + callback(); + }, + }); + } + ); + + assert.ok( + queryResponse.headers['propagation-error'] == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: queryResponse.statusCode, + httpMethod: 'GET', + path: '/', + query: '?query=test', + reqHeaders: headers, + resHeaders: queryResponse.headers as unknown as Headers, + }); + assert.strictEqual( + span.attributes['http.request.header.foo-client'], + 'bar', + 'request headers from fetch options are captured' + ); + assert.strictEqual( + span.attributes['http.request.header.x-requested-with'], + 'undici', + 'request headers from requestHook are captured' + ); + assert.strictEqual( + span.attributes['http.response.header.foo-server'], + 'bar', + 'response headers from the server are captured' + ); + assert.strictEqual( + span.attributes['test.hook.attribute'], + 'hook-value', + 'startSpanHook is called' + ); + }); + + it('should create valid spans for "dispatch" method', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Do some requests + const headers = { + 'user-agent': 'custom', + 'foo-client': 'bar', + }; + + const queryRequestUrl = `${protocol}://${hostname}:${mockServer.port}`; + const queryResponse: Record = {}; + const client = new undici.Client(queryRequestUrl); + await new Promise((resolve, reject) => { + client.dispatch( + { + path: '/?query=test', + method: 'GET', + headers, + }, + { + onHeaders: (statusCode, headers) => { + queryResponse.statusCode = statusCode; + queryResponse.headers = headers; + return true; // unidici types require to return boolean + }, + onError: reject, + onComplete: resolve, + // Although the types say these following handlers are optional they must + // be defined to avoid a TypeError + onConnect: () => undefined, + onData: () => true, + } + ); + }); + + assert.ok( + queryResponse.headers['propagation-error'] == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: queryResponse.statusCode, + httpMethod: 'GET', + path: '/', + query: '?query=test', + reqHeaders: headers, + resHeaders: queryResponse.headers as unknown as Headers, + }); + assert.strictEqual( + span.attributes['http.request.header.foo-client'], + 'bar', + 'request headers from fetch options are captured' + ); + assert.strictEqual( + span.attributes['http.request.header.x-requested-with'], + 'undici', + 'request headers from requestHook are captured' + ); + assert.strictEqual( + span.attributes['http.response.header.foo-server'], + 'bar', + 'response headers from the server are captured' + ); + assert.strictEqual( + span.attributes['test.hook.attribute'], + 'hook-value', + 'startSpanHook is called' + ); + }); + + it('should create valid spans even if the configuration hooks fail', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + // Set the bad configuration + instrumentation.setConfig({ + enabled: true, + ignoreRequestHook: () => { + throw new Error('ignoreRequestHook error'); + }, + requestHook: () => { + throw new Error('requestHook error'); + }, + startSpanHook: () => { + throw new Error('startSpanHook error'); + }, + }); + + const requestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const { headers, statusCode, body } = await undici.request(requestUrl); + await consumeResponseBody(body); + + assert.ok( + headers['propagation-error'] == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpStatusCode: statusCode, + httpMethod: 'GET', + path: '/', + query: '?query=test', + resHeaders: headers, + }); + }); + + it('should not create spans without parent if required in configuration', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + instrumentation.setConfig({ + enabled: true, + requireParentforSpans: true, + }); + + const requestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const response = await undici.request(requestUrl); + await consumeResponseBody(response.body); + + assert.ok( + response.headers['propagation-error'] == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0, 'no spans are created'); + }); + + it('should create spans with parent if required in configuration', function (done) { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + instrumentation.setConfig({ + enabled: true, + requireParentforSpans: true, + }); + + const tracer = provider.getTracer('default'); + const span = tracer.startSpan('parentSpan', { + kind: SpanKind.INTERNAL, + }); + + context.with(trace.setSpan(context.active(), span), async () => { + const requestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const response = await undici.request(requestUrl); + await consumeResponseBody(response.body); + + span.end(); + assert.ok( + response.headers['propagation-error'] == null, + 'propagation is set for instrumented requests' + ); + + spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2, 'child span is created'); + assert.strictEqual( + spans.filter(span => span.kind === SpanKind.CLIENT).length, + 1, + 'child span is created' + ); + assert.strictEqual( + spans.filter(span => span.kind === SpanKind.INTERNAL).length, + 1, + 'parent span is present' + ); + + done(); + }); + }); + + it('should capture errors while doing request', async function () { + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + let fetchError; + try { + const requestUrl = 'http://unexistent-host-name/path'; + await undici.request(requestUrl); + } catch (err) { + // Expected error + fetchError = err as Error; + } + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'unexistent-host-name', + httpMethod: 'GET', + path: '/path', + error: fetchError, + noNetPeer: true, // do not check network attribs + forceStatus: { + code: SpanStatusCode.ERROR, + message: 'getaddrinfo ENOTFOUND unexistent-host-name', + }, + }); + }); + + it('should capture error if undici request is aborted', async function () { + // AbortController was added in: v15.0.0, v14.17.0 + // but we still run tests for node v14 + // https://nodejs.org/api/globals.html#class-abortcontroller + if (typeof AbortController === 'undefined') { + this.skip(); + } + + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + let requestError; + const controller = new AbortController(); + const requestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; + const requestPromise = undici.request(requestUrl, { + signal: controller.signal, + }); + controller.abort(); + try { + await requestPromise; + } catch (err) { + // Expected error + requestError = err as Error; + } + + // Let the error be published to diagnostics channel + await new Promise(r => setTimeout(r, 5)); + + spans = memoryExporter.getFinishedSpans(); + const span = spans[0]; + assert.ok(span, 'a span is present'); + assert.strictEqual(spans.length, 1); + assertSpan(span, { + hostname: 'localhost', + httpMethod: 'GET', + path: '/', + query: '?query=test', + error: requestError, + noNetPeer: true, // do not check network attribs + forceStatus: { + code: SpanStatusCode.ERROR, + message: requestError?.message, + }, + }); + }); + }); +}); diff --git a/plugins/node/instrumentation-undici/test/utils/assertSpan.ts b/plugins/node/instrumentation-undici/test/utils/assertSpan.ts new file mode 100644 index 0000000000..3ab0a66d7d --- /dev/null +++ b/plugins/node/instrumentation-undici/test/utils/assertSpan.ts @@ -0,0 +1,191 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { + SpanKind, + SpanStatus, + Exception, + SpanStatusCode, +} from '@opentelemetry/api'; +import { hrTimeToNanoseconds } from '@opentelemetry/core'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; +import * as assert from 'assert'; +import { SemanticAttributes } from '../../src/enums/SemanticAttributes'; + +type IncomingHttpHeaders = Record; + +export const assertSpan = ( + span: ReadableSpan, + validations: { + httpStatusCode?: number; + httpMethod: string; + spanName?: string; + resHeaders?: Headers | IncomingHttpHeaders; + hostname: string; + reqHeaders?: Headers | IncomingHttpHeaders; + path?: string | null; + query?: string | null; + forceStatus?: SpanStatus; + noNetPeer?: boolean; // we don't expect net peer info when request throw before being sent + error?: Exception; + } +) => { + assert.strictEqual(span.spanContext().traceId.length, 32); + assert.strictEqual(span.spanContext().spanId.length, 16); + assert.strictEqual(span.kind, SpanKind.CLIENT, 'span.kind is correct'); + assert.strictEqual( + span.name, + validations.spanName || validations.httpMethod, + 'span.name is correct' + ); + assert.strictEqual( + span.attributes[SemanticAttributes.HTTP_REQUEST_METHOD], + validations.httpMethod, + `attributes['${SemanticAttributes.HTTP_REQUEST_METHOD}'] is correct` + ); + + if (validations.path) { + assert.strictEqual( + span.attributes[SemanticAttributes.URL_PATH], + validations.path, + `attributes['${SemanticAttributes.URL_PATH}'] is correct` + ); + } + + if (validations.query) { + assert.strictEqual( + span.attributes[SemanticAttributes.URL_QUERY], + validations.query, + `attributes['${SemanticAttributes.URL_QUERY}'] is correct` + ); + } + + assert.strictEqual( + span.attributes[SemanticAttributes.HTTP_RESPONSE_STATUS_CODE], + validations.httpStatusCode, + `attributes['${SemanticAttributes.HTTP_RESPONSE_STATUS_CODE}'] is correct ${ + span.attributes[SemanticAttributes.HTTP_RESPONSE_STATUS_CODE] + }` + ); + + assert.strictEqual(span.links.length, 0, 'there are no links'); + + if (validations.error) { + assert.strictEqual(span.events.length, 1, 'span contains one error event'); + assert.strictEqual( + span.events[0].name, + 'exception', + 'error event name is correct' + ); + + const eventAttributes = span.events[0].attributes; + assert.ok(eventAttributes != null, 'event has attributes'); + assert.deepStrictEqual( + Object.keys(eventAttributes), + ['exception.type', 'exception.message', 'exception.stacktrace'], + 'the event attribute names are correct' + ); + } else { + assert.strictEqual(span.events.length, 0, 'span contains no events'); + } + + // Error message changes between version se we will + // only assert its presence + if (validations.forceStatus) { + assert.equal( + span.status.code, + validations.forceStatus.code, + 'span `status.code` is correct' + ); + assert.ok(span.status.message, 'span `status.message` is present'); + } else { + const { httpStatusCode } = validations; + const isStatusUnset = + httpStatusCode && httpStatusCode >= 100 && httpStatusCode < 400; + assert.equal( + span.status.code, + isStatusUnset ? SpanStatusCode.UNSET : SpanStatusCode.ERROR, + 'span `status.code` is correct' + ); + } + + assert.ok(span.endTime, 'must be finished'); + assert.ok( + hrTimeToNanoseconds(span.duration) > 0, + 'must have positive duration' + ); + + if (validations.resHeaders) { + // Headers were added in v17.5.0, v16.15.0 + // https://nodejs.org/api/globals.html#class-headers + const { resHeaders } = validations; + const contentLengthHeader = getHeader(resHeaders, 'content-length'); + + if (contentLengthHeader) { + const contentLength = Number(contentLengthHeader); + + assert.strictEqual( + span.attributes['http.response.header.content-length'], + contentLength + ); + } + } + + assert.strictEqual( + span.attributes[SemanticAttributes.SERVER_ADDRESS], + validations.hostname, + 'must be consistent (SERVER_ADDRESS and hostname)' + ); + if (!validations.noNetPeer) { + assert.ok( + span.attributes[SemanticAttributes.NETWORK_PEER_ADDRESS], + `must have ${SemanticAttributes.NETWORK_PEER_ADDRESS}` + ); + assert.ok( + span.attributes[SemanticAttributes.NETWORK_PEER_PORT], + `must have ${SemanticAttributes.NETWORK_PEER_PORT}` + ); + } + assert.ok( + (span.attributes[SemanticAttributes.URL_FULL] as string).indexOf( + span.attributes[SemanticAttributes.SERVER_ADDRESS] as string + ) > -1, + `${SemanticAttributes.URL_FULL} & ${SemanticAttributes.SERVER_ADDRESS} must be consistent` + ); + + if (validations.reqHeaders) { + const userAgent = getHeader(validations.reqHeaders, 'user-agent'); + + if (userAgent) { + assert.strictEqual( + span.attributes[SemanticAttributes.USER_AGENT_ORIGINAL], + userAgent + ); + } + } +}; + +/** + * Gets a header by name regardless of the type + */ +function getHeader( + headers: Headers | IncomingHttpHeaders, + name: string +): string | string[] | null | undefined { + if (typeof headers.get === 'function') { + return headers.get(name); + } + return (headers as IncomingHttpHeaders)[name]; +} diff --git a/plugins/node/instrumentation-undici/test/utils/mock-metrics-reader.ts b/plugins/node/instrumentation-undici/test/utils/mock-metrics-reader.ts new file mode 100644 index 0000000000..c3ffbf0ae6 --- /dev/null +++ b/plugins/node/instrumentation-undici/test/utils/mock-metrics-reader.ts @@ -0,0 +1,47 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MetricReader, PushMetricExporter } from '@opentelemetry/sdk-metrics'; + +export class MockMetricsReader extends MetricReader { + constructor(private _exporter: PushMetricExporter) { + super({ + aggregationTemporalitySelector: + _exporter.selectAggregationTemporality?.bind(_exporter), + }); + } + + protected onForceFlush(): Promise { + return Promise.resolve(undefined); + } + + protected onShutdown(): Promise { + return Promise.resolve(undefined); + } + + public async collectAndExport(): Promise { + const result = await this.collect(); + await new Promise((resolve, reject) => { + this._exporter.export(result.resourceMetrics, result => { + if (result.error != null) { + reject(result.error); + } else { + resolve(); + } + }); + }); + } +} diff --git a/plugins/node/instrumentation-undici/test/utils/mock-propagation.ts b/plugins/node/instrumentation-undici/test/utils/mock-propagation.ts new file mode 100644 index 0000000000..5c49e661d6 --- /dev/null +++ b/plugins/node/instrumentation-undici/test/utils/mock-propagation.ts @@ -0,0 +1,52 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { + Context, + TextMapPropagator, + trace, + TraceFlags, +} from '@opentelemetry/api'; + +export class MockPropagation implements TextMapPropagator { + static TRACE_CONTEXT_KEY = 'x-mock-trace-id'; + static SPAN_CONTEXT_KEY = 'x-mock-span-id'; + extract(context: Context, carrier: Record) { + const extractedSpanContext = { + traceId: carrier[MockPropagation.TRACE_CONTEXT_KEY] as string, + spanId: carrier[MockPropagation.SPAN_CONTEXT_KEY] as string, + traceFlags: TraceFlags.SAMPLED, + isRemote: true, + }; + if (extractedSpanContext.traceId && extractedSpanContext.spanId) { + return trace.setSpanContext(context, extractedSpanContext); + } + return context; + } + inject(context: Context, carrier: Record): void { + const spanContext = trace.getSpanContext(context); + + if (spanContext) { + carrier[MockPropagation.TRACE_CONTEXT_KEY] = spanContext.traceId; + carrier[MockPropagation.SPAN_CONTEXT_KEY] = spanContext.spanId; + } + } + fields(): string[] { + return [ + MockPropagation.TRACE_CONTEXT_KEY, + MockPropagation.SPAN_CONTEXT_KEY, + ]; + } +} diff --git a/plugins/node/instrumentation-undici/test/utils/mock-server.ts b/plugins/node/instrumentation-undici/test/utils/mock-server.ts new file mode 100644 index 0000000000..8a160c8117 --- /dev/null +++ b/plugins/node/instrumentation-undici/test/utils/mock-server.ts @@ -0,0 +1,74 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import * as http from 'http'; + +export class MockServer { + private _port: number | undefined; + private _httpServer: http.Server | undefined; + private _reqListener: http.RequestListener | undefined; + + get port(): number { + return this._port || 0; + } + + mockListener(handler: http.RequestListener | undefined): void { + this._reqListener = handler; + } + + start(cb: (err?: Error) => void) { + this._httpServer = http.createServer((req, res) => { + // Use the mock listener if defined + if (typeof this._reqListener === 'function') { + return this._reqListener(req, res); + } + + // If no mock function is provided fallback to a basic response + res.statusCode = 200; + res.setHeader('content-type', 'application/json'); + res.write(JSON.stringify({ success: true })); + res.end(); + }); + + this._httpServer.listen(0, () => { + const addr = this._httpServer!.address(); + if (addr == null) { + cb(new Error('unexpected addr null')); + return; + } + + if (typeof addr === 'string') { + cb(new Error(`unexpected addr ${addr}`)); + return; + } + + if (addr.port <= 0) { + cb(new Error('Could not get port')); + return; + } + this._port = addr.port; + cb(); + }); + } + + stop(cb: (err?: Error) => void) { + if (this._httpServer) { + this._httpServer.close(); + this._httpServer = undefined; + this._reqListener = undefined; + } + cb(); + } +} diff --git a/plugins/node/instrumentation-undici/tsconfig.json b/plugins/node/instrumentation-undici/tsconfig.json new file mode 100644 index 0000000000..28be80d266 --- /dev/null +++ b/plugins/node/instrumentation-undici/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.base", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ] +} diff --git a/release-please-config.json b/release-please-config.json index 6db17aa16a..c0cace7d26 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -31,6 +31,7 @@ "plugins/node/instrumentation-runtime-node": {}, "plugins/node/instrumentation-socket.io": {}, "plugins/node/instrumentation-tedious": {}, + "plugins/node/instrumentation-undici": {}, "plugins/node/opentelemetry-instrumentation-aws-lambda": {}, "plugins/node/opentelemetry-instrumentation-aws-sdk": {}, "plugins/node/opentelemetry-instrumentation-bunyan": {}, From f09080137d786d57cb3666d00487abed5cb97f23 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 16:06:24 -0400 Subject: [PATCH 05/14] chore(resource-detector-azure): use exported strings for attributes (#2048) Use exported strings for Semantic Resource Attributes, Cloud Platform Values and Cloud Provider Values. Signed-off-by: maryliag Co-authored-by: Jamie Danielson --- .../package.json | 2 +- .../src/detectors/AzureAppServiceDetector.ts | 27 ++++---- .../src/detectors/AzureFunctionsDetector.ts | 35 +++++----- .../src/detectors/AzureVmDetector.ts | 26 +++++--- .../detectors/AzureAppServiceDetector.test.ts | 64 +++++++------------ .../detectors/AzureFunctionsDetector.test.ts | 45 ++++++------- package-lock.json | 4 +- 7 files changed, 97 insertions(+), 106 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-azure/package.json b/detectors/node/opentelemetry-resource-detector-azure/package.json index 6e1f51ae42..7690843f9d 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/package.json +++ b/detectors/node/opentelemetry-resource-detector-azure/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@opentelemetry/resources": "^1.10.1", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-azure#readme" } diff --git a/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureAppServiceDetector.ts b/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureAppServiceDetector.ts index 430899b81c..7811ba4fa3 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureAppServiceDetector.ts +++ b/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureAppServiceDetector.ts @@ -29,16 +29,22 @@ import { FUNCTIONS_VERSION, } from '../types'; import { - CloudProviderValues, - CloudPlatformValues, - SemanticResourceAttributes, + SEMRESATTRS_CLOUD_REGION, + SEMRESATTRS_DEPLOYMENT_ENVIRONMENT, + SEMRESATTRS_HOST_ID, + SEMRESATTRS_SERVICE_INSTANCE_ID, + SEMRESATTRS_SERVICE_NAME, + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CLOUD_PLATFORM, + CLOUDPROVIDERVALUES_AZURE, + CLOUDPLATFORMVALUES_AZURE_APP_SERVICE, } from '@opentelemetry/semantic-conventions'; const APP_SERVICE_ATTRIBUTE_ENV_VARS = { - [SemanticResourceAttributes.CLOUD_REGION]: REGION_NAME, - [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: WEBSITE_SLOT_NAME, - [SemanticResourceAttributes.HOST_ID]: WEBSITE_HOSTNAME, - [SemanticResourceAttributes.SERVICE_INSTANCE_ID]: WEBSITE_INSTANCE_ID, + [SEMRESATTRS_CLOUD_REGION]: REGION_NAME, + [SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: WEBSITE_SLOT_NAME, + [SEMRESATTRS_HOST_ID]: WEBSITE_HOSTNAME, + [SEMRESATTRS_SERVICE_INSTANCE_ID]: WEBSITE_INSTANCE_ID, [AZURE_APP_SERVICE_STAMP_RESOURCE_ATTRIBUTE]: WEBSITE_HOME_STAMPNAME, }; @@ -54,16 +60,15 @@ class AzureAppServiceDetector implements DetectorSync { if (websiteSiteName && !isAzureFunction) { attributes = { ...attributes, - [SemanticResourceAttributes.SERVICE_NAME]: websiteSiteName, + [SEMRESATTRS_SERVICE_NAME]: websiteSiteName, }; attributes = { ...attributes, - [SemanticResourceAttributes.CLOUD_PROVIDER]: CloudProviderValues.AZURE, + [SEMRESATTRS_CLOUD_PROVIDER]: CLOUDPROVIDERVALUES_AZURE, }; attributes = { ...attributes, - [SemanticResourceAttributes.CLOUD_PLATFORM]: - CloudPlatformValues.AZURE_APP_SERVICE, + [SEMRESATTRS_CLOUD_PLATFORM]: CLOUDPLATFORMVALUES_AZURE_APP_SERVICE, }; const azureResourceUri = this.getAzureResourceUri(websiteSiteName); diff --git a/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureFunctionsDetector.ts b/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureFunctionsDetector.ts index 2a695fd2d6..38b2f62f5e 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureFunctionsDetector.ts +++ b/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureFunctionsDetector.ts @@ -17,9 +17,15 @@ import { DetectorSync, IResource, Resource } from '@opentelemetry/resources'; import { - CloudProviderValues, - CloudPlatformValues, - SemanticResourceAttributes, + SEMRESATTRS_FAAS_NAME, + SEMRESATTRS_FAAS_VERSION, + SEMRESATTRS_FAAS_MAX_MEMORY, + SEMRESATTRS_FAAS_INSTANCE, + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CLOUD_PLATFORM, + SEMRESATTRS_CLOUD_REGION, + CLOUDPROVIDERVALUES_AZURE, + CLOUDPLATFORMVALUES_AZURE_FUNCTIONS, } from '@opentelemetry/semantic-conventions'; import { WEBSITE_SITE_NAME, @@ -30,10 +36,10 @@ import { } from '../types'; const AZURE_FUNCTIONS_ATTRIBUTE_ENV_VARS = { - [SemanticResourceAttributes.FAAS_NAME]: WEBSITE_SITE_NAME, - [SemanticResourceAttributes.FAAS_VERSION]: FUNCTIONS_VERSION, - [SemanticResourceAttributes.FAAS_INSTANCE]: WEBSITE_INSTANCE_ID, - [SemanticResourceAttributes.FAAS_MAX_MEMORY]: FUNCTIONS_MEM_LIMIT, + [SEMRESATTRS_FAAS_NAME]: WEBSITE_SITE_NAME, + [SEMRESATTRS_FAAS_VERSION]: FUNCTIONS_VERSION, + [SEMRESATTRS_FAAS_INSTANCE]: WEBSITE_INSTANCE_ID, + [SEMRESATTRS_FAAS_MAX_MEMORY]: FUNCTIONS_MEM_LIMIT, }; /** @@ -50,34 +56,33 @@ class AzureFunctionsDetector implements DetectorSync { const functionMemLimit = process.env[FUNCTIONS_MEM_LIMIT]; attributes = { - [SemanticResourceAttributes.CLOUD_PROVIDER]: CloudProviderValues.AZURE, - [SemanticResourceAttributes.CLOUD_PLATFORM]: - CloudPlatformValues.AZURE_FUNCTIONS, - [SemanticResourceAttributes.CLOUD_REGION]: process.env[REGION_NAME], + [SEMRESATTRS_CLOUD_PROVIDER]: CLOUDPROVIDERVALUES_AZURE, + [SEMRESATTRS_CLOUD_PLATFORM]: CLOUDPLATFORMVALUES_AZURE_FUNCTIONS, + [SEMRESATTRS_CLOUD_REGION]: process.env[REGION_NAME], }; if (functionName) { attributes = { ...attributes, - [SemanticResourceAttributes.FAAS_NAME]: functionName, + [SEMRESATTRS_FAAS_NAME]: functionName, }; } if (functionVersion) { attributes = { ...attributes, - [SemanticResourceAttributes.FAAS_VERSION]: functionVersion, + [SEMRESATTRS_FAAS_VERSION]: functionVersion, }; } if (functionInstance) { attributes = { ...attributes, - [SemanticResourceAttributes.FAAS_INSTANCE]: functionInstance, + [SEMRESATTRS_FAAS_INSTANCE]: functionInstance, }; } if (functionMemLimit) { attributes = { ...attributes, - [SemanticResourceAttributes.FAAS_MAX_MEMORY]: functionMemLimit, + [SEMRESATTRS_FAAS_MAX_MEMORY]: functionMemLimit, }; } diff --git a/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureVmDetector.ts b/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureVmDetector.ts index 9de9bc330b..1dfc6da705 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureVmDetector.ts +++ b/detectors/node/opentelemetry-resource-detector-azure/src/detectors/AzureVmDetector.ts @@ -22,9 +22,15 @@ import { ResourceAttributes, } from '@opentelemetry/resources'; import { - CloudPlatformValues, - CloudProviderValues, - SemanticResourceAttributes, + CLOUDPLATFORMVALUES_AZURE_VM, + CLOUDPROVIDERVALUES_AZURE, + SEMRESATTRS_CLOUD_PLATFORM, + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CLOUD_REGION, + SEMRESATTRS_HOST_ID, + SEMRESATTRS_HOST_NAME, + SEMRESATTRS_HOST_TYPE, + SEMRESATTRS_OS_VERSION, } from '@opentelemetry/semantic-conventions'; import { CLOUD_RESOURCE_ID_RESOURCE_ATTRIBUTE, @@ -90,14 +96,14 @@ class AzureVmResourceDetector implements DetectorSync { const attributes = { [AZURE_VM_SCALE_SET_NAME_ATTRIBUTE]: metadata['vmScaleSetName'], [AZURE_VM_SKU_ATTRIBUTE]: metadata['sku'], - [SemanticResourceAttributes.CLOUD_PLATFORM]: CloudPlatformValues.AZURE_VM, - [SemanticResourceAttributes.CLOUD_PROVIDER]: CloudProviderValues.AZURE, - [SemanticResourceAttributes.CLOUD_REGION]: metadata['location'], + [SEMRESATTRS_CLOUD_PLATFORM]: CLOUDPLATFORMVALUES_AZURE_VM, + [SEMRESATTRS_CLOUD_PROVIDER]: CLOUDPROVIDERVALUES_AZURE, + [SEMRESATTRS_CLOUD_REGION]: metadata['location'], [CLOUD_RESOURCE_ID_RESOURCE_ATTRIBUTE]: metadata['resourceId'], - [SemanticResourceAttributes.HOST_ID]: metadata['vmId'], - [SemanticResourceAttributes.HOST_NAME]: metadata['name'], - [SemanticResourceAttributes.HOST_TYPE]: metadata['vmSize'], - [SemanticResourceAttributes.OS_VERSION]: metadata['version'], + [SEMRESATTRS_HOST_ID]: metadata['vmId'], + [SEMRESATTRS_HOST_NAME]: metadata['name'], + [SEMRESATTRS_HOST_TYPE]: metadata['vmSize'], + [SEMRESATTRS_OS_VERSION]: metadata['version'], }; return attributes; } diff --git a/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureAppServiceDetector.test.ts b/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureAppServiceDetector.test.ts index 46796d3a6a..c178106f32 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureAppServiceDetector.test.ts +++ b/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureAppServiceDetector.test.ts @@ -16,7 +16,15 @@ import * as assert from 'assert'; import { azureAppServiceDetector } from '../../src/detectors/AzureAppServiceDetector'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMRESATTRS_CLOUD_PLATFORM, + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CLOUD_REGION, + SEMRESATTRS_DEPLOYMENT_ENVIRONMENT, + SEMRESATTRS_HOST_ID, + SEMRESATTRS_SERVICE_INSTANCE_ID, + SEMRESATTRS_SERVICE_NAME, +} from '@opentelemetry/semantic-conventions'; import { azureFunctionsDetector } from '../../src'; import { detectResourcesSync } from '@opentelemetry/resources'; @@ -45,36 +53,24 @@ describe('AzureAppServiceDetector', () => { }); assert.ok(resource); const attributes = resource.attributes; + assert.strictEqual(attributes[SEMRESATTRS_SERVICE_NAME], 'test-site'); + assert.strictEqual(attributes[SEMRESATTRS_CLOUD_PROVIDER], 'azure'); assert.strictEqual( - attributes[SemanticResourceAttributes.SERVICE_NAME], - 'test-site' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_PROVIDER], - 'azure' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_PLATFORM], + attributes[SEMRESATTRS_CLOUD_PLATFORM], 'azure_app_service' ); assert.strictEqual( attributes['cloud.resource_id'], `/subscriptions/${process.env.WEBSITE_OWNER_NAME}/resourceGroups/${process.env.WEBSITE_RESOURCE_GROUP}/providers/Microsoft.Web/sites/${process.env.WEBSITE_SITE_NAME}` ); + assert.strictEqual(attributes[SEMRESATTRS_CLOUD_REGION], 'test-region'); assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_REGION], - 'test-region' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT], + attributes[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT], 'test-slot' ); + assert.strictEqual(attributes[SEMRESATTRS_HOST_ID], 'test-hostname'); assert.strictEqual( - attributes[SemanticResourceAttributes.HOST_ID], - 'test-hostname' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.SERVICE_INSTANCE_ID], + attributes[SEMRESATTRS_SERVICE_INSTANCE_ID], 'test-instance-id' ); assert.strictEqual( @@ -97,20 +93,14 @@ describe('AzureAppServiceDetector', () => { }); assert.ok(resource); const attributes = resource.attributes; + assert.strictEqual(attributes[SEMRESATTRS_CLOUD_REGION], 'test-region'); assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_REGION], - 'test-region' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT], + attributes[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT], 'test-slot' ); + assert.strictEqual(attributes[SEMRESATTRS_HOST_ID], 'test-hostname'); assert.strictEqual( - attributes[SemanticResourceAttributes.HOST_ID], - 'test-hostname' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.SERVICE_INSTANCE_ID], + attributes[SEMRESATTRS_SERVICE_INSTANCE_ID], 'test-instance-id' ); assert.strictEqual( @@ -134,20 +124,14 @@ describe('AzureAppServiceDetector', () => { }); assert.ok(resource); const attributes = resource.attributes; + assert.strictEqual(attributes[SEMRESATTRS_CLOUD_REGION], 'test-region'); assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_REGION], - 'test-region' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT], + attributes[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT], 'test-slot' ); + assert.strictEqual(attributes[SEMRESATTRS_HOST_ID], 'test-hostname'); assert.strictEqual( - attributes[SemanticResourceAttributes.HOST_ID], - 'test-hostname' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.SERVICE_INSTANCE_ID], + attributes[SEMRESATTRS_SERVICE_INSTANCE_ID], 'test-instance-id' ); assert.strictEqual( diff --git a/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureFunctionsDetector.test.ts b/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureFunctionsDetector.test.ts index 2918f245f5..0a334ab66f 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureFunctionsDetector.test.ts +++ b/detectors/node/opentelemetry-resource-detector-azure/test/detectors/AzureFunctionsDetector.test.ts @@ -17,7 +17,16 @@ import * as assert from 'assert'; import { azureFunctionsDetector } from '../../src/detectors/AzureFunctionsDetector'; import { azureAppServiceDetector } from '../../src/detectors/AzureAppServiceDetector'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMRESATTRS_CLOUD_PLATFORM, + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CLOUD_REGION, + SEMRESATTRS_FAAS_INSTANCE, + SEMRESATTRS_FAAS_MAX_MEMORY, + SEMRESATTRS_FAAS_NAME, + SEMRESATTRS_FAAS_VERSION, + SEMRESATTRS_SERVICE_INSTANCE_ID, +} from '@opentelemetry/semantic-conventions'; import { detectResourcesSync } from '@opentelemetry/resources'; import { AZURE_APP_SERVICE_STAMP_RESOURCE_ATTRIBUTE } from '../../src/types'; @@ -43,40 +52,22 @@ describe('AzureFunctionsDetector', () => { }); assert.ok(resource); const attributes = resource.attributes; + assert.strictEqual(attributes[SEMRESATTRS_FAAS_NAME], 'test-function'); + assert.strictEqual(attributes[SEMRESATTRS_CLOUD_PROVIDER], 'azure'); assert.strictEqual( - attributes[SemanticResourceAttributes.FAAS_NAME], - 'test-function' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_PROVIDER], - 'azure' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_PLATFORM], + attributes[SEMRESATTRS_CLOUD_PLATFORM], 'azure_functions' ); + assert.strictEqual(attributes[SEMRESATTRS_CLOUD_REGION], 'test-region'); assert.strictEqual( - attributes[SemanticResourceAttributes.CLOUD_REGION], - 'test-region' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.FAAS_INSTANCE], + attributes[SEMRESATTRS_FAAS_INSTANCE], 'test-instance-id' ); - assert.strictEqual( - attributes[SemanticResourceAttributes.FAAS_MAX_MEMORY], - '1000' - ); - assert.strictEqual( - attributes[SemanticResourceAttributes.FAAS_VERSION], - '~4' - ); + assert.strictEqual(attributes[SEMRESATTRS_FAAS_MAX_MEMORY], '1000'); + assert.strictEqual(attributes[SEMRESATTRS_FAAS_VERSION], '~4'); // Should not detect app service values - assert.strictEqual( - attributes[SemanticResourceAttributes.SERVICE_INSTANCE_ID], - undefined - ); + assert.strictEqual(attributes[SEMRESATTRS_SERVICE_INSTANCE_ID], undefined); assert.strictEqual( attributes[AZURE_APP_SERVICE_STAMP_RESOURCE_ATTRIBUTE], diff --git a/package-lock.json b/package-lock.json index 9a502dc61d..f215b16732 100644 --- a/package-lock.json +++ b/package-lock.json @@ -112,7 +112,7 @@ "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.10.1", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.0.0", @@ -48028,7 +48028,7 @@ "@opentelemetry/api": "^1.0.0", "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/resources": "^1.10.1", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", From cf25c50362900c177cecf4ef58a5f79c43418898 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 17:01:55 -0400 Subject: [PATCH 06/14] chore(resource-detector-instana): use exported strings for attributes (#2051) Use exported strings for Semantic Resource Attributes --- .../opentelemetry-resource-detector-instana/README.md | 4 ++-- .../opentelemetry-resource-detector-instana/package.json | 2 +- .../src/detectors/InstanaAgentDetector.ts | 9 ++++++--- .../test/InstanaAgentDetectorIntegrationTest.test.ts | 6 +++--- package-lock.json | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-instana/README.md b/detectors/node/opentelemetry-resource-detector-instana/README.md index fef7b05bbd..203b5a2280 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/README.md +++ b/detectors/node/opentelemetry-resource-detector-instana/README.md @@ -26,12 +26,12 @@ import { processDetector, envDetector, } from "@opentelemetry/resources"; -import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions"; +import { SEMRESATTRS_SERVICE_NAME } from "@opentelemetry/semantic-conventions"; import { NodeSDK } from "@opentelemetry/sdk-node"; import { instanaAgentDetector } from "@opentelemetry/resource-detector-instana"; const globalResource = new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: "TestService", + [SEMRESATTRS_SERVICE_NAME]: "TestService", }); const sdk = new NodeSDK({ diff --git a/detectors/node/opentelemetry-resource-detector-instana/package.json b/detectors/node/opentelemetry-resource-detector-instana/package.json index dd4e3391c7..2bc2b34f36 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/package.json +++ b/detectors/node/opentelemetry-resource-detector-instana/package.json @@ -52,7 +52,7 @@ }, "dependencies": { "@opentelemetry/resources": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" diff --git a/detectors/node/opentelemetry-resource-detector-instana/src/detectors/InstanaAgentDetector.ts b/detectors/node/opentelemetry-resource-detector-instana/src/detectors/InstanaAgentDetector.ts index e036523240..ed0a11284c 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/src/detectors/InstanaAgentDetector.ts +++ b/detectors/node/opentelemetry-resource-detector-instana/src/detectors/InstanaAgentDetector.ts @@ -15,7 +15,10 @@ */ import { Detector, Resource, IResource } from '@opentelemetry/resources'; import { diag } from '@opentelemetry/api'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMRESATTRS_PROCESS_PID, + SEMRESATTRS_SERVICE_INSTANCE_ID, +} from '@opentelemetry/semantic-conventions'; import * as http from 'http'; class InstanaAgentDetector implements Detector { @@ -32,8 +35,8 @@ class InstanaAgentDetector implements Detector { const data = await this._retryHandler(host, port, 0); return new Resource({ - [SemanticResourceAttributes.PROCESS_PID]: data.pid, - [SemanticResourceAttributes.SERVICE_INSTANCE_ID]: data.agentUuid, + [SEMRESATTRS_PROCESS_PID]: data.pid, + [SEMRESATTRS_SERVICE_INSTANCE_ID]: data.agentUuid, }); } diff --git a/detectors/node/opentelemetry-resource-detector-instana/test/InstanaAgentDetectorIntegrationTest.test.ts b/detectors/node/opentelemetry-resource-detector-instana/test/InstanaAgentDetectorIntegrationTest.test.ts index ee8124f3cc..e99aa78487 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/test/InstanaAgentDetectorIntegrationTest.test.ts +++ b/detectors/node/opentelemetry-resource-detector-instana/test/InstanaAgentDetectorIntegrationTest.test.ts @@ -21,7 +21,7 @@ import { processDetector, envDetector, } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; import { NodeSDK } from '@opentelemetry/sdk-node'; import { instanaAgentDetector } from '../src'; @@ -54,7 +54,7 @@ describe('[Integration] instanaAgentDetector', () => { const serviceName = 'TestService'; const globalResource = new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }); const sdk = new NodeSDK({ @@ -93,7 +93,7 @@ describe('[Integration] instanaAgentDetector', () => { const serviceName = 'TestService'; const globalResource = new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }); const sdk = new NodeSDK({ diff --git a/package-lock.json b/package-lock.json index f215b16732..856082a284 100644 --- a/package-lock.json +++ b/package-lock.json @@ -250,7 +250,7 @@ "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -48135,7 +48135,7 @@ "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/sdk-node": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", From 4da02680b6441e0662f21f690714097e63076fa7 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 17:03:09 -0400 Subject: [PATCH 07/14] chore: update readme for gcp resource detector (#2062) Update README of GCP Resource Detector to clarify the source of the data and add semantic conventions. Part Of #2055 Part Of #2025 --- .../README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/detectors/node/opentelemetry-resource-detector-gcp/README.md b/detectors/node/opentelemetry-resource-detector-gcp/README.md index 5262d02c33..5eee1f8820 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/README.md +++ b/detectors/node/opentelemetry-resource-detector-gcp/README.md @@ -27,6 +27,24 @@ const resource = await detectResources({ const tracerProvider = new NodeTracerProvider({ resource }); ``` +## Available detectors + +This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) + +### GCP Detector + +| Resource Attribute | Description | +|-------------------------|---------------------------------------------------------------| +| cloud.account.id | Value of `project-id` from GCP Metadata project | +| cloud.availability_zone | Value of `zone` from GCP Metadata instance | +| cloud.provider | The cloud provider. In this context, it's always "gcp" | +| container.name | Value of Environment Variable `CONTAINER_NAME` | +| host.id | Value of `id` from GCP Metadata instance | +| host.name | Value of `hostname` from GCP Metadata instance | +| k8s.cluster.name | Value of `attributes/cluster-name` from GCP Metadata instance | +| k8s.namespace.name | Value of Environment Variable `NAMESPACE` | +| k8s.pod.name | Value of Environment Variable `HOSTNAME` | + ## Useful links - [GCP Metadata Documentation][] From 1a7b87a200b84b1df10f0a5b56ce034676277f51 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 18:42:45 -0400 Subject: [PATCH 08/14] chore(test-utils): update semantic resource attributes (#2080) Update Semantic Resource Attributes Part Of #2025 --- package-lock.json | 4 +- packages/opentelemetry-test-utils/README.md | 4 + .../opentelemetry-test-utils/package.json | 2 +- .../src/instrumentations/index.ts | 4 +- .../src/resource-assertions.ts | 84 ++++++++++++------- 5 files changed, 64 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 856082a284..eef1558af7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36772,7 +36772,7 @@ "@opentelemetry/sdk-node": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -45796,7 +45796,7 @@ "@opentelemetry/sdk-node": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/node": "18.6.5", "typescript": "4.4.4" } diff --git a/packages/opentelemetry-test-utils/README.md b/packages/opentelemetry-test-utils/README.md index 5820ef175e..62219eb7c3 100644 --- a/packages/opentelemetry-test-utils/README.md +++ b/packages/opentelemetry-test-utils/README.md @@ -65,6 +65,10 @@ it('some test', () => { That's it - supper short and easy. +## Semantic Conventions + +This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/packages/opentelemetry-test-utils/package.json b/packages/opentelemetry-test-utils/package.json index 21162672d0..0b77a8acbf 100644 --- a/packages/opentelemetry-test-utils/package.json +++ b/packages/opentelemetry-test-utils/package.json @@ -51,6 +51,6 @@ "@opentelemetry/sdk-node": "^0.50.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/semantic-conventions": "^1.22.0" } } diff --git a/packages/opentelemetry-test-utils/src/instrumentations/index.ts b/packages/opentelemetry-test-utils/src/instrumentations/index.ts index 0a8f456236..b480032e8e 100644 --- a/packages/opentelemetry-test-utils/src/instrumentations/index.ts +++ b/packages/opentelemetry-test-utils/src/instrumentations/index.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; import { getInstrumentation } from './instrumentation-singleton'; import { registerInstrumentationTestingProvider } from './otel-default-provider'; import { resetMemoryExporter } from './otel-provider-api'; @@ -40,7 +40,7 @@ export const mochaHooks = { } const provider = registerInstrumentationTestingProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }), }); getInstrumentation()?.setTracerProvider(provider); diff --git a/packages/opentelemetry-test-utils/src/resource-assertions.ts b/packages/opentelemetry-test-utils/src/resource-assertions.ts index fb179fb40e..eb248d41d8 100644 --- a/packages/opentelemetry-test-utils/src/resource-assertions.ts +++ b/packages/opentelemetry-test-utils/src/resource-assertions.ts @@ -19,6 +19,32 @@ import * as assert from 'assert'; import { Resource } from '@opentelemetry/resources'; import { SemanticResourceAttributes, + SEMRESATTRS_CLOUD_ACCOUNT_ID, + SEMRESATTRS_CLOUD_AVAILABILITY_ZONE, + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CLOUD_REGION, + SEMRESATTRS_CONTAINER_ID, + SEMRESATTRS_CONTAINER_IMAGE_NAME, + SEMRESATTRS_CONTAINER_IMAGE_TAG, + SEMRESATTRS_CONTAINER_NAME, + SEMRESATTRS_HOST_ID, + SEMRESATTRS_HOST_IMAGE_ID, + SEMRESATTRS_HOST_IMAGE_NAME, + SEMRESATTRS_HOST_IMAGE_VERSION, + SEMRESATTRS_HOST_NAME, + SEMRESATTRS_HOST_TYPE, + SEMRESATTRS_K8S_CLUSTER_NAME, + SEMRESATTRS_K8S_DEPLOYMENT_NAME, + SEMRESATTRS_K8S_NAMESPACE_NAME, + SEMRESATTRS_K8S_POD_NAME, + SEMRESATTRS_PROCESS_COMMAND, + SEMRESATTRS_PROCESS_COMMAND_LINE, + SEMRESATTRS_PROCESS_EXECUTABLE_NAME, + SEMRESATTRS_PROCESS_PID, + SEMRESATTRS_SERVICE_INSTANCE_ID, + SEMRESATTRS_SERVICE_NAME, + SEMRESATTRS_SERVICE_NAMESPACE, + SEMRESATTRS_SERVICE_VERSION, SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, SEMRESATTRS_TELEMETRY_SDK_NAME, SEMRESATTRS_TELEMETRY_SDK_VERSION, @@ -42,22 +68,22 @@ export const assertCloudResource = ( assertHasOneLabel('CLOUD', resource); if (validations.provider) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CLOUD_PROVIDER], + resource.attributes[SEMRESATTRS_CLOUD_PROVIDER], validations.provider ); if (validations.accountId) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CLOUD_ACCOUNT_ID], + resource.attributes[SEMRESATTRS_CLOUD_ACCOUNT_ID], validations.accountId ); if (validations.region) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CLOUD_REGION], + resource.attributes[SEMRESATTRS_CLOUD_REGION], validations.region ); if (validations.zone) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CLOUD_AVAILABILITY_ZONE], + resource.attributes[SEMRESATTRS_CLOUD_AVAILABILITY_ZONE], validations.zone ); }; @@ -80,22 +106,22 @@ export const assertContainerResource = ( assertHasOneLabel('CONTAINER', resource); if (validations.name) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CONTAINER_NAME], + resource.attributes[SEMRESATTRS_CONTAINER_NAME], validations.name ); if (validations.id) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CONTAINER_ID], + resource.attributes[SEMRESATTRS_CONTAINER_ID], validations.id ); if (validations.imageName) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CONTAINER_IMAGE_NAME], + resource.attributes[SEMRESATTRS_CONTAINER_IMAGE_NAME], validations.imageName ); if (validations.imageTag) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.CONTAINER_IMAGE_TAG], + resource.attributes[SEMRESATTRS_CONTAINER_IMAGE_TAG], validations.imageTag ); }; @@ -120,32 +146,32 @@ export const assertHostResource = ( assertHasOneLabel('HOST', resource); if (validations.id) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.HOST_ID], + resource.attributes[SEMRESATTRS_HOST_ID], validations.id ); if (validations.name) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.HOST_NAME], + resource.attributes[SEMRESATTRS_HOST_NAME], validations.name ); if (validations.hostType) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.HOST_TYPE], + resource.attributes[SEMRESATTRS_HOST_TYPE], validations.hostType ); if (validations.imageName) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.HOST_IMAGE_NAME], + resource.attributes[SEMRESATTRS_HOST_IMAGE_NAME], validations.imageName ); if (validations.imageId) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.HOST_IMAGE_ID], + resource.attributes[SEMRESATTRS_HOST_IMAGE_ID], validations.imageId ); if (validations.imageVersion) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.HOST_IMAGE_VERSION], + resource.attributes[SEMRESATTRS_HOST_IMAGE_VERSION], validations.imageVersion ); }; @@ -168,22 +194,22 @@ export const assertK8sResource = ( assertHasOneLabel('K8S', resource); if (validations.clusterName) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.K8S_CLUSTER_NAME], + resource.attributes[SEMRESATTRS_K8S_CLUSTER_NAME], validations.clusterName ); if (validations.namespaceName) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.K8S_NAMESPACE_NAME], + resource.attributes[SEMRESATTRS_K8S_NAMESPACE_NAME], validations.namespaceName ); if (validations.podName) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.K8S_POD_NAME], + resource.attributes[SEMRESATTRS_K8S_POD_NAME], validations.podName ); if (validations.deploymentName) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.K8S_DEPLOYMENT_NAME], + resource.attributes[SEMRESATTRS_K8S_DEPLOYMENT_NAME], validations.deploymentName ); }; @@ -211,17 +237,17 @@ export const assertTelemetrySDKResource = ( if (validations.name) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.TELEMETRY_SDK_NAME], + resource.attributes[SEMRESATTRS_TELEMETRY_SDK_NAME], validations.name ); if (validations.language) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE], + resource.attributes[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE], validations.language ); if (validations.version) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.TELEMETRY_SDK_VERSION], + resource.attributes[SEMRESATTRS_TELEMETRY_SDK_VERSION], validations.version ); }; @@ -242,21 +268,21 @@ export const assertServiceResource = ( } ) => { assert.strictEqual( - resource.attributes[SemanticResourceAttributes.SERVICE_NAME], + resource.attributes[SEMRESATTRS_SERVICE_NAME], validations.name ); assert.strictEqual( - resource.attributes[SemanticResourceAttributes.SERVICE_INSTANCE_ID], + resource.attributes[SEMRESATTRS_SERVICE_INSTANCE_ID], validations.instanceId ); if (validations.namespace) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.SERVICE_NAMESPACE], + resource.attributes[SEMRESATTRS_SERVICE_NAMESPACE], validations.namespace ); if (validations.version) assert.strictEqual( - resource.attributes[SemanticResourceAttributes.SERVICE_VERSION], + resource.attributes[SEMRESATTRS_SERVICE_VERSION], validations.version ); }; @@ -277,24 +303,24 @@ export const assertProcessResource = ( } ) => { assert.strictEqual( - resource.attributes[SemanticResourceAttributes.PROCESS_PID], + resource.attributes[SEMRESATTRS_PROCESS_PID], validations.pid ); if (validations.name) { assert.strictEqual( - resource.attributes[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME], + resource.attributes[SEMRESATTRS_PROCESS_EXECUTABLE_NAME], validations.name ); } if (validations.command) { assert.strictEqual( - resource.attributes[SemanticResourceAttributes.PROCESS_COMMAND], + resource.attributes[SEMRESATTRS_PROCESS_COMMAND], validations.command ); } if (validations.commandLine) { assert.strictEqual( - resource.attributes[SemanticResourceAttributes.PROCESS_COMMAND_LINE], + resource.attributes[SEMRESATTRS_PROCESS_COMMAND_LINE], validations.commandLine ); } From 6bd62a27a81564b4518a15732967cdebc73d6e54 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 18:43:03 -0400 Subject: [PATCH 09/14] chore(resource-detector-gcp): use exported strings for attributes (#2050) Use exported strings for Semantic Resource Attributes and Cloud Provider Values. Signed-off-by: maryliag --- .../package.json | 2 +- .../src/detectors/GcpDetector.ts | 31 ++++++++++++------- package-lock.json | 4 +-- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-gcp/package.json b/detectors/node/opentelemetry-resource-detector-gcp/package.json index 6a3df59b58..cc070b0c5b 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/package.json +++ b/detectors/node/opentelemetry-resource-detector-gcp/package.json @@ -56,7 +56,7 @@ "dependencies": { "@opentelemetry/core": "^1.0.0", "@opentelemetry/resources": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "gcp-metadata": "^6.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-gcp#readme" diff --git a/detectors/node/opentelemetry-resource-detector-gcp/src/detectors/GcpDetector.ts b/detectors/node/opentelemetry-resource-detector-gcp/src/detectors/GcpDetector.ts index 206bb4d1d3..142885eaa6 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/src/detectors/GcpDetector.ts +++ b/detectors/node/opentelemetry-resource-detector-gcp/src/detectors/GcpDetector.ts @@ -24,8 +24,16 @@ import { } from '@opentelemetry/resources'; import { getEnv } from '@opentelemetry/core'; import { - CloudProviderValues, - SemanticResourceAttributes, + CLOUDPROVIDERVALUES_GCP, + SEMRESATTRS_CLOUD_ACCOUNT_ID, + SEMRESATTRS_CLOUD_AVAILABILITY_ZONE, + SEMRESATTRS_CLOUD_PROVIDER, + SEMRESATTRS_CONTAINER_NAME, + SEMRESATTRS_HOST_ID, + SEMRESATTRS_HOST_NAME, + SEMRESATTRS_K8S_CLUSTER_NAME, + SEMRESATTRS_K8S_NAMESPACE_NAME, + SEMRESATTRS_K8S_POD_NAME, } from '@opentelemetry/semantic-conventions'; /** @@ -58,12 +66,11 @@ class GcpDetector implements Detector { ]); const attributes: ResourceAttributes = {}; - attributes[SemanticResourceAttributes.CLOUD_ACCOUNT_ID] = projectId; - attributes[SemanticResourceAttributes.HOST_ID] = instanceId; - attributes[SemanticResourceAttributes.HOST_NAME] = hostname; - attributes[SemanticResourceAttributes.CLOUD_AVAILABILITY_ZONE] = zoneId; - attributes[SemanticResourceAttributes.CLOUD_PROVIDER] = - CloudProviderValues.GCP; + attributes[SEMRESATTRS_CLOUD_ACCOUNT_ID] = projectId; + attributes[SEMRESATTRS_HOST_ID] = instanceId; + attributes[SEMRESATTRS_HOST_NAME] = hostname; + attributes[SEMRESATTRS_CLOUD_AVAILABILITY_ZONE] = zoneId; + attributes[SEMRESATTRS_CLOUD_PROVIDER] = CLOUDPROVIDERVALUES_GCP; if (getEnv().KUBERNETES_SERVICE_HOST) this._addK8sAttributes(attributes, clusterName); @@ -78,10 +85,10 @@ class GcpDetector implements Detector { ): void { const env = getEnv(); - attributes[SemanticResourceAttributes.K8S_CLUSTER_NAME] = clusterName; - attributes[SemanticResourceAttributes.K8S_NAMESPACE_NAME] = env.NAMESPACE; - attributes[SemanticResourceAttributes.K8S_POD_NAME] = env.HOSTNAME; - attributes[SemanticResourceAttributes.CONTAINER_NAME] = env.CONTAINER_NAME; + attributes[SEMRESATTRS_K8S_CLUSTER_NAME] = clusterName; + attributes[SEMRESATTRS_K8S_NAMESPACE_NAME] = env.NAMESPACE; + attributes[SEMRESATTRS_K8S_POD_NAME] = env.HOSTNAME; + attributes[SEMRESATTRS_CONTAINER_NAME] = env.CONTAINER_NAME; } /** Gets project id from GCP project metadata. */ diff --git a/package-lock.json b/package-lock.json index eef1558af7..ba9b0c9ab0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -183,7 +183,7 @@ "dependencies": { "@opentelemetry/core": "^1.0.0", "@opentelemetry/resources": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "gcp-metadata": "^6.0.0" }, "devDependencies": { @@ -48083,7 +48083,7 @@ "@opentelemetry/contrib-test-utils": "^0.38.0", "@opentelemetry/core": "^1.0.0", "@opentelemetry/resources": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", From 10c0c93e58d7921119cda7d454ee13b606638904 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 18:45:35 -0400 Subject: [PATCH 10/14] docs(resource-detector-container): update readme for container resource detector (#2061) Refs: #2055 Signed-off-by: maryliag --- .../README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/detectors/node/opentelemetry-resource-detector-container/README.md b/detectors/node/opentelemetry-resource-detector-container/README.md index 8e8baa4e45..f798241a28 100644 --- a/detectors/node/opentelemetry-resource-detector-container/README.md +++ b/detectors/node/opentelemetry-resource-detector-container/README.md @@ -28,7 +28,15 @@ const tracerProvider = new NodeTracerProvider({ resource }); ## Available detectors -- `containerDetector`: Populates `container.id` for processes running on containers supporting : docker( cgroup v1 or v2 ) or with containerd +This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) + +### ContainerDetector + +Populates `container.id` for processes running on containers supporting : docker( cgroup v1 or v2 ) or with containerd + +| Resource Attribute | Description | +|--------------------|------------------------------------------------------------------------------------------------------------------------------------------| +| `container.id` | Value parsed from file `/proc/self/cgroup` (cgroup v1). If it doesn't exist, parse the value from file `/proc/self/mountinfo` (cgroup v2)| ## Useful links From 69e8077caa2949d2243ccd998a66b88c900b7744 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 18:46:46 -0400 Subject: [PATCH 11/14] docs(resource-detector-aws): update readme for aws resource detector (#2060) Refs: #2055 Signed-off-by: maryliag --- .../README.md | 85 +++++++++++++++++-- 1 file changed, 78 insertions(+), 7 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-aws/README.md b/detectors/node/opentelemetry-resource-detector-aws/README.md index 690c25700d..aeb075c237 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/README.md +++ b/detectors/node/opentelemetry-resource-detector-aws/README.md @@ -33,13 +33,84 @@ const tracerProvider = new NodeTracerProvider({ resource }); ## Available detectors -- `awsBeanstalkDetector`: Populates `service` for processes running on [AWS Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/) -- `awsEc2Detector`: Populates `cloud` and `host` for processes running on [Amazon EC2](https://aws.amazon.com/ec2/), including abstractions such as ECS on EC2. Notably, it does not populate anything on AWS Fargate -- `awsEcsDetector`: Populates `container` for containers running on [Amazon ECS](https://aws.amazon.com/ecs/) -- `awsEksDetector`: Populates `container` and `k8s.cluster_name` for containers running on [Amazon EKS](https://aws.amazon.com/eks/) - - `k8s.cluster_name` is not always available depending on the configuration of CloudWatch monitoring for the EKS cluster -- `awsLambdaDetector`: Populates `faas` and `cloud` for functions running on [AWS Lambda](https://aws.amazon.com/lambda/) - - `faas.id` is currently not populated as it is not provided by the runtime at startup +This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) + +### AWS Beanstalk Detector + +Populates `service` for processes running on [AWS Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/) + +| Resource Attribute | Description | +|---------------------|--------------------------------------------------------------------------| +| cloud.platform | The cloud platform. In this context, it's always "aws_elastic_beanstalk" | +| cloud.provider | The cloud provider. In this context, it's always "aws" | +| service.instance.id | Value of `deployment_id` from config file `environment.conf` | +| service.name | The service name. In this context, it's always "aws_elastic_beanstalk" | +| service.namespace | Value of `environment_name` from config file `environment.conf` | +| service.version | Value of `version_label` from config file `environment.conf` | + +### AWS EC2 Detector + +Populates `cloud` and `host` for processes running on [Amazon EC2](https://aws.amazon.com/ec2/), including abstractions such as ECS on EC2. Notably, it does not populate anything on AWS Fargate. + +| Resource Attribute | Description | +|-------------------------|---------------------------------------------------------------------------------------| +| cloud.account.id | Value of `accountId` from `/latest/dynamic/instance-identity/document` request | +| cloud.availability_zone | Value of `availabilityZone` from `/latest/dynamic/instance-identity/document` request | +| cloud.platform | The cloud platform. In this context, it's always "aws_ec2" | +| cloud.provider | The cloud provider. In this context, it's always "aws" | +| cloud.region | Value of `region` from `/latest/dynamic/instance-identity/document` request | +| host.id | Value of `instanceId` from `/latest/dynamic/instance-identity/document` request | +| host.name | Value of `hostname` from `/latest/dynamic/instance-identity/document` request | +| host.type | Value of `instanceType` from `/latest/dynamic/instance-identity/document` request | + +### AWS ECS Detector + +Populates `container` for containers running on [Amazon ECS](https://aws.amazon.com/ecs/). + +| Resource Attribute | Description | +|-------------------------|----------------------------------------------------------------------------------------| +| aws.ecs.container.arn | Value of `ContainerARN` from the request to the metadata Uri. The Metadata Uri is stored on the Environment Variable `ECS_CONTAINER_METADATA_URI_V4` | +| aws.ecs.cluster.arn | Value in the format `${baseArn}:cluster/${cluster}`, with `baseArn` and `cluster` from a `ECS_CONTAINER_METADATA_URI_V4/task` request, with values from `TaskARN` and `Cluster` respectively | +| aws.ecs.launchtype | Value of `LaunchType` from `ECS_CONTAINER_METADATA_URI_V4/task` request | +| aws.ecs.task.arn | Value of `TaskARN` from `ECS_CONTAINER_METADATA_URI_V4/task` request | +| aws.ecs.task.family | Value of `Family` from `ECS_CONTAINER_METADATA_URI_V4/task` request | +| aws.ecs.task.revision | Value of `Revision` from `ECS_CONTAINER_METADATA_URI_V4/task` request | +| aws.log.group.arns | Value on format `arn:aws:logs:${logsRegion}:${awsAccount}:log-group:${logsGroupName}`, with `logsRegions` and `logsGroupName` from logs metadata, values of `awslogs-region` and `awslogs-group` respectively, and `awsAccount` parsed value from the `TaskARN`. Logs metadata values come from `LogOptions` on `ECS_CONTAINER_METADATA_URI_V4` request | +| aws.log.group.names | Value of `awslogs-group` from logs metadata. Logs metadata values come from `LogOptions` on `ECS_CONTAINER_METADATA_URI_V4` request | +| aws.log.stream.arns | Value on format `arn:aws:logs:${logsRegion}:${awsAccount}:log-group:${logsGroupName}:log-stream:${logsStreamName}`, with `logsRegions`, `logsGroupName` and `logsStreamName` from logs metadata, values of `awslogs-region`, `awslogs-group` and `awslogs-stream` respectively, and `awsAccount` parsed value from the `TaskARN` | +| aws.log.stream.names | Value of `awslogs-stream` from logs metadata | +| cloud.account.id | Parsed value from the `TaskARN` | +| cloud.availability_zone | Value of `AvailabilityZone` from `ECS_CONTAINER_METADATA_URI_V4/task` request. This value is not available in all Fargate runtimes | +| cloud.platform | The cloud platform. In this context, it's always "aws_ecs" | +| cloud.provider | The cloud provider. In this context, it's always "aws" | +| cloud.region | Parsed value from the `TaskARN` | +| container.id | Value of from file `/proc/self/cgroup` | +| container.name | The hostname of the operating system | + +### AWS EKS Detector + +Populates `container` and `k8s.cluster_name` for containers running on [Amazon EKS](https://aws.amazon.com/eks/). +`k8s.cluster_name` is not always available depending on the configuration of CloudWatch monitoring for the EKS cluster. + +| Resource Attribute | Description | +|--------------------|-----------------------------------------------------------------------------------------------------| +| cloud.platform | The cloud platform. In this context, it's always "aws_eks" | +| cloud.provider | The cloud provider. In this context, it's always "aws" | +| container.id | Value from config file `/proc/self/cgroup` | +| k8s.cluster.name | Value of `cluster.name` from `/api/v1/namespaces/amazon-cloudwatch/configmaps/cluster-info` request | + +### AWS Lambda Detector + +Populates `faas` and `cloud` for functions running on [AWS Lambda](https://aws.amazon.com/lambda/). +`faas.id` is currently not populated as it is not provided by the runtime at startup. + +| Resource Attribute | Description | +|--------------------|---------------------------------------------------------------------| +| cloud.platform | The cloud platform. In this context, it's always "aws_lambda" | +| cloud.provider | The cloud provider. In this context, it's always "aws" | +| cloud.region | Value of Process Environment Variable `AWS_REGION` | +| faas.name | Value of Process Environment Variable `AWS_LAMBDA_FUNCTION_NAME` | +| faas.version | Value of Process Environment Variable `AWS_LAMBDA_FUNCTION_VERSION` | ## Useful links From 13b49b3f3b26b1405eb3be62d0985f8874f898b2 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 19:02:27 -0400 Subject: [PATCH 12/14] docs(resource-detector-instana): update readme for instana resource detector (#2063) Refs: #2055 Signed-off-by: maryliag --- .../opentelemetry-resource-detector-instana/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/detectors/node/opentelemetry-resource-detector-instana/README.md b/detectors/node/opentelemetry-resource-detector-instana/README.md index 203b5a2280..8845808cdf 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/README.md +++ b/detectors/node/opentelemetry-resource-detector-instana/README.md @@ -42,6 +42,17 @@ const sdk = new NodeSDK({ sdk.start() ``` +## Available detectors + +This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) + +### Instana Agent Detector + +| Resource Attribute | Description | +|------------------------------|--------------------------------------------------------------------------------------------------------------------------| +| process.pid | The ID of the process. Value of parameter `pid` from the response to a request to `/com.instana.plugin.nodejs.discovery` | +| service.instance.id | The agent UUID. Value of parameter `agentUuid` from the response to a request to `/com.instana.plugin.nodejs.discovery` | + ## Useful links - For more information about Instana Agent, visit: From 88514d96d9d6d48d56ca0e79b9214303593a64f7 Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 19:57:54 -0400 Subject: [PATCH 13/14] docs(resource-detector-azure): update readme for azure resource detector (#2057) Update README of Azure Resource Detector to clarify the source of the data and also remove values from the table that were not actually being set. Add Semantic conventions to README Refs: #2055 Refs: #2025 Signed-off-by: maryliag Co-authored-by: Jamie Danielson Co-authored-by: Trent Mick --- .../README.md | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-azure/README.md b/detectors/node/opentelemetry-resource-detector-azure/README.md index ea4efc6862..c900a48663 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/README.md +++ b/detectors/node/opentelemetry-resource-detector-azure/README.md @@ -27,48 +27,48 @@ const tracerProvider = new NodeTracerProvider({ resource }); ## Available Detectors +This package implements Semantic Convention [Version 1.19.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.19.0/semantic_conventions/README.md). + ### App Service Resource Detector -| Attribute | Description | +| Resource Attribute | Description | |-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| azure.app.service.stamp | The specific "stamp" cluster within Azure where the App Service is running, e.g., "waws-prod-sn1-001". | +| azure.app.service.stamp | The specific "stamp" cluster within Azure where the App Service is running, e.g., "waws-prod-sn1-001". Value of Process Environment Variable `APP_SERVICE_ATTRIBUTE_ENV_VARS`. | | cloud.platform | The cloud platform. Here, it's always "azure_app_service". | | cloud.provider | The cloud service provider. In this context, it's always "azure". | -| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure App Service. Typically in the format "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/sites/{siteName}". | -| cloud.region | The Azure region where the App Service is hosted, e.g., "East US", "West Europe", etc. | -| deployment.environment | The deployment slot where the Azure App Service is running, such as "staging", "production", etc. | -| host.id | The primary hostname for the app, excluding any custom hostnames. | -| service.instance.id | The specific instance of the Azure App Service, useful in a scaled-out configuration. | -| service.name | The name of the Azure App Service. | +| cloud.region | The Azure region where the App Service is hosted, e.g., "East US", "West Europe", etc. Value of Process Environment Variable `REGION_NAME`. | +| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure App Service. Typically in the format `/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/sites/{siteName}`. | +| deployment.environment | The deployment slot where the Azure App Service is running, such as "staging", "production", etc. Value of Process Environment Variable `WEBSITE_SLOT_NAME`. | +| host.id | The primary hostname for the app, excluding any custom hostnames. Value of Process Environment Variable `WEBSITE_HOSTNAME`. | +| service.instance.id | The specific instance of the Azure App Service, useful in a scaled-out configuration. Value of Process Environment Variable `WEBSITE_INSTANCE_ID`. | +| service.name | The name of the Azure App Service. Value of Process Environment Variable `WEBSITE_SITE_NAME`. | ### VM Resource Detector -| Attribute | Description | -|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| azure.vm.scaleset.name | The name of the Virtual Machine Scale Set if the VM is part of one. | -| azure.vm.sku | The SKU of the Azure Virtual Machine's operating system. For instance, for a VM running Windows Server 2019 Datacenter edition, this value would be "2019-Datacenter". | -| cloud.platform | The cloud platform, which is always set to "azure_vm" in this context. | -| cloud.provider | The cloud service provider, which is always set to "azure" in this context. | -| cloud.region | The Azure region where the Virtual Machine is hosted, such as "East US", "West Europe", etc. | -| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure Virtual Machine. It typically follows this format: "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/virtualMachines/{vmName}". | -| host.id | A unique identifier for the VM host, for instance, "02aab8a4-74ef-476e-8182-f6d2ba4166a6". | -| host.name | The name of the host machine. | -| host.type | The size of the VM instance, for example, "Standard_D2s_v3". | -| os.type | The type of operating system running on the VM, such as "Linux" or "Windows". | -| os.version | The version of the operating system running on the VM. | -| service.instance.id | An identifier for a specific instance of the service running on the Azure VM, for example, "02aab8a4-74ef-476e-8182-f6d2ba4166a6". | +| Resource Attribute | Description | +|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| azure.vm.scaleset.name | The name of the Virtual Machine Scale Set if the VM is part of one. Value from `vmScaleSetName` key on `/metadata/instance/compute` request. | +| azure.vm.sku | The SKU of the Azure Virtual Machine's operating system. For instance, for a VM running Windows Server 2019 Datacenter edition, this value would be "2019-Datacenter". Value from `sku` key on `/metadata/instance/compute` request. | +| cloud.platform | The cloud platform, which is always set to "azure_vm" in this context. | +| cloud.provider | The cloud service provider, which is always set to "azure" in this context. | +| cloud.region | The Azure region where the Virtual Machine is hosted, such as "East US", "West Europe", etc. Value from `location` key on `/metadata/instance/compute` request. | +| cloud.resource_id | The Azure Resource Manager URI uniquely identifying the Azure Virtual Machine. It typically follows this format: `/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/virtualMachines/{vmName}`. Value from `resourceId` key on `/metadata/instance/compute` request.| +| host.id | A unique identifier for the VM host, for instance, "02aab8a4-74ef-476e-8182-f6d2ba4166a6". Value from `vmId` key on `/metadata/instance/compute` request. | +| host.name | The name of the host machine. Value from `name` key on `/metadata/instance/compute` request. | +| host.type | The size of the VM instance, for example, "Standard_D2s_v3". Value from `vmSize` key on `/metadata/instance/compute` request. | +| os.version | The version of the operating system running on the VM. Value from `version` key on `/metadata/instance/compute` request. | ### Azure Functions Resource Detector -| Attribute | Description | -|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| cloud.platform | The cloud platform. Here, it's always "azure_functions". | -| cloud.provider | The cloud service provider. In this context, it's always "azure". | -| cloud.region | The Azure region where the Azure Function is hosted, e.g., "East US", "West Europe", etc. | -| faas.instance | The specific instance of the Azure App Service, useful in a scaled-out configuration. | -| faas.name | The name of the Azure App Service. | -| faas.version | The version of the Azure Function being executed, e.g., "~4". | -| faas.max_memory | The amount of memory available to the Azure Function expressed in MiB. | +| Resource Attribute | Description | +|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| +| cloud.platform | The cloud platform. Here, it's always "azure_functions". | +| cloud.provider | The cloud service provider. In this context, it's always "azure". | +| cloud.region | The Azure region where the Azure Function is hosted, e.g., "East US", "West Europe", etc. Value of Process Environment Variable `REGION_NAME`. | +| faas.instance | The specific instance of the Azure App Service, useful in a scaled-out configuration. Value from Process Environment Variable `WEBSITE_INSTANCE_ID`. | +| faas.max_memory | The amount of memory available to the Azure Function expressed in MiB. value from Process Environment Variable `WEBSITE_MEMORY_LIMIT_MB`. | +| faas.name | The name of the Azure App Service. Value from Process Environment Variable `WEBSITE_SITE_NAME`. | +| faas.version | The version of the Azure Function being executed, e.g., "~4". value from Process Environment Variable `FUNCTIONS_EXTENSION_VERSION`. | ## Useful links From eaa99f8fd0d9ac1b454d0672e579461d06330bce Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Tue, 9 Apr 2024 19:59:06 -0400 Subject: [PATCH 14/14] chore: update readme for github resource detector (#2064) Update README of GitHub Resource Detector to clarify the source of the data. Refs: #2055 Signed-off-by: maryliag --- .../README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/detectors/node/opentelemetry-resource-detector-github/README.md b/detectors/node/opentelemetry-resource-detector-github/README.md index 8f2066af71..31cdf85839 100644 --- a/detectors/node/opentelemetry-resource-detector-github/README.md +++ b/detectors/node/opentelemetry-resource-detector-github/README.md @@ -33,6 +33,21 @@ async function run() { run() ``` +## Available detectors + +### GitHub Detector + +| Resource Attribute | Description | +|--------------------|-----------------------------------------------------------| +| github.actor | Value of Process Environment Variable `GITHUB_ACTOR` | +| github.base_ref | Value of Process Environment Variable `GITHUB_BASE_REF` | +| github.head_ref | Value of Process Environment Variable `GITHUB_HEAD_REF` | +| github.ref | Value of Process Environment Variable `GITHUB_REF` | +| github.run_id | Value of Process Environment Variable `GITHUB_RUN_ID` | +| github.run_number | Value of Process Environment Variable `GITHUB_RUN_NUMBER` | +| github.sha | Value of Process Environment Variable `GITHUB_SHA` | +| github.workflow | Value of Process Environment Variable `GITHUB_WORKFLOW` | + ## Useful links - [GitHub Action Environment Variables](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables)