diff --git a/.github/component-label-map.yml b/.github/component-label-map.yml index d49f02ac12..c766a864d0 100644 --- a/.github/component-label-map.yml +++ b/.github/component-label-map.yml @@ -61,7 +61,6 @@ pkg:instrumentation-aws-lambda: - changed-files: - any-glob-to-any-file: - plugins/node/opentelemetry-instrumentation-aws-lambda/** - - propagators/opentelemetry-propagator-aws-xray/** pkg:instrumentation-aws-sdk: - changed-files: - any-glob-to-any-file: @@ -72,7 +71,7 @@ pkg:instrumentation-bunyan: - changed-files: - any-glob-to-any-file: - plugins/node/opentelemetry-instrumentation-bunyan/** -pkg:instrumentation-cassandra: +pkg:instrumentation-cassandra-driver: - changed-files: - any-glob-to-any-file: - plugins/node/opentelemetry-instrumentation-cassandra/** @@ -246,10 +245,6 @@ pkg:propagation-utils: - any-glob-to-any-file: - packages/opentelemetry-propagation-utils/** - packages/opentelemetry-test-utils/** -pkg:propagator-aws-xray: - - changed-files: - - any-glob-to-any-file: - - propagators/opentelemetry-propagator-aws-xray/** pkg:propagator-grpc-census-binary: - changed-files: - any-glob-to-any-file: diff --git a/.github/component_owners.yml b/.github/component_owners.yml index fdc9c0fc10..210413659d 100644 --- a/.github/component_owners.yml +++ b/.github/component_owners.yml @@ -27,6 +27,9 @@ components: - pichlermarc - legendecas - blumamir + packages/baggage-span-processor: + - mikegoldsmith + - jamiedanielson packages/opentelemetry-host-metrics: - legendecas packages/opentelemetry-id-generator-aws-xray: @@ -138,8 +141,6 @@ components: - obecny plugins/web/opentelemetry-plugin-react-load: - martinkuba - propagators/opentelemetry-propagator-aws-xray: - - carolabadeer propagators/opentelemetry-propagator-grpc-census-binary: [] # Unmaintained? propagators/opentelemetry-propagator-instana: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 1c58cefc06..18a14e5130 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -54,11 +54,15 @@ jobs: # get main again - name: Checkout Repository + # only checkout if a release has been created + if: ${{ steps.release.outputs.releases_created }} uses: actions/checkout@v4 with: fetch-depth: 0 - name: Rebuild Packages + # only rebuild if a release has been created + if: ${{ steps.release.outputs.releases_created }} run: | npm ci npm run compile @@ -67,6 +71,8 @@ jobs: # need to publish all unpublished versions to npm here # See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package - name: Publish to npm + # only publish if a release has been created + if: ${{ steps.release.outputs.releases_created }} env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index aa0b908342..cc231a5174 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -53,7 +53,7 @@ jobs: --health-timeout 5s --health-retries 5 postgres: - image: postgres:15-alpine + image: postgres:16-alpine env: POSTGRES_USER: postgres POSTGRES_DB: otel_pg_database diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 025b727e9b..a03af4c942 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -51,7 +51,7 @@ jobs: --health-timeout 5s --health-retries 5 postgres: - image: postgres:15-alpine + image: postgres:16-alpine env: POSTGRES_USER: postgres POSTGRES_DB: otel_pg_database diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da8e4144db..43ec74b8a0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,63 +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/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" + "detectors/node/opentelemetry-resource-detector-alibaba-cloud": "0.28.9", + "detectors/node/opentelemetry-resource-detector-aws": "1.4.2", + "detectors/node/opentelemetry-resource-detector-azure": "0.2.7", + "detectors/node/opentelemetry-resource-detector-container": "0.3.9", + "detectors/node/opentelemetry-resource-detector-gcp": "0.29.9", + "detectors/node/opentelemetry-resource-detector-github": "0.28.2", + "detectors/node/opentelemetry-resource-detector-instana": "0.9.0", + "metapackages/auto-instrumentations-node": "0.46.0", + "metapackages/auto-instrumentations-web": "0.39.0", + "packages/baggage-span-processor": "0.1.0", + "packages/opentelemetry-host-metrics": "0.35.1", + "packages/opentelemetry-id-generator-aws-xray": "1.2.2", + "packages/opentelemetry-propagation-utils": "0.30.9", + "packages/opentelemetry-redis-common": "0.36.2", + "packages/opentelemetry-sql-common": "0.40.1", + "packages/opentelemetry-test-utils": "0.39.0", + "packages/winston-transport": "0.3.0", + "plugins/node/instrumentation-amqplib": "0.37.0", + "plugins/node/instrumentation-cucumber": "0.6.0", + "plugins/node/instrumentation-dataloader": "0.9.0", + "plugins/node/instrumentation-fs": "0.12.0", + "plugins/node/instrumentation-lru-memoizer": "0.37.0", + "plugins/node/instrumentation-mongoose": "0.38.1", + "plugins/node/instrumentation-runtime-node": "0.4.0", + "plugins/node/instrumentation-socket.io": "0.39.0", + "plugins/node/instrumentation-tedious": "0.10.1", + "plugins/node/instrumentation-undici": "0.2.0", + "plugins/node/opentelemetry-instrumentation-aws-lambda": "0.41.0", + "plugins/node/opentelemetry-instrumentation-aws-sdk": "0.41.0", + "plugins/node/opentelemetry-instrumentation-bunyan": "0.38.0", + "plugins/node/opentelemetry-instrumentation-cassandra": "0.38.0", + "plugins/node/opentelemetry-instrumentation-connect": "0.36.0", + "plugins/node/opentelemetry-instrumentation-dns": "0.36.1", + "plugins/node/opentelemetry-instrumentation-express": "0.38.0", + "plugins/node/opentelemetry-instrumentation-fastify": "0.36.1", + "plugins/node/opentelemetry-instrumentation-generic-pool": "0.36.0", + "plugins/node/opentelemetry-instrumentation-graphql": "0.40.0", + "plugins/node/opentelemetry-instrumentation-hapi": "0.38.0", + "plugins/node/opentelemetry-instrumentation-ioredis": "0.40.0", + "plugins/node/opentelemetry-instrumentation-knex": "0.36.1", + "plugins/node/opentelemetry-instrumentation-koa": "0.40.0", + "plugins/node/opentelemetry-instrumentation-memcached": "0.36.0", + "plugins/node/opentelemetry-instrumentation-mongodb": "0.43.0", + "plugins/node/opentelemetry-instrumentation-mysql": "0.38.1", + "plugins/node/opentelemetry-instrumentation-mysql2": "0.38.1", + "plugins/node/opentelemetry-instrumentation-nestjs-core": "0.37.1", + "plugins/node/opentelemetry-instrumentation-net": "0.36.0", + "plugins/node/opentelemetry-instrumentation-pg": "0.41.0", + "plugins/node/opentelemetry-instrumentation-pino": "0.39.0", + "plugins/node/opentelemetry-instrumentation-redis": "0.39.1", + "plugins/node/opentelemetry-instrumentation-redis-4": "0.39.0", + "plugins/node/opentelemetry-instrumentation-restify": "0.38.0", + "plugins/node/opentelemetry-instrumentation-router": "0.37.0", + "plugins/node/opentelemetry-instrumentation-winston": "0.37.0", + "plugins/web/opentelemetry-instrumentation-document-load": "0.38.0", + "plugins/web/opentelemetry-instrumentation-long-task": "0.38.0", + "plugins/web/opentelemetry-instrumentation-user-interaction": "0.38.0", + "plugins/web/opentelemetry-plugin-react-load": "0.30.1", + "propagators/opentelemetry-propagator-grpc-census-binary": "0.27.2", + "propagators/opentelemetry-propagator-instana": "0.3.2", + "propagators/opentelemetry-propagator-ot-trace": "0.27.2" } diff --git a/GUIDELINES.md b/GUIDELINES.md index b67f294370..04bc219b14 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -164,3 +164,36 @@ To support this use case, you can choose one of the following options: }; ... ``` + +## Diag Logging + +The OpenTelemetry diagnostic logging channel can be used to troubleshoot issues with instrumentation packages. + +### Patching Messages + +When OpenTelemetry is installed in a user application, and expected spans are missing from generated traces, it is often useful to differentiate between the following scenarios: + +- The instrumentation is not auto loaded - due to issue with the require/import interception, an unsupported version of the instrumented package, or some other issue. This knowledge can pin-point the issue to the instrumentation package. +- The instrumentation patch was applied but expected spans are missing -- this can suggest an issue with instrumented package logic, configuration, limits, otel sdk, or other issues. + +It can also be useful to know when the instrumentation is loaded and patched, to understand the order of operations in the application. + +Instrumentation packages should use the `@opentelemetry/instrumentation` package `InstrumentationBase` class to register patches and unpatch callbacks for specific require/import of the instrumented package, it's dependency or an internal module file. When this mechanism is used, the base class will automatically emit a debug message on instrumentation diag component logger, looking like this: + +```shell +@opentelemetry/instrumentation-foo Applying instrumentation patch for module on require hook { + module: 'foo', + version: '1.2.3', + baseDir: '/node_modules/foo' +} +``` + +Instrumentation should not add additional debug messages for triggering the patching and unpatching callbacks, as the base class will handle this. + +Instrumentation may add additional patch/unpatch messages for specific functions if it is expected to help in troubleshooting issues with the instrumentation. Few examples: + +- If the patch logic is conditional, and user can benefit from ensuring the condition is met and the patch happened. `koa` patching logic examine an object and branch between patching it as router vs middleware, which is applied at runtime. `aws-lambda` will abort patching if the environment is not configured properly. +- When the patch is not applied directly on a `moduleExports` object in the `InstrumentationBase` callbacks, but rather from an event in the package, like creating new client instance, registering a listener, etc. `fastify` instrumentation applies a patch when a hook is added to the fastify app instance, which is patched from `moduleExports`. +- In situations where the patch logic is not trivial and it helps to specify patch events in the right context and nuances. `aws-lambda` logs additional properties extracted from the lambda framework and exposes them for troubleshooting. + +The cases above are not covered by the base class and offer additional context to the user troubleshooting an issue with the instrumentation. diff --git a/LICENSE b/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/archive/opentelemetry-browser-extension-autoinjection/LICENSE b/archive/opentelemetry-browser-extension-autoinjection/LICENSE index 26104aae5b..f49a4e16e6 100644 --- a/archive/opentelemetry-browser-extension-autoinjection/LICENSE +++ b/archive/opentelemetry-browser-extension-autoinjection/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md index 7036542f0d..ae374d98a6 100644 --- a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md @@ -72,6 +72,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.28.9](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.8...resource-detector-alibaba-cloud-v0.28.9) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/LICENSE b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/LICENSE index a42588e10f..261eeb9e9f 100644 --- a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/LICENSE +++ b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2021] OpenTelemetry Authors + 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. diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/package.json index 6463fc2337..45de2cd410 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.8", + "version": "0.28.9", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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 18ac8f2c17..f8199248af 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md @@ -66,6 +66,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.35.1 to ^0.36.0 +## [1.4.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-aws-v1.4.1...resource-detector-aws-v1.4.2) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/detectors/node/opentelemetry-resource-detector-aws/LICENSE b/detectors/node/opentelemetry-resource-detector-aws/LICENSE index 6b91a297c8..261eeb9e9f 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/LICENSE +++ b/detectors/node/opentelemetry-resource-detector-aws/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2020] OpenTelemetry Authors + 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. diff --git a/detectors/node/opentelemetry-resource-detector-aws/package.json b/detectors/node/opentelemetry-resource-detector-aws/package.json index 6b611bc099..86a6aad28b 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.1", + "version": "1.4.2", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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 b8196ebfbf..37556413cb 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-azure/CHANGELOG.md @@ -12,6 +12,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.2.7](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-azure-v0.2.6...resource-detector-azure-v0.2.7) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/detectors/node/opentelemetry-resource-detector-azure/LICENSE b/detectors/node/opentelemetry-resource-detector-azure/LICENSE index 6f13cd2fe6..a36ec4ab7e 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/LICENSE +++ b/detectors/node/opentelemetry-resource-detector-azure/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [2020] OpenTelemetry Authors +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. diff --git a/detectors/node/opentelemetry-resource-detector-azure/package.json b/detectors/node/opentelemetry-resource-detector-azure/package.json index 7690843f9d..205caeb2cd 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.6", + "version": "0.2.7", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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 182be674b8..36aa20bfa8 100644 --- a/detectors/node/opentelemetry-resource-detector-container/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-container/CHANGELOG.md @@ -60,6 +60,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.3.9](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-container-v0.3.8...resource-detector-container-v0.3.9) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/detectors/node/opentelemetry-resource-detector-container/LICENSE b/detectors/node/opentelemetry-resource-detector-container/LICENSE index a42588e10f..261eeb9e9f 100644 --- a/detectors/node/opentelemetry-resource-detector-container/LICENSE +++ b/detectors/node/opentelemetry-resource-detector-container/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2021] OpenTelemetry Authors + 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. diff --git a/detectors/node/opentelemetry-resource-detector-container/package.json b/detectors/node/opentelemetry-resource-detector-container/package.json index a6fa4c9c85..61b3e45616 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.8", + "version": "0.3.9", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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 56b1be8e1c..6037084fb9 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-gcp/CHANGELOG.md @@ -60,6 +60,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.29.9](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-gcp-v0.29.8...resource-detector-gcp-v0.29.9) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/detectors/node/opentelemetry-resource-detector-gcp/LICENSE b/detectors/node/opentelemetry-resource-detector-gcp/LICENSE index 6b91a297c8..261eeb9e9f 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/LICENSE +++ b/detectors/node/opentelemetry-resource-detector-gcp/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2020] OpenTelemetry Authors + 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. diff --git a/detectors/node/opentelemetry-resource-detector-gcp/package.json b/detectors/node/opentelemetry-resource-detector-gcp/package.json index cc070b0c5b..f44623d65b 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.8", + "version": "0.29.9", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", diff --git a/detectors/node/opentelemetry-resource-detector-github/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-github/CHANGELOG.md index 989227e51e..02e132ad53 100644 --- a/detectors/node/opentelemetry-resource-detector-github/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-github/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.28.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-github-v0.28.1...resource-detector-github-v0.28.2) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.28.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-github-v0.28.0...resource-detector-github-v0.28.1) (2023-08-14) diff --git a/detectors/node/opentelemetry-resource-detector-github/LICENSE b/detectors/node/opentelemetry-resource-detector-github/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/detectors/node/opentelemetry-resource-detector-github/LICENSE +++ b/detectors/node/opentelemetry-resource-detector-github/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/detectors/node/opentelemetry-resource-detector-github/package.json b/detectors/node/opentelemetry-resource-detector-github/package.json index 0b7fc892fa..b4c45dbba2 100644 --- a/detectors/node/opentelemetry-resource-detector-github/package.json +++ b/detectors/node/opentelemetry-resource-detector-github/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resource-detector-github", - "version": "0.28.1", + "version": "0.28.2", "description": "OpenTelemetry SDK resource detector for GitHub", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md b/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md index c0bcedff8a..8e06bd069d 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-instana/CHANGELOG.md @@ -6,6 +6,26 @@ * 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/resource-detector-instana-v0.8.0...resource-detector-instana-v0.9.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/detectors/node/opentelemetry-resource-detector-instana/LICENSE b/detectors/node/opentelemetry-resource-detector-instana/LICENSE index 6b91a297c8..261eeb9e9f 100644 --- a/detectors/node/opentelemetry-resource-detector-instana/LICENSE +++ b/detectors/node/opentelemetry-resource-detector-instana/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2020] OpenTelemetry Authors + 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. diff --git a/detectors/node/opentelemetry-resource-detector-instana/package.json b/detectors/node/opentelemetry-resource-detector-instana/package.json index 2bc2b34f36..f8fa1192b2 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.8.0", + "version": "0.9.0", "description": "OpenTelemetry SDK resource detector for Instana", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -38,8 +38,8 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/sdk-node": "^0.51.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", diff --git a/examples/connect/package.json b/examples/connect/package.json index eb58fc2299..4acf0fcf9a 100644 --- a/examples/connect/package.json +++ b/examples/connect/package.json @@ -45,7 +45,7 @@ "@opentelemetry/instrumentation-http": "^0.25.0", "@opentelemetry/sdk-trace-node": "^0.25.0", "@opentelemetry/resources": "^0.25.0", - "@opentelemetry/semantic-conventions": "^0.25.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "@opentelemetry/sdk-trace-base": "^0.25.0", "axios": "^0.21.1", "cross-env": "^7.0.3", diff --git a/examples/connect/tracing.js b/examples/connect/tracing.js index d711b935d1..7639af2925 100644 --- a/examples/connect/tracing.js +++ b/examples/connect/tracing.js @@ -6,7 +6,7 @@ const { diag, DiagConsoleLogger, DiagLogLevel } = opentelemetry; diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO); const { Resource } = require('@opentelemetry/resources'); -const { ResourceAttributes: SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); +const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); @@ -24,7 +24,7 @@ function log() { module.exports = (serviceName) => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }), }); const connectInstrumentation = new ConnectInstrumentation(); diff --git a/examples/express/package.json b/examples/express/package.json index f3bac84d8e..61442eeac2 100644 --- a/examples/express/package.json +++ b/examples/express/package.json @@ -40,7 +40,7 @@ "@opentelemetry/resources": "^1.18.1", "@opentelemetry/sdk-trace-base": "^1.18.1", "@opentelemetry/sdk-trace-node": "^1.18.1", - "@opentelemetry/semantic-conventions": "^1.18.1", + "@opentelemetry/semantic-conventions": "^1.23.0", "axios": "^1.6.0", "cross-env": "^7.0.3", "express": "^4.17.1" diff --git a/examples/express/src/tracer.ts b/examples/express/src/tracer.ts index 93a1515f69..4ad569644f 100644 --- a/examples/express/src/tracer.ts +++ b/examples/express/src/tracer.ts @@ -14,7 +14,7 @@ import { Sampler, AlwaysOnSampler, SimpleSpanProcessor } from '@opentelemetry/sd import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'; import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; import { Resource } from '@opentelemetry/resources'; -import { SemanticAttributes, SemanticResourceAttributes as ResourceAttributesSC } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME, SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions'; const Exporter = (process.env.EXPORTER || '').toLowerCase().startsWith('z') ? ZipkinExporter : OTLPTraceExporter; import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express'; @@ -23,7 +23,7 @@ const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); export const setupTracing = (serviceName: string) => { const provider = new NodeTracerProvider({ resource: new Resource({ - [ResourceAttributesSC.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }), sampler: filterSampler(ignoreHealthCheck, new AlwaysOnSampler()), }); @@ -65,5 +65,5 @@ function filterSampler(filterFn: FilterFunction, parent: Sampler): Sampler { } function ignoreHealthCheck(spanName: string, spanKind: SpanKind, attributes: Attributes) { - return spanKind !== opentelemetry.SpanKind.SERVER || attributes[SemanticAttributes.HTTP_ROUTE] !== "/health"; + return spanKind !== opentelemetry.SpanKind.SERVER || attributes[SEMATTRS_HTTP_ROUTE] !== "/health"; } diff --git a/examples/graphql/package.json b/examples/graphql/package.json index 53e8935933..6ca5a0371b 100644 --- a/examples/graphql/package.json +++ b/examples/graphql/package.json @@ -44,7 +44,7 @@ "@opentelemetry/resources": "~1.0.0", "@opentelemetry/sdk-trace-base": "~1.0.0", "@opentelemetry/sdk-trace-node": "~1.0.0", - "@opentelemetry/semantic-conventions": "~1.0.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "apollo-server": "^2.18.1", "cross-fetch": "^3.0.5", "express": "^4.17.1", diff --git a/examples/graphql/tracer.js b/examples/graphql/tracer.js index 2545a20874..82a24edde8 100644 --- a/examples/graphql/tracer.js +++ b/examples/graphql/tracer.js @@ -8,11 +8,11 @@ const { OTLPTraceExporter } = require('@opentelemetry/exporter-otlp-http'); const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); const { ExpressInstrumentation } = require('@opentelemetry/instrumentation-express'); const { Resource } = require('@opentelemetry/resources'); -const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); +const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions'); const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'graphql-service', + [SEMRESATTRS_SERVICE_NAME]: 'graphql-service', }), }); diff --git a/examples/koa/package.json b/examples/koa/package.json index a3447a8273..9165d6ebdd 100644 --- a/examples/koa/package.json +++ b/examples/koa/package.json @@ -39,6 +39,7 @@ "@opentelemetry/instrumentation-koa": "^0.31.0", "@opentelemetry/sdk-trace-node": "^1.0.0", "@opentelemetry/sdk-trace-base": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "axios": "^1.6.0", "koa": "^2.13.0" }, diff --git a/examples/koa/src/tracer.ts b/examples/koa/src/tracer.ts index 32bc6b166d..d0a3321a68 100644 --- a/examples/koa/src/tracer.ts +++ b/examples/koa/src/tracer.ts @@ -10,14 +10,14 @@ import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions' +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions' const EXPORTER = process.env.EXPORTER || ''; export const setupTracing = (serviceName: string) => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName + [SEMRESATTRS_SERVICE_NAME]: serviceName }) }); diff --git a/examples/memcached/package.json b/examples/memcached/package.json index 73170fe28a..858393ab71 100644 --- a/examples/memcached/package.json +++ b/examples/memcached/package.json @@ -31,8 +31,10 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/instrumentation": "^0.25.0", "@opentelemetry/instrumentation-memcached": "^0.23.0", - "@opentelemetry/sdk-trace-node": "^0.25.0", + "@opentelemetry/resources": "^1.23.0", "@opentelemetry/sdk-trace-base": "^0.25.0", + "@opentelemetry/sdk-trace-node": "^0.25.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "memcached": "^2.2.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib#readme" diff --git a/examples/memcached/tracer.js b/examples/memcached/tracer.js index 0dbda86a19..285233199a 100644 --- a/examples/memcached/tracer.js +++ b/examples/memcached/tracer.js @@ -9,14 +9,14 @@ const { registerInstrumentations } = require('@opentelemetry/instrumentation'); const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { SimpleSpanProcessor, ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base'); const { Resource } = require('@opentelemetry/resources'); -const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); +const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions'); const { MemcachedInstrumentation } = require('@opentelemetry/instrumentation-memcached'); module.exports = (serviceName) => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }), }); registerInstrumentations({ diff --git a/examples/mongodb/package.json b/examples/mongodb/package.json index f96cd0feb2..7bf097e553 100644 --- a/examples/mongodb/package.json +++ b/examples/mongodb/package.json @@ -38,6 +38,7 @@ "@opentelemetry/instrumentation-mongodb": "^0.32.0", "@opentelemetry/sdk-trace-node": "^1.0.0", "@opentelemetry/sdk-trace-base": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "mongodb": "^3.6.11" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib#readme", diff --git a/examples/mongodb/src/tracer.ts b/examples/mongodb/src/tracer.ts index e38075df25..4e63724503 100644 --- a/examples/mongodb/src/tracer.ts +++ b/examples/mongodb/src/tracer.ts @@ -8,13 +8,13 @@ import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; export const setupTracing = (serviceName: string): api.Tracer => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName + [SEMRESATTRS_SERVICE_NAME]: serviceName }) }); diff --git a/examples/mysql/package.json b/examples/mysql/package.json index 3291020209..8455f63678 100644 --- a/examples/mysql/package.json +++ b/examples/mysql/package.json @@ -39,6 +39,7 @@ "@opentelemetry/instrumentation-mysql": "^0.31.0", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-node": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "@opentelemetry/exporter-metrics-otlp-grpc": "^0.48.0", "mysql": "^2.18.1" }, diff --git a/examples/mysql/src/tracer.ts b/examples/mysql/src/tracer.ts index f37153aa64..b5c2f522cb 100644 --- a/examples/mysql/src/tracer.ts +++ b/examples/mysql/src/tracer.ts @@ -9,7 +9,7 @@ import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; import { MySQLInstrumentation } from '@opentelemetry/instrumentation-mysql'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; import { MeterProvider, PeriodicExportingMetricReader, @@ -33,7 +33,7 @@ export const setupTracing = (serviceName: string) => { //traces: const tracerProvider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }),}); if (EXPORTER.toLowerCase().startsWith('z')) { diff --git a/examples/postgres/README.md b/examples/postgres/README.md deleted file mode 100644 index 4b29d482c8..0000000000 --- a/examples/postgres/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Overview - -OpenTelemetry PostgreSQL Instrumentation allows the user to automatically collect trace data and export them to the backend of choice (we can use Zipkin or Jaeger for this example), to give observability to distributed systems. - -This is a simple example that demonstrates tracing HTTP request from client to server. The example -shows key aspects of tracing such as - -- Root Span (on Client) -- Child Span (on Client) -- Child Span from a Remote Parent (on Server) -- SpanContext Propagation (from Client to Server) -- Span Events -- Span Attributes - -## Installation - -```sh -# from this directory -npm install -``` - -Setup [Zipkin Tracing](https://zipkin.io/pages/quickstart.html) -or -Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/#all-in-one) - -## Run the Application - -### Zipkin - -- Start postgres via docker - - ```sh - # from this directory - npm run docker:start - ``` - -- Run the server - - ```sh - # from this directory - npm run zipkin:server - ``` - -- Run the client - - ```sh - # from this directory - npm run zipkin:client - ``` - -- Cleanup docker - - ```sh - # from this directory - npm run docker:stop - ``` - -#### Zipkin UI - -`zipkin:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`). -Go to Zipkin with your browser (e.g ) - -

- -### Jaeger - -- Start postgres via docker - - ```sh - # from this directory - npm run docker:start - ``` - -- Run the server - - ```sh - # from this directory - npm run jaeger:server - ``` - -- Run the client - - ```sh - # from this directory - npm run jaeger:client - ``` - -- Cleanup docker - - ```sh - # from this directory - npm run docker:stop - ``` - -#### Jaeger UI - -`jaeger:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`). -Go to Jaeger with your browser (e.g ) - -

- -## Useful links - -- For more information on OpenTelemetry, visit: -- For more information on OpenTelemetry for Node.js, visit: - -## LICENSE - -Apache License 2.0 diff --git a/examples/postgres/client.js b/examples/postgres/client.js deleted file mode 100644 index 86e96ad263..0000000000 --- a/examples/postgres/client.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -const api = require('@opentelemetry/api'); -const tracer = require('./tracer')('postgres-client-service'); -// eslint-disable-next-line import/order -const http = require('http'); - -function makeRequest() { - const span = tracer.startSpan('makeRequest'); - const randomId = Math.floor(Math.random() * 10); - api.context.with(api.trace.setSpan(api.ROOT_CONTEXT, span), () => { - console.log('Client traceId ', span.spanContext().traceId); - http.get({ - host: 'localhost', - port: 3000, - path: `/insert?id=${randomId}&text=randomstring`, - }); - - http.get({ - host: 'localhost', - port: 3000, - path: `/get?id=${randomId}`, - }); - }); - - // The process must live for at least the interval past any traces that - // must be exported, or some risk being lost if they are recorded after the - // last export. - console.log('Sleeping 5 seconds before shutdown to ensure all records are flushed.'); - setTimeout(() => { console.log('Completed.'); }, 5000); -} - -makeRequest(); diff --git a/examples/postgres/images/jaeger.png b/examples/postgres/images/jaeger.png deleted file mode 100644 index aaecd50a56..0000000000 Binary files a/examples/postgres/images/jaeger.png and /dev/null differ diff --git a/examples/postgres/images/zipkin.png b/examples/postgres/images/zipkin.png deleted file mode 100644 index ea907ae047..0000000000 Binary files a/examples/postgres/images/zipkin.png and /dev/null differ diff --git a/examples/postgres/package.json b/examples/postgres/package.json deleted file mode 100644 index 0197d15772..0000000000 --- a/examples/postgres/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "postgres-example", - "private": true, - "version": "0.23.0", - "description": "Example of Postgres integration with OpenTelemetry", - "main": "index.js", - "scripts": { - "zipkin:server": "cross-env EXPORTER=zipkin node ./server.js", - "zipkin:client": "cross-env EXPORTER=zipkin node ./client.js", - "jaeger:server": "cross-env EXPORTER=jaeger node ./server.js", - "jaeger:client": "cross-env EXPORTER=jaeger node ./client.js", - "docker:start": "docker run -d -p 54320:5432 -e POSTGRES_PASSWORD=postgres --name otpostgres postgres:alpine", - "docker:stop": "docker stop otpostgres & docker rm otpostgres" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/open-telemetry/opentelemetry-js.git" - }, - "keywords": [ - "opentelemetry", - "postgres", - "tracing" - ], - "engines": { - "node": ">=8.5.0" - }, - "author": "OpenTelemetry Authors", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/open-telemetry/opentelemetry-js/issues" - }, - "dependencies": { - "@opentelemetry/api": "^1.0.2", - "@opentelemetry/exporter-jaeger": "^0.25.0", - "@opentelemetry/exporter-zipkin": "^0.25.0", - "@opentelemetry/instrumentation": "^0.25.0", - "@opentelemetry/instrumentation-http": "^0.25.0", - "@opentelemetry/instrumentation-pg": "^0.23.0", - "@opentelemetry/sdk-trace-node": "^0.25.0", - "@opentelemetry/sdk-trace-base": "^0.25.0", - "express": "^4.17.1", - "pg": "^8.6.0" - }, - "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", - "devDependencies": { - "cross-env": "^6.0.0" - } -} diff --git a/examples/postgres/server.js b/examples/postgres/server.js deleted file mode 100644 index 1c2ac91c54..0000000000 --- a/examples/postgres/server.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -const api = require('@opentelemetry/api'); -// eslint-disable-next-line import/order -const tracer = require('./tracer')('postgres-server-service'); -const { SpanKind, SpanStatusCode } = require('@opentelemetry/api'); -const express = require('express'); -const setupPg = require('./setupPsql'); - -const pool = setupPg.startPsql(); - -const app = express(); - -app.get('/:cmd', (req, res) => { - const cmd = req.path.slice(1); - if (!req.query.id) { - res.status(400).send('No id provided'); - return; - } - let queryText = `SELECT id, text FROM test WHERE id = ${req.query.id}`; - if (cmd === 'insert') { - if (!req.query.text) { - res.status(400).send('No text provided'); - return; - } - queryText = { - text: 'INSERT INTO test (id, text) VALUES($1, $2) ON CONFLICT(id) DO UPDATE SET text=$2', - values: [req.query.id, req.query.text], - }; - } - const currentSpan = api.trace.getSpan(api.context.active()); - console.log(`traceid: ${currentSpan.spanContext().traceId}`); - const span = tracer.startSpan(cmd, { - kind: SpanKind.SERVER, - }); - api.context.with(api.trace.setSpan(api.ROOT_CONTEXT, span), () => { - try { - pool.query(queryText, (err, ret) => { - if (err) throw err; - res.send(ret.rows); - }); - } catch (e) { - res.status(400).send({ message: e.message }); - span.setStatus(SpanStatusCode.ERROR); - } - span.end(); - }); -}); - -// start server -const port = 3000; -app.listen(port, () => { - console.log(`Node HTTP listening on ${port}`); -}); diff --git a/examples/postgres/setupPsql.js b/examples/postgres/setupPsql.js deleted file mode 100644 index e07ae2604c..0000000000 --- a/examples/postgres/setupPsql.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const { Pool } = require('pg'); - -// create new pool for psql -const CONFIG = { - password: process.env.POSTGRES_USER || 'postgres', - user: process.env.POSTGRES_USER || 'postgres', - database: process.env.POSTGRES_DB || 'postgres', - host: process.env.POSTGRES_HOST || 'localhost', - port: process.env.POSTGRES_PORT - ? parseInt(process.env.POSTGRES_PORT, 10) - : 54320, -}; - -function startPsql() { - const pool = new Pool(CONFIG); - - pool.connect((connectErr, client, release) => { - if (connectErr) throw connectErr; - release(); - const queryText = 'CREATE TABLE IF NOT EXISTS test(id SERIAL PRIMARY KEY, text VARCHAR(40) not null)'; - client.query(queryText, (err, res) => { - if (err) throw err; - console.log(res.rows[0]); - }); - }); - - return pool; -} - -exports.startPsql = startPsql; diff --git a/examples/postgres/tracer.js b/examples/postgres/tracer.js deleted file mode 100644 index 3f1c5f7e66..0000000000 --- a/examples/postgres/tracer.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -const opentelemetry = require('@opentelemetry/api'); -const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); -const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); -const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); -const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); -const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); -const { PgInstrumentation } = require('@opentelemetry/instrumentation-pg'); - -const EXPORTER = process.env.EXPORTER || ''; - -module.exports = (serviceName) => { - const provider = new NodeTracerProvider(); - - let exporter; - if (EXPORTER.toLowerCase().startsWith('z')) { - exporter = new ZipkinExporter({ - serviceName, - }); - } else { - exporter = new JaegerExporter({ - serviceName, - // The default flush interval is 5 seconds. - flushInterval: 2000, - }); - } - - provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); - - // Initialize the OpenTelemetry APIs to use the BasicTracer bindings - provider.register(); - - registerInstrumentations({ - instrumentations: [ - new PgInstrumentation(), - new HttpInstrumentation(), - ], - }); - - return opentelemetry.trace.getTracer('example-postgres'); -}; diff --git a/examples/react-load/react/package.json b/examples/react-load/react/package.json index 702f88cfac..9c9ce0281a 100644 --- a/examples/react-load/react/package.json +++ b/examples/react-load/react/package.json @@ -43,6 +43,7 @@ "@opentelemetry/plugin-react-load": "^0.23.0", "@opentelemetry/sdk-trace-base": "^0.25.0", "@opentelemetry/sdk-trace-web": "^0.25.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "react": "^16.13.1", "react-dom": "^16.13.1", "react-router-dom": "^5.2.0", diff --git a/examples/react-load/react/src/web-tracer.js b/examples/react-load/react/src/web-tracer.js index ea1b5ca952..80796da13e 100644 --- a/examples/react-load/react/src/web-tracer.js +++ b/examples/react-load/react/src/web-tracer.js @@ -5,12 +5,12 @@ import { ZoneContextManager } from '@opentelemetry/context-zone'; import { CollectorTraceExporter } from '@opentelemetry/exporter-collector'; import { diag, DiagConsoleLogger } from '@opentelemetry/api'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions' +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions' export default (serviceName) => { const provider = new WebTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: "react-load-example" + [SEMRESATTRS_SERVICE_NAME]: "react-load-example" }), }); diff --git a/examples/redis/package.json b/examples/redis/package.json index fedef04c8d..5e989b9fd2 100644 --- a/examples/redis/package.json +++ b/examples/redis/package.json @@ -39,6 +39,7 @@ "@opentelemetry/instrumentation-redis": "^0.32.0", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-node": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.23.0", "axios": "^1.6.0", "express": "^4.17.1", "redis": "^3.1.1" diff --git a/examples/redis/src/tracer.ts b/examples/redis/src/tracer.ts index e50633493a..de70a60418 100644 --- a/examples/redis/src/tracer.ts +++ b/examples/redis/src/tracer.ts @@ -9,14 +9,14 @@ import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; import { RedisInstrumentation } from '@opentelemetry/instrumentation-redis'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; const EXPORTER = process.env.EXPORTER || ''; export const setupTracing = (serviceName: string) => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }),}); let exporter; diff --git a/examples/web/examples/document-load/index.js b/examples/web/examples/document-load/index.js index 0cb6755088..65db02bba3 100644 --- a/examples/web/examples/document-load/index.js +++ b/examples/web/examples/document-load/index.js @@ -9,11 +9,11 @@ import { B3Propagator } from '@opentelemetry/propagator-b3'; import { CompositePropagator, W3CTraceContextPropagator } from '@opentelemetry/core'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; const provider = new WebTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'web-service-dl', + [SEMRESATTRS_SERVICE_NAME]: 'web-service-dl', }), }); diff --git a/examples/web/examples/meta/index.js b/examples/web/examples/meta/index.js index 621779d0dc..8b9cb5ad41 100644 --- a/examples/web/examples/meta/index.js +++ b/examples/web/examples/meta/index.js @@ -6,11 +6,11 @@ import { B3Propagator } from '@opentelemetry/propagator-b3'; import { getWebAutoInstrumentations } from '@opentelemetry/auto-instrumentations-web'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; const providerWithZone = new WebTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'web-service-meta', + [SEMRESATTRS_SERVICE_NAME]: 'web-service-meta', }), }); diff --git a/examples/web/examples/user-interaction/index.js b/examples/web/examples/user-interaction/index.js index 34606eb0e9..b75cae65d5 100644 --- a/examples/web/examples/user-interaction/index.js +++ b/examples/web/examples/user-interaction/index.js @@ -7,11 +7,11 @@ import { B3Propagator } from '@opentelemetry/propagator-b3'; import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; const providerWithZone = new WebTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'web-service-ui', + [SEMRESATTRS_SERVICE_NAME]: 'web-service-ui', }), }); diff --git a/examples/web/package.json b/examples/web/package.json index 0bc5691c59..b4be8fa692 100644 --- a/examples/web/package.json +++ b/examples/web/package.json @@ -46,7 +46,7 @@ "@opentelemetry/instrumentation-xml-http-request": "^0.39.1", "@opentelemetry/propagator-b3": "^1.13.0", "@opentelemetry/sdk-trace-web": "^1.13.0", - "@opentelemetry/semantic-conventions": "^1.13.0" + "@opentelemetry/semantic-conventions": "^1.23.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib#readme" } diff --git a/incubator/opentelemetry-sampler-aws-xray/LICENSE b/incubator/opentelemetry-sampler-aws-xray/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/incubator/opentelemetry-sampler-aws-xray/LICENSE +++ b/incubator/opentelemetry-sampler-aws-xray/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/metapackages/auto-instrumentations-node/CHANGELOG.md b/metapackages/auto-instrumentations-node/CHANGELOG.md index b69ff3972e..31f144fd3d 100644 --- a/metapackages/auto-instrumentations-node/CHANGELOG.md +++ b/metapackages/auto-instrumentations-node/CHANGELOG.md @@ -152,6 +152,90 @@ * dependencies * @opentelemetry/instrumentation-aws-sdk bumped from ^0.38.0 to ^0.38.1 +## [0.46.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-node-v0.45.0...auto-instrumentations-node-v0.46.0) (2024-05-02) + + +### Features + +* **auto-instrumentation-node:** add azure detector ([#2101](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2101)) ([af2f3f1](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/af2f3f1e5a2608900fcea721f08b2e541a17927c)) +* **auto-instrumentation-node:** add options for `serviceinstance` ([#2158](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2158)) ([379b757](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/379b7571fe3fead239285b503581094f42a79d66)) +* **auto-instrumentation-node:** add undici instrumentation ([#2131](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2131)) ([4463483](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4463483515c335de4cbb5b066f92c7ce0336619a)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/instrumentation-dns bumped from ^0.36.0 to ^0.36.1 + * @opentelemetry/instrumentation-fastify bumped from ^0.36.0 to ^0.36.1 + * @opentelemetry/instrumentation-hapi bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-knex bumped from ^0.36.0 to ^0.36.1 + * @opentelemetry/instrumentation-mongoose bumped from ^0.38.0 to ^0.38.1 + * @opentelemetry/instrumentation-mysql bumped from ^0.38.0 to ^0.38.1 + * @opentelemetry/instrumentation-mysql2 bumped from ^0.38.0 to ^0.38.1 + * @opentelemetry/instrumentation-nestjs-core bumped from ^0.37.0 to ^0.37.1 + * @opentelemetry/instrumentation-pino bumped from ^0.38.0 to ^0.39.0 + * @opentelemetry/instrumentation-redis bumped from ^0.39.0 to ^0.39.1 + * @opentelemetry/instrumentation-tedious bumped from ^0.10.0 to ^0.10.1 + +## [0.45.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-node-v0.44.0...auto-instrumentations-node-v0.45.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/instrumentation-amqplib bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-aws-lambda bumped from ^0.40.0 to ^0.41.0 + * @opentelemetry/instrumentation-aws-sdk bumped from ^0.40.0 to ^0.41.0 + * @opentelemetry/instrumentation-bunyan bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-cassandra-driver bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-connect bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-cucumber bumped from ^0.5.0 to ^0.6.0 + * @opentelemetry/instrumentation-dataloader bumped from ^0.8.0 to ^0.9.0 + * @opentelemetry/instrumentation-dns bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-express bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-fastify bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-fs bumped from ^0.11.0 to ^0.12.0 + * @opentelemetry/instrumentation-generic-pool bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-graphql bumped from ^0.39.0 to ^0.40.0 + * @opentelemetry/instrumentation-hapi bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-ioredis bumped from ^0.39.0 to ^0.40.0 + * @opentelemetry/instrumentation-knex bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-koa bumped from ^0.39.0 to ^0.40.0 + * @opentelemetry/instrumentation-lru-memoizer bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-memcached bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-mongodb bumped from ^0.42.0 to ^0.43.0 + * @opentelemetry/instrumentation-mongoose bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-mysql bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-mysql2 bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-nestjs-core bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-net bumped from ^0.35.0 to ^0.36.0 + * @opentelemetry/instrumentation-pg bumped from ^0.40.0 to ^0.41.0 + * @opentelemetry/instrumentation-pino bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-redis bumped from ^0.38.0 to ^0.39.0 + * @opentelemetry/instrumentation-redis-4 bumped from ^0.38.0 to ^0.39.0 + * @opentelemetry/instrumentation-restify bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-router bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/instrumentation-socket.io bumped from ^0.38.0 to ^0.39.0 + * @opentelemetry/instrumentation-tedious bumped from ^0.9.0 to ^0.10.0 + * @opentelemetry/instrumentation-winston bumped from ^0.36.0 to ^0.37.0 + * @opentelemetry/resource-detector-alibaba-cloud bumped from ^0.28.8 to ^0.28.9 + * @opentelemetry/resource-detector-aws bumped from ^1.4.1 to ^1.4.2 + * @opentelemetry/resource-detector-container bumped from ^0.3.8 to ^0.3.9 + * @opentelemetry/resource-detector-gcp bumped from ^0.29.8 to ^0.29.9 + ## [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) diff --git a/metapackages/auto-instrumentations-node/LICENSE b/metapackages/auto-instrumentations-node/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/metapackages/auto-instrumentations-node/LICENSE +++ b/metapackages/auto-instrumentations-node/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/metapackages/auto-instrumentations-node/README.md b/metapackages/auto-instrumentations-node/README.md index dccf55a266..181d920386 100644 --- a/metapackages/auto-instrumentations-node/README.md +++ b/metapackages/auto-instrumentations-node/README.md @@ -50,7 +50,7 @@ export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://your-endpoint" export OTEL_EXPORTER_OTLP_HEADERS="x-api-key=your-api-key" export OTEL_EXPORTER_OTLP_TRACES_HEADERS="x-api-key=your-api-key" export OTEL_RESOURCE_ATTRIBUTES="service.namespace=my-namespace" -export OTEL_NODE_RESOURCE_DETECTORS="env,host,os" +export OTEL_NODE_RESOURCE_DETECTORS="env,host,os,serviceinstace" export OTEL_SERVICE_NAME="client" export NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register" node app.js @@ -62,9 +62,11 @@ By default, all SDK resource detectors are used, but you can use the environment - `host` - `os` - `process` +- `serviceinstance` - `container` - `alibaba` - `aws` +- `azure` - `gcp` - `all` - enable all resource detectors - `none` - disable resource detection @@ -179,6 +181,7 @@ registerInstrumentations({ - [@opentelemetry/instrumentation-redis](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-redis) - [@opentelemetry/instrumentation-restify](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-restify) - [@opentelemetry/instrumentation-socket.io](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-socket.io) +- [@opentelemetry/instrumentation-undici](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-undici) - [@opentelemetry/instrumentation-winston](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-winston) ## Useful links diff --git a/metapackages/auto-instrumentations-node/package.json b/metapackages/auto-instrumentations-node/package.json index e8c3bbe6b8..0a3ae85cc1 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.44.0", + "version": "0.46.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", @@ -49,50 +49,52 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@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.36.0", - "@opentelemetry/instrumentation-http": "^0.50.0", - "@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" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-amqplib": "^0.37.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.41.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.41.0", + "@opentelemetry/instrumentation-bunyan": "^0.38.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.38.0", + "@opentelemetry/instrumentation-connect": "^0.36.0", + "@opentelemetry/instrumentation-cucumber": "^0.6.0", + "@opentelemetry/instrumentation-dataloader": "^0.9.0", + "@opentelemetry/instrumentation-dns": "^0.36.1", + "@opentelemetry/instrumentation-express": "^0.38.0", + "@opentelemetry/instrumentation-fastify": "^0.36.1", + "@opentelemetry/instrumentation-fs": "^0.12.0", + "@opentelemetry/instrumentation-generic-pool": "^0.36.0", + "@opentelemetry/instrumentation-graphql": "^0.40.0", + "@opentelemetry/instrumentation-grpc": "^0.51.0", + "@opentelemetry/instrumentation-hapi": "^0.38.0", + "@opentelemetry/instrumentation-http": "^0.51.0", + "@opentelemetry/instrumentation-ioredis": "^0.40.0", + "@opentelemetry/instrumentation-knex": "^0.36.1", + "@opentelemetry/instrumentation-koa": "^0.40.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.37.0", + "@opentelemetry/instrumentation-memcached": "^0.36.0", + "@opentelemetry/instrumentation-mongodb": "^0.43.0", + "@opentelemetry/instrumentation-mongoose": "^0.38.1", + "@opentelemetry/instrumentation-mysql": "^0.38.1", + "@opentelemetry/instrumentation-mysql2": "^0.38.1", + "@opentelemetry/instrumentation-nestjs-core": "^0.37.1", + "@opentelemetry/instrumentation-net": "^0.36.0", + "@opentelemetry/instrumentation-pg": "^0.41.0", + "@opentelemetry/instrumentation-pino": "^0.39.0", + "@opentelemetry/instrumentation-redis": "^0.39.1", + "@opentelemetry/instrumentation-redis-4": "^0.39.0", + "@opentelemetry/instrumentation-restify": "^0.38.0", + "@opentelemetry/instrumentation-router": "^0.37.0", + "@opentelemetry/instrumentation-socket.io": "^0.39.0", + "@opentelemetry/instrumentation-tedious": "^0.10.1", + "@opentelemetry/instrumentation-undici": "^0.2.0", + "@opentelemetry/instrumentation-winston": "^0.37.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.9", + "@opentelemetry/resource-detector-aws": "^1.4.2", + "@opentelemetry/resource-detector-azure": "^0.2.6", + "@opentelemetry/resource-detector-container": "^0.3.9", + "@opentelemetry/resource-detector-gcp": "^0.29.9", + "@opentelemetry/resources": "^1.24.0", + "@opentelemetry/sdk-node": "^0.51.0" }, "files": [ "build/src/**/*.js", diff --git a/metapackages/auto-instrumentations-node/src/utils.ts b/metapackages/auto-instrumentations-node/src/utils.ts index 67cfa900c8..04f4c1ed50 100644 --- a/metapackages/auto-instrumentations-node/src/utils.ts +++ b/metapackages/auto-instrumentations-node/src/utils.ts @@ -53,6 +53,7 @@ import { RestifyInstrumentation } from '@opentelemetry/instrumentation-restify'; import { RouterInstrumentation } from '@opentelemetry/instrumentation-router'; import { SocketIoInstrumentation } from '@opentelemetry/instrumentation-socket.io'; import { TediousInstrumentation } from '@opentelemetry/instrumentation-tedious'; +import { UndiciInstrumentation } from '@opentelemetry/instrumentation-undici'; import { WinstonInstrumentation } from '@opentelemetry/instrumentation-winston'; import { alibabaCloudEcsDetector } from '@opentelemetry/resource-detector-alibaba-cloud'; @@ -72,15 +73,23 @@ import { hostDetectorSync, osDetectorSync, processDetectorSync, + serviceInstanceIdDetectorSync, } from '@opentelemetry/resources'; +import { + azureAppServiceDetector, + azureFunctionsDetector, + azureVmDetector, +} from '@opentelemetry/resource-detector-azure'; const RESOURCE_DETECTOR_CONTAINER = 'container'; const RESOURCE_DETECTOR_ENVIRONMENT = 'env'; const RESOURCE_DETECTOR_HOST = 'host'; const RESOURCE_DETECTOR_OS = 'os'; +const RESOURCE_DETECTOR_SERVICE_INSTANCE_ID = 'serviceinstance'; const RESOURCE_DETECTOR_PROCESS = 'process'; const RESOURCE_DETECTOR_ALIBABA = 'alibaba'; const RESOURCE_DETECTOR_AWS = 'aws'; +const RESOURCE_DETECTOR_AZURE = 'azure'; const RESOURCE_DETECTOR_GCP = 'gcp'; const InstrumentationMap = { @@ -121,6 +130,7 @@ const InstrumentationMap = { '@opentelemetry/instrumentation-router': RouterInstrumentation, '@opentelemetry/instrumentation-socket.io': SocketIoInstrumentation, '@opentelemetry/instrumentation-tedious': TediousInstrumentation, + '@opentelemetry/instrumentation-undici': UndiciInstrumentation, '@opentelemetry/instrumentation-winston': WinstonInstrumentation, }; @@ -196,12 +206,13 @@ function getEnabledInstrumentationsFromEnv() { export function getResourceDetectorsFromEnv(): Array { const resourceDetectors = new Map< string, - Detector | DetectorSync | Detector[] + Detector | DetectorSync | Detector[] | DetectorSync[] >([ [RESOURCE_DETECTOR_CONTAINER, containerDetector], [RESOURCE_DETECTOR_ENVIRONMENT, envDetectorSync], [RESOURCE_DETECTOR_HOST, hostDetectorSync], [RESOURCE_DETECTOR_OS, osDetectorSync], + [RESOURCE_DETECTOR_SERVICE_INSTANCE_ID, serviceInstanceIdDetectorSync], [RESOURCE_DETECTOR_PROCESS, processDetectorSync], [RESOURCE_DETECTOR_ALIBABA, alibabaCloudEcsDetector], [RESOURCE_DETECTOR_GCP, gcpDetector], @@ -215,6 +226,10 @@ export function getResourceDetectorsFromEnv(): Array { awsLambdaDetector, ], ], + [ + RESOURCE_DETECTOR_AZURE, + [azureAppServiceDetector, azureFunctionsDetector, azureVmDetector], + ], ]); const resourceDetectorsFromEnv = diff --git a/metapackages/auto-instrumentations-node/test/utils.test.ts b/metapackages/auto-instrumentations-node/test/utils.test.ts index 3a04c01569..0622022f36 100644 --- a/metapackages/auto-instrumentations-node/test/utils.test.ts +++ b/metapackages/auto-instrumentations-node/test/utils.test.ts @@ -114,25 +114,28 @@ describe('utils', () => { describe('getResourceDetectorsFromEnv', () => { it('should return all resource detectors by default', () => { - assert.equal(getResourceDetectorsFromEnv().length, 12); + assert.equal(getResourceDetectorsFromEnv().length, 16); }); it('should return all resource detectors when OTEL_NODE_RESOURCE_DETECTORS contains "all"', () => { process.env.OTEL_NODE_RESOURCE_DETECTORS = 'all'; - - assert.equal(getResourceDetectorsFromEnv().length, 12); + assert.equal(getResourceDetectorsFromEnv().length, 16); delete process.env.OTEL_NODE_RESOURCE_DETECTORS; }); it('should return specific resource detectors depending on OTEL_NODE_RESOURCE_DETECTORS', () => { - process.env.OTEL_NODE_RESOURCE_DETECTORS = 'env,host'; + process.env.OTEL_NODE_RESOURCE_DETECTORS = 'env,host,serviceinstance'; const resourceDetectors = getResourceDetectorsFromEnv(); - assert.equal(resourceDetectors.length, 2); + assert.equal(resourceDetectors.length, 3); assert.equal(resourceDetectors[0].constructor.name, 'EnvDetectorSync'); assert.equal(resourceDetectors[1].constructor.name, 'HostDetectorSync'); + assert.equal( + resourceDetectors[2].constructor.name, + 'ServiceInstanceIdDetectorSync' + ); delete process.env.OTEL_NODE_RESOURCE_DETECTORS; }); diff --git a/metapackages/auto-instrumentations-web/CHANGELOG.md b/metapackages/auto-instrumentations-web/CHANGELOG.md index 145883734e..94fc875089 100644 --- a/metapackages/auto-instrumentations-web/CHANGELOG.md +++ b/metapackages/auto-instrumentations-web/CHANGELOG.md @@ -12,6 +12,27 @@ * dependencies * @opentelemetry/instrumentation-document-load bumped from ^0.31.1 to ^0.31.2 +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-web-v0.38.0...auto-instrumentations-web-v0.39.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/instrumentation-document-load bumped from ^0.37.0 to ^0.38.0 + * @opentelemetry/instrumentation-user-interaction bumped from ^0.37.0 to ^0.38.0 + ## [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) diff --git a/metapackages/auto-instrumentations-web/LICENSE b/metapackages/auto-instrumentations-web/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/metapackages/auto-instrumentations-web/LICENSE +++ b/metapackages/auto-instrumentations-web/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/metapackages/auto-instrumentations-web/package.json b/metapackages/auto-instrumentations-web/package.json index 61e875742f..4520fe6748 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.38.0", + "version": "0.39.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", @@ -61,11 +61,11 @@ "webpack-merge": "5.8.0" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-document-load": "^0.37.0", - "@opentelemetry/instrumentation-fetch": "^0.50.0", - "@opentelemetry/instrumentation-user-interaction": "^0.37.0", - "@opentelemetry/instrumentation-xml-http-request": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-document-load": "^0.38.0", + "@opentelemetry/instrumentation-fetch": "^0.51.0", + "@opentelemetry/instrumentation-user-interaction": "^0.38.0", + "@opentelemetry/instrumentation-xml-http-request": "^0.51.0" }, "files": [ "build/src/**/*.js", diff --git a/metapackages/auto-instrumentations-web/tsconfig.esm.json b/metapackages/auto-instrumentations-web/tsconfig.esm.json index 356b6d0307..a94adff6aa 100644 --- a/metapackages/auto-instrumentations-web/tsconfig.esm.json +++ b/metapackages/auto-instrumentations-web/tsconfig.esm.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "src", "outDir": "build/esm", - "skipLibCheck": true, "tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo" }, "include": [ diff --git a/metapackages/auto-instrumentations-web/tsconfig.esnext.json b/metapackages/auto-instrumentations-web/tsconfig.esnext.json index d6054d1fb0..ff1191ab29 100644 --- a/metapackages/auto-instrumentations-web/tsconfig.esnext.json +++ b/metapackages/auto-instrumentations-web/tsconfig.esnext.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "src", "outDir": "build/esnext", - "skipLibCheck": true, "tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo" }, "include": ["src/**/*.ts"] diff --git a/metapackages/auto-instrumentations-web/tsconfig.json b/metapackages/auto-instrumentations-web/tsconfig.json index e1baf4c16d..569e38e289 100644 --- a/metapackages/auto-instrumentations-web/tsconfig.json +++ b/metapackages/auto-instrumentations-web/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": ".", "outDir": "build", - "skipLibCheck": true }, "include": [ "src/**/*.ts", diff --git a/package-lock.json b/package-lock.json index 0f7fb562c3..a948005334 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.8", + "version": "0.28.9", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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.1", + "version": "1.4.2", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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.6", + "version": "0.2.7", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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.8", + "version": "0.3.9", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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.8", + "version": "0.29.9", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", @@ -214,7 +214,7 @@ }, "detectors/node/opentelemetry-resource-detector-github": { "name": "@opentelemetry/resource-detector-github", - "version": "0.28.1", + "version": "0.28.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.0.0" @@ -246,7 +246,7 @@ }, "detectors/node/opentelemetry-resource-detector-instana": { "name": "@opentelemetry/resource-detector-instana", - "version": "0.8.0", + "version": "0.9.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/resources": "^1.0.0", @@ -254,8 +254,8 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/sdk-node": "^0.51.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/semver": "7.5.3", @@ -281,53 +281,55 @@ }, "metapackages/auto-instrumentations-node": { "name": "@opentelemetry/auto-instrumentations-node", - "version": "0.44.0", + "version": "0.46.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@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.36.0", - "@opentelemetry/instrumentation-http": "^0.50.0", - "@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" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-amqplib": "^0.37.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.41.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.41.0", + "@opentelemetry/instrumentation-bunyan": "^0.38.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.38.0", + "@opentelemetry/instrumentation-connect": "^0.36.0", + "@opentelemetry/instrumentation-cucumber": "^0.6.0", + "@opentelemetry/instrumentation-dataloader": "^0.9.0", + "@opentelemetry/instrumentation-dns": "^0.36.1", + "@opentelemetry/instrumentation-express": "^0.38.0", + "@opentelemetry/instrumentation-fastify": "^0.36.1", + "@opentelemetry/instrumentation-fs": "^0.12.0", + "@opentelemetry/instrumentation-generic-pool": "^0.36.0", + "@opentelemetry/instrumentation-graphql": "^0.40.0", + "@opentelemetry/instrumentation-grpc": "^0.51.0", + "@opentelemetry/instrumentation-hapi": "^0.38.0", + "@opentelemetry/instrumentation-http": "^0.51.0", + "@opentelemetry/instrumentation-ioredis": "^0.40.0", + "@opentelemetry/instrumentation-knex": "^0.36.1", + "@opentelemetry/instrumentation-koa": "^0.40.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.37.0", + "@opentelemetry/instrumentation-memcached": "^0.36.0", + "@opentelemetry/instrumentation-mongodb": "^0.43.0", + "@opentelemetry/instrumentation-mongoose": "^0.38.1", + "@opentelemetry/instrumentation-mysql": "^0.38.1", + "@opentelemetry/instrumentation-mysql2": "^0.38.1", + "@opentelemetry/instrumentation-nestjs-core": "^0.37.1", + "@opentelemetry/instrumentation-net": "^0.36.0", + "@opentelemetry/instrumentation-pg": "^0.41.0", + "@opentelemetry/instrumentation-pino": "^0.39.0", + "@opentelemetry/instrumentation-redis": "^0.39.1", + "@opentelemetry/instrumentation-redis-4": "^0.39.0", + "@opentelemetry/instrumentation-restify": "^0.38.0", + "@opentelemetry/instrumentation-router": "^0.37.0", + "@opentelemetry/instrumentation-socket.io": "^0.39.0", + "@opentelemetry/instrumentation-tedious": "^0.10.1", + "@opentelemetry/instrumentation-undici": "^0.2.0", + "@opentelemetry/instrumentation-winston": "^0.37.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.9", + "@opentelemetry/resource-detector-aws": "^1.4.2", + "@opentelemetry/resource-detector-azure": "^0.2.6", + "@opentelemetry/resource-detector-container": "^0.3.9", + "@opentelemetry/resource-detector-gcp": "^0.29.9", + "@opentelemetry/resources": "^1.24.0", + "@opentelemetry/sdk-node": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.4.1", @@ -348,16 +350,354 @@ "@opentelemetry/api": "^1.4.1" } }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/api-logs": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.0.tgz", + "integrity": "sha512-m/jtfBPEIXS1asltl8fPQtO3Sb1qMpuL61unQajUmM8zIxeMF1AlqzWXM3QedcYgTTFiJCew5uJjyhpmqhc0+g==", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/context-async-hooks": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.0.tgz", + "integrity": "sha512-s7xaQ9ifDpJvwbWRLkZD/J5hY35w+MECm4TQUkg6szRcny9lf6oVhWij4w3JJFQgvHQMXU7oXOpX8Z05HxV/8g==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/core": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.0.tgz", + "integrity": "sha512-FP2oN7mVPqcdxJDTTnKExj4mi91EH+DNuArKfHTjPuJWe2K1JfMIVXNfahw1h3onJxQnxS8K0stKkogX05s+Aw==", + "dependencies": { + "@opentelemetry/semantic-conventions": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/exporter-trace-otlp-grpc": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.51.0.tgz", + "integrity": "sha512-xQpxKzS8ZnxYCa1v+3EKWhwMrSK3+RezpJ+AEKaP2pf2QbLfHt7kKfSn7niR2u3A1Tbe2aC7Ptt9+MafhThOOQ==", + "dependencies": { + "@grpc/grpc-js": "^1.7.1", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/exporter-trace-otlp-http": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.51.0.tgz", + "integrity": "sha512-zODqnLZmPOxj9CarFv0TrVlx9mgj0TfCMCiUiTdNi9iA2rgdKVo+bjJjpYF6LCTJOQCR5TScAUCKyzwkgDI+iA==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/exporter-trace-otlp-proto": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.51.0.tgz", + "integrity": "sha512-Fi7r0iMqGoFCQQ+WY0pYOWp395vdinZJIkYKnNbnreHxAN/kVDBl2FxbV3DeOKuRxEY08Gyb9ggPf+Zrqp7l/w==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-proto-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/exporter-zipkin": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.24.0.tgz", + "integrity": "sha512-QeGv0PHONswmu567pf9QliJ6s6DgCu5+ziF+soNS1LTcr1VRRVLViYLmGxmzDFUC48sjNTu7sumcKT0nJXsGBw==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/otlp-exporter-base": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.51.0.tgz", + "integrity": "sha512-hR4c9vWVz1QgzCBSyy9zSDkvfTgaK96E6/tfVP6O4dzdZW9HqWimA3lXV/KXadEGqShvM4GToz9EHp2A5RU5bQ==", + "dependencies": { + "@opentelemetry/core": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/otlp-grpc-exporter-base": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.51.0.tgz", + "integrity": "sha512-oTRtDvvB0bTRTBVrvKA/oM1gIAqQ6DVQS07pvqiL1cZS8wBrGgpw+2iTd0nV661Y/MhDn/kNWp8lRhMEIKN9bw==", + "dependencies": { + "@grpc/grpc-js": "^1.7.1", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "protobufjs": "^7.2.3" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/otlp-proto-exporter-base": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.51.0.tgz", + "integrity": "sha512-WDANDLSUh11Gu5o6iCzmjZraIv5bK8z1L/t6lxQ2NeEKiKUPo5pVOBBQQC/yAQU2yeqkiO1GRCieH+XahZf60A==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "protobufjs": "^7.2.3" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/otlp-transformer": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.51.0.tgz", + "integrity": "sha512-ylLgx2xumVoSefDHP9GMAU/LG+TU3+8eacVDXV5o1RqWxsdVOaQmCTY0XyDgeRTn6hIOVAq/HHQbRq3iWOrt2A==", + "dependencies": { + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/propagator-b3": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.24.0.tgz", + "integrity": "sha512-7TMIDE4+NO5vnkor+zned42wqca+hmhW5gWKhmYjUHC5B5uojo1PvtmBrd7kigFu96XvL4ZUWVzibWRWIQ/++Q==", + "dependencies": { + "@opentelemetry/core": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/propagator-jaeger": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.24.0.tgz", + "integrity": "sha512-r3MX3AmJiUeiWTXSDOdwBeaO+ahvWcFCpuKxmhhsH8Q8LqDnjhNd3krqBh4Qsq9wa0WhWtiQaDs/NOCWoMOlOw==", + "dependencies": { + "@opentelemetry/core": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/resources": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.0.tgz", + "integrity": "sha512-mxC7E7ocUS1tLzepnA7O9/G8G6ZTdjCH2pXme1DDDuCuk6n2/53GADX+GWBuyX0dfIxeMInIbJAdjlfN9GNr6A==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/sdk-logs": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.51.0.tgz", + "integrity": "sha512-K4fMBRFD8hQ6khk0rvYFuo6L9ymeGgByir6BcuFIgQuQ00OhYwBi9AruZz5V733Ejq7P8ObR3YyubkOUIbeVAw==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.4.0 <1.9.0", + "@opentelemetry/api-logs": ">=0.39.1" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/sdk-metrics": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.0.tgz", + "integrity": "sha512-4tJ+E6N019OZVB/nUW/LoK9xHxfeh88TCoaTqHeLBE9wLYfi6irWW6J9cphMav7J8Qk0D5b7/RM4VEY4dArWOA==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "lodash.merge": "^4.6.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/sdk-node": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.51.0.tgz", + "integrity": "sha512-MrPXDQsTAj3lcY8YUCjb7dvSXVZ5jG6wmjD2LB68V1rsLBdP8j70jsI9GaKijY7QB6psbLq6apO1vYeim5U7aw==", + "dependencies": { + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.51.0", + "@opentelemetry/exporter-trace-otlp-http": "0.51.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.51.0", + "@opentelemetry/exporter-zipkin": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/sdk-trace-node": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/instrumentation": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.0.tgz", + "integrity": "sha512-Eg/+Od5bEvzpvZQGhvMyKIkrzB9S7jW+6z9LHEI2VXhl/GrqQ3oBqlzJt4tA6pGtxRmqQWKWGM1wAbwDdW/gUA==", + "dependencies": { + "@opentelemetry/api-logs": "0.51.0", + "@types/shimmer": "^1.0.2", + "import-in-the-middle": "1.7.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/sdk-trace-base": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.0.tgz", + "integrity": "sha512-H9sLETZ4jw9UJ3totV8oM5R0m4CW0ZIOLfp4NV3g0CM8HD5zGZcaW88xqzWDgiYRpctFxd+WmHtGX/Upoa2vRg==", + "dependencies": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/sdk-trace-node": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.24.0.tgz", + "integrity": "sha512-QgByHmM9uloTpcYEEyW9YJEIMKHFSIM677RH9pJPWWwtM2NQFbEp/8HIJw80Ymtaz6cAxg1Kay1ByqIVzq3t5g==", + "dependencies": { + "@opentelemetry/context-async-hooks": "1.24.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/propagator-b3": "1.24.0", + "@opentelemetry/propagator-jaeger": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "semver": "^7.5.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "metapackages/auto-instrumentations-node/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.0.tgz", + "integrity": "sha512-yL0jI6Ltuz8R+Opj7jClGrul6pOoYrdfVmzQS4SITXRPH7I5IRZbrwe/6/v8v4WYMa6MYZG480S1+uc/IGfqsA==", + "engines": { + "node": ">=14" + } + }, "metapackages/auto-instrumentations-web": { "name": "@opentelemetry/auto-instrumentations-web", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-document-load": "^0.37.0", - "@opentelemetry/instrumentation-fetch": "^0.50.0", - "@opentelemetry/instrumentation-user-interaction": "^0.37.0", - "@opentelemetry/instrumentation-xml-http-request": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-document-load": "^0.38.0", + "@opentelemetry/instrumentation-fetch": "^0.51.0", + "@opentelemetry/instrumentation-user-interaction": "^0.38.0", + "@opentelemetry/instrumentation-xml-http-request": "^0.51.0" }, "devDependencies": { "@babel/core": "7.22.17", @@ -5122,9 +5462,9 @@ "dev": true }, "node_modules/@fastify/express": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@fastify/express/-/express-2.3.0.tgz", - "integrity": "sha512-jvvjlPPCfJsSHfF6tQDyARJ3+c3xXiqcxVZu6bi3xMWCWB3fl07vrjFDeaqnwqKhLZ9+m6cog5dw7gIMKEsTnQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@fastify/express/-/express-3.0.0.tgz", + "integrity": "sha512-Ug6aulXCUiHgMyrHVYQqnQbGdsAV0aTad6nZxbOr6w3QjKn1mdQS3Kyzvc+I0xMjZ9yIyMUWHSooHgZ0l7nOng==", "dev": true, "dependencies": { "express": "^4.17.1", @@ -5185,311 +5525,654 @@ } }, "node_modules/@hapi/accept": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.2.tgz", - "integrity": "sha512-CmzBx/bXUR8451fnZRuZAJRlzgm0Jgu5dltTX/bszmR2lheb9BpyN47Q1RbaGTsvFzn0PXAEs+lXDKfshccYZw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-6.0.3.tgz", + "integrity": "sha512-p72f9k56EuF0n3MwlBNThyVE5PXX40g+aQh+C/xbKrfzahM2Oispv3AXmOIU51t3j77zay1qrX7IIziZXspMlw==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/ammo": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz", - "integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==", + "node_modules/@hapi/accept/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", "dev": true, "dependencies": { - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/b64": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", - "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", + "node_modules/@hapi/accept/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/ammo": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-6.0.1.tgz", + "integrity": "sha512-pmL+nPod4g58kXrMcsGLp05O2jF4P2Q3GiL8qYV7nKYEh3cGf+rV4P5Jyi2Uq0agGhVU63GtaSAfBEZOlrJn9w==", + "dev": true, "dependencies": { - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/boom": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz", - "integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==", + "node_modules/@hapi/ammo/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/bounce": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-3.0.1.tgz", + "integrity": "sha512-G+/Pp9c1Ha4FDP+3Sy/Xwg2O4Ahaw3lIZFSX+BL4uWi64CmiETuZPxhKDUD4xBMOUZbBlzvO8HjiK8ePnhBadA==", + "dev": true, "dependencies": { - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/bounce": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz", - "integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==", + "node_modules/@hapi/bounce/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/bourne": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz", - "integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==" + "node_modules/@hapi/bounce/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true }, "node_modules/@hapi/call": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz", - "integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@hapi/call/-/call-9.0.1.tgz", + "integrity": "sha512-uPojQRqEL1GRZR4xXPqcLMujQGaEpyVPRyBlD8Pp5rqgIwLhtveF9PkixiKru2THXvuN8mUrLeet5fqxKAAMGg==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/call/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/call/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@hapi/catbox": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz", - "integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-12.1.1.tgz", + "integrity": "sha512-hDqYB1J+R0HtZg4iPH3LEnldoaBsar6bYp0EonBmNQ9t5CO+1CqgCul2ZtFveW1ReA5SQuze9GPSU7/aecERhw==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/podium": "4.x.x", - "@hapi/validate": "1.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/podium": "^5.0.0", + "@hapi/validate": "^2.0.1" } }, "node_modules/@hapi/catbox-memory": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-6.0.1.tgz", + "integrity": "sha512-sVb+/ZxbZIvaMtJfAbdyY+QJUQg9oKTwamXpEg/5xnfG5WbJLTjvEn4kIGKz9pN3ENNbIL/bIdctmHmqi/AdGA==", + "dev": true, + "dependencies": { + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/catbox-memory/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/catbox-memory/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/catbox/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/catbox/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/catbox/node_modules/@hapi/podium": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-5.0.1.tgz", - "integrity": "sha512-QWw9nOYJq5PlvChLWV8i6hQHJYfvdqiXdvTupJFh0eqLZ64Xir7mKNi96d5/ZMUAqXPursfNDIDxjFgoEDUqeQ==", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-5.0.1.tgz", + "integrity": "sha512-eznFTw6rdBhAijXFIlBOMJJd+lXTvqbrBIS4Iu80r2KTVIo4g+7fLy4NKp/8+UnSt5Ox6mJtAlKBU/Sf5080TQ==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2", + "@hapi/teamwork": "^6.0.0", + "@hapi/validate": "^2.0.1" + } + }, + "node_modules/@hapi/catbox/node_modules/@hapi/teamwork": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-6.0.0.tgz", + "integrity": "sha512-05HumSy3LWfXpmJ9cr6HzwhAavrHkJ1ZRCmNE2qJMihdM5YcWreWPfyN0yKT2ZjCM92au3ZkuodjBxOibxM67A==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@hapi/catbox/node_modules/@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/catbox/node_modules/@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" } }, "node_modules/@hapi/content": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz", - "integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@hapi/content/-/content-6.0.0.tgz", + "integrity": "sha512-CEhs7j+H0iQffKfe5Htdak5LBOz/Qc8TRh51cF+BFv0qnuph3Em4pjGVzJMkI2gfTDdlJKWJISGWS1rK34POGA==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x" + "@hapi/boom": "^10.0.0" } }, - "node_modules/@hapi/cryptiles": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz", - "integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==", + "node_modules/@hapi/content/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, "dependencies": { - "@hapi/boom": "9.x.x" - }, - "engines": { - "node": ">=12.0.0" + "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/content/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@hapi/file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz", - "integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/file/-/file-3.0.0.tgz", + "integrity": "sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q==", "dev": true }, "node_modules/@hapi/hapi": { - "version": "20.1.5", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-20.1.5.tgz", - "integrity": "sha512-BhJ5XFR9uWPUBj/z5pPqXSk8OnvQQU/EbQjwpmjZy0ymNEiq7kIhXkAmzXcntbBHta9o7zpW8XMeXnfV4wudXw==", - "dev": true, - "dependencies": { - "@hapi/accept": "^5.0.1", - "@hapi/ammo": "^5.0.1", - "@hapi/boom": "^9.1.0", - "@hapi/bounce": "^2.0.0", - "@hapi/call": "^8.0.0", - "@hapi/catbox": "^11.1.1", - "@hapi/catbox-memory": "^5.0.0", - "@hapi/heavy": "^7.0.1", - "@hapi/hoek": "^9.0.4", - "@hapi/mimos": "^6.0.0", - "@hapi/podium": "^4.1.1", - "@hapi/shot": "^5.0.5", - "@hapi/somever": "^3.0.0", - "@hapi/statehood": "^7.0.3", - "@hapi/subtext": "^7.0.3", - "@hapi/teamwork": "^5.1.0", - "@hapi/topo": "^5.0.0", - "@hapi/validate": "^1.1.1" + "version": "21.3.3", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.3.tgz", + "integrity": "sha512-6pgwWVl/aSKSNVn86n+mWa06jRqCAKi2adZp/Hti19A0u5x3/6eiKz8UTBPMzfrdGf9WcrYbFBYzWr/qd2s28g==", + "dev": true, + "dependencies": { + "@hapi/accept": "^6.0.1", + "@hapi/ammo": "^6.0.1", + "@hapi/boom": "^10.0.1", + "@hapi/bounce": "^3.0.1", + "@hapi/call": "^9.0.1", + "@hapi/catbox": "^12.1.1", + "@hapi/catbox-memory": "^6.0.1", + "@hapi/heavy": "^8.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/mimos": "^7.0.1", + "@hapi/podium": "^5.0.1", + "@hapi/shot": "^6.0.1", + "@hapi/somever": "^4.1.1", + "@hapi/statehood": "^8.1.1", + "@hapi/subtext": "^8.1.0", + "@hapi/teamwork": "^6.0.0", + "@hapi/topo": "^6.0.1", + "@hapi/validate": "^2.0.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.15.0" } }, - "node_modules/@hapi/heavy": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.1.tgz", - "integrity": "sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==", + "node_modules/@hapi/hapi/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/validate": "1.x.x" + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" + "node_modules/@hapi/hapi/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/hapi/node_modules/@hapi/podium": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-5.0.1.tgz", + "integrity": "sha512-eznFTw6rdBhAijXFIlBOMJJd+lXTvqbrBIS4Iu80r2KTVIo4g+7fLy4NKp/8+UnSt5Ox6mJtAlKBU/Sf5080TQ==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2", + "@hapi/teamwork": "^6.0.0", + "@hapi/validate": "^2.0.1" + } }, - "node_modules/@hapi/iron": { + "node_modules/@hapi/hapi/node_modules/@hapi/teamwork": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz", - "integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-6.0.0.tgz", + "integrity": "sha512-05HumSy3LWfXpmJ9cr6HzwhAavrHkJ1ZRCmNE2qJMihdM5YcWreWPfyN0yKT2ZjCM92au3ZkuodjBxOibxM67A==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@hapi/hapi/node_modules/@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, "dependencies": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/hapi/node_modules/@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + }, + "node_modules/@hapi/heavy": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-8.0.1.tgz", + "integrity": "sha512-gBD/NANosNCOp6RsYTsjo2vhr5eYA3BEuogk6cxY0QdhllkkTaJFYtTXv46xd6qhBVMbMMqcSdtqey+UQU3//w==", + "dev": true, + "dependencies": { + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/validate": "^2.0.1" + } + }, + "node_modules/@hapi/heavy/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/heavy/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/heavy/node_modules/@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/heavy/node_modules/@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true + }, "node_modules/@hapi/mimos": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-6.0.0.tgz", - "integrity": "sha512-Op/67tr1I+JafN3R3XN5DucVSxKRT/Tc+tUszDwENoNpolxeXkhrJ2Czt6B6AAqrespHoivhgZBWYSuANN9QXg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-7.0.1.tgz", + "integrity": "sha512-b79V+BrG0gJ9zcRx1VGcCI6r6GEzzZUgiGEJVoq5gwzuB2Ig9Cax8dUuBauQCFKvl2YWSWyOc8mZ8HDaJOtkew==", "dev": true, "dependencies": { - "@hapi/hoek": "9.x.x", - "mime-db": "1.x.x" + "@hapi/hoek": "^11.0.2", + "mime-db": "^1.52.0" } }, + "node_modules/@hapi/mimos/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@hapi/nigel": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz", - "integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-5.0.1.tgz", + "integrity": "sha512-uv3dtYuB4IsNaha+tigWmN8mQw/O9Qzl5U26Gm4ZcJVtDdB1AVJOwX3X5wOX+A07qzpEZnOMBAm8jjSqGsU6Nw==", "dev": true, "dependencies": { - "@hapi/hoek": "^9.0.4", - "@hapi/vise": "^4.0.0" + "@hapi/hoek": "^11.0.2", + "@hapi/vise": "^5.0.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, + "node_modules/@hapi/nigel/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@hapi/pez": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.1.0.tgz", - "integrity": "sha512-YfB0btnkLB3lb6Ry/1KifnMPBm5ZPfaAHWFskzOMAgDgXgcBgA+zjpIynyEiBfWEz22DBT8o1e2tAaBdlt8zbw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-6.1.0.tgz", + "integrity": "sha512-+FE3sFPYuXCpuVeHQ/Qag1b45clR2o54QoonE/gKHv9gukxQ8oJJZPR7o3/ydDTK6racnCJXxOyT1T93FCJMIg==", "dev": true, "dependencies": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/content": "^5.0.2", - "@hapi/hoek": "9.x.x", - "@hapi/nigel": "4.x.x" + "@hapi/b64": "^6.0.1", + "@hapi/boom": "^10.0.1", + "@hapi/content": "^6.0.0", + "@hapi/hoek": "^11.0.2", + "@hapi/nigel": "^5.0.1" } }, - "node_modules/@hapi/podium": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz", - "integrity": "sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==", + "node_modules/@hapi/pez/node_modules/@hapi/b64": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-6.0.1.tgz", + "integrity": "sha512-ZvjX4JQReUmBheeCq+S9YavcnMMHWqx3S0jHNXWIM1kQDxB9cyfSycpVvjfrKcIS8Mh5N3hmu/YKo4Iag9g2Kw==", + "dev": true, "dependencies": { - "@hapi/hoek": "9.x.x", - "@hapi/teamwork": "5.x.x", - "@hapi/validate": "1.x.x" + "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/pez/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/pez/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@hapi/shot": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.5.tgz", - "integrity": "sha512-x5AMSZ5+j+Paa8KdfCoKh+klB78otxF+vcJR/IoN91Vo2e5ulXIW6HUsFTCU+4W6P/Etaip9nmdAx2zWDimB2A==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-6.0.1.tgz", + "integrity": "sha512-s5ynMKZXYoDd3dqPw5YTvOR/vjHvMTxc388+0qL0jZZP1+uwXuUD32o9DuuuLsmTlyXCWi02BJl1pBpwRuUrNA==", "dev": true, "dependencies": { - "@hapi/hoek": "9.x.x", - "@hapi/validate": "1.x.x" + "@hapi/hoek": "^11.0.2", + "@hapi/validate": "^2.0.1" + } + }, + "node_modules/@hapi/shot/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/shot/node_modules/@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/shot/node_modules/@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" } }, "node_modules/@hapi/somever": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.1.tgz", - "integrity": "sha512-4ZTSN3YAHtgpY/M4GOtHUXgi6uZtG9nEZfNI6QrArhK0XN/RDVgijlb9kOmXwCR5VclDSkBul9FBvhSuKXx9+w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-4.1.1.tgz", + "integrity": "sha512-lt3QQiDDOVRatS0ionFDNrDIv4eXz58IibQaZQDOg4DqqdNme8oa0iPWcE0+hkq/KTeBCPtEOjDOBKBKwDumVg==", "dev": true, "dependencies": { - "@hapi/bounce": "2.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/bounce": "^3.0.1", + "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/somever/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@hapi/statehood": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.4.tgz", - "integrity": "sha512-Fia6atroOVmc5+2bNOxF6Zv9vpbNAjEXNcUbWXavDqhnJDlchwUUwKS5LCi5mGtCTxRhUKKHwuxuBZJkmLZ7fw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-8.1.1.tgz", + "integrity": "sha512-YbK7PSVUA59NArAW5Np0tKRoIZ5VNYUicOk7uJmWZF6XyH5gGL+k62w77SIJb0AoAJ0QdGQMCQ/WOGL1S3Ydow==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/bounce": "2.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/iron": "6.x.x", - "@hapi/validate": "1.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/bounce": "^3.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/cryptiles": "^6.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/iron": "^7.0.1", + "@hapi/validate": "^2.0.1" } }, - "node_modules/@hapi/subtext": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.1.0.tgz", - "integrity": "sha512-n94cU6hlvsNRIpXaROzBNEJGwxC+HA69q769pChzej84On8vsU14guHDub7Pphr/pqn5b93zV3IkMPDU5AUiXA==", + "node_modules/@hapi/statehood/node_modules/@hapi/b64": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-6.0.1.tgz", + "integrity": "sha512-ZvjX4JQReUmBheeCq+S9YavcnMMHWqx3S0jHNXWIM1kQDxB9cyfSycpVvjfrKcIS8Mh5N3hmu/YKo4Iag9g2Kw==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/content": "^5.0.2", - "@hapi/file": "2.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/pez": "^5.1.0", - "@hapi/wreck": "17.x.x" + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/teamwork": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.1.tgz", - "integrity": "sha512-1oPx9AE5TIv+V6Ih54RP9lTZBso3rP8j4Xhb6iSVwPXtAM+sDopl5TFMv5Paw73UnpZJ9gjcrTE1BXrWt9eQrg==", + "node_modules/@hapi/statehood/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/statehood/node_modules/@hapi/bourne": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-3.0.0.tgz", + "integrity": "sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==", + "dev": true + }, + "node_modules/@hapi/statehood/node_modules/@hapi/cryptiles": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-6.0.1.tgz", + "integrity": "sha512-9GM9ECEHfR8lk5ASOKG4+4ZsEzFqLfhiryIJ2ISePVB92OHLp/yne4m+zn7z9dgvM98TLpiFebjDFQ0UHcqxXQ==", + "dev": true, + "dependencies": { + "@hapi/boom": "^10.0.1" + }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" + } + }, + "node_modules/@hapi/statehood/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/statehood/node_modules/@hapi/iron": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-7.0.1.tgz", + "integrity": "sha512-tEZnrOujKpS6jLKliyWBl3A9PaE+ppuL/+gkbyPPDb/l2KSKQyH4lhMkVb+sBhwN+qaxxlig01JRqB8dk/mPxQ==", + "dev": true, + "dependencies": { + "@hapi/b64": "^6.0.1", + "@hapi/boom": "^10.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/cryptiles": "^6.0.1", + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/statehood/node_modules/@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" + } + }, + "node_modules/@hapi/statehood/node_modules/@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + }, + "node_modules/@hapi/subtext": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-8.1.0.tgz", + "integrity": "sha512-PyaN4oSMtqPjjVxLny1k0iYg4+fwGusIhaom9B2StinBclHs7v46mIW706Y+Wo21lcgulGyXbQrmT/w4dus6ww==", + "dev": true, + "dependencies": { + "@hapi/boom": "^10.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/content": "^6.0.0", + "@hapi/file": "^3.0.0", + "@hapi/hoek": "^11.0.2", + "@hapi/pez": "^6.1.0", + "@hapi/wreck": "^18.0.1" + } + }, + "node_modules/@hapi/subtext/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/subtext/node_modules/@hapi/bourne": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-3.0.0.tgz", + "integrity": "sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==", + "dev": true + }, + "node_modules/@hapi/subtext/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@hapi/topo": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, "dependencies": { "@hapi/hoek": "^9.0.0" } }, - "node_modules/@hapi/validate": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.3.tgz", - "integrity": "sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==", + "node_modules/@hapi/vise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-5.0.1.tgz", + "integrity": "sha512-XZYWzzRtINQLedPYlIkSkUr7m5Ddwlu99V9elh8CSygXstfv3UnWIXT0QD+wmR0VAG34d2Vx3olqcEhRRoTu9A==", + "dev": true, "dependencies": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0" + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/vise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz", - "integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==", + "node_modules/@hapi/vise/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "node_modules/@hapi/wreck": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-18.1.0.tgz", + "integrity": "sha512-0z6ZRCmFEfV/MQqkQomJ7sl/hyxvcZM7LtuVqN3vdAO4vM9eBbowl0kaqQj9EJJQab+3Uuh1GxbGIBFy4NfJ4w==", "dev": true, "dependencies": { - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/hoek": "^11.0.2" } }, - "node_modules/@hapi/wreck": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.2.0.tgz", - "integrity": "sha512-pJ5kjYoRPYDv+eIuiLQqhGon341fr2bNIYZjuotuPJG/3Ilzr/XtI+JAp0A86E2bYfsS3zBPABuS2ICkaXFT8g==", + "node_modules/@hapi/wreck/node_modules/@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", "dev": true, "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/wreck/node_modules/@hapi/bourne": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-3.0.0.tgz", + "integrity": "sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==", + "dev": true + }, + "node_modules/@hapi/wreck/node_modules/@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -8197,9 +8880,9 @@ } }, "node_modules/@opentelemetry/api-logs": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.50.0.tgz", - "integrity": "sha512-JdZuKrhOYggqOpUljAq4WWNi5nB10PmgoF0y2CvedLGXd0kSawb/UBnWT8gg1ND3bHCNHStAIVT0ELlxJJRqrA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.0.tgz", + "integrity": "sha512-m/jtfBPEIXS1asltl8fPQtO3Sb1qMpuL61unQajUmM8zIxeMF1AlqzWXM3QedcYgTTFiJCew5uJjyhpmqhc0+g==", "dependencies": { "@opentelemetry/api": "^1.0.0" }, @@ -8215,10 +8898,14 @@ "resolved": "metapackages/auto-instrumentations-web", "link": true }, + "node_modules/@opentelemetry/baggage-span-processor": { + "resolved": "packages/baggage-span-processor", + "link": true + }, "node_modules/@opentelemetry/context-async-hooks": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.23.0.tgz", - "integrity": "sha512-wazGJZDRevibOJ+VgyrT+9+8sybZAxpZx2G7vy30OAtk92OpZCg7HgNxT11NUx0VBDWcRx1dOatMYGOVplQ7QA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.0.tgz", + "integrity": "sha512-s7xaQ9ifDpJvwbWRLkZD/J5hY35w+MECm4TQUkg6szRcny9lf6oVhWij4w3JJFQgvHQMXU7oXOpX8Z05HxV/8g==", "engines": { "node": ">=14" }, @@ -8227,11 +8914,11 @@ } }, "node_modules/@opentelemetry/context-zone": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.23.0.tgz", - "integrity": "sha512-7piNTrpH+gZNMDDOHIJXCSwp0Xslh3R96HWH5HwXw+4PykR4+jVoXvd6jziQxudX9rFAfu2B64A10DHs4ZWrfA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.24.0.tgz", + "integrity": "sha512-Znb6fvmqZy+4ZC63vvf9qktXakTlLOLeBsMizR5E1G/1cM8LKUVR/JJUws+A4QSAY95Rzldi05aqxoc+YUVVKw==", "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.23.0", + "@opentelemetry/context-zone-peer-dep": "1.24.0", "zone.js": "^0.11.0 || ^0.13.0 || ^0.14.0" }, "engines": { @@ -8239,9 +8926,9 @@ } }, "node_modules/@opentelemetry/context-zone-peer-dep": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.23.0.tgz", - "integrity": "sha512-3ia5w2y3CGHIhMSggttliGbeRBWclIyMMXdfRCcit1NHg1ocieA9qYxyUEetbOvPrQpoti3O3k+5eyQUv7r8nw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.24.0.tgz", + "integrity": "sha512-znNlicjfxRqepQdOZGUN3RYSs+QGoEiGI+cjILBYM4KdEXpoXgxt87l72b0UYhH7YI/uK0TVHse99D0ER9ODAw==", "engines": { "node": ">=14" }, @@ -8255,11 +8942,11 @@ "link": true }, "node_modules/@opentelemetry/core": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.23.0.tgz", - "integrity": "sha512-hdQ/a9TMzMQF/BO8Cz1juA43/L5YGtCSiKoOHmrTEf7VMDAZgy8ucpWx3eQTnQ3gBloRcWtzvcrMZABC3PTSKQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.0.tgz", + "integrity": "sha512-FP2oN7mVPqcdxJDTTnKExj4mi91EH+DNuArKfHTjPuJWe2K1JfMIVXNfahw1h3onJxQnxS8K0stKkogX05s+Aw==", "dependencies": { - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8269,13 +8956,13 @@ } }, "node_modules/@opentelemetry/exporter-jaeger": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-1.23.0.tgz", - "integrity": "sha512-9GjZPS9kR4nC0ApOFQtj2xwYAGhQ3bO6KPx27DLqCOiso27OlJVUgvAtB3i+1On23OTcjfPtKbNo4a2npmV27A==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-1.24.0.tgz", + "integrity": "sha512-mD28eBrdth937QGU6zgn+6fYBywUaYxLJwANREnE7XS8pHP/Hjxpiy4nb9yIzQ2DqC8Uq7yEnc8ah2pH45B9ZQ==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0", "jaeger-client": "^3.15.0" }, "engines": { @@ -8286,16 +8973,16 @@ } }, "node_modules/@opentelemetry/exporter-trace-otlp-grpc": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.50.0.tgz", - "integrity": "sha512-w/NF4TrwHxx+Uz1M0rCOSVr6KgcoQPv3zF9JRqcebY2euD7ddWnLP0hE8JavyA1uq4UchnMp9faAk9n7hTCePw==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.51.0.tgz", + "integrity": "sha512-xQpxKzS8ZnxYCa1v+3EKWhwMrSK3+RezpJ+AEKaP2pf2QbLfHt7kKfSn7niR2u3A1Tbe2aC7Ptt9+MafhThOOQ==", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.50.0", - "@opentelemetry/otlp-transformer": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" }, "engines": { "node": ">=14" @@ -8305,15 +8992,15 @@ } }, "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.50.0.tgz", - "integrity": "sha512-L7OtIMT7MsFqkmhbQlPBGRXt7152VN5esHpQEJYIBFedOEo3Da+yHpu5ojMZtPzpIvSpB5Xr5lnJUjJCbkttCA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.51.0.tgz", + "integrity": "sha512-zODqnLZmPOxj9CarFv0TrVlx9mgj0TfCMCiUiTdNi9iA2rgdKVo+bjJjpYF6LCTJOQCR5TScAUCKyzwkgDI+iA==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", - "@opentelemetry/otlp-transformer": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" }, "engines": { "node": ">=14" @@ -8323,16 +9010,16 @@ } }, "node_modules/@opentelemetry/exporter-trace-otlp-proto": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.50.0.tgz", - "integrity": "sha512-vavD9Ow6yOLiD+ocuS/oeciCsXNdsN41aYUrEljNaLXogvnkfMhJ+JLAhOnRSpzlVtRp7Ciw2BYGdYSebR0OsA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.51.0.tgz", + "integrity": "sha512-Fi7r0iMqGoFCQQ+WY0pYOWp395vdinZJIkYKnNbnreHxAN/kVDBl2FxbV3DeOKuRxEY08Gyb9ggPf+Zrqp7l/w==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", - "@opentelemetry/otlp-proto-exporter-base": "0.50.0", - "@opentelemetry/otlp-transformer": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-proto-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" }, "engines": { "node": ">=14" @@ -8342,14 +9029,14 @@ } }, "node_modules/@opentelemetry/exporter-zipkin": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.23.0.tgz", - "integrity": "sha512-2LOGvNUGONuIcWhynFaJorVyqv03uZkURScciLmOxvBf2lWTNPEj77br1dCpShIWBM+YlrH7Tc+JXAs+GC7DqA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.24.0.tgz", + "integrity": "sha512-QeGv0PHONswmu567pf9QliJ6s6DgCu5+ziF+soNS1LTcr1VRRVLViYLmGxmzDFUC48sjNTu7sumcKT0nJXsGBw==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8367,11 +9054,11 @@ "link": true }, "node_modules/@opentelemetry/instrumentation": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.50.0.tgz", - "integrity": "sha512-bhGhbJiZKpuu7wTaSak4hyZcFPlnDeuSF/2vglze8B4w2LubcSbbOnkVTzTs5SXtzh4Xz8eRjaNnAm+u2GYufQ==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.0.tgz", + "integrity": "sha512-Eg/+Od5bEvzpvZQGhvMyKIkrzB9S7jW+6z9LHEI2VXhl/GrqQ3oBqlzJt4tA6pGtxRmqQWKWGM1wAbwDdW/gUA==", "dependencies": { - "@opentelemetry/api-logs": "0.50.0", + "@opentelemetry/api-logs": "0.51.0", "@types/shimmer": "^1.0.2", "import-in-the-middle": "1.7.1", "require-in-the-middle": "^7.1.1", @@ -8434,14 +9121,14 @@ "link": true }, "node_modules/@opentelemetry/instrumentation-fetch": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fetch/-/instrumentation-fetch-0.50.0.tgz", - "integrity": "sha512-CayteluGJbrfDvzEFQ0EWqLFkNAcO9H7nfDHptZjtonBpJRWF170XZoMkJVC2bxp0lIVwyuw6WlnGVRSNwEtKA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fetch/-/instrumentation-fetch-0.51.0.tgz", + "integrity": "sha512-dB9wisB2+wyh0wUB1RFNinCS4TqJ7QMVc4jNzy3JCMJudwFWI/stU10DgZ3vwFQNUEBUIz9QmEQSFud7lsvB2w==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/sdk-trace-web": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/sdk-trace-web": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8463,12 +9150,12 @@ "link": true }, "node_modules/@opentelemetry/instrumentation-grpc": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.50.0.tgz", - "integrity": "sha512-/ZFuvHtrHyxfRJX5CJ8yPKokAIcvTbIJAoR4AN+gBq1YqecWuCr4XG52p5YU5qDrbwOBtShOrC8d4GdFZOky6Q==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.51.0.tgz", + "integrity": "sha512-Wfhs9e1Hi4nnULLqzt9s2M6+Tz52EkKj6uZnj9ZL3coldlZiP+WmvuUNepds7jcBJg/qDBjnEe96fThPuO7ddA==", "dependencies": { - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8482,13 +9169,13 @@ "link": true }, "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.50.0.tgz", - "integrity": "sha512-bsd6Nv0FtN9C6M6vX/kgPzvJY9UhJc4CZZNvqDbsfVQv3/MWvPrYgthf41AhrehqeDnpfn/QGzNKtdWUduGanQ==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.51.0.tgz", + "integrity": "sha512-6VsGPBnU6iVKWhVBnuRpwrmiHfxt8EYrqfnH2glfsMpsn4xy+O6U0yGlggPLhoYeOVafV3h70EEk5MU0tpsbiw==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/semantic-conventions": "1.24.0", "semver": "^7.5.2" }, "engines": { @@ -8595,14 +9282,14 @@ "link": true }, "node_modules/@opentelemetry/instrumentation-xml-http-request": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-xml-http-request/-/instrumentation-xml-http-request-0.50.0.tgz", - "integrity": "sha512-o9z6SDQByqc3GvmUcy6Npt/SAIrv2Pk0Hm0Hl54B3Ny8WUrTsrlt6MULx8d+EjuifE4uVo8op8DekmvKJ1FHoQ==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-xml-http-request/-/instrumentation-xml-http-request-0.51.0.tgz", + "integrity": "sha512-KgLO2qx1z1Wn9NeJgrgNukd10ssK1QqxODwdeBJFO1BaP9sVVargpupYowlDKUL5I3oWOEqi/Oxxdh/fbEsJtw==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/sdk-trace-web": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/sdk-trace-web": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8612,11 +9299,11 @@ } }, "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.50.0.tgz", - "integrity": "sha512-JUmjmrCmE1/fc4LjCQMqLfudgSl5OpUkzx7iA94b4jgeODM7zWxUoVXL7/CT7fWf47Cn+pmKjMvTCSESqZZ3mA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.51.0.tgz", + "integrity": "sha512-hR4c9vWVz1QgzCBSyy9zSDkvfTgaK96E6/tfVP6O4dzdZW9HqWimA3lXV/KXadEGqShvM4GToz9EHp2A5RU5bQ==", "dependencies": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.0" }, "engines": { "node": ">=14" @@ -8626,13 +9313,13 @@ } }, "node_modules/@opentelemetry/otlp-grpc-exporter-base": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.50.0.tgz", - "integrity": "sha512-J500AczSD7xEsjXpwNzSh5HQqxW73PT3CCNsi1VEWCE+8UPgVfkHYIGRHGoch35DV+CMe1svbi7gAk3e5eCSVA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.51.0.tgz", + "integrity": "sha512-oTRtDvvB0bTRTBVrvKA/oM1gIAqQ6DVQS07pvqiL1cZS8wBrGgpw+2iTd0nV661Y/MhDn/kNWp8lRhMEIKN9bw==", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", "protobufjs": "^7.2.3" }, "engines": { @@ -8643,12 +9330,12 @@ } }, "node_modules/@opentelemetry/otlp-proto-exporter-base": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.50.0.tgz", - "integrity": "sha512-hlbn3eZbhxoK79Sq1ddj1f7qcx+PzsPQC/SFpJvaWgTaqacCbqJmpzWDKfRRCAC7iGX2Hj/sgpf8vysazqyMOw==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.51.0.tgz", + "integrity": "sha512-WDANDLSUh11Gu5o6iCzmjZraIv5bK8z1L/t6lxQ2NeEKiKUPo5pVOBBQQC/yAQU2yeqkiO1GRCieH+XahZf60A==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", "protobufjs": "^7.2.3" }, "engines": { @@ -8659,16 +9346,16 @@ } }, "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.50.0.tgz", - "integrity": "sha512-s0sl1Yfqd5q1Kjrf6DqXPWzErL+XHhrXOfejh4Vc/SMTNqC902xDsC8JQxbjuramWt/+hibfguIvi7Ns8VLolA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.51.0.tgz", + "integrity": "sha512-ylLgx2xumVoSefDHP9GMAU/LG+TU3+8eacVDXV5o1RqWxsdVOaQmCTY0XyDgeRTn6hIOVAq/HHQbRq3iWOrt2A==", "dependencies": { - "@opentelemetry/api-logs": "0.50.0", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-logs": "0.50.0", - "@opentelemetry/sdk-metrics": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" }, "engines": { "node": ">=14" @@ -8686,15 +9373,25 @@ "link": true }, "node_modules/@opentelemetry/propagator-aws-xray": { - "resolved": "propagators/opentelemetry-propagator-aws-xray", - "link": true + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-1.24.0.tgz", + "integrity": "sha512-rcuMtEOTZC7TW84tws1QLUVRElrGSbBJwK0b+qa56zJULDiUIiUpS+dSzO+aUchg7MtTJBZSG5OPsfsKpGgNig==", + "dependencies": { + "@opentelemetry/core": "1.24.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } }, "node_modules/@opentelemetry/propagator-b3": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.23.0.tgz", - "integrity": "sha512-cZ6rl8y2bdxYQ4e+zP2CQ+QmuPebaLBLO1skjFpj3eEu7zar+6hBzUP3llMOUupkQeQSwXz+4c8dZ26OhYfG/g==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.24.0.tgz", + "integrity": "sha512-7TMIDE4+NO5vnkor+zned42wqca+hmhW5gWKhmYjUHC5B5uojo1PvtmBrd7kigFu96XvL4ZUWVzibWRWIQ/++Q==", "dependencies": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.0" }, "engines": { "node": ">=14" @@ -8712,11 +9409,11 @@ "link": true }, "node_modules/@opentelemetry/propagator-jaeger": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.23.0.tgz", - "integrity": "sha512-6iArixfgIl3ZgzeltQ5jyiKbjZygM+MbM84pXi1HL0Qs4x4Ck5rM6wEtjhZffFnlDMWEkEqrnM0xF6bTfbiMAQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.24.0.tgz", + "integrity": "sha512-r3MX3AmJiUeiWTXSDOdwBeaO+ahvWcFCpuKxmhhsH8Q8LqDnjhNd3krqBh4Qsq9wa0WhWtiQaDs/NOCWoMOlOw==", "dependencies": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.0" }, "engines": { "node": ">=14" @@ -8762,12 +9459,12 @@ "link": true }, "node_modules/@opentelemetry/resources": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.23.0.tgz", - "integrity": "sha512-iPRLfVfcEQynYGo7e4Di+ti+YQTAY0h5mQEUJcHlU9JOqpb4x965O6PZ+wMcwYVY63G96KtdS86YCM1BF1vQZg==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.0.tgz", + "integrity": "sha512-mxC7E7ocUS1tLzepnA7O9/G8G6ZTdjCH2pXme1DDDuCuk6n2/53GADX+GWBuyX0dfIxeMInIbJAdjlfN9GNr6A==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8777,12 +9474,12 @@ } }, "node_modules/@opentelemetry/sdk-logs": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.50.0.tgz", - "integrity": "sha512-PeUEupBB29p9nlPNqXoa1PUWNLsZnxG0DCDj3sHqzae+8y76B/A5hvZjg03ulWdnvBLYpnJslqzylG9E0IL87g==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.51.0.tgz", + "integrity": "sha512-K4fMBRFD8hQ6khk0rvYFuo6L9ymeGgByir6BcuFIgQuQ00OhYwBi9AruZz5V733Ejq7P8ObR3YyubkOUIbeVAw==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0" }, "engines": { "node": ">=14" @@ -8793,12 +9490,12 @@ } }, "node_modules/@opentelemetry/sdk-metrics": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.23.0.tgz", - "integrity": "sha512-4OkvW6+wST4h6LFG23rXSTf6nmTf201h9dzq7bE0z5R9ESEVLERZz6WXwE7PSgg1gdjlaznm1jLJf8GttypFDg==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.0.tgz", + "integrity": "sha512-4tJ+E6N019OZVB/nUW/LoK9xHxfeh88TCoaTqHeLBE9wLYfi6irWW6J9cphMav7J8Qk0D5b7/RM4VEY4dArWOA==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", "lodash.merge": "^4.6.2" }, "engines": { @@ -8809,23 +9506,23 @@ } }, "node_modules/@opentelemetry/sdk-node": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.50.0.tgz", - "integrity": "sha512-LhIXHnvcnhRYcPwG9VG4G6lJ7x4ElYF6UYHHmXA7e4ZWzSUEFmAPfR1IBWv358aD1KwffcEBu7J6zeAR7lPZag==", - "dependencies": { - "@opentelemetry/api-logs": "0.50.0", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.50.0", - "@opentelemetry/exporter-trace-otlp-http": "0.50.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.50.0", - "@opentelemetry/exporter-zipkin": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-logs": "0.50.0", - "@opentelemetry/sdk-metrics": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/sdk-trace-node": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.51.0.tgz", + "integrity": "sha512-MrPXDQsTAj3lcY8YUCjb7dvSXVZ5jG6wmjD2LB68V1rsLBdP8j70jsI9GaKijY7QB6psbLq6apO1vYeim5U7aw==", + "dependencies": { + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.51.0", + "@opentelemetry/exporter-trace-otlp-http": "0.51.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.51.0", + "@opentelemetry/exporter-zipkin": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/sdk-trace-node": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8835,13 +9532,13 @@ } }, "node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.23.0.tgz", - "integrity": "sha512-PzBmZM8hBomUqvCddF/5Olyyviayka44O5nDWq673np3ctnvwMOvNrsUORZjKja1zJbwEuD9niAGbnVrz3jwRQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.0.tgz", + "integrity": "sha512-H9sLETZ4jw9UJ3totV8oM5R0m4CW0ZIOLfp4NV3g0CM8HD5zGZcaW88xqzWDgiYRpctFxd+WmHtGX/Upoa2vRg==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8851,15 +9548,15 @@ } }, "node_modules/@opentelemetry/sdk-trace-node": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.23.0.tgz", - "integrity": "sha512-dwnin5Go2r6VzJZkVc9JBPupssWp7j2EFto+S7qRkwQ00WDykWeq3x2Skk7I1Jr448FeBSvGCQVPgV5e6s6O3w==", - "dependencies": { - "@opentelemetry/context-async-hooks": "1.23.0", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/propagator-b3": "1.23.0", - "@opentelemetry/propagator-jaeger": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.24.0.tgz", + "integrity": "sha512-QgByHmM9uloTpcYEEyW9YJEIMKHFSIM677RH9pJPWWwtM2NQFbEp/8HIJw80Ymtaz6cAxg1Kay1ByqIVzq3t5g==", + "dependencies": { + "@opentelemetry/context-async-hooks": "1.24.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/propagator-b3": "1.24.0", + "@opentelemetry/propagator-jaeger": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", "semver": "^7.5.2" }, "engines": { @@ -8870,13 +9567,13 @@ } }, "node_modules/@opentelemetry/sdk-trace-web": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.23.0.tgz", - "integrity": "sha512-tx9N3hIkd6k567BeujBnpXYdhu3ptYVk0ZkhdcjyQ3I8ZDJ+/JkVtaVNLAuf8hp1buTqNDmxSipALMxEmK2fnw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.24.0.tgz", + "integrity": "sha512-G0q8aZPUhRtO/iw2BkjHeNqCMBf0JQX5VqqiPWXn9u5iRkpeQ6LZrGaiymKWOdEqtXCgM44yrCY/4WoJqR0bjQ==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" }, "engines": { "node": ">=14" @@ -8886,9 +9583,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.23.0.tgz", - "integrity": "sha512-MiqFvfOzfR31t8cc74CTP1OZfz7MbqpAnLCra8NqQoaHJX6ncIRTdYOQYBDQ2uFISDq0WY8Y9dDTWvsgzzBYRg==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.0.tgz", + "integrity": "sha512-yL0jI6Ltuz8R+Opj7jClGrul6pOoYrdfVmzQS4SITXRPH7I5IRZbrwe/6/v8v4WYMa6MYZG480S1+uc/IGfqsA==", "engines": { "node": ">=14" } @@ -9364,6 +10061,7 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", + "dev": true, "dependencies": { "@hapi/hoek": "^9.0.0" } @@ -9371,12 +10069,14 @@ "node_modules/@sideway/formula": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "dev": true }, "node_modules/@sideway/pinpoint": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true }, "node_modules/@sigstore/bundle": { "version": "1.1.0", @@ -10523,42 +11223,6 @@ "generic-pool": "*" } }, - "node_modules/@types/hapi__catbox": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/@types/hapi__catbox/-/hapi__catbox-10.2.6.tgz", - "integrity": "sha512-qdMHk4fBlwRfnBBDJaoaxb+fU9Ewi2xqkXD3mNjSPl2v/G/8IJbDpVRBuIcF7oXrcE8YebU5M8cCeKh1NXEn0w==" - }, - "node_modules/@types/hapi__hapi": { - "version": "20.0.13", - "resolved": "https://registry.npmjs.org/@types/hapi__hapi/-/hapi__hapi-20.0.13.tgz", - "integrity": "sha512-LP4IPfhIO5ZPVOrJo7H8c8Slc0WYTFAUNQX1U0LBPKyXioXhH5H2TawIgxKujIyOhbwoBbpvOsBf6o5+ToJIrQ==", - "dependencies": { - "@hapi/boom": "^9.0.0", - "@hapi/iron": "^6.0.0", - "@hapi/podium": "^4.1.3", - "@types/hapi__catbox": "*", - "@types/hapi__mimos": "*", - "@types/hapi__shot": "*", - "@types/node": "*", - "joi": "^17.3.0" - } - }, - "node_modules/@types/hapi__mimos": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz", - "integrity": "sha512-i9hvJpFYTT/qzB5xKWvDYaSXrIiNqi4ephi+5Lo6+DoQdwqPXQgmVVOZR+s3MBiHoFqsCZCX9TmVWG3HczmTEQ==", - "dependencies": { - "@types/mime-db": "*" - } - }, - "node_modules/@types/hapi__shot": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/hapi__shot/-/hapi__shot-4.1.6.tgz", - "integrity": "sha512-h33NBjx2WyOs/9JgcFeFhkxnioYWQAZxOHdmqDuoJ1Qjxpcs+JGvSjEEoDeWfcrF+1n47kKgqph5IpfmPOnzbg==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/http-assert": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.5.tgz", @@ -10694,11 +11358,6 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, - "node_modules/@types/mime-db": { - "version": "1.43.5", - "resolved": "https://registry.npmjs.org/@types/mime-db/-/mime-db-1.43.5.tgz", - "integrity": "sha512-/bfTiIUTNPUBnwnYvUxXAre5MhD88jgagLEQiQtIASjU+bwxd8kS/ASDA4a8ufd8m0Lheu6eeMJHEUpLHoJ28A==" - }, "node_modules/@types/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", @@ -21319,6 +21978,7 @@ "version": "17.12.2", "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.2.tgz", "integrity": "sha512-RonXAIzCiHLc8ss3Ibuz45u28GOsWE1UpfDXLbN/9NKbL4tCJf8TWYVKsoYuuh+sAUt7fsSNpA+r2+TBA6Wjmw==", + "dev": true, "dependencies": { "@hapi/hoek": "^9.3.0", "@hapi/topo": "^5.1.0", @@ -36611,9 +37271,41 @@ "tslib": "^2.0.0" } }, + "packages/baggage-span-processor": { + "name": "@opentelemetry/baggage-span-processor", + "version": "0.1.0", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.0.0", + "@opentelemetry/sdk-trace-base": "^1.0.0" + }, + "devDependencies": { + "@opentelemetry/api": "^1.3.0", + "@types/mocha": "8.2.3", + "@types/node": "18.6.5", + "expect": "29.2.0", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "packages/baggage-span-processor/node_modules/@types/mocha": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", + "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", + "dev": true + }, "packages/opentelemetry-host-metrics": { "name": "@opentelemetry/host-metrics", - "version": "0.35.0", + "version": "0.35.1", "license": "Apache-2.0", "dependencies": { "@opentelemetry/sdk-metrics": "^1.8.0", @@ -36646,7 +37338,7 @@ }, "packages/opentelemetry-id-generator-aws-xray": { "name": "@opentelemetry/id-generator-aws-xray", - "version": "1.2.1", + "version": "1.2.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.0.0" @@ -36688,11 +37380,11 @@ }, "packages/opentelemetry-propagation-utils": { "name": "@opentelemetry/propagation-utils", - "version": "0.30.8", + "version": "0.30.9", "license": "Apache-2.0", "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/mocha": "^9.1.1", "@types/node": "18.6.5", "@types/sinon": "^10.0.11", @@ -36718,7 +37410,7 @@ }, "packages/opentelemetry-redis-common": { "name": "@opentelemetry/redis-common", - "version": "0.36.1", + "version": "0.36.2", "license": "Apache-2.0", "devDependencies": { "@types/mocha": "^9.1.1", @@ -36740,7 +37432,7 @@ }, "packages/opentelemetry-sql-common": { "name": "@opentelemetry/sql-common", - "version": "0.40.0", + "version": "0.40.1", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.1.0" @@ -36763,14 +37455,14 @@ }, "packages/opentelemetry-test-utils": { "name": "@opentelemetry/contrib-test-utils", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.0.0", "@opentelemetry/exporter-jaeger": "^1.3.1", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/resources": "^1.8.0", - "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/sdk-node": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0" @@ -36789,10 +37481,10 @@ }, "packages/winston-transport": { "name": "@opentelemetry/winston-transport", - "version": "0.2.0", + "version": "0.3.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "^0.50.0", + "@opentelemetry/api-logs": "^0.51.0", "winston-transport": "4.*" }, "devDependencies": { @@ -36819,16 +37511,16 @@ }, "plugins/node/instrumentation-amqplib": { "name": "@opentelemetry/instrumentation-amqplib", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/amqplib": "^0.5.17", "@types/lodash": "4.14.199", "@types/mocha": "8.2.3", @@ -36859,11 +37551,11 @@ }, "plugins/node/instrumentation-cucumber": { "name": "@opentelemetry/instrumentation-cucumber", - "version": "0.5.0", + "version": "0.6.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@cucumber/cucumber": "^9.0.0", @@ -36926,10 +37618,10 @@ }, "plugins/node/instrumentation-dataloader": { "name": "@opentelemetry/instrumentation-dataloader", - "version": "0.8.0", + "version": "0.9.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -36955,12 +37647,11 @@ }, "plugins/node/instrumentation-fs": { "name": "@opentelemetry/instrumentation-fs", - "version": "0.11.0", + "version": "0.12.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -36987,14 +37678,14 @@ }, "plugins/node/instrumentation-lru-memoizer": { "name": "@opentelemetry/instrumentation-lru-memoizer", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/lru-cache": "7.10.9", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -37022,16 +37713,16 @@ }, "plugins/node/instrumentation-mongoose": { "name": "@opentelemetry/instrumentation-mongoose", - "version": "0.37.0", + "version": "0.38.1", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -37059,10 +37750,10 @@ }, "plugins/node/instrumentation-runtime-node": { "name": "@opentelemetry/instrumentation-runtime-node", - "version": "0.3.0", + "version": "0.4.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -37099,15 +37790,15 @@ }, "plugins/node/instrumentation-socket.io": { "name": "@opentelemetry/instrumentation-socket.io", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -37348,17 +38039,17 @@ }, "plugins/node/instrumentation-tedious": { "name": "@opentelemetry/instrumentation-tedious", - "version": "0.9.0", + "version": "0.10.1", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/tedious": "^4.0.10" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -37379,11 +38070,11 @@ }, "plugins/node/instrumentation-undici": { "name": "@opentelemetry/instrumentation-undici", - "version": "0.1.0", + "version": "0.2.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.7.0", @@ -37411,10 +38102,10 @@ }, "plugins/node/opentelemetry-instrumentation-aws-lambda": { "name": "@opentelemetry/instrumentation-aws-lambda", - "version": "0.40.0", + "version": "0.41.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/propagator-aws-xray": "^1.3.1", "@opentelemetry/resources": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -37443,13 +38134,13 @@ }, "plugins/node/opentelemetry-instrumentation-aws-sdk": { "name": "@opentelemetry/instrumentation-aws-sdk", - "version": "0.40.0", + "version": "0.41.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/propagation-utils": "^0.30.8", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/propagation-utils": "^0.30.9", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@aws-sdk/client-dynamodb": "3.85.0", @@ -37459,7 +38150,7 @@ "@aws-sdk/client-sqs": "3.85.0", "@aws-sdk/types": "3.78.0", "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -37491,17 +38182,17 @@ }, "plugins/node/opentelemetry-instrumentation-bunyan": { "name": "@opentelemetry/instrumentation-bunyan", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "^0.50.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/api-logs": "^0.51.0", + "@opentelemetry/instrumentation": "^0.51.0", "@types/bunyan": "1.8.9" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/resources": "^1.8.0", - "@opentelemetry/sdk-logs": "^0.50.0", + "@opentelemetry/sdk-logs": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -37534,16 +38225,16 @@ }, "plugins/node/opentelemetry-instrumentation-cassandra": { "name": "@opentelemetry/instrumentation-cassandra-driver", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -37567,12 +38258,12 @@ }, "plugins/node/opentelemetry-instrumentation-connect": { "name": "@opentelemetry/instrumentation-connect", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/connect": "3.4.36" }, "devDependencies": { @@ -37606,10 +38297,10 @@ }, "plugins/node/opentelemetry-instrumentation-dns": { "name": "@opentelemetry/instrumentation-dns", - "version": "0.35.0", + "version": "0.36.1", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0", "semver": "^7.5.4" }, @@ -37639,17 +38330,17 @@ }, "plugins/node/opentelemetry-instrumentation-express": { "name": "@opentelemetry/instrumentation-express", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/express": "4.17.18", @@ -37674,19 +38365,19 @@ }, "plugins/node/opentelemetry-instrumentation-fastify": { "name": "@opentelemetry/instrumentation-fastify", - "version": "0.35.0", + "version": "0.36.1", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { - "@fastify/express": "^2.0.2", + "@fastify/express": "^3.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation-http": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation-http": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/express": "4.17.18", @@ -37723,10 +38414,10 @@ }, "plugins/node/opentelemetry-instrumentation-generic-pool": { "name": "@opentelemetry/instrumentation-generic-pool", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0" }, "devDependencies": { @@ -37788,10 +38479,10 @@ }, "plugins/node/opentelemetry-instrumentation-graphql": { "name": "@opentelemetry/instrumentation-graphql", - "version": "0.39.0", + "version": "0.40.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -37822,22 +38513,22 @@ }, "plugins/node/opentelemetry-instrumentation-hapi": { "name": "@opentelemetry/instrumentation-hapi", - "version": "0.36.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/hapi__hapi": "20.0.13" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.0.0" }, "devDependencies": { - "@hapi/hapi": "20.1.5", + "@hapi/hapi": "21.3.3", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^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", + "joi": "17.12.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", @@ -37854,17 +38545,17 @@ }, "plugins/node/opentelemetry-instrumentation-ioredis": { "name": "@opentelemetry/instrumentation-ioredis", - "version": "0.39.0", + "version": "0.40.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", "@opentelemetry/semantic-conventions": "^1.0.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/ioredis4": "npm:@types/ioredis@4.28.10", @@ -37890,11 +38581,11 @@ }, "plugins/node/opentelemetry-instrumentation-knex": { "name": "@opentelemetry/instrumentation-knex", - "version": "0.35.0", + "version": "0.36.1", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -37920,11 +38611,11 @@ }, "plugins/node/opentelemetry-instrumentation-koa": { "name": "@opentelemetry/instrumentation-koa", - "version": "0.39.0", + "version": "0.40.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/koa": "2.14.0", "@types/koa__router": "12.0.3" @@ -37933,8 +38624,8 @@ "@koa/router": "12.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation-http": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation-http": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -37958,17 +38649,17 @@ }, "plugins/node/opentelemetry-instrumentation-memcached": { "name": "@opentelemetry/instrumentation-memcached", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0", "@types/memcached": "^2.2.6" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -37990,17 +38681,17 @@ }, "plugins/node/opentelemetry-instrumentation-mongodb": { "name": "@opentelemetry/instrumentation-mongodb", - "version": "0.42.0", + "version": "0.43.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/bson": "4.0.5", @@ -38184,17 +38875,17 @@ }, "plugins/node/opentelemetry-instrumentation-mysql": { "name": "@opentelemetry/instrumentation-mysql", - "version": "0.37.0", + "version": "0.38.1", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mysql": "2.15.22" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", @@ -38217,17 +38908,17 @@ }, "plugins/node/opentelemetry-instrumentation-mysql2": { "name": "@opentelemetry/instrumentation-mysql2", - "version": "0.37.0", + "version": "0.38.1", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@opentelemetry/sql-common": "^0.40.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@opentelemetry/sql-common": "^0.40.1" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -38283,10 +38974,10 @@ }, "plugins/node/opentelemetry-instrumentation-nestjs-core": { "name": "@opentelemetry/instrumentation-nestjs-core", - "version": "0.36.0", + "version": "0.37.1", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0" }, "devDependencies": { @@ -38356,10 +39047,10 @@ }, "plugins/node/opentelemetry-instrumentation-net": { "name": "@opentelemetry/instrumentation-net", - "version": "0.35.0", + "version": "0.36.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0" }, "devDependencies": { @@ -38386,19 +39077,19 @@ }, "plugins/node/opentelemetry-instrumentation-pg": { "name": "@opentelemetry/instrumentation-pg", - "version": "0.40.0", + "version": "0.41.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", - "@opentelemetry/sql-common": "^0.40.0", + "@opentelemetry/sql-common": "^0.40.1", "@types/pg": "8.6.1", "@types/pg-pool": "2.0.4" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -38425,15 +39116,15 @@ }, "plugins/node/opentelemetry-instrumentation-pino": { "name": "@opentelemetry/instrumentation-pino", - "version": "0.37.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -38492,17 +39183,17 @@ }, "plugins/node/opentelemetry-instrumentation-redis": { "name": "@opentelemetry/instrumentation-redis", - "version": "0.38.0", + "version": "0.39.1", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -38526,17 +39217,17 @@ }, "plugins/node/opentelemetry-instrumentation-redis-4": { "name": "@opentelemetry/instrumentation-redis-4", - "version": "0.38.0", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -38574,12 +39265,12 @@ }, "plugins/node/opentelemetry-instrumentation-restify": { "name": "@opentelemetry/instrumentation-restify", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -38641,11 +39332,11 @@ }, "plugins/node/opentelemetry-instrumentation-router": { "name": "@opentelemetry/instrumentation-router", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -38670,17 +39361,18 @@ }, "plugins/node/opentelemetry-instrumentation-winston": { "name": "@opentelemetry/instrumentation-winston", - "version": "0.36.0", + "version": "0.37.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/api-logs": "^0.51.0", + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@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.2.0", + "@opentelemetry/winston-transport": "^0.3.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -38704,11 +39396,11 @@ }, "plugins/web/opentelemetry-instrumentation-document-load": { "name": "@opentelemetry/instrumentation-document-load", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.15.0", "@opentelemetry/semantic-conventions": "^1.22.0" @@ -38745,11 +39437,11 @@ }, "plugins/web/opentelemetry-instrumentation-long-task": { "name": "@opentelemetry/instrumentation-long-task", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-web": "^1.8.0" }, "devDependencies": { @@ -38791,11 +39483,11 @@ }, "plugins/web/opentelemetry-instrumentation-user-interaction": { "name": "@opentelemetry/instrumentation-user-interaction", - "version": "0.37.0", + "version": "0.38.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-web": "^1.8.0" }, "devDependencies": { @@ -38803,7 +39495,7 @@ "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-zone-peer-dep": "^1.8.0", - "@opentelemetry/instrumentation-xml-http-request": "^0.50.0", + "@opentelemetry/instrumentation-xml-http-request": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/jquery": "3.5.20", "@types/mocha": "7.0.2", @@ -38840,7 +39532,7 @@ }, "plugins/web/opentelemetry-plugin-react-load": { "name": "@opentelemetry/plugin-react-load", - "version": "0.30.0", + "version": "0.30.1", "license": "Apache-2.0", "dependencies": { "@opentelemetry/context-zone": "^1.0.0", @@ -38891,49 +39583,9 @@ "react": "^16.13.1 || ^17.0.0" } }, - "propagators/opentelemetry-propagator-aws-xray": { - "name": "@opentelemetry/propagator-aws-xray", - "version": "1.3.1", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^1.0.0" - }, - "devDependencies": { - "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "@opentelemetry/api": "^1.0.0", - "@types/mocha": "8.2.3", - "@types/node": "18.6.5", - "@types/webpack-env": "1.16.2", - "karma": "6.3.16", - "karma-chrome-launcher": "^3.1.1", - "karma-coverage-istanbul-reporter": "3.0.3", - "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.36", - "karma-webpack": "4.0.2", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "ts-loader": "8.3.0", - "ts-mocha": "10.0.0", - "typescript": "4.4.4", - "webpack": "4.46.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0" - } - }, - "propagators/opentelemetry-propagator-aws-xray/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "propagators/opentelemetry-propagator-grpc-census-binary": { "name": "@opentelemetry/propagator-grpc-census-binary", - "version": "0.27.1", + "version": "0.27.2", "license": "Apache-2.0", "devDependencies": { "@opentelemetry/api": "^1.0.0", @@ -38956,7 +39608,7 @@ }, "propagators/opentelemetry-propagator-instana": { "name": "@opentelemetry/propagator-instana", - "version": "0.3.1", + "version": "0.3.2", "license": "Apache-2.0", "devDependencies": { "@jsdevtools/coverage-istanbul-loader": "3.0.5", @@ -39189,7 +39841,7 @@ }, "propagators/opentelemetry-propagator-ot-trace": { "name": "@opentelemetry/propagator-ot-trace", - "version": "0.27.1", + "version": "0.27.2", "license": "Apache-2.0", "devDependencies": { "@jsdevtools/coverage-istanbul-loader": "3.0.5", @@ -43109,9 +43761,9 @@ "dev": true }, "@fastify/express": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@fastify/express/-/express-2.3.0.tgz", - "integrity": "sha512-jvvjlPPCfJsSHfF6tQDyARJ3+c3xXiqcxVZu6bi3xMWCWB3fl07vrjFDeaqnwqKhLZ9+m6cog5dw7gIMKEsTnQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@fastify/express/-/express-3.0.0.tgz", + "integrity": "sha512-Ug6aulXCUiHgMyrHVYQqnQbGdsAV0aTad6nZxbOr6w3QjKn1mdQS3Kyzvc+I0xMjZ9yIyMUWHSooHgZ0l7nOng==", "dev": true, "requires": { "express": "^4.17.1", @@ -43163,297 +43815,673 @@ } }, "@hapi/accept": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.2.tgz", - "integrity": "sha512-CmzBx/bXUR8451fnZRuZAJRlzgm0Jgu5dltTX/bszmR2lheb9BpyN47Q1RbaGTsvFzn0PXAEs+lXDKfshccYZw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-6.0.3.tgz", + "integrity": "sha512-p72f9k56EuF0n3MwlBNThyVE5PXX40g+aQh+C/xbKrfzahM2Oispv3AXmOIU51t3j77zay1qrX7IIziZXspMlw==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/ammo": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz", - "integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-6.0.1.tgz", + "integrity": "sha512-pmL+nPod4g58kXrMcsGLp05O2jF4P2Q3GiL8qYV7nKYEh3cGf+rV4P5Jyi2Uq0agGhVU63GtaSAfBEZOlrJn9w==", "dev": true, "requires": { - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/b64": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", - "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", - "requires": { - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/boom": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz", - "integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==", - "requires": { - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/bounce": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz", - "integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-3.0.1.tgz", + "integrity": "sha512-G+/Pp9c1Ha4FDP+3Sy/Xwg2O4Ahaw3lIZFSX+BL4uWi64CmiETuZPxhKDUD4xBMOUZbBlzvO8HjiK8ePnhBadA==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, - "@hapi/bourne": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz", - "integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==" - }, "@hapi/call": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz", - "integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@hapi/call/-/call-9.0.1.tgz", + "integrity": "sha512-uPojQRqEL1GRZR4xXPqcLMujQGaEpyVPRyBlD8Pp5rqgIwLhtveF9PkixiKru2THXvuN8mUrLeet5fqxKAAMGg==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/catbox": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz", - "integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-12.1.1.tgz", + "integrity": "sha512-hDqYB1J+R0HtZg4iPH3LEnldoaBsar6bYp0EonBmNQ9t5CO+1CqgCul2ZtFveW1ReA5SQuze9GPSU7/aecERhw==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/podium": "4.x.x", - "@hapi/validate": "1.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/podium": "^5.0.0", + "@hapi/validate": "^2.0.1" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "@hapi/podium": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-5.0.1.tgz", + "integrity": "sha512-eznFTw6rdBhAijXFIlBOMJJd+lXTvqbrBIS4Iu80r2KTVIo4g+7fLy4NKp/8+UnSt5Ox6mJtAlKBU/Sf5080TQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2", + "@hapi/teamwork": "^6.0.0", + "@hapi/validate": "^2.0.1" + } + }, + "@hapi/teamwork": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-6.0.0.tgz", + "integrity": "sha512-05HumSy3LWfXpmJ9cr6HzwhAavrHkJ1ZRCmNE2qJMihdM5YcWreWPfyN0yKT2ZjCM92au3ZkuodjBxOibxM67A==", + "dev": true + }, + "@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + } } }, "@hapi/catbox-memory": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-5.0.1.tgz", - "integrity": "sha512-QWw9nOYJq5PlvChLWV8i6hQHJYfvdqiXdvTupJFh0eqLZ64Xir7mKNi96d5/ZMUAqXPursfNDIDxjFgoEDUqeQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-6.0.1.tgz", + "integrity": "sha512-sVb+/ZxbZIvaMtJfAbdyY+QJUQg9oKTwamXpEg/5xnfG5WbJLTjvEn4kIGKz9pN3ENNbIL/bIdctmHmqi/AdGA==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/content": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz", - "integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@hapi/content/-/content-6.0.0.tgz", + "integrity": "sha512-CEhs7j+H0iQffKfe5Htdak5LBOz/Qc8TRh51cF+BFv0qnuph3Em4pjGVzJMkI2gfTDdlJKWJISGWS1rK34POGA==", "dev": true, "requires": { - "@hapi/boom": "9.x.x" - } - }, - "@hapi/cryptiles": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz", - "integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==", - "requires": { - "@hapi/boom": "9.x.x" + "@hapi/boom": "^10.0.0" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz", - "integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/file/-/file-3.0.0.tgz", + "integrity": "sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q==", "dev": true }, "@hapi/hapi": { - "version": "20.1.5", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-20.1.5.tgz", - "integrity": "sha512-BhJ5XFR9uWPUBj/z5pPqXSk8OnvQQU/EbQjwpmjZy0ymNEiq7kIhXkAmzXcntbBHta9o7zpW8XMeXnfV4wudXw==", - "dev": true, - "requires": { - "@hapi/accept": "^5.0.1", - "@hapi/ammo": "^5.0.1", - "@hapi/boom": "^9.1.0", - "@hapi/bounce": "^2.0.0", - "@hapi/call": "^8.0.0", - "@hapi/catbox": "^11.1.1", - "@hapi/catbox-memory": "^5.0.0", - "@hapi/heavy": "^7.0.1", - "@hapi/hoek": "^9.0.4", - "@hapi/mimos": "^6.0.0", - "@hapi/podium": "^4.1.1", - "@hapi/shot": "^5.0.5", - "@hapi/somever": "^3.0.0", - "@hapi/statehood": "^7.0.3", - "@hapi/subtext": "^7.0.3", - "@hapi/teamwork": "^5.1.0", - "@hapi/topo": "^5.0.0", - "@hapi/validate": "^1.1.1" + "version": "21.3.3", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.3.tgz", + "integrity": "sha512-6pgwWVl/aSKSNVn86n+mWa06jRqCAKi2adZp/Hti19A0u5x3/6eiKz8UTBPMzfrdGf9WcrYbFBYzWr/qd2s28g==", + "dev": true, + "requires": { + "@hapi/accept": "^6.0.1", + "@hapi/ammo": "^6.0.1", + "@hapi/boom": "^10.0.1", + "@hapi/bounce": "^3.0.1", + "@hapi/call": "^9.0.1", + "@hapi/catbox": "^12.1.1", + "@hapi/catbox-memory": "^6.0.1", + "@hapi/heavy": "^8.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/mimos": "^7.0.1", + "@hapi/podium": "^5.0.1", + "@hapi/shot": "^6.0.1", + "@hapi/somever": "^4.1.1", + "@hapi/statehood": "^8.1.1", + "@hapi/subtext": "^8.1.0", + "@hapi/teamwork": "^6.0.0", + "@hapi/topo": "^6.0.1", + "@hapi/validate": "^2.0.1" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "@hapi/podium": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-5.0.1.tgz", + "integrity": "sha512-eznFTw6rdBhAijXFIlBOMJJd+lXTvqbrBIS4Iu80r2KTVIo4g+7fLy4NKp/8+UnSt5Ox6mJtAlKBU/Sf5080TQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2", + "@hapi/teamwork": "^6.0.0", + "@hapi/validate": "^2.0.1" + } + }, + "@hapi/teamwork": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-6.0.0.tgz", + "integrity": "sha512-05HumSy3LWfXpmJ9cr6HzwhAavrHkJ1ZRCmNE2qJMihdM5YcWreWPfyN0yKT2ZjCM92au3ZkuodjBxOibxM67A==", + "dev": true + }, + "@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + } } }, "@hapi/heavy": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.1.tgz", - "integrity": "sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-8.0.1.tgz", + "integrity": "sha512-gBD/NANosNCOp6RsYTsjo2vhr5eYA3BEuogk6cxY0QdhllkkTaJFYtTXv46xd6qhBVMbMMqcSdtqey+UQU3//w==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/validate": "1.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/validate": "^2.0.1" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + } } }, "@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" - }, - "@hapi/iron": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz", - "integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==", - "requires": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x" - } + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true }, "@hapi/mimos": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-6.0.0.tgz", - "integrity": "sha512-Op/67tr1I+JafN3R3XN5DucVSxKRT/Tc+tUszDwENoNpolxeXkhrJ2Czt6B6AAqrespHoivhgZBWYSuANN9QXg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-7.0.1.tgz", + "integrity": "sha512-b79V+BrG0gJ9zcRx1VGcCI6r6GEzzZUgiGEJVoq5gwzuB2Ig9Cax8dUuBauQCFKvl2YWSWyOc8mZ8HDaJOtkew==", "dev": true, "requires": { - "@hapi/hoek": "9.x.x", - "mime-db": "1.x.x" + "@hapi/hoek": "^11.0.2", + "mime-db": "^1.52.0" + }, + "dependencies": { + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/nigel": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz", - "integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-5.0.1.tgz", + "integrity": "sha512-uv3dtYuB4IsNaha+tigWmN8mQw/O9Qzl5U26Gm4ZcJVtDdB1AVJOwX3X5wOX+A07qzpEZnOMBAm8jjSqGsU6Nw==", "dev": true, "requires": { - "@hapi/hoek": "^9.0.4", - "@hapi/vise": "^4.0.0" + "@hapi/hoek": "^11.0.2", + "@hapi/vise": "^5.0.1" + }, + "dependencies": { + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/pez": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.1.0.tgz", - "integrity": "sha512-YfB0btnkLB3lb6Ry/1KifnMPBm5ZPfaAHWFskzOMAgDgXgcBgA+zjpIynyEiBfWEz22DBT8o1e2tAaBdlt8zbw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-6.1.0.tgz", + "integrity": "sha512-+FE3sFPYuXCpuVeHQ/Qag1b45clR2o54QoonE/gKHv9gukxQ8oJJZPR7o3/ydDTK6racnCJXxOyT1T93FCJMIg==", "dev": true, "requires": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/content": "^5.0.2", - "@hapi/hoek": "9.x.x", - "@hapi/nigel": "4.x.x" - } - }, - "@hapi/podium": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz", - "integrity": "sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==", - "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/teamwork": "5.x.x", - "@hapi/validate": "1.x.x" + "@hapi/b64": "^6.0.1", + "@hapi/boom": "^10.0.1", + "@hapi/content": "^6.0.0", + "@hapi/hoek": "^11.0.2", + "@hapi/nigel": "^5.0.1" + }, + "dependencies": { + "@hapi/b64": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-6.0.1.tgz", + "integrity": "sha512-ZvjX4JQReUmBheeCq+S9YavcnMMHWqx3S0jHNXWIM1kQDxB9cyfSycpVvjfrKcIS8Mh5N3hmu/YKo4Iag9g2Kw==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/shot": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.5.tgz", - "integrity": "sha512-x5AMSZ5+j+Paa8KdfCoKh+klB78otxF+vcJR/IoN91Vo2e5ulXIW6HUsFTCU+4W6P/Etaip9nmdAx2zWDimB2A==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-6.0.1.tgz", + "integrity": "sha512-s5ynMKZXYoDd3dqPw5YTvOR/vjHvMTxc388+0qL0jZZP1+uwXuUD32o9DuuuLsmTlyXCWi02BJl1pBpwRuUrNA==", "dev": true, "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/validate": "1.x.x" + "@hapi/hoek": "^11.0.2", + "@hapi/validate": "^2.0.1" + }, + "dependencies": { + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + } } }, "@hapi/somever": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.1.tgz", - "integrity": "sha512-4ZTSN3YAHtgpY/M4GOtHUXgi6uZtG9nEZfNI6QrArhK0XN/RDVgijlb9kOmXwCR5VclDSkBul9FBvhSuKXx9+w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-4.1.1.tgz", + "integrity": "sha512-lt3QQiDDOVRatS0ionFDNrDIv4eXz58IibQaZQDOg4DqqdNme8oa0iPWcE0+hkq/KTeBCPtEOjDOBKBKwDumVg==", "dev": true, "requires": { - "@hapi/bounce": "2.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/bounce": "^3.0.1", + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/statehood": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.4.tgz", - "integrity": "sha512-Fia6atroOVmc5+2bNOxF6Zv9vpbNAjEXNcUbWXavDqhnJDlchwUUwKS5LCi5mGtCTxRhUKKHwuxuBZJkmLZ7fw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-8.1.1.tgz", + "integrity": "sha512-YbK7PSVUA59NArAW5Np0tKRoIZ5VNYUicOk7uJmWZF6XyH5gGL+k62w77SIJb0AoAJ0QdGQMCQ/WOGL1S3Ydow==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bounce": "2.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/iron": "6.x.x", - "@hapi/validate": "1.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/bounce": "^3.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/cryptiles": "^6.0.1", + "@hapi/hoek": "^11.0.2", + "@hapi/iron": "^7.0.1", + "@hapi/validate": "^2.0.1" + }, + "dependencies": { + "@hapi/b64": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-6.0.1.tgz", + "integrity": "sha512-ZvjX4JQReUmBheeCq+S9YavcnMMHWqx3S0jHNXWIM1kQDxB9cyfSycpVvjfrKcIS8Mh5N3hmu/YKo4Iag9g2Kw==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/bourne": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-3.0.0.tgz", + "integrity": "sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==", + "dev": true + }, + "@hapi/cryptiles": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-6.0.1.tgz", + "integrity": "sha512-9GM9ECEHfR8lk5ASOKG4+4ZsEzFqLfhiryIJ2ISePVB92OHLp/yne4m+zn7z9dgvM98TLpiFebjDFQ0UHcqxXQ==", + "dev": true, + "requires": { + "@hapi/boom": "^10.0.1" + } + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + }, + "@hapi/iron": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-7.0.1.tgz", + "integrity": "sha512-tEZnrOujKpS6jLKliyWBl3A9PaE+ppuL/+gkbyPPDb/l2KSKQyH4lhMkVb+sBhwN+qaxxlig01JRqB8dk/mPxQ==", + "dev": true, + "requires": { + "@hapi/b64": "^6.0.1", + "@hapi/boom": "^10.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/cryptiles": "^6.0.1", + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/topo": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", + "integrity": "sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/validate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-2.0.1.tgz", + "integrity": "sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2", + "@hapi/topo": "^6.0.1" + } + } } }, "@hapi/subtext": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.1.0.tgz", - "integrity": "sha512-n94cU6hlvsNRIpXaROzBNEJGwxC+HA69q769pChzej84On8vsU14guHDub7Pphr/pqn5b93zV3IkMPDU5AUiXA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-8.1.0.tgz", + "integrity": "sha512-PyaN4oSMtqPjjVxLny1k0iYg4+fwGusIhaom9B2StinBclHs7v46mIW706Y+Wo21lcgulGyXbQrmT/w4dus6ww==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/content": "^5.0.2", - "@hapi/file": "2.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/pez": "^5.1.0", - "@hapi/wreck": "17.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/content": "^6.0.0", + "@hapi/file": "^3.0.0", + "@hapi/hoek": "^11.0.2", + "@hapi/pez": "^6.1.0", + "@hapi/wreck": "^18.0.1" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/bourne": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-3.0.0.tgz", + "integrity": "sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==", + "dev": true + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, - "@hapi/teamwork": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.1.tgz", - "integrity": "sha512-1oPx9AE5TIv+V6Ih54RP9lTZBso3rP8j4Xhb6iSVwPXtAM+sDopl5TFMv5Paw73UnpZJ9gjcrTE1BXrWt9eQrg==" - }, "@hapi/topo": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, "requires": { "@hapi/hoek": "^9.0.0" } }, - "@hapi/validate": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.3.tgz", - "integrity": "sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==", - "requires": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0" - } - }, "@hapi/vise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz", - "integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-5.0.1.tgz", + "integrity": "sha512-XZYWzzRtINQLedPYlIkSkUr7m5Ddwlu99V9elh8CSygXstfv3UnWIXT0QD+wmR0VAG34d2Vx3olqcEhRRoTu9A==", "dev": true, "requires": { - "@hapi/hoek": "9.x.x" + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@hapi/wreck": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.2.0.tgz", - "integrity": "sha512-pJ5kjYoRPYDv+eIuiLQqhGon341fr2bNIYZjuotuPJG/3Ilzr/XtI+JAp0A86E2bYfsS3zBPABuS2ICkaXFT8g==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-18.1.0.tgz", + "integrity": "sha512-0z6ZRCmFEfV/MQqkQomJ7sl/hyxvcZM7LtuVqN3vdAO4vM9eBbowl0kaqQj9EJJQab+3Uuh1GxbGIBFy4NfJ4w==", "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/boom": "^10.0.1", + "@hapi/bourne": "^3.0.0", + "@hapi/hoek": "^11.0.2" + }, + "dependencies": { + "@hapi/boom": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-10.0.1.tgz", + "integrity": "sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==", + "dev": true, + "requires": { + "@hapi/hoek": "^11.0.2" + } + }, + "@hapi/bourne": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-3.0.0.tgz", + "integrity": "sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==", + "dev": true + }, + "@hapi/hoek": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", + "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==", + "dev": true + } } }, "@humanwhocodes/config-array": { @@ -45493,9 +46521,9 @@ "integrity": "sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==" }, "@opentelemetry/api-logs": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.50.0.tgz", - "integrity": "sha512-JdZuKrhOYggqOpUljAq4WWNi5nB10PmgoF0y2CvedLGXd0kSawb/UBnWT8gg1ND3bHCNHStAIVT0ELlxJJRqrA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.0.tgz", + "integrity": "sha512-m/jtfBPEIXS1asltl8fPQtO3Sb1qMpuL61unQajUmM8zIxeMF1AlqzWXM3QedcYgTTFiJCew5uJjyhpmqhc0+g==", "requires": { "@opentelemetry/api": "^1.0.0" } @@ -45504,50 +46532,52 @@ "version": "file:metapackages/auto-instrumentations-node", "requires": { "@opentelemetry/api": "^1.4.1", - "@opentelemetry/instrumentation": "^0.50.0", - "@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.36.0", - "@opentelemetry/instrumentation-http": "^0.50.0", - "@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", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-amqplib": "^0.37.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.41.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.41.0", + "@opentelemetry/instrumentation-bunyan": "^0.38.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.38.0", + "@opentelemetry/instrumentation-connect": "^0.36.0", + "@opentelemetry/instrumentation-cucumber": "^0.6.0", + "@opentelemetry/instrumentation-dataloader": "^0.9.0", + "@opentelemetry/instrumentation-dns": "^0.36.1", + "@opentelemetry/instrumentation-express": "^0.38.0", + "@opentelemetry/instrumentation-fastify": "^0.36.1", + "@opentelemetry/instrumentation-fs": "^0.12.0", + "@opentelemetry/instrumentation-generic-pool": "^0.36.0", + "@opentelemetry/instrumentation-graphql": "^0.40.0", + "@opentelemetry/instrumentation-grpc": "^0.51.0", + "@opentelemetry/instrumentation-hapi": "^0.38.0", + "@opentelemetry/instrumentation-http": "^0.51.0", + "@opentelemetry/instrumentation-ioredis": "^0.40.0", + "@opentelemetry/instrumentation-knex": "^0.36.1", + "@opentelemetry/instrumentation-koa": "^0.40.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.37.0", + "@opentelemetry/instrumentation-memcached": "^0.36.0", + "@opentelemetry/instrumentation-mongodb": "^0.43.0", + "@opentelemetry/instrumentation-mongoose": "^0.38.1", + "@opentelemetry/instrumentation-mysql": "^0.38.1", + "@opentelemetry/instrumentation-mysql2": "^0.38.1", + "@opentelemetry/instrumentation-nestjs-core": "^0.37.1", + "@opentelemetry/instrumentation-net": "^0.36.0", + "@opentelemetry/instrumentation-pg": "^0.41.0", + "@opentelemetry/instrumentation-pino": "^0.39.0", + "@opentelemetry/instrumentation-redis": "^0.39.1", + "@opentelemetry/instrumentation-redis-4": "^0.39.0", + "@opentelemetry/instrumentation-restify": "^0.38.0", + "@opentelemetry/instrumentation-router": "^0.37.0", + "@opentelemetry/instrumentation-socket.io": "^0.39.0", + "@opentelemetry/instrumentation-tedious": "^0.10.1", + "@opentelemetry/instrumentation-undici": "^0.2.0", + "@opentelemetry/instrumentation-winston": "^0.37.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.28.9", + "@opentelemetry/resource-detector-aws": "^1.4.2", + "@opentelemetry/resource-detector-azure": "^0.2.6", + "@opentelemetry/resource-detector-container": "^0.3.9", + "@opentelemetry/resource-detector-gcp": "^0.29.9", + "@opentelemetry/resources": "^1.24.0", + "@opentelemetry/sdk-node": "^0.51.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -45557,6 +46587,228 @@ "sinon": "15.2.0", "ts-mocha": "10.0.0", "typescript": "4.4.4" + }, + "dependencies": { + "@opentelemetry/api-logs": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.0.tgz", + "integrity": "sha512-m/jtfBPEIXS1asltl8fPQtO3Sb1qMpuL61unQajUmM8zIxeMF1AlqzWXM3QedcYgTTFiJCew5uJjyhpmqhc0+g==", + "requires": { + "@opentelemetry/api": "^1.0.0" + } + }, + "@opentelemetry/context-async-hooks": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.0.tgz", + "integrity": "sha512-s7xaQ9ifDpJvwbWRLkZD/J5hY35w+MECm4TQUkg6szRcny9lf6oVhWij4w3JJFQgvHQMXU7oXOpX8Z05HxV/8g==", + "requires": {} + }, + "@opentelemetry/core": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.0.tgz", + "integrity": "sha512-FP2oN7mVPqcdxJDTTnKExj4mi91EH+DNuArKfHTjPuJWe2K1JfMIVXNfahw1h3onJxQnxS8K0stKkogX05s+Aw==", + "requires": { + "@opentelemetry/semantic-conventions": "1.24.0" + } + }, + "@opentelemetry/exporter-trace-otlp-grpc": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.51.0.tgz", + "integrity": "sha512-xQpxKzS8ZnxYCa1v+3EKWhwMrSK3+RezpJ+AEKaP2pf2QbLfHt7kKfSn7niR2u3A1Tbe2aC7Ptt9+MafhThOOQ==", + "requires": { + "@grpc/grpc-js": "^1.7.1", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + } + }, + "@opentelemetry/exporter-trace-otlp-http": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.51.0.tgz", + "integrity": "sha512-zODqnLZmPOxj9CarFv0TrVlx9mgj0TfCMCiUiTdNi9iA2rgdKVo+bjJjpYF6LCTJOQCR5TScAUCKyzwkgDI+iA==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + } + }, + "@opentelemetry/exporter-trace-otlp-proto": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.51.0.tgz", + "integrity": "sha512-Fi7r0iMqGoFCQQ+WY0pYOWp395vdinZJIkYKnNbnreHxAN/kVDBl2FxbV3DeOKuRxEY08Gyb9ggPf+Zrqp7l/w==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-proto-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + } + }, + "@opentelemetry/exporter-zipkin": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.24.0.tgz", + "integrity": "sha512-QeGv0PHONswmu567pf9QliJ6s6DgCu5+ziF+soNS1LTcr1VRRVLViYLmGxmzDFUC48sjNTu7sumcKT0nJXsGBw==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + } + }, + "@opentelemetry/otlp-exporter-base": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.51.0.tgz", + "integrity": "sha512-hR4c9vWVz1QgzCBSyy9zSDkvfTgaK96E6/tfVP6O4dzdZW9HqWimA3lXV/KXadEGqShvM4GToz9EHp2A5RU5bQ==", + "requires": { + "@opentelemetry/core": "1.24.0" + } + }, + "@opentelemetry/otlp-grpc-exporter-base": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.51.0.tgz", + "integrity": "sha512-oTRtDvvB0bTRTBVrvKA/oM1gIAqQ6DVQS07pvqiL1cZS8wBrGgpw+2iTd0nV661Y/MhDn/kNWp8lRhMEIKN9bw==", + "requires": { + "@grpc/grpc-js": "^1.7.1", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "protobufjs": "^7.2.3" + } + }, + "@opentelemetry/otlp-proto-exporter-base": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.51.0.tgz", + "integrity": "sha512-WDANDLSUh11Gu5o6iCzmjZraIv5bK8z1L/t6lxQ2NeEKiKUPo5pVOBBQQC/yAQU2yeqkiO1GRCieH+XahZf60A==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "protobufjs": "^7.2.3" + } + }, + "@opentelemetry/otlp-transformer": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.51.0.tgz", + "integrity": "sha512-ylLgx2xumVoSefDHP9GMAU/LG+TU3+8eacVDXV5o1RqWxsdVOaQmCTY0XyDgeRTn6hIOVAq/HHQbRq3iWOrt2A==", + "requires": { + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" + } + }, + "@opentelemetry/propagator-b3": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.24.0.tgz", + "integrity": "sha512-7TMIDE4+NO5vnkor+zned42wqca+hmhW5gWKhmYjUHC5B5uojo1PvtmBrd7kigFu96XvL4ZUWVzibWRWIQ/++Q==", + "requires": { + "@opentelemetry/core": "1.24.0" + } + }, + "@opentelemetry/propagator-jaeger": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.24.0.tgz", + "integrity": "sha512-r3MX3AmJiUeiWTXSDOdwBeaO+ahvWcFCpuKxmhhsH8Q8LqDnjhNd3krqBh4Qsq9wa0WhWtiQaDs/NOCWoMOlOw==", + "requires": { + "@opentelemetry/core": "1.24.0" + } + }, + "@opentelemetry/resources": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.0.tgz", + "integrity": "sha512-mxC7E7ocUS1tLzepnA7O9/G8G6ZTdjCH2pXme1DDDuCuk6n2/53GADX+GWBuyX0dfIxeMInIbJAdjlfN9GNr6A==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + } + }, + "@opentelemetry/sdk-logs": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.51.0.tgz", + "integrity": "sha512-K4fMBRFD8hQ6khk0rvYFuo6L9ymeGgByir6BcuFIgQuQ00OhYwBi9AruZz5V733Ejq7P8ObR3YyubkOUIbeVAw==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0" + } + }, + "@opentelemetry/sdk-metrics": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.0.tgz", + "integrity": "sha512-4tJ+E6N019OZVB/nUW/LoK9xHxfeh88TCoaTqHeLBE9wLYfi6irWW6J9cphMav7J8Qk0D5b7/RM4VEY4dArWOA==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "lodash.merge": "^4.6.2" + } + }, + "@opentelemetry/sdk-node": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.51.0.tgz", + "integrity": "sha512-MrPXDQsTAj3lcY8YUCjb7dvSXVZ5jG6wmjD2LB68V1rsLBdP8j70jsI9GaKijY7QB6psbLq6apO1vYeim5U7aw==", + "requires": { + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.51.0", + "@opentelemetry/exporter-trace-otlp-http": "0.51.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.51.0", + "@opentelemetry/exporter-zipkin": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/sdk-trace-node": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + }, + "dependencies": { + "@opentelemetry/instrumentation": { + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.0.tgz", + "integrity": "sha512-Eg/+Od5bEvzpvZQGhvMyKIkrzB9S7jW+6z9LHEI2VXhl/GrqQ3oBqlzJt4tA6pGtxRmqQWKWGM1wAbwDdW/gUA==", + "requires": { + "@opentelemetry/api-logs": "0.51.0", + "@types/shimmer": "^1.0.2", + "import-in-the-middle": "1.7.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + } + } + } + }, + "@opentelemetry/sdk-trace-base": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.0.tgz", + "integrity": "sha512-H9sLETZ4jw9UJ3totV8oM5R0m4CW0ZIOLfp4NV3g0CM8HD5zGZcaW88xqzWDgiYRpctFxd+WmHtGX/Upoa2vRg==", + "requires": { + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" + } + }, + "@opentelemetry/sdk-trace-node": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.24.0.tgz", + "integrity": "sha512-QgByHmM9uloTpcYEEyW9YJEIMKHFSIM677RH9pJPWWwtM2NQFbEp/8HIJw80Ymtaz6cAxg1Kay1ByqIVzq3t5g==", + "requires": { + "@opentelemetry/context-async-hooks": "1.24.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/propagator-b3": "1.24.0", + "@opentelemetry/propagator-jaeger": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "semver": "^7.5.2" + } + }, + "@opentelemetry/semantic-conventions": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.0.tgz", + "integrity": "sha512-yL0jI6Ltuz8R+Opj7jClGrul6pOoYrdfVmzQS4SITXRPH7I5IRZbrwe/6/v8v4WYMa6MYZG480S1+uc/IGfqsA==" + } } }, "@opentelemetry/auto-instrumentations-web": { @@ -45565,11 +46817,11 @@ "@babel/core": "7.22.17", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-document-load": "^0.37.0", - "@opentelemetry/instrumentation-fetch": "^0.50.0", - "@opentelemetry/instrumentation-user-interaction": "^0.37.0", - "@opentelemetry/instrumentation-xml-http-request": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-document-load": "^0.38.0", + "@opentelemetry/instrumentation-fetch": "^0.51.0", + "@opentelemetry/instrumentation-user-interaction": "^0.38.0", + "@opentelemetry/instrumentation-xml-http-request": "^0.51.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -45601,25 +46853,48 @@ } } }, + "@opentelemetry/baggage-span-processor": { + "version": "file:packages/baggage-span-processor", + "requires": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-trace-base": "^1.0.0", + "@types/mocha": "8.2.3", + "@types/node": "18.6.5", + "expect": "29.2.0", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + }, + "dependencies": { + "@types/mocha": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", + "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", + "dev": true + } + } + }, "@opentelemetry/context-async-hooks": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.23.0.tgz", - "integrity": "sha512-wazGJZDRevibOJ+VgyrT+9+8sybZAxpZx2G7vy30OAtk92OpZCg7HgNxT11NUx0VBDWcRx1dOatMYGOVplQ7QA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.0.tgz", + "integrity": "sha512-s7xaQ9ifDpJvwbWRLkZD/J5hY35w+MECm4TQUkg6szRcny9lf6oVhWij4w3JJFQgvHQMXU7oXOpX8Z05HxV/8g==", "requires": {} }, "@opentelemetry/context-zone": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.23.0.tgz", - "integrity": "sha512-7piNTrpH+gZNMDDOHIJXCSwp0Xslh3R96HWH5HwXw+4PykR4+jVoXvd6jziQxudX9rFAfu2B64A10DHs4ZWrfA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.24.0.tgz", + "integrity": "sha512-Znb6fvmqZy+4ZC63vvf9qktXakTlLOLeBsMizR5E1G/1cM8LKUVR/JJUws+A4QSAY95Rzldi05aqxoc+YUVVKw==", "requires": { - "@opentelemetry/context-zone-peer-dep": "1.23.0", + "@opentelemetry/context-zone-peer-dep": "1.24.0", "zone.js": "^0.11.0 || ^0.13.0 || ^0.14.0" } }, "@opentelemetry/context-zone-peer-dep": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.23.0.tgz", - "integrity": "sha512-3ia5w2y3CGHIhMSggttliGbeRBWclIyMMXdfRCcit1NHg1ocieA9qYxyUEetbOvPrQpoti3O3k+5eyQUv7r8nw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.24.0.tgz", + "integrity": "sha512-znNlicjfxRqepQdOZGUN3RYSs+QGoEiGI+cjILBYM4KdEXpoXgxt87l72b0UYhH7YI/uK0TVHse99D0ER9ODAw==", "requires": {} }, "@opentelemetry/contrib-test-utils": { @@ -45628,9 +46903,9 @@ "@opentelemetry/api": "^1.3.0", "@opentelemetry/core": "^1.0.0", "@opentelemetry/exporter-jaeger": "^1.3.1", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/resources": "^1.8.0", - "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/sdk-node": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -45639,71 +46914,71 @@ } }, "@opentelemetry/core": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.23.0.tgz", - "integrity": "sha512-hdQ/a9TMzMQF/BO8Cz1juA43/L5YGtCSiKoOHmrTEf7VMDAZgy8ucpWx3eQTnQ3gBloRcWtzvcrMZABC3PTSKQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.0.tgz", + "integrity": "sha512-FP2oN7mVPqcdxJDTTnKExj4mi91EH+DNuArKfHTjPuJWe2K1JfMIVXNfahw1h3onJxQnxS8K0stKkogX05s+Aw==", "requires": { - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/exporter-jaeger": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-1.23.0.tgz", - "integrity": "sha512-9GjZPS9kR4nC0ApOFQtj2xwYAGhQ3bO6KPx27DLqCOiso27OlJVUgvAtB3i+1On23OTcjfPtKbNo4a2npmV27A==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-1.24.0.tgz", + "integrity": "sha512-mD28eBrdth937QGU6zgn+6fYBywUaYxLJwANREnE7XS8pHP/Hjxpiy4nb9yIzQ2DqC8Uq7yEnc8ah2pH45B9ZQ==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0", "jaeger-client": "^3.15.0" } }, "@opentelemetry/exporter-trace-otlp-grpc": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.50.0.tgz", - "integrity": "sha512-w/NF4TrwHxx+Uz1M0rCOSVr6KgcoQPv3zF9JRqcebY2euD7ddWnLP0hE8JavyA1uq4UchnMp9faAk9n7hTCePw==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.51.0.tgz", + "integrity": "sha512-xQpxKzS8ZnxYCa1v+3EKWhwMrSK3+RezpJ+AEKaP2pf2QbLfHt7kKfSn7niR2u3A1Tbe2aC7Ptt9+MafhThOOQ==", "requires": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.50.0", - "@opentelemetry/otlp-transformer": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" } }, "@opentelemetry/exporter-trace-otlp-http": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.50.0.tgz", - "integrity": "sha512-L7OtIMT7MsFqkmhbQlPBGRXt7152VN5esHpQEJYIBFedOEo3Da+yHpu5ojMZtPzpIvSpB5Xr5lnJUjJCbkttCA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.51.0.tgz", + "integrity": "sha512-zODqnLZmPOxj9CarFv0TrVlx9mgj0TfCMCiUiTdNi9iA2rgdKVo+bjJjpYF6LCTJOQCR5TScAUCKyzwkgDI+iA==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", - "@opentelemetry/otlp-transformer": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" } }, "@opentelemetry/exporter-trace-otlp-proto": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.50.0.tgz", - "integrity": "sha512-vavD9Ow6yOLiD+ocuS/oeciCsXNdsN41aYUrEljNaLXogvnkfMhJ+JLAhOnRSpzlVtRp7Ciw2BYGdYSebR0OsA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.51.0.tgz", + "integrity": "sha512-Fi7r0iMqGoFCQQ+WY0pYOWp395vdinZJIkYKnNbnreHxAN/kVDBl2FxbV3DeOKuRxEY08Gyb9ggPf+Zrqp7l/w==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", - "@opentelemetry/otlp-proto-exporter-base": "0.50.0", - "@opentelemetry/otlp-transformer": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", + "@opentelemetry/otlp-proto-exporter-base": "0.51.0", + "@opentelemetry/otlp-transformer": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" } }, "@opentelemetry/exporter-zipkin": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.23.0.tgz", - "integrity": "sha512-2LOGvNUGONuIcWhynFaJorVyqv03uZkURScciLmOxvBf2lWTNPEj77br1dCpShIWBM+YlrH7Tc+JXAs+GC7DqA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.24.0.tgz", + "integrity": "sha512-QeGv0PHONswmu567pf9QliJ6s6DgCu5+ziF+soNS1LTcr1VRRVLViYLmGxmzDFUC48sjNTu7sumcKT0nJXsGBw==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/host-metrics": { @@ -45766,11 +47041,11 @@ } }, "@opentelemetry/instrumentation": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.50.0.tgz", - "integrity": "sha512-bhGhbJiZKpuu7wTaSak4hyZcFPlnDeuSF/2vglze8B4w2LubcSbbOnkVTzTs5SXtzh4Xz8eRjaNnAm+u2GYufQ==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.0.tgz", + "integrity": "sha512-Eg/+Od5bEvzpvZQGhvMyKIkrzB9S7jW+6z9LHEI2VXhl/GrqQ3oBqlzJt4tA6pGtxRmqQWKWGM1wAbwDdW/gUA==", "requires": { - "@opentelemetry/api-logs": "0.50.0", + "@opentelemetry/api-logs": "0.51.0", "@types/shimmer": "^1.0.2", "import-in-the-middle": "1.7.1", "require-in-the-middle": "^7.1.1", @@ -45782,10 +47057,10 @@ "version": "file:plugins/node/instrumentation-amqplib", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/amqplib": "^0.5.17", "@types/lodash": "4.14.199", "@types/mocha": "8.2.3", @@ -45815,7 +47090,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/propagator-aws-xray": "^1.3.1", "@opentelemetry/resources": "^1.8.0", "@opentelemetry/sdk-metrics": "^1.8.0", @@ -45842,12 +47117,12 @@ "@aws-sdk/client-sqs": "3.85.0", "@aws-sdk/types": "3.78.0", "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/propagation-utils": "^0.30.8", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/propagation-utils": "^0.30.9", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@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", @@ -45876,10 +47151,10 @@ "version": "file:plugins/node/opentelemetry-instrumentation-bunyan", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/api-logs": "^0.50.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/api-logs": "^0.51.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/resources": "^1.8.0", - "@opentelemetry/sdk-logs": "^0.50.0", + "@opentelemetry/sdk-logs": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -45912,11 +47187,11 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.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/mocha": "7.0.2", "@types/node": "18.6.5", "@types/semver": "7.5.3", @@ -45936,10 +47211,10 @@ "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.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/connect": "3.4.36", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -45967,10 +47242,10 @@ "@cucumber/cucumber": "^9.0.0", "@opentelemetry/api": "^1.0.0", "@opentelemetry/core": "^1.3.1", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.3.1", "@opentelemetry/sdk-trace-node": "^1.3.1", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "7.0.2", "@types/semver": "7.5.3", "@types/shimmer": "1.0.3", @@ -46016,7 +47291,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -46035,7 +47310,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -46060,7 +47335,7 @@ "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.15.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -46091,9 +47366,9 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -46114,13 +47389,13 @@ "@opentelemetry/instrumentation-fastify": { "version": "file:plugins/node/opentelemetry-instrumentation-fastify", "requires": { - "@fastify/express": "^2.0.2", + "@fastify/express": "^3.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-http": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-http": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -46153,14 +47428,14 @@ } }, "@opentelemetry/instrumentation-fetch": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fetch/-/instrumentation-fetch-0.50.0.tgz", - "integrity": "sha512-CayteluGJbrfDvzEFQ0EWqLFkNAcO9H7nfDHptZjtonBpJRWF170XZoMkJVC2bxp0lIVwyuw6WlnGVRSNwEtKA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fetch/-/instrumentation-fetch-0.51.0.tgz", + "integrity": "sha512-dB9wisB2+wyh0wUB1RFNinCS4TqJ7QMVc4jNzy3JCMJudwFWI/stU10DgZ3vwFQNUEBUIz9QmEQSFud7lsvB2w==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/sdk-trace-web": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/sdk-trace-web": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/instrumentation-fs": { @@ -46169,11 +47444,10 @@ "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/resources": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "^10.0.11", @@ -46190,7 +47464,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -46237,7 +47511,7 @@ "version": "file:plugins/node/opentelemetry-instrumentation-graphql", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.3.1", "@types/mocha": "8.2.3", @@ -46260,28 +47534,28 @@ } }, "@opentelemetry/instrumentation-grpc": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.50.0.tgz", - "integrity": "sha512-/ZFuvHtrHyxfRJX5CJ8yPKokAIcvTbIJAoR4AN+gBq1YqecWuCr4XG52p5YU5qDrbwOBtShOrC8d4GdFZOky6Q==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.51.0.tgz", + "integrity": "sha512-Wfhs9e1Hi4nnULLqzt9s2M6+Tz52EkKj6uZnj9ZL3coldlZiP+WmvuUNepds7jcBJg/qDBjnEe96fThPuO7ddA==", "requires": { - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/instrumentation-hapi": { "version": "file:plugins/node/opentelemetry-instrumentation-hapi", "requires": { - "@hapi/hapi": "20.1.5", + "@hapi/hapi": "21.3.3", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/hapi__hapi": "20.0.13", "@types/mocha": "7.0.2", "@types/node": "18.6.5", + "joi": "17.12.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", @@ -46291,13 +47565,13 @@ } }, "@opentelemetry/instrumentation-http": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.50.0.tgz", - "integrity": "sha512-bsd6Nv0FtN9C6M6vX/kgPzvJY9UhJc4CZZNvqDbsfVQv3/MWvPrYgthf41AhrehqeDnpfn/QGzNKtdWUduGanQ==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.51.0.tgz", + "integrity": "sha512-6VsGPBnU6iVKWhVBnuRpwrmiHfxt8EYrqfnH2glfsMpsn4xy+O6U0yGlggPLhoYeOVafV3h70EEk5MU0tpsbiw==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/semantic-conventions": "1.24.0", "semver": "^7.5.2" } }, @@ -46306,9 +47580,9 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -46332,10 +47606,10 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.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/mocha": "7.0.2", "@types/node": "18.6.5", "knex": "0.95.9", @@ -46353,10 +47627,10 @@ "@koa/router": "12.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-http": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-http": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -46382,7 +47656,7 @@ "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-web": "^1.8.0", "@types/jquery": "3.5.20", @@ -46415,8 +47689,8 @@ "version": "file:plugins/node/instrumentation-lru-memoizer", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@types/lru-cache": "7.10.9", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -46443,8 +47717,8 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -46465,8 +47739,8 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -46594,11 +47868,11 @@ "version": "file:plugins/node/instrumentation-mongoose", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "expect": "29.2.0", @@ -46624,11 +47898,11 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "7.0.2", "@types/mysql": "2.15.22", "@types/node": "18.6.5", @@ -46647,11 +47921,11 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@opentelemetry/sql-common": "^0.40.0", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@opentelemetry/sql-common": "^0.40.1", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/semver": "7.5.3", @@ -46701,7 +47975,7 @@ "@nestjs/websockets": "9.4.3", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -46752,7 +48026,7 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -46772,12 +48046,12 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0", - "@opentelemetry/sql-common": "^0.40.0", + "@opentelemetry/sql-common": "^0.40.1", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/pg": "8.6.1", @@ -46801,8 +48075,8 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -46851,12 +48125,12 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", "@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/mocha": "7.0.2", "@types/node": "18.6.5", "@types/redis": "2.8.32", @@ -46875,13 +48149,13 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", "@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/mocha": "7.0.2", "@types/node": "18.6.5", "cross-env": "7.0.3", @@ -46916,10 +48190,10 @@ "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.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/mocha": "7.0.2", "@types/node": "18.6.5", "@types/restify": "4.3.10", @@ -46965,10 +48239,10 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.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/mocha": "7.0.2", "@types/node": "18.6.5", "mocha": "7.2.0", @@ -46983,7 +48257,7 @@ "version": "file:plugins/node/instrumentation-runtime-node", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-metrics": "^1.20.0", "@types/mocha": "^10.0.6", "@types/node": "^20.11.2", @@ -47015,10 +48289,10 @@ "version": "file:plugins/node/instrumentation-socket.io", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "expect": "27.4.2", @@ -47208,10 +48482,10 @@ "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/tedious": "^4.0.10", @@ -47229,7 +48503,7 @@ "requires": { "@opentelemetry/api": "^1.7.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -47254,8 +48528,8 @@ "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-zone-peer-dep": "^1.8.0", "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/instrumentation-xml-http-request": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/instrumentation-xml-http-request": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-web": "^1.8.0", "@types/jquery": "3.5.20", @@ -47288,11 +48562,12 @@ "version": "file:plugins/node/opentelemetry-instrumentation-winston", "requires": { "@opentelemetry/api": "^1.3.0", + "@opentelemetry/api-logs": "^0.51.0", "@opentelemetry/context-async-hooks": "^1.21.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.21.0", "@opentelemetry/sdk-trace-node": "^1.21.0", - "@opentelemetry/winston-transport": "^0.2.0", + "@opentelemetry/winston-transport": "^0.3.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -47309,56 +48584,56 @@ } }, "@opentelemetry/instrumentation-xml-http-request": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-xml-http-request/-/instrumentation-xml-http-request-0.50.0.tgz", - "integrity": "sha512-o9z6SDQByqc3GvmUcy6Npt/SAIrv2Pk0Hm0Hl54B3Ny8WUrTsrlt6MULx8d+EjuifE4uVo8op8DekmvKJ1FHoQ==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-xml-http-request/-/instrumentation-xml-http-request-0.51.0.tgz", + "integrity": "sha512-KgLO2qx1z1Wn9NeJgrgNukd10ssK1QqxODwdeBJFO1BaP9sVVargpupYowlDKUL5I3oWOEqi/Oxxdh/fbEsJtw==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/sdk-trace-web": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/sdk-trace-web": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/otlp-exporter-base": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.50.0.tgz", - "integrity": "sha512-JUmjmrCmE1/fc4LjCQMqLfudgSl5OpUkzx7iA94b4jgeODM7zWxUoVXL7/CT7fWf47Cn+pmKjMvTCSESqZZ3mA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.51.0.tgz", + "integrity": "sha512-hR4c9vWVz1QgzCBSyy9zSDkvfTgaK96E6/tfVP6O4dzdZW9HqWimA3lXV/KXadEGqShvM4GToz9EHp2A5RU5bQ==", "requires": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.0" } }, "@opentelemetry/otlp-grpc-exporter-base": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.50.0.tgz", - "integrity": "sha512-J500AczSD7xEsjXpwNzSh5HQqxW73PT3CCNsi1VEWCE+8UPgVfkHYIGRHGoch35DV+CMe1svbi7gAk3e5eCSVA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.51.0.tgz", + "integrity": "sha512-oTRtDvvB0bTRTBVrvKA/oM1gIAqQ6DVQS07pvqiL1cZS8wBrGgpw+2iTd0nV661Y/MhDn/kNWp8lRhMEIKN9bw==", "requires": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", "protobufjs": "^7.2.3" } }, "@opentelemetry/otlp-proto-exporter-base": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.50.0.tgz", - "integrity": "sha512-hlbn3eZbhxoK79Sq1ddj1f7qcx+PzsPQC/SFpJvaWgTaqacCbqJmpzWDKfRRCAC7iGX2Hj/sgpf8vysazqyMOw==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.51.0.tgz", + "integrity": "sha512-WDANDLSUh11Gu5o6iCzmjZraIv5bK8z1L/t6lxQ2NeEKiKUPo5pVOBBQQC/yAQU2yeqkiO1GRCieH+XahZf60A==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/otlp-exporter-base": "0.51.0", "protobufjs": "^7.2.3" } }, "@opentelemetry/otlp-transformer": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.50.0.tgz", - "integrity": "sha512-s0sl1Yfqd5q1Kjrf6DqXPWzErL+XHhrXOfejh4Vc/SMTNqC902xDsC8JQxbjuramWt/+hibfguIvi7Ns8VLolA==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.51.0.tgz", + "integrity": "sha512-ylLgx2xumVoSefDHP9GMAU/LG+TU3+8eacVDXV5o1RqWxsdVOaQmCTY0XyDgeRTn6hIOVAq/HHQbRq3iWOrt2A==", "requires": { - "@opentelemetry/api-logs": "0.50.0", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-logs": "0.50.0", - "@opentelemetry/sdk-metrics": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0" + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0" } }, "@opentelemetry/plugin-react-load": { @@ -47407,7 +48682,7 @@ "version": "file:packages/opentelemetry-propagation-utils", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/mocha": "^9.1.1", "@types/node": "18.6.5", "@types/sinon": "^10.0.11", @@ -47428,43 +48703,19 @@ } }, "@opentelemetry/propagator-aws-xray": { - "version": "file:propagators/opentelemetry-propagator-aws-xray", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-1.24.0.tgz", + "integrity": "sha512-rcuMtEOTZC7TW84tws1QLUVRElrGSbBJwK0b+qa56zJULDiUIiUpS+dSzO+aUchg7MtTJBZSG5OPsfsKpGgNig==", "requires": { - "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "@opentelemetry/api": "^1.0.0", - "@opentelemetry/core": "^1.0.0", - "@types/mocha": "8.2.3", - "@types/node": "18.6.5", - "@types/webpack-env": "1.16.2", - "karma": "6.3.16", - "karma-chrome-launcher": "^3.1.1", - "karma-coverage-istanbul-reporter": "3.0.3", - "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.36", - "karma-webpack": "4.0.2", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "ts-loader": "8.3.0", - "ts-mocha": "10.0.0", - "typescript": "4.4.4", - "webpack": "4.46.0" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } + "@opentelemetry/core": "1.24.0" } }, "@opentelemetry/propagator-b3": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.23.0.tgz", - "integrity": "sha512-cZ6rl8y2bdxYQ4e+zP2CQ+QmuPebaLBLO1skjFpj3eEu7zar+6hBzUP3llMOUupkQeQSwXz+4c8dZ26OhYfG/g==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.24.0.tgz", + "integrity": "sha512-7TMIDE4+NO5vnkor+zned42wqca+hmhW5gWKhmYjUHC5B5uojo1PvtmBrd7kigFu96XvL4ZUWVzibWRWIQ/++Q==", "requires": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.0" } }, "@opentelemetry/propagator-grpc-census-binary": { @@ -47654,11 +48905,11 @@ } }, "@opentelemetry/propagator-jaeger": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.23.0.tgz", - "integrity": "sha512-6iArixfgIl3ZgzeltQ5jyiKbjZygM+MbM84pXi1HL0Qs4x4Ck5rM6wEtjhZffFnlDMWEkEqrnM0xF6bTfbiMAQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.24.0.tgz", + "integrity": "sha512-r3MX3AmJiUeiWTXSDOdwBeaO+ahvWcFCpuKxmhhsH8Q8LqDnjhNd3krqBh4Qsq9wa0WhWtiQaDs/NOCWoMOlOw==", "requires": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.0" } }, "@opentelemetry/propagator-ot-trace": { @@ -47714,7 +48965,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-alibaba-cloud", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", @@ -47741,7 +48992,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-aws", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.0.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -47769,7 +49020,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-azure", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/resources": "^1.10.1", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", @@ -47795,7 +49046,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-container", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", @@ -47823,7 +49074,7 @@ "version": "file:detectors/node/opentelemetry-resource-detector-gcp", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.0.0", "@opentelemetry/resources": "^1.0.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -47875,9 +49126,9 @@ "version": "file:detectors/node/opentelemetry-resource-detector-instana", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/resources": "^1.0.0", - "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/sdk-node": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -47899,90 +49150,90 @@ } }, "@opentelemetry/resources": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.23.0.tgz", - "integrity": "sha512-iPRLfVfcEQynYGo7e4Di+ti+YQTAY0h5mQEUJcHlU9JOqpb4x965O6PZ+wMcwYVY63G96KtdS86YCM1BF1vQZg==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.0.tgz", + "integrity": "sha512-mxC7E7ocUS1tLzepnA7O9/G8G6ZTdjCH2pXme1DDDuCuk6n2/53GADX+GWBuyX0dfIxeMInIbJAdjlfN9GNr6A==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/sdk-logs": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.50.0.tgz", - "integrity": "sha512-PeUEupBB29p9nlPNqXoa1PUWNLsZnxG0DCDj3sHqzae+8y76B/A5hvZjg03ulWdnvBLYpnJslqzylG9E0IL87g==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.51.0.tgz", + "integrity": "sha512-K4fMBRFD8hQ6khk0rvYFuo6L9ymeGgByir6BcuFIgQuQ00OhYwBi9AruZz5V733Ejq7P8ObR3YyubkOUIbeVAw==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0" } }, "@opentelemetry/sdk-metrics": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.23.0.tgz", - "integrity": "sha512-4OkvW6+wST4h6LFG23rXSTf6nmTf201h9dzq7bE0z5R9ESEVLERZz6WXwE7PSgg1gdjlaznm1jLJf8GttypFDg==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.0.tgz", + "integrity": "sha512-4tJ+E6N019OZVB/nUW/LoK9xHxfeh88TCoaTqHeLBE9wLYfi6irWW6J9cphMav7J8Qk0D5b7/RM4VEY4dArWOA==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", "lodash.merge": "^4.6.2" } }, "@opentelemetry/sdk-node": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.50.0.tgz", - "integrity": "sha512-LhIXHnvcnhRYcPwG9VG4G6lJ7x4ElYF6UYHHmXA7e4ZWzSUEFmAPfR1IBWv358aD1KwffcEBu7J6zeAR7lPZag==", - "requires": { - "@opentelemetry/api-logs": "0.50.0", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.50.0", - "@opentelemetry/exporter-trace-otlp-http": "0.50.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.50.0", - "@opentelemetry/exporter-zipkin": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/sdk-logs": "0.50.0", - "@opentelemetry/sdk-metrics": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/sdk-trace-node": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.51.0.tgz", + "integrity": "sha512-MrPXDQsTAj3lcY8YUCjb7dvSXVZ5jG6wmjD2LB68V1rsLBdP8j70jsI9GaKijY7QB6psbLq6apO1vYeim5U7aw==", + "requires": { + "@opentelemetry/api-logs": "0.51.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.51.0", + "@opentelemetry/exporter-trace-otlp-http": "0.51.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.51.0", + "@opentelemetry/exporter-zipkin": "1.24.0", + "@opentelemetry/instrumentation": "0.51.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/sdk-logs": "0.51.0", + "@opentelemetry/sdk-metrics": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/sdk-trace-node": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/sdk-trace-base": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.23.0.tgz", - "integrity": "sha512-PzBmZM8hBomUqvCddF/5Olyyviayka44O5nDWq673np3ctnvwMOvNrsUORZjKja1zJbwEuD9niAGbnVrz3jwRQ==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.0.tgz", + "integrity": "sha512-H9sLETZ4jw9UJ3totV8oM5R0m4CW0ZIOLfp4NV3g0CM8HD5zGZcaW88xqzWDgiYRpctFxd+WmHtGX/Upoa2vRg==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/resources": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/sdk-trace-node": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.23.0.tgz", - "integrity": "sha512-dwnin5Go2r6VzJZkVc9JBPupssWp7j2EFto+S7qRkwQ00WDykWeq3x2Skk7I1Jr448FeBSvGCQVPgV5e6s6O3w==", - "requires": { - "@opentelemetry/context-async-hooks": "1.23.0", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/propagator-b3": "1.23.0", - "@opentelemetry/propagator-jaeger": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.24.0.tgz", + "integrity": "sha512-QgByHmM9uloTpcYEEyW9YJEIMKHFSIM677RH9pJPWWwtM2NQFbEp/8HIJw80Ymtaz6cAxg1Kay1ByqIVzq3t5g==", + "requires": { + "@opentelemetry/context-async-hooks": "1.24.0", + "@opentelemetry/core": "1.24.0", + "@opentelemetry/propagator-b3": "1.24.0", + "@opentelemetry/propagator-jaeger": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", "semver": "^7.5.2" } }, "@opentelemetry/sdk-trace-web": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.23.0.tgz", - "integrity": "sha512-tx9N3hIkd6k567BeujBnpXYdhu3ptYVk0ZkhdcjyQ3I8ZDJ+/JkVtaVNLAuf8hp1buTqNDmxSipALMxEmK2fnw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.24.0.tgz", + "integrity": "sha512-G0q8aZPUhRtO/iw2BkjHeNqCMBf0JQX5VqqiPWXn9u5iRkpeQ6LZrGaiymKWOdEqtXCgM44yrCY/4WoJqR0bjQ==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.0", + "@opentelemetry/sdk-trace-base": "1.24.0", + "@opentelemetry/semantic-conventions": "1.24.0" } }, "@opentelemetry/semantic-conventions": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.23.0.tgz", - "integrity": "sha512-MiqFvfOzfR31t8cc74CTP1OZfz7MbqpAnLCra8NqQoaHJX6ncIRTdYOQYBDQ2uFISDq0WY8Y9dDTWvsgzzBYRg==" + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.0.tgz", + "integrity": "sha512-yL0jI6Ltuz8R+Opj7jClGrul6pOoYrdfVmzQS4SITXRPH7I5IRZbrwe/6/v8v4WYMa6MYZG480S1+uc/IGfqsA==" }, "@opentelemetry/sql-common": { "version": "file:packages/opentelemetry-sql-common", @@ -48000,7 +49251,7 @@ "@opentelemetry/winston-transport": { "version": "file:packages/winston-transport", "requires": { - "@opentelemetry/api-logs": "^0.50.0", + "@opentelemetry/api-logs": "^0.51.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -48336,6 +49587,7 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", + "dev": true, "requires": { "@hapi/hoek": "^9.0.0" } @@ -48343,12 +49595,14 @@ "@sideway/formula": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "dev": true }, "@sideway/pinpoint": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true }, "@sigstore/bundle": { "version": "1.1.0", @@ -49340,42 +50594,6 @@ "generic-pool": "*" } }, - "@types/hapi__catbox": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/@types/hapi__catbox/-/hapi__catbox-10.2.6.tgz", - "integrity": "sha512-qdMHk4fBlwRfnBBDJaoaxb+fU9Ewi2xqkXD3mNjSPl2v/G/8IJbDpVRBuIcF7oXrcE8YebU5M8cCeKh1NXEn0w==" - }, - "@types/hapi__hapi": { - "version": "20.0.13", - "resolved": "https://registry.npmjs.org/@types/hapi__hapi/-/hapi__hapi-20.0.13.tgz", - "integrity": "sha512-LP4IPfhIO5ZPVOrJo7H8c8Slc0WYTFAUNQX1U0LBPKyXioXhH5H2TawIgxKujIyOhbwoBbpvOsBf6o5+ToJIrQ==", - "requires": { - "@hapi/boom": "^9.0.0", - "@hapi/iron": "^6.0.0", - "@hapi/podium": "^4.1.3", - "@types/hapi__catbox": "*", - "@types/hapi__mimos": "*", - "@types/hapi__shot": "*", - "@types/node": "*", - "joi": "^17.3.0" - } - }, - "@types/hapi__mimos": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz", - "integrity": "sha512-i9hvJpFYTT/qzB5xKWvDYaSXrIiNqi4ephi+5Lo6+DoQdwqPXQgmVVOZR+s3MBiHoFqsCZCX9TmVWG3HczmTEQ==", - "requires": { - "@types/mime-db": "*" - } - }, - "@types/hapi__shot": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/hapi__shot/-/hapi__shot-4.1.6.tgz", - "integrity": "sha512-h33NBjx2WyOs/9JgcFeFhkxnioYWQAZxOHdmqDuoJ1Qjxpcs+JGvSjEEoDeWfcrF+1n47kKgqph5IpfmPOnzbg==", - "requires": { - "@types/node": "*" - } - }, "@types/http-assert": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.5.tgz", @@ -49510,11 +50728,6 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" }, - "@types/mime-db": { - "version": "1.43.5", - "resolved": "https://registry.npmjs.org/@types/mime-db/-/mime-db-1.43.5.tgz", - "integrity": "sha512-/bfTiIUTNPUBnwnYvUxXAre5MhD88jgagLEQiQtIASjU+bwxd8kS/ASDA4a8ufd8m0Lheu6eeMJHEUpLHoJ28A==" - }, "@types/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", @@ -57845,6 +59058,7 @@ "version": "17.12.2", "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.2.tgz", "integrity": "sha512-RonXAIzCiHLc8ss3Ibuz45u28GOsWE1UpfDXLbN/9NKbL4tCJf8TWYVKsoYuuh+sAUt7fsSNpA+r2+TBA6Wjmw==", + "dev": true, "requires": { "@hapi/hoek": "^9.3.0", "@hapi/topo": "^5.1.0", diff --git a/propagators/opentelemetry-propagator-aws-xray/.eslintignore b/packages/baggage-span-processor/.eslintignore similarity index 100% rename from propagators/opentelemetry-propagator-aws-xray/.eslintignore rename to packages/baggage-span-processor/.eslintignore diff --git a/propagators/opentelemetry-propagator-aws-xray/.eslintrc.js b/packages/baggage-span-processor/.eslintrc.js similarity index 58% rename from propagators/opentelemetry-propagator-aws-xray/.eslintrc.js rename to packages/baggage-span-processor/.eslintrc.js index 01b8d09740..f726f3becb 100644 --- a/propagators/opentelemetry-propagator-aws-xray/.eslintrc.js +++ b/packages/baggage-span-processor/.eslintrc.js @@ -1,9 +1,7 @@ module.exports = { "env": { "mocha": true, - "commonjs": true, - "browser": true, - "jquery": true + "node": true }, ...require('../../eslint.config.js') } diff --git a/packages/baggage-span-processor/CHANGELOG.md b/packages/baggage-span-processor/CHANGELOG.md new file mode 100644 index 0000000000..bb2d503c69 --- /dev/null +++ b/packages/baggage-span-processor/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## 0.1.0 + +Initial version. diff --git a/propagators/opentelemetry-propagator-aws-xray/LICENSE b/packages/baggage-span-processor/LICENSE similarity index 99% rename from propagators/opentelemetry-propagator-aws-xray/LICENSE rename to packages/baggage-span-processor/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/propagators/opentelemetry-propagator-aws-xray/LICENSE +++ b/packages/baggage-span-processor/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/baggage-span-processor/README.md b/packages/baggage-span-processor/README.md new file mode 100644 index 0000000000..913abdba9d --- /dev/null +++ b/packages/baggage-span-processor/README.md @@ -0,0 +1,63 @@ +# OpenTelemetry Baggage Span Processor for Node.js + +[![NPM Published Version][npm-img]][npm-url] +[![Apache License][license-image]][license-url] + +The BaggageSpanProcessor reads entries stored in Baggage from the parent context and adds the [baggage](https://opentelemetry.io/docs/concepts/signals/baggage) entries' keys and +values to the span as attributes on span start. + +Add this span processor to a tracer provider. + +Keys and values added to Baggage will appear on subsequent child spans for a trace within this service *and* be propagated to external services in accordance with any configured propagation formats configured. +If the external services also have a Baggage span processor, the keys and values will appear in those child spans as well. + +⚠ Warning ⚠️ + +Do not put sensitive information in Baggage. + +To repeat: a consequence of adding data to Baggage is that the keys and values will appear in all outgoing HTTP headers from the application. + +Compatible with OpenTelemetry JS API and SDK `1.0+`. + +## Installation + +```bash +npm install --save @opentelemetry/baggage-span-processor +``` + +### Usage + +Add to the span processors during configuration: + +```javascript +import { NodeSDK, tracing } from "@opentelemetry/sdk-node"; +import { BaggageSpanProcessor } from "@opentelemetry/baggage-span-processor"; + +const spanProcessors = [ + new tracing.SimpleSpanProcessor( + new tracing.ConsoleSpanExporter()), + new BaggageSpanProcessor()]; + +const sdk = new NodeSDK({ + serviceName: "example-service", + spanProcessors +}); + +sdk.start(); +``` + +## 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/host-metrics +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fhost-metrics.svg diff --git a/packages/baggage-span-processor/package.json b/packages/baggage-span-processor/package.json new file mode 100644 index 0000000000..ca10dfb792 --- /dev/null +++ b/packages/baggage-span-processor/package.json @@ -0,0 +1,59 @@ +{ + "name": "@opentelemetry/baggage-span-processor", + "version": "0.1.0", + "description": "OpenTelemetry Baggage Span Processor for Node.js", + "main": "build/src/index.ts", + "types": "build/src/index.d.ts", + "repository": "open-telemetry/opentelemetry-js-contrib", + "scripts": { + "clean": "rimraf build/*", + "compile": "tsc -p .", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix", + "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/baggage-span-processor --include-dependencies", + "prewatch": "npm run precompile", + "prepublishOnly": "npm run compile", + "tdd": "npm run test -- --watch-extensions ts --watch", + "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", + "version:update": "node ../../scripts/version-update.js", + "watch": "tsc -w" + }, + "keywords": [ + "opentelemetry", + "nodejs", + "tracing", + "baggage", + "plugin" + ], + "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" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "dependencies": { + "@opentelemetry/sdk-trace-base": "^1.0.0" + }, + "devDependencies": { + "@opentelemetry/api": "^1.0.0", + "@types/mocha": "8.2.3", + "@types/node": "18.6.5", + "expect": "29.2.0", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + }, + "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/baggage-span-processor#readme" +} diff --git a/packages/baggage-span-processor/src/baggage-span-processor.ts b/packages/baggage-span-processor/src/baggage-span-processor.ts new file mode 100644 index 0000000000..13d3c84260 --- /dev/null +++ b/packages/baggage-span-processor/src/baggage-span-processor.ts @@ -0,0 +1,84 @@ +/* + * 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, propagation } from '@opentelemetry/api'; +import { + SpanProcessor, + Span, + ReadableSpan, +} from '@opentelemetry/sdk-trace-base'; + +/** + * BaggageSpanProcessor is a {@link SpanProcessor} that reads entries stored in {@link Baggage} + * from the parent context and adds the baggage entries' keys and + * values to the span as attributes on span start. + * + * Add this span processor to a tracer provider. + * + * Keys and values added to Baggage will appear on subsequent child + * spans for a trace within this service *and* be propagated to external + * services in accordance with any configured propagation formats + * configured. If the external services also have a Baggage span + * processor, the keys and values will appear in those child spans as + * well. + * + * ⚠ Warning ⚠️ + * + * Do not put sensitive information in Baggage. + * + * To repeat: a consequence of adding data to Baggage is that the keys and + * values will appear in all outgoing HTTP headers from the application. + */ +export class BaggageSpanProcessor implements SpanProcessor { + /** + * Forces to export all finished spans + */ + forceFlush(): Promise { + // no-op + return Promise.resolve(); + } + + /** + * Called when a {@link Span} is started, if the `span.isRecording()` + * returns true. + * @param span the Span that just started. + */ + onStart(span: Span, parentContext: Context): void { + (propagation.getBaggage(parentContext)?.getAllEntries() ?? []).forEach( + entry => { + span.setAttribute(entry[0], entry[1].value); + } + ); + } + + /** + * Called when a {@link ReadableSpan} is ended, if the `span.isRecording()` + * returns true. + * @param span the Span that just ended. + */ + onEnd(_: ReadableSpan): void { + // no-op + } + + /** + * Shuts down the processor. Called when SDK is shut down. This is an + * opportunity for processor to do any cleanup required. + */ + shutdown(): Promise { + // no-op + return Promise.resolve(); + } +} diff --git a/propagators/opentelemetry-propagator-aws-xray/src/index.ts b/packages/baggage-span-processor/src/index.ts similarity index 90% rename from propagators/opentelemetry-propagator-aws-xray/src/index.ts rename to packages/baggage-span-processor/src/index.ts index dea8476683..39e175e9b3 100644 --- a/propagators/opentelemetry-propagator-aws-xray/src/index.ts +++ b/packages/baggage-span-processor/src/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './AWSXRayPropagator'; +export { BaggageSpanProcessor } from './baggage-span-processor'; diff --git a/packages/baggage-span-processor/test/baggage-span-processor.test.ts b/packages/baggage-span-processor/test/baggage-span-processor.test.ts new file mode 100644 index 0000000000..2829858ab1 --- /dev/null +++ b/packages/baggage-span-processor/test/baggage-span-processor.test.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 { BaggageSpanProcessor } from '../src/baggage-span-processor'; +import { + propagation, + ROOT_CONTEXT, + SpanKind, + TraceFlags, +} from '@opentelemetry/api'; +import { BasicTracerProvider, Span } from '@opentelemetry/sdk-trace-base'; +import { expect } from 'expect'; + +describe('BaggageSpanProcessor', () => { + const baggageProcessor = new BaggageSpanProcessor(); + + const bag = propagation.createBaggage({ + brand: { value: 'samsonite' }, + }); + + const expectedAttrs = { + brand: 'samsonite', + }; + + let span: Span; + + beforeEach(() => { + span = new Span( + new BasicTracerProvider().getTracer('baggage-testing'), + ROOT_CONTEXT, + 'Edward W. Span', + { + traceId: 'e4cda95b652f4a1592b449d5929fda1b', + spanId: '7e0c63257de34c92', + traceFlags: TraceFlags.SAMPLED, + }, + SpanKind.SERVER + ); + }); + + it('onStart adds current Baggage entries to a span as attributes', () => { + expect(span.attributes).toEqual({}); + const ctx = propagation.setBaggage(ROOT_CONTEXT, bag); + + baggageProcessor.onStart(span, ctx); + + expect(span.attributes).toEqual(expectedAttrs); + }); + + it('forceFlush is a no-op and does not throw error', async () => { + await expect(baggageProcessor.forceFlush()).resolves.not.toThrow(); + }); + + it('onEnd is a no-op and does not throw error', async () => { + expect(() => baggageProcessor.onEnd(span)).not.toThrow(); + }); + + it('shutdown is a no-op and does not throw error', async () => { + await expect(baggageProcessor.shutdown()).resolves.not.toThrow(); + }); +}); diff --git a/propagators/opentelemetry-propagator-aws-xray/tsconfig.json b/packages/baggage-span-processor/tsconfig.json similarity index 100% rename from propagators/opentelemetry-propagator-aws-xray/tsconfig.json rename to packages/baggage-span-processor/tsconfig.json diff --git a/packages/opentelemetry-host-metrics/CHANGELOG.md b/packages/opentelemetry-host-metrics/CHANGELOG.md index fd1f38dff1..7456803e58 100644 --- a/packages/opentelemetry-host-metrics/CHANGELOG.md +++ b/packages/opentelemetry-host-metrics/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.35.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/host-metrics-v0.35.0...host-metrics-v0.35.1) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/host-metrics-v0.34.1...host-metrics-v0.35.0) (2024-01-29) diff --git a/packages/opentelemetry-host-metrics/LICENSE b/packages/opentelemetry-host-metrics/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/packages/opentelemetry-host-metrics/LICENSE +++ b/packages/opentelemetry-host-metrics/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/opentelemetry-host-metrics/package.json b/packages/opentelemetry-host-metrics/package.json index 0337703640..4d0a0e1d6e 100644 --- a/packages/opentelemetry-host-metrics/package.json +++ b/packages/opentelemetry-host-metrics/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/host-metrics", - "version": "0.35.0", + "version": "0.35.1", "description": "OpenTelemetry Host Metrics for Node.js", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/packages/opentelemetry-id-generator-aws-xray/CHANGELOG.md b/packages/opentelemetry-id-generator-aws-xray/CHANGELOG.md index ff50615475..419ff2d330 100644 --- a/packages/opentelemetry-id-generator-aws-xray/CHANGELOG.md +++ b/packages/opentelemetry-id-generator-aws-xray/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/id-generator-aws-xray-v1.2.1...id-generator-aws-xray-v1.2.2) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [1.2.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/id-generator-aws-xray-v1.2.0...id-generator-aws-xray-v1.2.1) (2023-08-14) diff --git a/packages/opentelemetry-id-generator-aws-xray/LICENSE b/packages/opentelemetry-id-generator-aws-xray/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/packages/opentelemetry-id-generator-aws-xray/LICENSE +++ b/packages/opentelemetry-id-generator-aws-xray/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/opentelemetry-id-generator-aws-xray/package.json b/packages/opentelemetry-id-generator-aws-xray/package.json index d4219fa49e..9387f6cb05 100644 --- a/packages/opentelemetry-id-generator-aws-xray/package.json +++ b/packages/opentelemetry-id-generator-aws-xray/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/id-generator-aws-xray", - "version": "1.2.1", + "version": "1.2.2", "description": "AWS X-Ray ID generator for OpenTelemetry", "main": "build/src/index.js", "publishConfig": { diff --git a/packages/opentelemetry-propagation-utils/CHANGELOG.md b/packages/opentelemetry-propagation-utils/CHANGELOG.md index 48fbd04979..0b233f0097 100644 --- a/packages/opentelemetry-propagation-utils/CHANGELOG.md +++ b/packages/opentelemetry-propagation-utils/CHANGELOG.md @@ -60,6 +60,20 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0 +## [0.30.9](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagation-utils-v0.30.8...propagation-utils-v0.30.9) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/packages/opentelemetry-propagation-utils/LICENSE b/packages/opentelemetry-propagation-utils/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/packages/opentelemetry-propagation-utils/LICENSE +++ b/packages/opentelemetry-propagation-utils/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/opentelemetry-propagation-utils/package.json b/packages/opentelemetry-propagation-utils/package.json index ed5f41dcef..ce82dd204c 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.8", + "version": "0.30.9", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/mocha": "^9.1.1", "@types/node": "18.6.5", "@types/sinon": "^10.0.11", diff --git a/packages/opentelemetry-redis-common/CHANGELOG.md b/packages/opentelemetry-redis-common/CHANGELOG.md index c7959a4d6c..a140de285a 100644 --- a/packages/opentelemetry-redis-common/CHANGELOG.md +++ b/packages/opentelemetry-redis-common/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.36.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/redis-common-v0.36.1...redis-common-v0.36.2) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.36.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/redis-common-v0.36.0...redis-common-v0.36.1) (2023-08-14) diff --git a/packages/opentelemetry-redis-common/LICENSE b/packages/opentelemetry-redis-common/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/packages/opentelemetry-redis-common/LICENSE +++ b/packages/opentelemetry-redis-common/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/opentelemetry-redis-common/package.json b/packages/opentelemetry-redis-common/package.json index c7d6f373ea..57ea62092b 100644 --- a/packages/opentelemetry-redis-common/package.json +++ b/packages/opentelemetry-redis-common/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/redis-common", - "version": "0.36.1", + "version": "0.36.2", "description": "Redis utilities for redis instrumentations", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/packages/opentelemetry-sql-common/CHANGELOG.md b/packages/opentelemetry-sql-common/CHANGELOG.md index ee7f4757ee..37f15f923f 100644 --- a/packages/opentelemetry-sql-common/CHANGELOG.md +++ b/packages/opentelemetry-sql-common/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.40.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/sql-common-v0.40.0...sql-common-v0.40.1) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/sql-common-v0.39.0...sql-common-v0.40.0) (2023-07-12) diff --git a/packages/opentelemetry-sql-common/LICENSE b/packages/opentelemetry-sql-common/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/packages/opentelemetry-sql-common/LICENSE +++ b/packages/opentelemetry-sql-common/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/opentelemetry-sql-common/package.json b/packages/opentelemetry-sql-common/package.json index 61b79c6ddc..f4ba7ad04a 100644 --- a/packages/opentelemetry-sql-common/package.json +++ b/packages/opentelemetry-sql-common/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sql-common", - "version": "0.40.0", + "version": "0.40.1", "description": "Utilities for SQL instrumentations", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/packages/opentelemetry-test-utils/CHANGELOG.md b/packages/opentelemetry-test-utils/CHANGELOG.md index 1630f64d7c..84094633e1 100644 --- a/packages/opentelemetry-test-utils/CHANGELOG.md +++ b/packages/opentelemetry-test-utils/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/contrib-test-utils-v0.38.0...contrib-test-utils-v0.39.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/packages/opentelemetry-test-utils/LICENSE b/packages/opentelemetry-test-utils/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/packages/opentelemetry-test-utils/LICENSE +++ b/packages/opentelemetry-test-utils/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/opentelemetry-test-utils/package.json b/packages/opentelemetry-test-utils/package.json index 0b77a8acbf..fe0b7c28f7 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.38.0", + "version": "0.39.0", "description": "Test utilities for opentelemetry components", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,9 +46,9 @@ "dependencies": { "@opentelemetry/core": "^1.0.0", "@opentelemetry/exporter-jaeger": "^1.3.1", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/resources": "^1.8.0", - "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/sdk-node": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0" diff --git a/packages/opentelemetry-test-utils/src/test-utils.ts b/packages/opentelemetry-test-utils/src/test-utils.ts index 0020e043fd..aae38f160a 100644 --- a/packages/opentelemetry-test-utils/src/test-utils.ts +++ b/packages/opentelemetry-test-utils/src/test-utils.ts @@ -40,7 +40,7 @@ const dockerRunCmds = { mysql: 'docker run --rm -d --name otel-mysql -p 33306:3306 -e MYSQL_ROOT_PASSWORD=rootpw -e MYSQL_DATABASE=test_db -e MYSQL_USER=otel -e MYSQL_PASSWORD=secret mysql:5.7 --log_output=TABLE --general_log=ON', postgres: - 'docker run --rm -d --name otel-postgres -p 54320:5432 -e POSTGRES_PASSWORD=postgres postgres:15-alpine', + 'docker run --rm -d --name otel-postgres -p 54320:5432 -e POSTGRES_PASSWORD=postgres postgres:16-alpine', redis: 'docker run --rm -d --name otel-redis -p 63790:6379 redis:alpine', }; diff --git a/packages/winston-transport/CHANGELOG.md b/packages/winston-transport/CHANGELOG.md index e287c877ec..bea588b601 100644 --- a/packages/winston-transport/CHANGELOG.md +++ b/packages/winston-transport/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.3.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/winston-transport-v0.2.0...winston-transport-v0.3.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* **instrumentation-winston:** Allow log level to be configured for log sending ([#2016](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2016)) ([b903bce](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/b903bce15d6ba4fa44daeaf6785abd6ed94cb5ff)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) +* **winston-transport:** Typescript issue with OpenTelemetryTransportV3 not assignable to TransportStream ([#2079](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2079)) ([b006f7f](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/b006f7f4ce466611e437240508b9bc4deb622175)), closes [#2015](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2015) + ## [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) diff --git a/packages/winston-transport/LICENSE b/packages/winston-transport/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/packages/winston-transport/LICENSE +++ b/packages/winston-transport/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/packages/winston-transport/package.json b/packages/winston-transport/package.json index 485dfea31e..f5dc513e8a 100644 --- a/packages/winston-transport/package.json +++ b/packages/winston-transport/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/winston-transport", - "version": "0.2.0", + "version": "0.3.0", "description": "OpenTelemetry Transport for winston", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,7 +50,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/api-logs": "^0.50.0", + "@opentelemetry/api-logs": "^0.51.0", "winston-transport": "4.*" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/winston-transport#readme" diff --git a/packages/winston-transport/src/OpenTelemetryTransportV3.ts b/packages/winston-transport/src/OpenTelemetryTransportV3.ts index fe759676e9..a7e164adce 100644 --- a/packages/winston-transport/src/OpenTelemetryTransportV3.ts +++ b/packages/winston-transport/src/OpenTelemetryTransportV3.ts @@ -27,17 +27,15 @@ export class OpenTelemetryTransportV3 extends TransportStream { this._logger = logs.getLogger('@opentelemetry/winston-transport', VERSION); } - public override log(info: any, next: () => void) { + public override log(info: any, callback: () => void) { try { emitLogRecord(info, this._logger); } catch (error) { this.emit('warn', error); } - setImmediate(() => { - this.emit('logged', info); - }); - if (next) { - setImmediate(next); + this.emit('logged', info); + if (callback) { + callback(); } } } diff --git a/plugins/node/instrumentation-amqplib/CHANGELOG.md b/plugins/node/instrumentation-amqplib/CHANGELOG.md index 2a1d51fd81..abe7b56fcc 100644 --- a/plugins/node/instrumentation-amqplib/CHANGELOG.md +++ b/plugins/node/instrumentation-amqplib/CHANGELOG.md @@ -6,6 +6,26 @@ * 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-amqplib-v0.36.0...instrumentation-amqplib-v0.37.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/instrumentation-amqplib/LICENSE b/plugins/node/instrumentation-amqplib/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/instrumentation-amqplib/LICENSE +++ b/plugins/node/instrumentation-amqplib/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/instrumentation-amqplib/README.md b/plugins/node/instrumentation-amqplib/README.md index 3e931474ef..5d4933db7e 100644 --- a/plugins/node/instrumentation-amqplib/README.md +++ b/plugins/node/instrumentation-amqplib/README.md @@ -81,6 +81,27 @@ The instrumentation's config `publishHook`, `publishConfirmHook`, `consumeHook` The `moduleVersionAttributeName` config option is removed. To add the amqplib package version to spans, use the `moduleVersion` attribute in hook info for `publishHook` and `consumeHook` functions. +## 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 | +| -------------------------------- | ---------------------------------------------------------------------- | +| `messaging.destination` | The message destination name. | +| `messaging.destination_kind` | The kind of message destination. | +| `messaging.rabbitmq.routing_key` | RabbitMQ message routing key. | +| `messaging.operation` | A string identifying the kind of message consumption. | +| `messaging.message_id` | A value used by the messaging system as an identifier for the message. | +| `messaging.conversation_id` | The ID identifying the conversation to which the message belongs. | +| `messaging.protocol` | The name of the transport protocol. | +| `messaging.protocol_version` | The version of the transport protocol. | +| `messaging.system` | A string identifying the messaging system. | +| `messaging.url` | The connection string. | +| `net.peer.name` | Remote hostname or similar. | +| `net.peer.port` | Remote port number. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/instrumentation-amqplib/package.json b/plugins/node/instrumentation-amqplib/package.json index 00d8c4fc34..6634aad6bd 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.36.0", + "version": "0.37.0", "description": "OpenTelemetry automatic instrumentation for the `amqplib` package", "keywords": [ "amqplib", @@ -45,12 +45,12 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/amqplib": "^0.5.17", "@types/lodash": "4.14.199", "@types/mocha": "8.2.3", diff --git a/plugins/node/instrumentation-amqplib/src/amqplib.ts b/plugins/node/instrumentation-amqplib/src/amqplib.ts index 17fd6e20b6..c81e2b51a3 100644 --- a/plugins/node/instrumentation-amqplib/src/amqplib.ts +++ b/plugins/node/instrumentation-amqplib/src/amqplib.ts @@ -36,9 +36,14 @@ import { safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; import { - SemanticAttributes, - MessagingOperationValues, - MessagingDestinationKindValues, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY, + SEMATTRS_MESSAGING_OPERATION, + MESSAGINGOPERATIONVALUES_PROCESS, + SEMATTRS_MESSAGING_MESSAGE_ID, + SEMATTRS_MESSAGING_CONVERSATION_ID, } from '@opentelemetry/semantic-conventions'; import type { Connection, @@ -72,7 +77,7 @@ import { VERSION } from './version'; export class AmqplibInstrumentation extends InstrumentationBase { protected override _config!: AmqplibInstrumentationConfig; - constructor(config?: AmqplibInstrumentationConfig) { + constructor(config: AmqplibInstrumentationConfig = {}) { super( '@opentelemetry/instrumentation-amqplib', VERSION, @@ -415,16 +420,13 @@ export class AmqplibInstrumentation extends InstrumentationBase { kind: SpanKind.CONSUMER, attributes: { ...channel?.connection?.[CONNECTION_ATTRIBUTES], - [SemanticAttributes.MESSAGING_DESTINATION]: exchange, - [SemanticAttributes.MESSAGING_DESTINATION_KIND]: - MessagingDestinationKindValues.TOPIC, - [SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY]: - msg.fields?.routingKey, - [SemanticAttributes.MESSAGING_OPERATION]: - MessagingOperationValues.PROCESS, - [SemanticAttributes.MESSAGING_MESSAGE_ID]: - msg?.properties.messageId, - [SemanticAttributes.MESSAGING_CONVERSATION_ID]: + [SEMATTRS_MESSAGING_DESTINATION]: exchange, + [SEMATTRS_MESSAGING_DESTINATION_KIND]: + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + [SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY]: msg.fields?.routingKey, + [SEMATTRS_MESSAGING_OPERATION]: MESSAGINGOPERATIONVALUES_PROCESS, + [SEMATTRS_MESSAGING_MESSAGE_ID]: msg?.properties.messageId, + [SEMATTRS_MESSAGING_CONVERSATION_ID]: msg?.properties.correlationId, }, }, @@ -636,13 +638,12 @@ export class AmqplibInstrumentation extends InstrumentationBase { kind: SpanKind.PRODUCER, attributes: { ...channel.connection[CONNECTION_ATTRIBUTES], - [SemanticAttributes.MESSAGING_DESTINATION]: exchange, - [SemanticAttributes.MESSAGING_DESTINATION_KIND]: - MessagingDestinationKindValues.TOPIC, - [SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY]: routingKey, - [SemanticAttributes.MESSAGING_MESSAGE_ID]: options?.messageId, - [SemanticAttributes.MESSAGING_CONVERSATION_ID]: - options?.correlationId, + [SEMATTRS_MESSAGING_DESTINATION]: exchange, + [SEMATTRS_MESSAGING_DESTINATION_KIND]: + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + [SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY]: routingKey, + [SEMATTRS_MESSAGING_MESSAGE_ID]: options?.messageId, + [SEMATTRS_MESSAGING_CONVERSATION_ID]: options?.correlationId, }, } ); diff --git a/plugins/node/instrumentation-amqplib/src/utils.ts b/plugins/node/instrumentation-amqplib/src/utils.ts index d690e75bd7..2f0db1ad62 100644 --- a/plugins/node/instrumentation-amqplib/src/utils.ts +++ b/plugins/node/instrumentation-amqplib/src/utils.ts @@ -19,10 +19,17 @@ import { diag, HrTime, Span, - SpanAttributes, - SpanAttributeValue, + Attributes, + AttributeValue, } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL_VERSION, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; import type * as amqp from 'amqplib'; export const MESSAGE_STORED_SPAN: unique symbol = Symbol( @@ -41,9 +48,9 @@ export const CONNECTION_ATTRIBUTES: unique symbol = Symbol( export type InstrumentationPublishChannel = ( | amqp.Channel | amqp.ConfirmChannel -) & { connection: { [CONNECTION_ATTRIBUTES]: SpanAttributes } }; +) & { connection: { [CONNECTION_ATTRIBUTES]: Attributes } }; export type InstrumentationConsumeChannel = amqp.Channel & { - connection: { [CONNECTION_ATTRIBUTES]: SpanAttributes }; + connection: { [CONNECTION_ATTRIBUTES]: Attributes }; [CHANNEL_SPANS_NOT_ENDED]?: { msg: amqp.ConsumeMessage; timeOfConsume: HrTime; @@ -93,9 +100,9 @@ const getHostname = (hostnameFromUrl: string | undefined): string => { const extractConnectionAttributeOrLog = ( url: string | amqp.Options.Connect, attributeKey: string, - attributeValue: SpanAttributeValue, + attributeValue: AttributeValue, nameForLog: string -): SpanAttributes => { +): Attributes => { if (attributeValue) { return { [attributeKey]: attributeValue }; } else { @@ -111,11 +118,11 @@ const extractConnectionAttributeOrLog = ( export const getConnectionAttributesFromServer = ( conn: amqp.Connection['connection'] -): SpanAttributes => { +): Attributes => { const product = conn.serverProperties.product?.toLowerCase?.(); if (product) { return { - [SemanticAttributes.MESSAGING_SYSTEM]: product, + [SEMATTRS_MESSAGING_SYSTEM]: product, }; } else { return {}; @@ -124,9 +131,9 @@ export const getConnectionAttributesFromServer = ( export const getConnectionAttributesFromUrl = ( url: string | amqp.Options.Connect -): SpanAttributes => { - const attributes: SpanAttributes = { - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', // this is the only protocol supported by the instrumented library +): Attributes => { + const attributes: Attributes = { + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', // this is the only protocol supported by the instrumented library }; url = url || 'amqp://localhost'; @@ -137,7 +144,7 @@ export const getConnectionAttributesFromUrl = ( Object.assign(attributes, { ...extractConnectionAttributeOrLog( url, - SemanticAttributes.MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL, protocol, 'protocol' ), @@ -147,7 +154,7 @@ export const getConnectionAttributesFromUrl = ( Object.assign(attributes, { ...extractConnectionAttributeOrLog( url, - SemanticAttributes.NET_PEER_NAME, + SEMATTRS_NET_PEER_NAME, hostname, 'hostname' ), @@ -157,14 +164,14 @@ export const getConnectionAttributesFromUrl = ( Object.assign(attributes, { ...extractConnectionAttributeOrLog( url, - SemanticAttributes.NET_PEER_PORT, + SEMATTRS_NET_PEER_PORT, port, 'port' ), }); } else { const censoredUrl = censorPassword(url); - attributes[SemanticAttributes.MESSAGING_URL] = censoredUrl; + attributes[SEMATTRS_MESSAGING_URL] = censoredUrl; try { const urlParts = new URL(censoredUrl); @@ -172,7 +179,7 @@ export const getConnectionAttributesFromUrl = ( Object.assign(attributes, { ...extractConnectionAttributeOrLog( censoredUrl, - SemanticAttributes.MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL, protocol, 'protocol' ), @@ -182,7 +189,7 @@ export const getConnectionAttributesFromUrl = ( Object.assign(attributes, { ...extractConnectionAttributeOrLog( censoredUrl, - SemanticAttributes.NET_PEER_NAME, + SEMATTRS_NET_PEER_NAME, hostname, 'hostname' ), @@ -195,7 +202,7 @@ export const getConnectionAttributesFromUrl = ( Object.assign(attributes, { ...extractConnectionAttributeOrLog( censoredUrl, - SemanticAttributes.NET_PEER_PORT, + SEMATTRS_NET_PEER_PORT, port, 'port' ), diff --git a/plugins/node/instrumentation-amqplib/test/amqplib-callbacks.test.ts b/plugins/node/instrumentation-amqplib/test/amqplib-callbacks.test.ts index 9f2ab1d81e..533b5d9942 100644 --- a/plugins/node/instrumentation-amqplib/test/amqplib-callbacks.test.ts +++ b/plugins/node/instrumentation-amqplib/test/amqplib-callbacks.test.ts @@ -25,8 +25,16 @@ registerInstrumentationTesting(new AmqplibInstrumentation()); import * as amqpCallback from 'amqplib/callback_api'; import { - MessagingDestinationKindValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL_VERSION, + SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import { Baggage, context, propagation, SpanKind } from '@opentelemetry/api'; import { asyncConfirmSend, asyncConsume, shouldTest } from './utils'; @@ -127,67 +135,63 @@ describe('amqplib instrumentation callback model', () => { // assert publish span expect(publishSpan.kind).toEqual(SpanKind.PRODUCER); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '' + ); // according to spec: "This will be an empty string if the default exchange is used" expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + publishSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_URL] - ).toEqual(censoredUrl); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_NAME] - ).toEqual(TEST_RABBITMQ_HOST); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_PORT] - ).toEqual(TEST_RABBITMQ_PORT); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( + censoredUrl + ); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( + TEST_RABBITMQ_HOST + ); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( + TEST_RABBITMQ_PORT + ); // assert consume span expect(consumeSpan.kind).toEqual(SpanKind.CONSUMER); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '' + ); // according to spec: "This will be an empty string if the default exchange is used" expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + consumeSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_URL] - ).toEqual(censoredUrl); - expect( - consumeSpan.attributes[SemanticAttributes.NET_PEER_NAME] - ).toEqual(TEST_RABBITMQ_HOST); - expect( - consumeSpan.attributes[SemanticAttributes.NET_PEER_PORT] - ).toEqual(TEST_RABBITMQ_PORT); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( + censoredUrl + ); + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( + TEST_RABBITMQ_HOST + ); + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( + TEST_RABBITMQ_PORT + ); // assert context propagation expect(consumeSpan.spanContext().traceId).toEqual( @@ -301,75 +305,63 @@ describe('amqplib instrumentation callback model', () => { // assert publish span expect(publishSpan.kind).toEqual(SpanKind.PRODUCER); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] + publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION] ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_DESTINATION_KIND - ] - ).toEqual(MessagingDestinationKindValues.TOPIC); + publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + publishSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_PROTOCOL_VERSION - ] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_URL] - ).toEqual(censoredUrl); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_NAME] - ).toEqual(TEST_RABBITMQ_HOST); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_PORT] - ).toEqual(TEST_RABBITMQ_PORT); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( + censoredUrl + ); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( + TEST_RABBITMQ_HOST + ); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( + TEST_RABBITMQ_PORT + ); // assert consume span expect(consumeSpan.kind).toEqual(SpanKind.CONSUMER); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] + consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION] ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_DESTINATION_KIND - ] - ).toEqual(MessagingDestinationKindValues.TOPIC); + consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + consumeSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_PROTOCOL_VERSION - ] + consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_URL] - ).toEqual(censoredUrl); - expect( - consumeSpan.attributes[SemanticAttributes.NET_PEER_NAME] - ).toEqual(TEST_RABBITMQ_HOST); - expect( - consumeSpan.attributes[SemanticAttributes.NET_PEER_PORT] - ).toEqual(TEST_RABBITMQ_PORT); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( + censoredUrl + ); + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( + TEST_RABBITMQ_HOST + ); + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( + TEST_RABBITMQ_PORT + ); // assert context propagation expect(consumeSpan.spanContext().traceId).toEqual( diff --git a/plugins/node/instrumentation-amqplib/test/amqplib-connection.test.ts b/plugins/node/instrumentation-amqplib/test/amqplib-connection.test.ts index 7ac3e686e5..a9f6c5526d 100644 --- a/plugins/node/instrumentation-amqplib/test/amqplib-connection.test.ts +++ b/plugins/node/instrumentation-amqplib/test/amqplib-connection.test.ts @@ -32,7 +32,14 @@ import { registerInstrumentationTesting(new AmqplibInstrumentation()); import * as amqp from 'amqplib'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL_VERSION, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; describe('amqplib instrumentation connection', () => { before(function () { @@ -60,24 +67,22 @@ describe('amqplib instrumentation connection', () => { ); const [publishSpan] = getTestSpans(); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_URL] - ).toBeUndefined(); // no url string if value supplied as object - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_NAME] - ).toEqual(TEST_RABBITMQ_HOST); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_PORT] - ).toEqual(TEST_RABBITMQ_PORT); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_URL]).toBeUndefined(); // no url string if value supplied as object + expect(publishSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( + TEST_RABBITMQ_HOST + ); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( + TEST_RABBITMQ_PORT + ); } finally { await conn.close(); } @@ -99,9 +104,9 @@ describe('amqplib instrumentation connection', () => { Buffer.from('message created only to test connection attributes') ); const [publishSpan] = getTestSpans(); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); } finally { await conn.close(); } @@ -127,9 +132,9 @@ describe('amqplib instrumentation connection', () => { Buffer.from('message created only to test connection attributes') ); const [publishSpan] = getTestSpans(); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_NAME] - ).toEqual(TEST_RABBITMQ_HOST); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( + TEST_RABBITMQ_HOST + ); } finally { await conn.close(); } @@ -149,24 +154,24 @@ describe('amqplib instrumentation connection', () => { ); const [publishSpan] = getTestSpans(); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_URL] - ).toEqual(censoredUrl); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_NAME] - ).toEqual(TEST_RABBITMQ_HOST); - expect( - publishSpan.attributes[SemanticAttributes.NET_PEER_PORT] - ).toEqual(TEST_RABBITMQ_PORT); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( + censoredUrl + ); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( + TEST_RABBITMQ_HOST + ); + expect(publishSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( + TEST_RABBITMQ_PORT + ); } finally { await conn.close(); } diff --git a/plugins/node/instrumentation-amqplib/test/amqplib-promise.test.ts b/plugins/node/instrumentation-amqplib/test/amqplib-promise.test.ts index e130f5e942..2205d76a5a 100644 --- a/plugins/node/instrumentation-amqplib/test/amqplib-promise.test.ts +++ b/plugins/node/instrumentation-amqplib/test/amqplib-promise.test.ts @@ -36,8 +36,16 @@ const instrumentation = registerInstrumentationTesting( import * as amqp from 'amqplib'; import { ConsumeMessage } from 'amqplib'; import { - MessagingDestinationKindValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL_VERSION, + SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import { Span, SpanKind, SpanStatusCode } from '@opentelemetry/api'; import { asyncConfirmPublish, asyncConfirmSend, asyncConsume } from './utils'; @@ -146,65 +154,61 @@ describe('amqplib instrumentation promise model', () => { // assert publish span expect(publishSpan.kind).toEqual(SpanKind.PRODUCER); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '' + ); // according to spec: "This will be an empty string if the default exchange is used" expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + publishSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect(publishSpan.attributes[SemanticAttributes.MESSAGING_URL]).toEqual( + expect(publishSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( censoredUrl ); - expect(publishSpan.attributes[SemanticAttributes.NET_PEER_NAME]).toEqual( + expect(publishSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( TEST_RABBITMQ_HOST ); - expect(publishSpan.attributes[SemanticAttributes.NET_PEER_PORT]).toEqual( + expect(publishSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( TEST_RABBITMQ_PORT ); // assert consume span expect(consumeSpan.kind).toEqual(SpanKind.CONSUMER); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '' + ); // according to spec: "This will be an empty string if the default exchange is used" expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + consumeSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect(consumeSpan.attributes[SemanticAttributes.MESSAGING_URL]).toEqual( + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( censoredUrl ); - expect(consumeSpan.attributes[SemanticAttributes.NET_PEER_NAME]).toEqual( + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( TEST_RABBITMQ_HOST ); - expect(consumeSpan.attributes[SemanticAttributes.NET_PEER_PORT]).toEqual( + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( TEST_RABBITMQ_PORT ); @@ -505,48 +509,44 @@ describe('amqplib instrumentation promise model', () => { // assert publish span expect(publishSpan.kind).toEqual(SpanKind.PRODUCER); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + exchangeName + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(exchangeName); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + publishSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(routingKey); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); // assert consume span expect(consumeSpan.kind).toEqual(SpanKind.CONSUMER); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + exchangeName + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(exchangeName); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + consumeSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(routingKey); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); // assert context propagation @@ -689,65 +689,61 @@ describe('amqplib instrumentation promise model', () => { // assert publish span expect(publishSpan.kind).toEqual(SpanKind.PRODUCER); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '' + ); // according to spec: "This will be an empty string if the default exchange is used" expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + publishSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect(publishSpan.attributes[SemanticAttributes.MESSAGING_URL]).toEqual( + expect(publishSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( censoredUrl ); - expect(publishSpan.attributes[SemanticAttributes.NET_PEER_NAME]).toEqual( + expect(publishSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( TEST_RABBITMQ_HOST ); - expect(publishSpan.attributes[SemanticAttributes.NET_PEER_PORT]).toEqual( + expect(publishSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( TEST_RABBITMQ_PORT ); // assert consume span expect(consumeSpan.kind).toEqual(SpanKind.CONSUMER); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '' + ); // according to spec: "This will be an empty string if the default exchange is used" expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(''); // according to spec: "This will be an empty string if the default exchange is used" - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + consumeSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(queueName); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); - expect(consumeSpan.attributes[SemanticAttributes.MESSAGING_URL]).toEqual( + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_URL]).toEqual( censoredUrl ); - expect(consumeSpan.attributes[SemanticAttributes.NET_PEER_NAME]).toEqual( + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_NAME]).toEqual( TEST_RABBITMQ_HOST ); - expect(consumeSpan.attributes[SemanticAttributes.NET_PEER_PORT]).toEqual( + expect(consumeSpan.attributes[SEMATTRS_NET_PEER_PORT]).toEqual( TEST_RABBITMQ_PORT ); @@ -1100,48 +1096,44 @@ describe('amqplib instrumentation promise model', () => { // assert publish span expect(publishSpan.kind).toEqual(SpanKind.PRODUCER); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + exchangeName + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(exchangeName); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - publishSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + publishSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(routingKey); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + publishSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); // assert consume span expect(consumeSpan.kind).toEqual(SpanKind.CONSUMER); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'rabbitmq' + ); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + exchangeName + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('rabbitmq'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual(exchangeName); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); + consumeSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] + ).toEqual(MESSAGINGDESTINATIONKINDVALUES_TOPIC); expect( - consumeSpan.attributes[ - SemanticAttributes.MESSAGING_RABBITMQ_ROUTING_KEY - ] + consumeSpan.attributes[SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY] ).toEqual(routingKey); + expect(consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL]).toEqual( + 'AMQP' + ); expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL] - ).toEqual('AMQP'); - expect( - consumeSpan.attributes[SemanticAttributes.MESSAGING_PROTOCOL_VERSION] + consumeSpan.attributes[SEMATTRS_MESSAGING_PROTOCOL_VERSION] ).toEqual('0.9.1'); // assert context propagation diff --git a/plugins/node/instrumentation-amqplib/test/utils.test.ts b/plugins/node/instrumentation-amqplib/test/utils.test.ts index 34e6fb7aa9..6369398969 100644 --- a/plugins/node/instrumentation-amqplib/test/utils.test.ts +++ b/plugins/node/instrumentation-amqplib/test/utils.test.ts @@ -19,7 +19,14 @@ import { getConnectionAttributesFromServer, getConnectionAttributesFromUrl, } from '../src/utils'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_MESSAGING_PROTOCOL, + SEMATTRS_MESSAGING_PROTOCOL_VERSION, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; import * as amqp from 'amqplib'; import { shouldTest } from './utils'; import { rabbitMqUrl } from './config'; @@ -43,7 +50,7 @@ describe('utils', () => { it('messaging system attribute', () => { const attributes = getConnectionAttributesFromServer(conn.connection); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_SYSTEM]: 'rabbitmq', + [SEMATTRS_MESSAGING_SYSTEM]: 'rabbitmq', }); }); }); @@ -54,11 +61,11 @@ describe('utils', () => { 'amqp://user:pass@host:10000/vhost' ); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: 'host', - [SemanticAttributes.NET_PEER_PORT]: 10000, - [SemanticAttributes.MESSAGING_URL]: 'amqp://user:***@host:10000/vhost', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: 'host', + [SEMATTRS_NET_PEER_PORT]: 10000, + [SEMATTRS_MESSAGING_URL]: 'amqp://user:***@host:10000/vhost', }); }); @@ -67,102 +74,101 @@ describe('utils', () => { 'amqp://user%61:%61pass@ho%61st:10000/v%2fhost' ); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: 'ho%61st', - [SemanticAttributes.NET_PEER_PORT]: 10000, - [SemanticAttributes.MESSAGING_URL]: - 'amqp://user%61:***@ho%61st:10000/v%2fhost', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: 'ho%61st', + [SEMATTRS_NET_PEER_PORT]: 10000, + [SEMATTRS_MESSAGING_URL]: 'amqp://user%61:***@ho%61st:10000/v%2fhost', }); }); it('only protocol', () => { const attributes = getConnectionAttributesFromUrl('amqp://'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: 'localhost', - [SemanticAttributes.NET_PEER_PORT]: 5672, - [SemanticAttributes.MESSAGING_URL]: 'amqp://', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: 'localhost', + [SEMATTRS_NET_PEER_PORT]: 5672, + [SEMATTRS_MESSAGING_URL]: 'amqp://', }); }); it('empty username and password', () => { const attributes = getConnectionAttributesFromUrl('amqp://:@/'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.MESSAGING_URL]: 'amqp://:***@/', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_MESSAGING_URL]: 'amqp://:***@/', }); }); it('username and no password', () => { const attributes = getConnectionAttributesFromUrl('amqp://user@'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.MESSAGING_URL]: 'amqp://user@', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_MESSAGING_URL]: 'amqp://user@', }); }); it('username and password, no host', () => { const attributes = getConnectionAttributesFromUrl('amqp://user:pass@'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.MESSAGING_URL]: 'amqp://user:***@', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_MESSAGING_URL]: 'amqp://user:***@', }); }); it('host only', () => { const attributes = getConnectionAttributesFromUrl('amqp://host'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: 'host', - [SemanticAttributes.NET_PEER_PORT]: 5672, - [SemanticAttributes.MESSAGING_URL]: 'amqp://host', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: 'host', + [SEMATTRS_NET_PEER_PORT]: 5672, + [SEMATTRS_MESSAGING_URL]: 'amqp://host', }); }); it('vhost only', () => { const attributes = getConnectionAttributesFromUrl('amqp:///vhost'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: 'localhost', - [SemanticAttributes.NET_PEER_PORT]: 5672, - [SemanticAttributes.MESSAGING_URL]: 'amqp:///vhost', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: 'localhost', + [SEMATTRS_NET_PEER_PORT]: 5672, + [SEMATTRS_MESSAGING_URL]: 'amqp:///vhost', }); }); it('host only, trailing slash', () => { const attributes = getConnectionAttributesFromUrl('amqp://host/'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: 'host', - [SemanticAttributes.NET_PEER_PORT]: 5672, - [SemanticAttributes.MESSAGING_URL]: 'amqp://host/', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: 'host', + [SEMATTRS_NET_PEER_PORT]: 5672, + [SEMATTRS_MESSAGING_URL]: 'amqp://host/', }); }); it('vhost encoded', () => { const attributes = getConnectionAttributesFromUrl('amqp://host/%2f'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: 'host', - [SemanticAttributes.NET_PEER_PORT]: 5672, - [SemanticAttributes.MESSAGING_URL]: 'amqp://host/%2f', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: 'host', + [SEMATTRS_NET_PEER_PORT]: 5672, + [SEMATTRS_MESSAGING_URL]: 'amqp://host/%2f', }); }); it('IPv6 host', () => { const attributes = getConnectionAttributesFromUrl('amqp://[::1]'); expect(attributes).toStrictEqual({ - [SemanticAttributes.MESSAGING_PROTOCOL]: 'AMQP', - [SemanticAttributes.MESSAGING_PROTOCOL_VERSION]: '0.9.1', - [SemanticAttributes.NET_PEER_NAME]: '[::1]', - [SemanticAttributes.NET_PEER_PORT]: 5672, - [SemanticAttributes.MESSAGING_URL]: 'amqp://[::1]', + [SEMATTRS_MESSAGING_PROTOCOL]: 'AMQP', + [SEMATTRS_MESSAGING_PROTOCOL_VERSION]: '0.9.1', + [SEMATTRS_NET_PEER_NAME]: '[::1]', + [SEMATTRS_NET_PEER_PORT]: 5672, + [SEMATTRS_MESSAGING_URL]: 'amqp://[::1]', }); }); }); diff --git a/plugins/node/instrumentation-cucumber/CHANGELOG.md b/plugins/node/instrumentation-cucumber/CHANGELOG.md index 62cbee59f7..40c95823b6 100644 --- a/plugins/node/instrumentation-cucumber/CHANGELOG.md +++ b/plugins/node/instrumentation-cucumber/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.6.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-cucumber-v0.5.0...instrumentation-cucumber-v0.6.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/instrumentation-cucumber/LICENSE b/plugins/node/instrumentation-cucumber/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/instrumentation-cucumber/LICENSE +++ b/plugins/node/instrumentation-cucumber/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/instrumentation-cucumber/README.md b/plugins/node/instrumentation-cucumber/README.md index c3fd434353..acc5466c36 100644 --- a/plugins/node/instrumentation-cucumber/README.md +++ b/plugins/node/instrumentation-cucumber/README.md @@ -43,6 +43,19 @@ Cucumber instrumentation has currently no options. | Options | Type | Description | | ------- | ---- | ----------- | +## 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 | +| ---------------- | -------------------------------------------------------------------------------- | +| `code.filepath` | The source code file name that identifies the code unit as uniquely as possible. | +| `code.function` | The method or function name, or equivalent. | +| `code.lineno` | The line number in `code.filepath` best representing the operation. | +| `code.namespace` | The "namespace" within which `code.function` is defined. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/instrumentation-cucumber/package.json b/plugins/node/instrumentation-cucumber/package.json index 0fce8819e6..ee4b117fd0 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.5.0", + "version": "0.6.0", "description": "OpenTelemetry cucumber automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -62,8 +62,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-cucumber#readme" } diff --git a/plugins/node/instrumentation-cucumber/src/instrumentation.ts b/plugins/node/instrumentation-cucumber/src/instrumentation.ts index 5ea3305db2..255b2a297c 100644 --- a/plugins/node/instrumentation-cucumber/src/instrumentation.ts +++ b/plugins/node/instrumentation-cucumber/src/instrumentation.ts @@ -21,7 +21,12 @@ import { InstrumentationNodeModuleFile, isWrapped, } from '@opentelemetry/instrumentation'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_CODE_FILEPATH, + SEMATTRS_CODE_FUNCTION, + SEMATTRS_CODE_LINENO, + SEMATTRS_CODE_NAMESPACE, +} from '@opentelemetry/semantic-conventions'; import type * as cucumber from '@cucumber/cucumber'; import type * as messages from '@cucumber/messages'; @@ -48,15 +53,12 @@ export class CucumberInstrumentation extends InstrumentationBase { super('@opentelemetry/instrumentation-cucumber', VERSION, config); } - init(): InstrumentationNodeModuleDefinition[] { + init(): InstrumentationNodeModuleDefinition[] { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( '@cucumber/cucumber', ['^8.0.0', '^9.0.0', '^10.0.0'], - (moduleExports, moduleVersion) => { - this._diag.debug( - `Applying patch for @cucumber/cucumber@${moduleVersion}` - ); + (moduleExports: Cucumber) => { this.module = moduleExports; steps.forEach(step => { if (isWrapped(moduleExports[step])) { @@ -72,25 +74,17 @@ export class CucumberInstrumentation extends InstrumentationBase { }); return moduleExports; }, - (moduleExports, moduleVersion) => { + (moduleExports: Cucumber) => { if (moduleExports === undefined) return; - this._diag.debug( - `Removing patch for @cucumber/cucumber@${moduleVersion}` - ); [...hooks, ...steps].forEach(method => { this._unwrap(moduleExports, method); }); }, [ - new InstrumentationNodeModuleFile<{ - default: { new (): TestCaseRunner; prototype: TestCaseRunner }; - }>( + new InstrumentationNodeModuleFile( '@cucumber/cucumber/lib/runtime/test_case_runner.js', ['^8.0.0', '^9.0.0', '^10.0.0'], - (moduleExports, moduleVersion) => { - this._diag.debug( - `Applying patch for @cucumber/cucumber/lib/runtime/test_case_runner.js@${moduleVersion}` - ); + moduleExports => { if (isWrapped(moduleExports.default.prototype.run)) { this._unwrap(moduleExports.default.prototype, 'run'); this._unwrap(moduleExports.default.prototype, 'runStep'); @@ -117,11 +111,8 @@ export class CucumberInstrumentation extends InstrumentationBase { } return moduleExports; }, - (moduleExports, moduleVersion) => { + moduleExports => { if (moduleExports === undefined) return; - this._diag.debug( - `Removing patch for @cucumber/cucumber/lib/runtime/test_case_runner.js@${moduleVersion}` - ); this._unwrap(moduleExports.default.prototype, 'run'); this._unwrap(moduleExports.default.prototype, 'runStep'); if ('runAttempt' in moduleExports.default.prototype) { @@ -188,10 +179,10 @@ export class CucumberInstrumentation extends InstrumentationBase { { kind: SpanKind.CLIENT, attributes: { - [SemanticAttributes.CODE_FILEPATH]: gherkinDocument.uri, - [SemanticAttributes.CODE_LINENO]: scenario.location.line, - [SemanticAttributes.CODE_FUNCTION]: scenario.name, - [SemanticAttributes.CODE_NAMESPACE]: feature.name, + [SEMATTRS_CODE_FILEPATH]: gherkinDocument.uri, + [SEMATTRS_CODE_LINENO]: scenario.location.line, + [SEMATTRS_CODE_FUNCTION]: scenario.name, + [SEMATTRS_CODE_NAMESPACE]: feature.name, [AttributeNames.FEATURE_TAGS]: CucumberInstrumentation.mapTags( feature.tags ), diff --git a/plugins/node/instrumentation-cucumber/test/cucumber.test.ts b/plugins/node/instrumentation-cucumber/test/cucumber.test.ts index 87679cb7bd..deffbef31d 100644 --- a/plugins/node/instrumentation-cucumber/test/cucumber.test.ts +++ b/plugins/node/instrumentation-cucumber/test/cucumber.test.ts @@ -21,9 +21,14 @@ import { InMemorySpanExporter, SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_CODE_FILEPATH, + SEMATTRS_CODE_FUNCTION, + SEMATTRS_CODE_LINENO, + SEMATTRS_CODE_NAMESPACE, + SEMRESATTRS_SERVICE_NAME, +} from '@opentelemetry/semantic-conventions'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import * as path from 'path'; import * as assert from 'assert'; @@ -50,7 +55,7 @@ import { PassThrough } from 'stream'; describe('CucumberInstrumentation', () => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'CucumberInstrumentation', + [SEMRESATTRS_SERVICE_NAME]: 'CucumberInstrumentation', }), }); const memoryExporter = new InMemorySpanExporter(); @@ -165,10 +170,10 @@ describe('CucumberInstrumentation', () => { assert(parent, 'Expected a parent span'); assert.deepEqual(parent.attributes, { - [SemanticAttributes.CODE_FILEPATH]: 'test/current.feature', - [SemanticAttributes.CODE_LINENO]: 7, - [SemanticAttributes.CODE_FUNCTION]: 'Button pushing', - [SemanticAttributes.CODE_NAMESPACE]: 'Basic', + [SEMATTRS_CODE_FILEPATH]: 'test/current.feature', + [SEMATTRS_CODE_LINENO]: 7, + [SEMATTRS_CODE_FUNCTION]: 'Button pushing', + [SEMATTRS_CODE_NAMESPACE]: 'Basic', [AttributeNames.FEATURE_DESCRIPTION]: ' A very basic feature file with a single scenario', [AttributeNames.FEATURE_LANGUAGE]: 'en', diff --git a/plugins/node/instrumentation-cucumber/tsconfig.json b/plugins/node/instrumentation-cucumber/tsconfig.json index 568e7bb7cb..c87523782b 100644 --- a/plugins/node/instrumentation-cucumber/tsconfig.json +++ b/plugins/node/instrumentation-cucumber/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../../tsconfig.base", "compilerOptions": { "rootDir": ".", - "outDir": "build", - "skipLibCheck": true + "outDir": "build" }, "include": ["src/**/*.ts", "test/**/*.ts"] } diff --git a/plugins/node/instrumentation-dataloader/CHANGELOG.md b/plugins/node/instrumentation-dataloader/CHANGELOG.md index 54109c971e..6e198608a3 100644 --- a/plugins/node/instrumentation-dataloader/CHANGELOG.md +++ b/plugins/node/instrumentation-dataloader/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.9.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-dataloader-v0.8.0...instrumentation-dataloader-v0.9.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/instrumentation-dataloader/LICENSE b/plugins/node/instrumentation-dataloader/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/instrumentation-dataloader/LICENSE +++ b/plugins/node/instrumentation-dataloader/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/instrumentation-dataloader/package.json b/plugins/node/instrumentation-dataloader/package.json index b9e234c949..5a4ef1ea76 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.8.0", + "version": "0.9.0", "description": "OpenTelemetry instrumentation for dataloader", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -58,7 +58,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-dataloader#readme" } diff --git a/plugins/node/instrumentation-dataloader/src/instrumentation.ts b/plugins/node/instrumentation-dataloader/src/instrumentation.ts index 7264d031ae..adabc3c36d 100644 --- a/plugins/node/instrumentation-dataloader/src/instrumentation.ts +++ b/plugins/node/instrumentation-dataloader/src/instrumentation.ts @@ -20,7 +20,6 @@ import { isWrapped, } from '@opentelemetry/instrumentation'; import { - diag, trace, context, Link, @@ -51,20 +50,16 @@ export class DataloaderInstrumentation extends InstrumentationBase { protected init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( MODULE_NAME, ['^2.0.0'], - (dataloader, moduleVersion) => { - diag.debug(`Applying patch for ${MODULE_NAME}@${moduleVersion}`); - + dataloader => { this._patchLoad(dataloader.prototype); this._patchLoadMany(dataloader.prototype); return this._getPatchedConstructor(dataloader); }, - (dataloader, moduleVersion) => { - diag.debug(`Removing patch for ${MODULE_NAME}@${moduleVersion}`); - + dataloader => { if (isWrapped(dataloader.prototype.load)) { this._unwrap(dataloader.prototype, 'load'); } @@ -73,8 +68,7 @@ export class DataloaderInstrumentation extends InstrumentationBase { this._unwrap(dataloader.prototype, 'loadMany'); } } - // cast it to module definition of unknown type to avoid exposing Dataloader types on public APIs - ) as InstrumentationNodeModuleDefinition, + ) as InstrumentationNodeModuleDefinition, ]; } @@ -82,7 +76,7 @@ export class DataloaderInstrumentation extends InstrumentationBase { return this._config; } - override setConfig(config: DataloaderInstrumentationConfig) { + override setConfig(config: DataloaderInstrumentationConfig = {}) { this._config = config; } diff --git a/plugins/node/instrumentation-fs/CHANGELOG.md b/plugins/node/instrumentation-fs/CHANGELOG.md index e16b52dfbb..b77f34b167 100644 --- a/plugins/node/instrumentation-fs/CHANGELOG.md +++ b/plugins/node/instrumentation-fs/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.12.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-fs-v0.11.0...instrumentation-fs-v0.12.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + ## [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) diff --git a/plugins/node/instrumentation-fs/package.json b/plugins/node/instrumentation-fs/package.json index 2c41acd685..3d41437cbb 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.11.0", + "version": "0.12.0", "description": "OpenTelemetry automatic instrumentation package for fs", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -59,8 +59,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-fs#readme" } diff --git a/plugins/node/instrumentation-fs/src/instrumentation.ts b/plugins/node/instrumentation-fs/src/instrumentation.ts index 048b8d7b34..08490f496b 100644 --- a/plugins/node/instrumentation-fs/src/instrumentation.ts +++ b/plugins/node/instrumentation-fs/src/instrumentation.ts @@ -51,21 +51,20 @@ function patchedFunctionWithOriginalProperties< return Object.assign(patchedFunction, original); } -export default class FsInstrumentation extends InstrumentationBase { - constructor(config?: FsInstrumentationConfig) { +export default class FsInstrumentation extends InstrumentationBase { + constructor(config: FsInstrumentationConfig = {}) { super('@opentelemetry/instrumentation-fs', VERSION, config); } init(): ( - | InstrumentationNodeModuleDefinition - | InstrumentationNodeModuleDefinition + | InstrumentationNodeModuleDefinition + | InstrumentationNodeModuleDefinition )[] { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'fs', ['*'], (fs: FS) => { - this._diag.debug('Applying patch for fs'); for (const fName of SYNC_FUNCTIONS) { const { objectToPatch, functionNameToPatch } = indexFs(fs, fName); @@ -113,7 +112,6 @@ export default class FsInstrumentation extends InstrumentationBase { }, (fs: FS) => { if (fs === undefined) return; - this._diag.debug('Removing patch for fs'); for (const fName of SYNC_FUNCTIONS) { const { objectToPatch, functionNameToPatch } = indexFs(fs, fName); if (isWrapped(objectToPatch[functionNameToPatch])) { @@ -133,11 +131,10 @@ export default class FsInstrumentation extends InstrumentationBase { } } ), - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'fs/promises', ['*'], (fsPromises: FSPromises) => { - this._diag.debug('Applying patch for fs/promises'); for (const fName of PROMISE_FUNCTIONS) { if (isWrapped(fsPromises[fName])) { this._unwrap(fsPromises, fName); @@ -152,7 +149,6 @@ export default class FsInstrumentation extends InstrumentationBase { }, (fsPromises: FSPromises) => { if (fsPromises === undefined) return; - this._diag.debug('Removing patch for fs/promises'); for (const fName of PROMISE_FUNCTIONS) { if (isWrapped(fsPromises[fName])) { this._unwrap(fsPromises, fName); diff --git a/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md b/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md index 94ca8ba5f2..0894302e84 100644 --- a/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md +++ b/plugins/node/instrumentation-lru-memoizer/CHANGELOG.md @@ -6,6 +6,26 @@ * 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-lru-memoizer-v0.36.0...instrumentation-lru-memoizer-v0.37.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/instrumentation-lru-memoizer/LICENSE b/plugins/node/instrumentation-lru-memoizer/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/instrumentation-lru-memoizer/LICENSE +++ b/plugins/node/instrumentation-lru-memoizer/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/instrumentation-lru-memoizer/package.json b/plugins/node/instrumentation-lru-memoizer/package.json index 25e412b828..da739ec93e 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.36.0", + "version": "0.37.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@types/lru-cache": "7.10.9", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -57,7 +57,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-lru-memoizer#readme" } diff --git a/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts b/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts index b26d9468a3..09112043d2 100644 --- a/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts +++ b/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts @@ -23,18 +23,16 @@ import { import { VERSION } from './version'; export default class LruMemoizerInstrumentation extends InstrumentationBase { - constructor(config?: InstrumentationConfig) { + constructor(config: InstrumentationConfig = {}) { super('@opentelemetry/instrumentation-lru-memoizer', VERSION, config); } - init(): InstrumentationNodeModuleDefinition[] { + init(): InstrumentationNodeModuleDefinition[] { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'lru-memoizer', ['>=1.3 <3'], moduleExports => { - this._diag.debug('applying patch for lru-memoizer'); - // moduleExports is a function which receives an options object, // and returns a "memoizer" function upon invocation. // We want to patch this "memoizer's" internal function diff --git a/plugins/node/instrumentation-mongoose/CHANGELOG.md b/plugins/node/instrumentation-mongoose/CHANGELOG.md index a3bbb65de2..3ecd94b550 100644 --- a/plugins/node/instrumentation-mongoose/CHANGELOG.md +++ b/plugins/node/instrumentation-mongoose/CHANGELOG.md @@ -6,6 +6,33 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.38.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mongoose-v0.38.0...instrumentation-mongoose-v0.38.1) (2024-05-02) + + +### Bug Fixes + +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mongoose-v0.37.0...instrumentation-mongoose-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/instrumentation-mongoose/LICENSE b/plugins/node/instrumentation-mongoose/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/instrumentation-mongoose/LICENSE +++ b/plugins/node/instrumentation-mongoose/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/instrumentation-mongoose/README.md b/plugins/node/instrumentation-mongoose/README.md index 22a600e07e..159e01568b 100644 --- a/plugins/node/instrumentation-mongoose/README.md +++ b/plugins/node/instrumentation-mongoose/README.md @@ -52,6 +52,23 @@ The instrumentation's config `responseHook` functions signature changed, so the The `moduleVersionAttributeName` config option is removed. To add the mongoose package version to spans, use the `moduleVersion` attribute in hook info for `responseHook` function. +## 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 | +| ----------------------- | --------------------------------------------------------------------------- | +| `db.mongodb.collection` | The collection being accessed within the database stated in `db.name`. | +| `db.name` | This attribute is used to report the name of the database being accessed. | +| `db.operation` | The name of the operation being executed, or the SQL keyword. | +| `db.statement` | The database statement being executed. | +| `db.system` | An identifier for the database management system (DBMS) product being used. | +| `db.user` | Username for accessing the database. | +| `net.peer.name` | Remote hostname or similar. | +| `net.peer.port` | Remote port number. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/instrumentation-mongoose/package.json b/plugins/node/instrumentation-mongoose/package.json index 1a3d149543..e67c4b4aa5 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.37.0", + "version": "0.38.1", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -61,8 +61,8 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-mongoose#readme" } diff --git a/plugins/node/instrumentation-mongoose/src/mongoose.ts b/plugins/node/instrumentation-mongoose/src/mongoose.ts index 77c8dbee0d..ff76b33735 100644 --- a/plugins/node/instrumentation-mongoose/src/mongoose.ts +++ b/plugins/node/instrumentation-mongoose/src/mongoose.ts @@ -13,13 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { - context, - Span, - trace, - SpanAttributes, - SpanKind, -} from '@opentelemetry/api'; +import { context, Span, trace, Attributes, SpanKind } from '@opentelemetry/api'; import { suppressTracing } from '@opentelemetry/core'; import type * as mongoose from 'mongoose'; import { MongooseInstrumentationConfig, SerializerPayload } from './types'; @@ -34,7 +28,11 @@ import { InstrumentationNodeModuleDefinition, } from '@opentelemetry/instrumentation'; import { VERSION } from './version'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_DB_OPERATION, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, +} from '@opentelemetry/semantic-conventions'; const contextCaptureFunctions = [ 'remove', @@ -59,23 +57,19 @@ const contextCaptureFunctions = [ // calls. this bypass the unlinked spans issue on thenables await operations. export const _STORED_PARENT_SPAN: unique symbol = Symbol('stored-parent-span'); -export class MongooseInstrumentation extends InstrumentationBase { +export class MongooseInstrumentation extends InstrumentationBase { protected override _config!: MongooseInstrumentationConfig; constructor(config: MongooseInstrumentationConfig = {}) { - super( - '@opentelemetry/instrumentation-mongoose', - VERSION, - Object.assign({}, config) - ); + super('@opentelemetry/instrumentation-mongoose', VERSION, config); } override setConfig(config: MongooseInstrumentationConfig = {}) { this._config = Object.assign({}, config); } - protected init(): InstrumentationModuleDefinition { - const module = new InstrumentationNodeModuleDefinition( + protected init(): InstrumentationModuleDefinition { + const module = new InstrumentationNodeModuleDefinition( 'mongoose', ['>=5.9.7 <7'], this.patch.bind(this), @@ -128,7 +122,6 @@ export class MongooseInstrumentation extends InstrumentationBase { } private unpatch(moduleExports: typeof mongoose): void { - this._diag.debug('mongoose instrumentation: unpatch mongoose'); this._unwrap(moduleExports.Model.prototype, 'save'); // revert the patch for $save which we applied by aliasing it to patched `save` moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save; @@ -144,7 +137,6 @@ export class MongooseInstrumentation extends InstrumentationBase { private patchAggregateExec(moduleVersion: string | undefined) { const self = this; - this._diag.debug('patched mongoose Aggregate exec function'); return (originalAggregate: Function) => { return function exec(this: any, callback?: Function) { if ( @@ -155,9 +147,9 @@ export class MongooseInstrumentation extends InstrumentationBase { } const parentSpan = this[_STORED_PARENT_SPAN]; - const attributes: SpanAttributes = {}; + const attributes: Attributes = {}; if (self._config.dbStatementSerializer) { - attributes[SemanticAttributes.DB_STATEMENT] = + attributes[SEMATTRS_DB_STATEMENT] = self._config.dbStatementSerializer('aggregate', { options: this.options, aggregatePipeline: this._pipeline, @@ -186,7 +178,6 @@ export class MongooseInstrumentation extends InstrumentationBase { private patchQueryExec(moduleVersion: string | undefined) { const self = this; - this._diag.debug('patched mongoose Query exec function'); return (originalExec: Function) => { return function exec(this: any, callback?: Function) { if ( @@ -197,9 +188,9 @@ export class MongooseInstrumentation extends InstrumentationBase { } const parentSpan = this[_STORED_PARENT_SPAN]; - const attributes: SpanAttributes = {}; + const attributes: Attributes = {}; if (self._config.dbStatementSerializer) { - attributes[SemanticAttributes.DB_STATEMENT] = + attributes[SEMATTRS_DB_STATEMENT] = self._config.dbStatementSerializer(this.op, { condition: this._conditions, updates: this._update, @@ -229,7 +220,6 @@ export class MongooseInstrumentation extends InstrumentationBase { private patchOnModelMethods(op: string, moduleVersion: string | undefined) { const self = this; - this._diag.debug(`patching mongoose Model '${op}' operation`); return (originalOnModelFunction: Function) => { return function method(this: any, options?: any, callback?: Function) { if ( @@ -243,9 +233,9 @@ export class MongooseInstrumentation extends InstrumentationBase { if (options && !(options instanceof Function)) { serializePayload.options = options; } - const attributes: SpanAttributes = {}; + const attributes: Attributes = {}; if (self._config.dbStatementSerializer) { - attributes[SemanticAttributes.DB_STATEMENT] = + attributes[SEMATTRS_DB_STATEMENT] = self._config.dbStatementSerializer(op, serializePayload); } const span = self._startSpan( @@ -278,7 +268,6 @@ export class MongooseInstrumentation extends InstrumentationBase { // the aggregate of Model, and set the context on the Aggregate object private patchModelAggregate() { const self = this; - this._diag.debug('patched mongoose model aggregate function'); return (original: Function) => { return function captureSpanContext(this: any) { const currentSpan = trace.getSpan(context.active()); @@ -293,7 +282,6 @@ export class MongooseInstrumentation extends InstrumentationBase { private patchAndCaptureSpanContext(funcName: string) { const self = this; - this._diag.debug(`patching mongoose query ${funcName} function`); return (original: Function) => { return function captureSpanContext(this: any) { this[_STORED_PARENT_SPAN] = trace.getSpan(context.active()); @@ -308,7 +296,7 @@ export class MongooseInstrumentation extends InstrumentationBase { collection: mongoose.Collection, modelName: string, operation: string, - attributes: SpanAttributes, + attributes: Attributes, parentSpan?: Span ): Span { return this.tracer.startSpan( @@ -318,8 +306,8 @@ export class MongooseInstrumentation extends InstrumentationBase { attributes: { ...attributes, ...getAttributesFromCollection(collection), - [SemanticAttributes.DB_OPERATION]: operation, - [SemanticAttributes.DB_SYSTEM]: 'mongoose', + [SEMATTRS_DB_OPERATION]: operation, + [SEMATTRS_DB_SYSTEM]: 'mongoose', }, }, parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined diff --git a/plugins/node/instrumentation-mongoose/src/utils.ts b/plugins/node/instrumentation-mongoose/src/utils.ts index 2c44c87dae..f556218c87 100644 --- a/plugins/node/instrumentation-mongoose/src/utils.ts +++ b/plugins/node/instrumentation-mongoose/src/utils.ts @@ -13,21 +13,27 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { SpanAttributes, SpanStatusCode, diag, Span } from '@opentelemetry/api'; +import { Attributes, SpanStatusCode, diag, Span } from '@opentelemetry/api'; import type { Collection } from 'mongoose'; import { MongooseResponseCustomAttributesFunction } from './types'; import { safeExecuteInTheMiddle } from '@opentelemetry/instrumentation'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_DB_MONGODB_COLLECTION, + SEMATTRS_DB_NAME, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; export function getAttributesFromCollection( collection: Collection -): SpanAttributes { +): Attributes { return { - [SemanticAttributes.DB_MONGODB_COLLECTION]: collection.name, - [SemanticAttributes.DB_NAME]: collection.conn.name, - [SemanticAttributes.DB_USER]: collection.conn.user, - [SemanticAttributes.NET_PEER_NAME]: collection.conn.host, - [SemanticAttributes.NET_PEER_PORT]: collection.conn.port, + [SEMATTRS_DB_MONGODB_COLLECTION]: collection.name, + [SEMATTRS_DB_NAME]: collection.conn.name, + [SEMATTRS_DB_USER]: collection.conn.user, + [SEMATTRS_NET_PEER_NAME]: collection.conn.host, + [SEMATTRS_NET_PEER_PORT]: collection.conn.port, }; } diff --git a/plugins/node/instrumentation-mongoose/test/asserts.ts b/plugins/node/instrumentation-mongoose/test/asserts.ts index ad21f9a716..0cf109c80e 100644 --- a/plugins/node/instrumentation-mongoose/test/asserts.ts +++ b/plugins/node/instrumentation-mongoose/test/asserts.ts @@ -15,21 +15,26 @@ */ import { expect } from 'expect'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_DB_MONGODB_COLLECTION, + SEMATTRS_DB_NAME, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; import { SpanStatusCode } from '@opentelemetry/api'; import { SerializerPayload } from '../src'; import { DB_NAME, MONGO_HOST, MONGO_PORT } from './config'; export const assertSpan = (span: ReadableSpan) => { expect(span.status.code).toBe(SpanStatusCode.UNSET); - expect(span.attributes[SemanticAttributes.DB_SYSTEM]).toEqual('mongoose'); - expect(span.attributes[SemanticAttributes.DB_MONGODB_COLLECTION]).toEqual( - 'users' - ); - expect(span.attributes[SemanticAttributes.DB_NAME]).toEqual(DB_NAME); - expect(span.attributes[SemanticAttributes.NET_PEER_NAME]).toEqual(MONGO_HOST); - expect(span.attributes[SemanticAttributes.NET_PEER_PORT]).toEqual(MONGO_PORT); + expect(span.attributes[SEMATTRS_DB_SYSTEM]).toEqual('mongoose'); + expect(span.attributes[SEMATTRS_DB_MONGODB_COLLECTION]).toEqual('users'); + expect(span.attributes[SEMATTRS_DB_NAME]).toEqual(DB_NAME); + expect(span.attributes[SEMATTRS_NET_PEER_NAME]).toEqual(MONGO_HOST); + expect(span.attributes[SEMATTRS_NET_PEER_PORT]).toEqual(MONGO_PORT); }; export const getStatement = (span: ReadableSpan): SerializerPayload => - JSON.parse(span.attributes[SemanticAttributes.DB_STATEMENT] as string); + JSON.parse(span.attributes[SEMATTRS_DB_STATEMENT] as string); diff --git a/plugins/node/instrumentation-mongoose/test/mongoose.test.ts b/plugins/node/instrumentation-mongoose/test/mongoose.test.ts index 37ce6c70ec..b907300b69 100644 --- a/plugins/node/instrumentation-mongoose/test/mongoose.test.ts +++ b/plugins/node/instrumentation-mongoose/test/mongoose.test.ts @@ -16,7 +16,10 @@ import 'mocha'; import { expect } from 'expect'; import { context, ROOT_CONTEXT } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_DB_OPERATION, + SEMATTRS_DB_STATEMENT, +} from '@opentelemetry/semantic-conventions'; import { MongooseInstrumentation } from '../src'; import { getTestSpans, @@ -89,7 +92,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('save'); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('save'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.document).toEqual(expect.objectContaining(document)); }); @@ -107,7 +110,7 @@ describe('mongoose instrumentation', () => { expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('save'); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('save'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.document).toEqual(expect.objectContaining(document)); done(); @@ -120,7 +123,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('find'); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('find'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.condition).toEqual({ id: '_test' }); }); @@ -135,12 +138,12 @@ describe('mongoose instrumentation', () => { expect(spans.length).toBe(2); assertSpan(spans[0] as ReadableSpan); assertSpan(spans[1] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('find'); - expect(spans[0].attributes[SemanticAttributes.DB_STATEMENT]).toMatch( + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('find'); + expect(spans[0].attributes[SEMATTRS_DB_STATEMENT]).toMatch( /.*{"id":"_test[1-2]"}.*/g ); - expect(spans[1].attributes[SemanticAttributes.DB_OPERATION]).toBe('find'); - expect(spans[1].attributes[SemanticAttributes.DB_STATEMENT]).toMatch( + expect(spans[1].attributes[SEMATTRS_DB_OPERATION]).toBe('find'); + expect(spans[1].attributes[SEMATTRS_DB_STATEMENT]).toMatch( /.*{"id":"_test[1-2]"}.*/g ); }); @@ -151,7 +154,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('find'); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('find'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.condition).toEqual({ id: '_test' }); expect(statement.options).toEqual({ @@ -168,7 +171,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(2); assertSpan(spans[1] as ReadableSpan); - expect(spans[1].attributes[SemanticAttributes.DB_OPERATION]).toBe('remove'); + expect(spans[1].attributes[SEMATTRS_DB_OPERATION]).toBe('remove'); }); it('instrumenting remove operation with callbacks [deprecated]', done => { @@ -177,9 +180,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(2); assertSpan(spans[1] as ReadableSpan); - expect(spans[1].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'remove' - ); + expect(spans[1].attributes[SEMATTRS_DB_OPERATION]).toBe('remove'); expect(getStatement(spans[1] as ReadableSpan).options).toEqual({ overwrite: true, }); @@ -194,9 +195,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'deleteOne' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('deleteOne'); }); it('instrumenting updateOne operation on models', async () => { @@ -206,9 +205,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(2); assertSpan(spans[1] as ReadableSpan); - expect(spans[1].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'updateOne' - ); + expect(spans[1].attributes[SEMATTRS_DB_OPERATION]).toBe('updateOne'); const statement = getStatement(spans[1] as ReadableSpan); expect(statement.options).toEqual({ skip: 0 }); @@ -226,9 +223,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'updateOne' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('updateOne'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({ skip: 0 }); @@ -242,7 +237,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('count'); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('count'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({}); @@ -254,9 +249,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'countDocuments' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('countDocuments'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ email: 'john.doe@example.com' }); @@ -268,7 +261,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe( 'estimatedDocumentCount' ); const statement = getStatement(spans[0] as ReadableSpan); @@ -282,9 +275,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'deleteMany' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('deleteMany'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({}); @@ -296,9 +287,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'findOne' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('findOne'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ email: 'john.doe@example.com' }); @@ -313,7 +302,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('update'); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('update'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ email: 'john.doe@example.com' }); @@ -326,9 +315,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'updateOne' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('updateOne'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ email: 'john.doe@example.com' }); @@ -341,9 +328,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'updateMany' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('updateMany'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ age: 18 }); @@ -356,9 +341,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'findOneAndDelete' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('findOneAndDelete'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ email: 'john.doe@example.com' }); @@ -374,12 +357,8 @@ describe('mongoose instrumentation', () => { expect(spans.length).toBe(2); assertSpan(spans[0] as ReadableSpan); assertSpan(spans[1] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'findOne' - ); - expect(spans[1].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'findOneAndUpdate' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('findOne'); + expect(spans[1].attributes[SEMATTRS_DB_OPERATION]).toBe('findOneAndUpdate'); const statement = getStatement(spans[1] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ email: 'john.doe@example.com' }); @@ -392,9 +371,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'findOneAndRemove' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('findOneAndRemove'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.condition).toEqual({ email: 'john.doe@example.com' }); @@ -411,7 +388,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe('save'); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('save'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.options).toEqual({}); expect(statement.document).toEqual(expect.objectContaining(document)); @@ -426,9 +403,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'aggregate' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('aggregate'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.aggregatePipeline).toEqual([ { $match: { firstName: 'John' } }, @@ -446,9 +421,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_OPERATION]).toBe( - 'aggregate' - ); + expect(spans[0].attributes[SEMATTRS_DB_OPERATION]).toBe('aggregate'); const statement = getStatement(spans[0] as ReadableSpan); expect(statement.aggregatePipeline).toEqual([ { $match: { firstName: 'John' } }, @@ -483,9 +456,7 @@ describe('mongoose instrumentation', () => { const spans = getTestSpans(); expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); - expect(spans[0].attributes[SemanticAttributes.DB_STATEMENT]).toBe( - undefined - ); + expect(spans[0].attributes[SEMATTRS_DB_STATEMENT]).toBe(undefined); }); it('projection is sent to serializer', async () => { @@ -503,7 +474,7 @@ describe('mongoose instrumentation', () => { expect(spans.length).toBe(1); assertSpan(spans[0] as ReadableSpan); const reqPayload = JSON.parse( - spans[0].attributes[SemanticAttributes.DB_STATEMENT] as string + spans[0].attributes[SEMATTRS_DB_STATEMENT] as string ); expect(reqPayload.fields).toStrictEqual(projection); }); diff --git a/plugins/node/instrumentation-mongoose/tsconfig.json b/plugins/node/instrumentation-mongoose/tsconfig.json index 5c3680dd33..28be80d266 100644 --- a/plugins/node/instrumentation-mongoose/tsconfig.json +++ b/plugins/node/instrumentation-mongoose/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../../tsconfig.base", "compilerOptions": { "rootDir": ".", - "outDir": "build", - "skipLibCheck": true + "outDir": "build" }, "include": [ "src/**/*.ts", diff --git a/plugins/node/instrumentation-runtime-node/CHANGELOG.md b/plugins/node/instrumentation-runtime-node/CHANGELOG.md index 2867662028..75742ee468 100644 --- a/plugins/node/instrumentation-runtime-node/CHANGELOG.md +++ b/plugins/node/instrumentation-runtime-node/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.4.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-runtime-node-v0.3.0...instrumentation-runtime-node-v0.4.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/instrumentation-runtime-node/LICENSE b/plugins/node/instrumentation-runtime-node/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/instrumentation-runtime-node/LICENSE +++ b/plugins/node/instrumentation-runtime-node/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/instrumentation-runtime-node/package.json b/plugins/node/instrumentation-runtime-node/package.json index 80a1cc46bb..1d0759a869 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.3.0", + "version": "0.4.0", "description": "OpenTelemetry Node.js Performance measurement API automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -39,7 +39,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", diff --git a/plugins/node/instrumentation-socket.io/CHANGELOG.md b/plugins/node/instrumentation-socket.io/CHANGELOG.md index e1787d28a1..ff649a2854 100644 --- a/plugins/node/instrumentation-socket.io/CHANGELOG.md +++ b/plugins/node/instrumentation-socket.io/CHANGELOG.md @@ -6,6 +6,21 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-socket.io-v0.38.0...instrumentation-socket.io-v0.39.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/instrumentation-socket.io/README.md b/plugins/node/instrumentation-socket.io/README.md index ca242046f9..28370b58f2 100644 --- a/plugins/node/instrumentation-socket.io/README.md +++ b/plugins/node/instrumentation-socket.io/README.md @@ -59,6 +59,19 @@ Few breaking changes were made during porting to the contrib repo: The instrumentation's config `filterHttpTransport` option was removed to decouple this instrumentation from the http instrumentation. if you do not want to trace the socket.io http requests, add the default socket.io route (`/socket.io/`) to the `HttpInstrumentationConfig.ignoreIncomingPaths` array +## 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 | +| ---------------------------- | ------------------------------------------------------------------------------------------------ | +| `messaging.destination` | The message destination name. This might be equal to the span name but is required nevertheless. | +| `messaging.destination_kind` | The kind of message destination. | +| `messaging.operation` | A string identifying the kind of message consumption. | +| `messaging.system` | A string identifying the messaging system. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/instrumentation-socket.io/package.json b/plugins/node/instrumentation-socket.io/package.json index 11ab404b6b..7ec6a4e6b2 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.38.0", + "version": "0.39.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", @@ -58,8 +58,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-socket.io#readme" } diff --git a/plugins/node/instrumentation-socket.io/src/socket.io.ts b/plugins/node/instrumentation-socket.io/src/socket.io.ts index db37e5c375..5ed289c65b 100644 --- a/plugins/node/instrumentation-socket.io/src/socket.io.ts +++ b/plugins/node/instrumentation-socket.io/src/socket.io.ts @@ -28,9 +28,12 @@ import { safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; import { - SemanticAttributes, - MessagingOperationValues, - MessagingDestinationKindValues, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_OPERATION, + SEMATTRS_MESSAGING_SYSTEM, + MESSAGINGOPERATIONVALUES_RECEIVE, + MESSAGINGDESTINATIONKINDVALUES_TOPIC, } from '@opentelemetry/semantic-conventions'; import { SocketIoInstrumentationConfig } from './types'; import { SocketIoInstrumentationAttributes } from './AttributeNames'; @@ -50,7 +53,7 @@ const reservedEvents = [ 'removeListener', ]; -export class SocketIoInstrumentation extends InstrumentationBase { +export class SocketIoInstrumentation extends InstrumentationBase { protected override _config!: SocketIoInstrumentationConfig; constructor(config: SocketIoInstrumentationConfig = {}) { @@ -62,7 +65,7 @@ export class SocketIoInstrumentation extends InstrumentationBase { } protected init() { - const socketInstrumentation = new InstrumentationNodeModuleFile( + const socketInstrumentation = new InstrumentationNodeModuleFile( 'socket.io/dist/socket.js', ['>=3 <5'], (moduleExports, moduleVersion) => { @@ -72,7 +75,6 @@ export class SocketIoInstrumentation extends InstrumentationBase { if (moduleVersion === undefined) { return moduleExports; } - this._diag.debug(`applying patch to socket.io@${moduleVersion} Socket`); if (isWrapped(moduleExports?.Socket?.prototype?.on)) { this._unwrap(moduleExports.Socket.prototype, 'on'); } @@ -102,38 +104,34 @@ export class SocketIoInstrumentation extends InstrumentationBase { } ); - const broadcastOperatorInstrumentation = - new InstrumentationNodeModuleFile( - 'socket.io/dist/broadcast-operator.js', - ['>=4 <5'], - (moduleExports, moduleVersion) => { - if (moduleExports === undefined || moduleExports === null) { - return moduleExports; - } - if (moduleVersion === undefined) { - return moduleExports; - } - this._diag.debug( - `applying patch to socket.io@${moduleVersion} StrictEventEmitter` - ); - if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) { - this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit'); - } - this._wrap( - moduleExports.BroadcastOperator.prototype, - 'emit', - this._patchEmit(moduleVersion) - ); + const broadcastOperatorInstrumentation = new InstrumentationNodeModuleFile( + 'socket.io/dist/broadcast-operator.js', + ['>=4 <5'], + (moduleExports, moduleVersion) => { + if (moduleExports === undefined || moduleExports === null) { return moduleExports; - }, - moduleExports => { - if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) { - this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit'); - } + } + if (moduleVersion === undefined) { return moduleExports; } - ); - const namespaceInstrumentation = new InstrumentationNodeModuleFile( + if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) { + this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit'); + } + this._wrap( + moduleExports.BroadcastOperator.prototype, + 'emit', + this._patchEmit(moduleVersion) + ); + return moduleExports; + }, + moduleExports => { + if (isWrapped(moduleExports?.BroadcastOperator?.prototype?.emit)) { + this._unwrap(moduleExports.BroadcastOperator.prototype, 'emit'); + } + return moduleExports; + } + ); + const namespaceInstrumentation = new InstrumentationNodeModuleFile( 'socket.io/dist/namespace.js', ['<4'], (moduleExports, moduleVersion) => { @@ -143,9 +141,6 @@ export class SocketIoInstrumentation extends InstrumentationBase { if (moduleVersion === undefined) { return moduleExports; } - this._diag.debug( - `applying patch to socket.io@${moduleVersion} Namespace` - ); if (isWrapped(moduleExports?.Namespace?.prototype?.emit)) { this._unwrap(moduleExports.Namespace.prototype, 'emit'); } @@ -162,7 +157,7 @@ export class SocketIoInstrumentation extends InstrumentationBase { } } ); - const socketInstrumentationLegacy = new InstrumentationNodeModuleFile( + const socketInstrumentationLegacy = new InstrumentationNodeModuleFile( 'socket.io/lib/socket.js', ['2'], (moduleExports, moduleVersion) => { @@ -172,7 +167,6 @@ export class SocketIoInstrumentation extends InstrumentationBase { if (moduleVersion === undefined) { return moduleExports; } - this._diag.debug(`applying patch to socket.io@${moduleVersion} Socket`); if (isWrapped(moduleExports.prototype?.on)) { this._unwrap(moduleExports.prototype, 'on'); } @@ -197,39 +191,35 @@ export class SocketIoInstrumentation extends InstrumentationBase { return moduleExports; } ); - const namespaceInstrumentationLegacy = - new InstrumentationNodeModuleFile( - 'socket.io/lib/namespace.js', - ['2'], - (moduleExports, moduleVersion) => { - if (moduleExports === undefined || moduleExports === null) { - return moduleExports; - } - if (moduleVersion === undefined) { - return moduleExports; - } - this._diag.debug( - `applying patch to socket.io@${moduleVersion} Namespace` - ); - if (isWrapped(moduleExports?.prototype?.emit)) { - this._unwrap(moduleExports.prototype, 'emit'); - } - this._wrap( - moduleExports.prototype, - 'emit', - this._patchEmit(moduleVersion) - ); + const namespaceInstrumentationLegacy = new InstrumentationNodeModuleFile( + 'socket.io/lib/namespace.js', + ['2'], + (moduleExports, moduleVersion) => { + if (moduleExports === undefined || moduleExports === null) { return moduleExports; - }, - moduleExports => { - if (isWrapped(moduleExports?.prototype?.emit)) { - this._unwrap(moduleExports.prototype, 'emit'); - } } - ); + if (moduleVersion === undefined) { + return moduleExports; + } + if (isWrapped(moduleExports?.prototype?.emit)) { + this._unwrap(moduleExports.prototype, 'emit'); + } + this._wrap( + moduleExports.prototype, + 'emit', + this._patchEmit(moduleVersion) + ); + return moduleExports; + }, + moduleExports => { + if (isWrapped(moduleExports?.prototype?.emit)) { + this._unwrap(moduleExports.prototype, 'emit'); + } + } + ); return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'socket.io', ['>=3 <5'], (moduleExports, moduleVersion) => { @@ -239,9 +229,6 @@ export class SocketIoInstrumentation extends InstrumentationBase { if (moduleVersion === undefined) { return moduleExports; } - this._diag.debug( - `applying patch to socket.io@${moduleVersion} Server` - ); if (isWrapped(moduleExports?.Server?.prototype?.on)) { this._unwrap(moduleExports.Server.prototype, 'on'); } @@ -252,7 +239,7 @@ export class SocketIoInstrumentation extends InstrumentationBase { ); return moduleExports; }, - (moduleExports, moduleVersion) => { + moduleExports => { if (isWrapped(moduleExports?.Server?.prototype?.on)) { this._unwrap(moduleExports.Server.prototype, 'on'); } @@ -264,7 +251,7 @@ export class SocketIoInstrumentation extends InstrumentationBase { socketInstrumentation, ] ), - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'socket.io', ['2'], (moduleExports, moduleVersion) => { @@ -274,9 +261,6 @@ export class SocketIoInstrumentation extends InstrumentationBase { if (moduleVersion === undefined) { return moduleExports; } - this._diag.debug( - `applying patch to socket.io@${moduleVersion} Server` - ); if (isWrapped(moduleExports?.prototype?.on)) { this._unwrap(moduleExports.prototype, 'on'); } @@ -321,14 +305,14 @@ export class SocketIoInstrumentation extends InstrumentationBase { ? eventName : `${namespace} ${eventName}`; const span: Span = self.tracer.startSpan( - `${destination} ${MessagingOperationValues.RECEIVE}`, + `${destination} ${MESSAGINGOPERATIONVALUES_RECEIVE}`, { kind: SpanKind.CONSUMER, attributes: { - [SemanticAttributes.MESSAGING_SYSTEM]: 'socket.io', - [SemanticAttributes.MESSAGING_DESTINATION]: namespace, - [SemanticAttributes.MESSAGING_OPERATION]: - MessagingOperationValues.RECEIVE, + [SEMATTRS_MESSAGING_SYSTEM]: 'socket.io', + [SEMATTRS_MESSAGING_DESTINATION]: namespace, + [SEMATTRS_MESSAGING_OPERATION]: + MESSAGINGOPERATIONVALUES_RECEIVE, [SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]: eventName, }, @@ -398,9 +382,9 @@ export class SocketIoInstrumentation extends InstrumentationBase { const messagingSystem = 'socket.io'; const eventName = ev; const attributes: any = { - [SemanticAttributes.MESSAGING_SYSTEM]: messagingSystem, - [SemanticAttributes.MESSAGING_DESTINATION_KIND]: - MessagingDestinationKindValues.TOPIC, + [SEMATTRS_MESSAGING_SYSTEM]: messagingSystem, + [SEMATTRS_MESSAGING_DESTINATION_KIND]: + MESSAGINGDESTINATIONKINDVALUES_TOPIC, [SocketIoInstrumentationAttributes.SOCKET_IO_EVENT_NAME]: eventName, }; @@ -413,7 +397,7 @@ export class SocketIoInstrumentation extends InstrumentationBase { if (namespace) { attributes[SocketIoInstrumentationAttributes.SOCKET_IO_NAMESPACE] = namespace; - attributes[SemanticAttributes.MESSAGING_DESTINATION] = namespace; + attributes[SEMATTRS_MESSAGING_DESTINATION] = namespace; } const spanRooms = rooms.length ? `[${rooms.join()}]` : ''; const span = self.tracer.startSpan(`${namespace}${spanRooms} send`, { diff --git a/plugins/node/instrumentation-socket.io/test/socket.io.test.ts b/plugins/node/instrumentation-socket.io/test/socket.io.test.ts index 1b47fd5d73..0b733a438c 100644 --- a/plugins/node/instrumentation-socket.io/test/socket.io.test.ts +++ b/plugins/node/instrumentation-socket.io/test/socket.io.test.ts @@ -14,8 +14,10 @@ * limitations under the License. */ import { - MessagingDestinationKindValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_SYSTEM, } from '@opentelemetry/semantic-conventions'; import { SocketIoInstrumentation, @@ -56,12 +58,10 @@ describe('SocketIoInstrumentation', () => { io.emit('test'); expectSpan('/ send', span => { expect(span.kind).toEqual(SpanKind.PRODUCER); - expect(span.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toEqual( - 'socket.io' + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual('socket.io'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND]).toEqual( + MESSAGINGDESTINATIONKINDVALUES_TOPIC ); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); }); }); @@ -89,7 +89,7 @@ describe('SocketIoInstrumentation', () => { // only for v2: connect do not throw, but are just ignored return expectSpan('/ send', span => { expect(span.kind).toEqual(SpanKind.PRODUCER); - expect(span.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toEqual( + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( 'socket.io' ); }); @@ -107,12 +107,10 @@ describe('SocketIoInstrumentation', () => { io.send('test'); expectSpan('/ send', span => { expect(span.kind).toEqual(SpanKind.PRODUCER); - expect(span.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toEqual( - 'socket.io' + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual('socket.io'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND]).toEqual( + MESSAGINGDESTINATIONKINDVALUES_TOPIC ); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.TOPIC); }); }); @@ -173,9 +171,9 @@ describe('SocketIoInstrumentation', () => { span => { try { expect(span.kind).toEqual(SpanKind.CONSUMER); - expect( - span.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('socket.io'); + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'socket.io' + ); expect(span.attributes['payload']).toEqual( JSON.stringify([data]) ); @@ -213,9 +211,9 @@ describe('SocketIoInstrumentation', () => { setTimeout(() => { expectSpan('connection receive', span => { expect(span.kind).toEqual(SpanKind.CONSUMER); - expect( - span.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('socket.io'); + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'socket.io' + ); done(); }); }); @@ -244,9 +242,9 @@ describe('SocketIoInstrumentation', () => { span => { try { expect(span.kind).toEqual(SpanKind.CONSUMER); - expect( - span.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('socket.io'); + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'socket.io' + ); done(); } catch (e) { done(e); @@ -294,9 +292,7 @@ describe('SocketIoInstrumentation', () => { const sio = createServerInstance(); sio.to(roomName).emit('broadcast', '1234'); expectSpan('/[room] send', span => { - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual('/'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual('/'); expect( span.attributes[SocketIoInstrumentationAttributes.SOCKET_IO_ROOMS] ).toEqual([roomName]); @@ -307,9 +303,7 @@ describe('SocketIoInstrumentation', () => { const sio = createServerInstance(); sio.to('room1').to('room2').emit('broadcast', '1234'); expectSpan('/[room1,room2] send', span => { - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual('/'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual('/'); expect( span.attributes[SocketIoInstrumentationAttributes.SOCKET_IO_ROOMS] ).toEqual(['room1', 'room2']); @@ -323,9 +317,9 @@ describe('SocketIoInstrumentation', () => { const namespace = io.of('/testing'); namespace.emit('namespace'); expectSpan('/testing send', span => { - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual('/testing'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '/testing' + ); expect( span.attributes[SocketIoInstrumentationAttributes.SOCKET_IO_NAMESPACE] ).toEqual('/testing'); @@ -338,9 +332,9 @@ describe('SocketIoInstrumentation', () => { const namespace = io.of('/testing'); namespace.to(roomName).emit('broadcast', '1234'); expectSpan('/testing[room] send', span => { - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual('/testing'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '/testing' + ); expect( span.attributes[SocketIoInstrumentationAttributes.SOCKET_IO_ROOMS] ).toEqual([roomName]); @@ -355,9 +349,9 @@ describe('SocketIoInstrumentation', () => { const namespace = io.of('/testing'); namespace.to('room1').to('room2').emit('broadcast', '1234'); expectSpan('/testing[room1,room2] send', span => { - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual('/testing'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + '/testing' + ); expect( span.attributes[SocketIoInstrumentationAttributes.SOCKET_IO_NAMESPACE] ).toEqual('/testing'); @@ -389,11 +383,11 @@ describe('SocketIoInstrumentation', () => { span => { try { expect(span.kind).toEqual(SpanKind.CONSUMER); + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'socket.io' + ); expect( - span.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('socket.io'); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] + span.attributes[SEMATTRS_MESSAGING_DESTINATION] ).toEqual('/testing'); done(); } catch (e) { @@ -431,9 +425,9 @@ describe('SocketIoInstrumentation', () => { span => { try { expect(span.kind).toEqual(SpanKind.PRODUCER); - expect( - span.attributes[SemanticAttributes.MESSAGING_SYSTEM] - ).toEqual('socket.io'); + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( + 'socket.io' + ); done(); } catch (e) { done(e); diff --git a/plugins/node/instrumentation-tedious/CHANGELOG.md b/plugins/node/instrumentation-tedious/CHANGELOG.md index ea50ad6918..455ad22ac5 100644 --- a/plugins/node/instrumentation-tedious/CHANGELOG.md +++ b/plugins/node/instrumentation-tedious/CHANGELOG.md @@ -6,6 +6,33 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.10.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-tedious-v0.10.0...instrumentation-tedious-v0.10.1) (2024-05-02) + + +### Bug Fixes + +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.10.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-tedious-v0.9.0...instrumentation-tedious-v0.10.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/instrumentation-tedious/LICENSE b/plugins/node/instrumentation-tedious/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/instrumentation-tedious/LICENSE +++ b/plugins/node/instrumentation-tedious/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/instrumentation-tedious/README.md b/plugins/node/instrumentation-tedious/README.md index ee8a9ee535..48863d1a3c 100644 --- a/plugins/node/instrumentation-tedious/README.md +++ b/plugins/node/instrumentation-tedious/README.md @@ -40,6 +40,22 @@ registerInstrumentations({ }) ``` +## 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 | +| ----------------------- | ------------------------------------------------------------------------------ | +| `db.name` | This attribute is used to report the name of the database being accessed. | +| `db.sql.table` | The name of the primary table that the operation is acting upon. | +| `db.statement` | The database statement being executed. | +| `db.system` | An identifier for the database management system (DBMS) product being used. | +| `db.user` | Username for accessing the database. | +| `net.peer.name` | Remote hostname or similar. | +| `net.peer.port` | Remote port number. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/instrumentation-tedious/package.json b/plugins/node/instrumentation-tedious/package.json index 0d73cf1922..4474df3657 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.9.0", + "version": "0.10.1", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -62,8 +62,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/tedious": "^4.0.10" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-tedious#readme" diff --git a/plugins/node/instrumentation-tedious/src/instrumentation.ts b/plugins/node/instrumentation-tedious/src/instrumentation.ts index 7484dd49fb..78b11de517 100644 --- a/plugins/node/instrumentation-tedious/src/instrumentation.ts +++ b/plugins/node/instrumentation-tedious/src/instrumentation.ts @@ -22,8 +22,14 @@ import { isWrapped, } from '@opentelemetry/instrumentation'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MSSQL, + SEMATTRS_DB_NAME, + SEMATTRS_DB_SQL_TABLE, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import type * as tedious from 'tedious'; import { TediousInstrumentationConfig } from './types'; @@ -61,23 +67,19 @@ function setDatabase(this: ApproxConnection, databaseName: string) { }); } -export class TediousInstrumentation extends InstrumentationBase< - typeof tedious -> { +export class TediousInstrumentation extends InstrumentationBase { static readonly COMPONENT = 'tedious'; - constructor(config?: TediousInstrumentationConfig) { + constructor(config: TediousInstrumentationConfig = {}) { super('@opentelemetry/instrumentation-tedious', VERSION, config); } protected init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( TediousInstrumentation.COMPONENT, ['>=1.11.0 <=15'], - (moduleExports: any, moduleVersion) => { - this._diag.debug(`Patching tedious@${moduleVersion}`); - + (moduleExports: typeof tedious) => { const ConnectionPrototype: any = moduleExports.Connection.prototype; for (const method of PATCHED_METHODS) { if (isWrapped(ConnectionPrototype[method])) { @@ -97,7 +99,7 @@ export class TediousInstrumentation extends InstrumentationBase< return moduleExports; }, - (moduleExports: any) => { + (moduleExports: typeof tedious) => { if (moduleExports === undefined) return; const ConnectionPrototype: any = moduleExports.Connection.prototype; for (const method of PATCHED_METHODS) { @@ -127,9 +129,6 @@ export class TediousInstrumentation extends InstrumentationBase< private _patchQuery(operation: string) { return (originalMethod: UnknownFunction): UnknownFunction => { const thisPlugin = this; - this._diag.debug( - `TediousInstrumentation: patched Connection.prototype.${operation}` - ); function patchedMethod(this: ApproxConnection, request: ApproxRequest) { if (!(request instanceof EventEmitter)) { @@ -159,16 +158,16 @@ export class TediousInstrumentation extends InstrumentationBase< { kind: api.SpanKind.CLIENT, attributes: { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.MSSQL, - [SemanticAttributes.DB_NAME]: databaseName, - [SemanticAttributes.NET_PEER_PORT]: this.config?.options?.port, - [SemanticAttributes.NET_PEER_NAME]: this.config?.server, + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_MSSQL, + [SEMATTRS_DB_NAME]: databaseName, + [SEMATTRS_NET_PEER_PORT]: this.config?.options?.port, + [SEMATTRS_NET_PEER_NAME]: this.config?.server, // >=4 uses `authentication` object, older versions just userName and password pair - [SemanticAttributes.DB_USER]: + [SEMATTRS_DB_USER]: this.config?.userName ?? this.config?.authentication?.options?.userName, - [SemanticAttributes.DB_STATEMENT]: sql, - [SemanticAttributes.DB_SQL_TABLE]: request.table, + [SEMATTRS_DB_STATEMENT]: sql, + [SEMATTRS_DB_SQL_TABLE]: request.table, }, } ); diff --git a/plugins/node/instrumentation-tedious/test/instrumentation.test.ts b/plugins/node/instrumentation-tedious/test/instrumentation.test.ts index 9313281838..5a531e2815 100644 --- a/plugins/node/instrumentation-tedious/test/instrumentation.test.ts +++ b/plugins/node/instrumentation-tedious/test/instrumentation.test.ts @@ -17,8 +17,14 @@ import { context, trace, SpanStatusCode, SpanKind } from '@opentelemetry/api'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MSSQL, + SEMATTRS_DB_NAME, + SEMATTRS_DB_SQL_TABLE, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import * as util from 'util'; import * as testUtils from '@opentelemetry/contrib-test-utils'; @@ -335,17 +341,14 @@ function assertSpan(span: ReadableSpan, expected: any) { assert(span); assert.strictEqual(span.name, expected.name); assert.strictEqual(span.kind, SpanKind.CLIENT); + assert.strictEqual(span.attributes[SEMATTRS_DB_SYSTEM], DBSYSTEMVALUES_MSSQL); assert.strictEqual( - span.attributes[SemanticAttributes.DB_SYSTEM], - DbSystemValues.MSSQL - ); - assert.strictEqual( - span.attributes[SemanticAttributes.DB_NAME], + span.attributes[SEMATTRS_DB_NAME], expected.database ?? database ); - assert.strictEqual(span.attributes[SemanticAttributes.NET_PEER_PORT], port); - assert.strictEqual(span.attributes[SemanticAttributes.NET_PEER_NAME], host); - assert.strictEqual(span.attributes[SemanticAttributes.DB_USER], user); + assert.strictEqual(span.attributes[SEMATTRS_NET_PEER_PORT], port); + assert.strictEqual(span.attributes[SEMATTRS_NET_PEER_NAME], host); + assert.strictEqual(span.attributes[SEMATTRS_DB_USER], user); assert.strictEqual( span.attributes['tedious.procedure_count'], expected.procCount ?? 1, @@ -362,27 +365,18 @@ function assertSpan(span: ReadableSpan, expected: any) { expected.parentSpan.spanContext().spanId ); } - assert.strictEqual( - span.attributes[SemanticAttributes.DB_SQL_TABLE], - expected.table - ); + assert.strictEqual(span.attributes[SEMATTRS_DB_SQL_TABLE], expected.table); if (expected.sql) { if (expected.sql instanceof RegExp) { assertMatch( - span.attributes[SemanticAttributes.DB_STATEMENT] as string | undefined, + span.attributes[SEMATTRS_DB_STATEMENT] as string | undefined, expected.sql ); } else { - assert.strictEqual( - span.attributes[SemanticAttributes.DB_STATEMENT], - expected.sql - ); + assert.strictEqual(span.attributes[SEMATTRS_DB_STATEMENT], expected.sql); } } else { - assert.strictEqual( - span.attributes[SemanticAttributes.DB_STATEMENT], - undefined - ); + assert.strictEqual(span.attributes[SEMATTRS_DB_STATEMENT], undefined); } if (expected.error) { assert( diff --git a/plugins/node/instrumentation-undici/CHANGELOG.md b/plugins/node/instrumentation-undici/CHANGELOG.md new file mode 100644 index 0000000000..65d823248a --- /dev/null +++ b/plugins/node/instrumentation-undici/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## [0.2.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-undici-v0.1.0...instrumentation-undici-v0.2.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* **instr-undici:** add instrumentation for `undici` versions `>=5 <7` and global `fetch` API ([#1951](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1951)) ([fe18e2f](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/fe18e2fbb2a6535cb72f314fdb1550a3a4160403)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) diff --git a/plugins/node/instrumentation-undici/README.md b/plugins/node/instrumentation-undici/README.md index 08a7128404..f26fee2352 100644 --- a/plugins/node/instrumentation-undici/README.md +++ b/plugins/node/instrumentation-undici/README.md @@ -71,21 +71,21 @@ Ref: [opentelemetry-js/issues/4235](https://github.com/open-telemetry/openteleme 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` | +| Attribute | Short Description | +| ------------------------------ | ---------------------------------------------------------------------------------------------------------- | +| `error.type` | Describes a class of error the operation ended with. | +| `http.request.method` | HTTP request method. | +| `http.request.method_original` | Original HTTP method sent by the client in the request line. | +| `http.response.status_code` | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | +| `network.peer.address` | Peer address of the network connection - IP address or Unix domain socket name. | +| `network.peer.port` | Peer port number of the network connection. | +| `server.address` | Server domain name, IP address or Unix domain socket name. | +| `server.port` | Server port number. | +| `url.full` | Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986). | +| `url.path` | The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component. | +| `url.query` | The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component. | +| `url.scheme` | HTTP request method. | +| `user_agent.original` | Value of the HTTP User-Agent header sent by the client. | ## Useful links diff --git a/plugins/node/instrumentation-undici/package.json b/plugins/node/instrumentation-undici/package.json index fd21b60b47..d644222a56 100644 --- a/plugins/node/instrumentation-undici/package.json +++ b/plugins/node/instrumentation-undici/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-undici", - "version": "0.1.0", + "version": "0.2.0", "description": "OpenTelemetry instrumentation for undici and Node.js fetch().", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -62,7 +62,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.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/undici.ts b/plugins/node/instrumentation-undici/src/undici.ts index 0fa07f97a3..ececad63c7 100644 --- a/plugins/node/instrumentation-undici/src/undici.ts +++ b/plugins/node/instrumentation-undici/src/undici.ts @@ -66,7 +66,7 @@ export class UndiciInstrumentation extends InstrumentationBase { private _recordFromReq = new WeakMap(); private _httpClientDurationHistogram!: Histogram; - constructor(config?: UndiciInstrumentationConfig) { + constructor(config: UndiciInstrumentationConfig = {}) { super('@opentelemetry/instrumentation-undici', VERSION, config); this.setConfig(config); } @@ -111,7 +111,7 @@ export class UndiciInstrumentation extends InstrumentationBase { this.subscribeToChannel('undici:request:error', this.onError.bind(this)); } - override setConfig(config?: UndiciInstrumentationConfig): void { + override setConfig(config: UndiciInstrumentationConfig = {}): void { super.setConfig(config); if (config?.enabled) { diff --git a/plugins/node/instrumentation-undici/test/undici.test.ts b/plugins/node/instrumentation-undici/test/undici.test.ts index aea2f036ce..c125b2e189 100644 --- a/plugins/node/instrumentation-undici/test/undici.test.ts +++ b/plugins/node/instrumentation-undici/test/undici.test.ts @@ -119,6 +119,10 @@ describe('UndiciInstrumentation `undici` tests', function () { propagation.disable(); mockServer.mockListener(undefined); mockServer.stop(done); + + // Close kept-alive sockets. This can save a 4s keep-alive delay before the + // process exits. + (undici as any).getGlobalDispatcher().close(); }); beforeEach(function () { @@ -216,11 +220,27 @@ describe('UndiciInstrumentation `undici` tests', function () { }; const queryRequestUrl = `${protocol}://${hostname}:${mockServer.port}/?query=test`; - const firstQueryResponse = await undici.request(queryRequestUrl, { - headers, - // @ts-expect-error - method type expects in uppercase - method: 'get', - }); + let firstQueryResponse; + try { + firstQueryResponse = await undici.request(queryRequestUrl, { + headers, + // @ts-expect-error - method type expects in uppercase + method: 'get', + }); + } catch (err: any) { + // This request is using a bogus HTTP method `get`. If (a) using Node.js + // v14, v16, or early v18.x versions and (b) this request is re-using + // a socket (from an earlier keep-alive request in this test file), + // then Node.js will emit 'end' on the socket. Undici then throws + // `SocketError: other side closed`. Given this is only for old Node.js + // versions and for this rare case of using a bogus HTTP method, we will + // skip out of this test instead of attempting to fully understand it. + assert.strictEqual(err.message, 'other side closed'); + this.skip(); + } + if (!firstQueryResponse) { + return; + } await consumeResponseBody(firstQueryResponse.body); const secondQueryResponse = await undici.request(queryRequestUrl, { diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md index 6bfef574ff..10744b46b7 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.41.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-aws-lambda-v0.40.0...instrumentation-aws-lambda-v0.41.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/LICENSE b/plugins/node/opentelemetry-instrumentation-aws-lambda/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index 92b33aefc3..368ffcd5ef 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.40.0", + "version": "0.41.0", "description": "OpenTelemetry AWS Lambda automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -56,7 +56,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/propagator-aws-xray": "^1.3.1", "@opentelemetry/resources": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts index 0b85377d1d..6d475f91dc 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts @@ -44,8 +44,9 @@ import { AWSXRayPropagator, } from '@opentelemetry/propagator-aws-xray'; import { - SemanticAttributes, - SemanticResourceAttributes, + SEMATTRS_FAAS_EXECUTION, + SEMRESATTRS_CLOUD_ACCOUNT_ID, + SEMRESATTRS_FAAS_ID, } from '@opentelemetry/semantic-conventions'; import { @@ -76,8 +77,10 @@ export class AwsLambdaInstrumentation extends InstrumentationBase { private _traceForceFlusher?: () => Promise; private _metricForceFlusher?: () => Promise; - constructor(protected override _config: AwsLambdaInstrumentationConfig = {}) { - super('@opentelemetry/instrumentation-aws-lambda', VERSION, _config); + protected override _config!: AwsLambdaInstrumentationConfig; + + constructor(config: AwsLambdaInstrumentationConfig = {}) { + super('@opentelemetry/instrumentation-aws-lambda', VERSION, config); if (this._config.disableAwsContextPropagation == null) { if ( typeof env['OTEL_LAMBDA_DISABLE_AWS_CONTEXT_PROPAGATION'] === @@ -150,7 +153,6 @@ export class AwsLambdaInstrumentation extends InstrumentationBase { module, ['*'], (moduleExports: LambdaModule) => { - diag.debug('Applying patch for lambda handler'); if (isWrapped(moduleExports[functionName])) { this._unwrap(moduleExports, functionName); } @@ -159,7 +161,6 @@ export class AwsLambdaInstrumentation extends InstrumentationBase { }, (moduleExports?: LambdaModule) => { if (moduleExports == null) return; - diag.debug('Removing patch for lambda handler'); this._unwrap(moduleExports, functionName); } ), @@ -201,9 +202,9 @@ export class AwsLambdaInstrumentation extends InstrumentationBase { { kind: SpanKind.SERVER, attributes: { - [SemanticAttributes.FAAS_EXECUTION]: context.awsRequestId, - [SemanticResourceAttributes.FAAS_ID]: context.invokedFunctionArn, - [SemanticResourceAttributes.CLOUD_ACCOUNT_ID]: + [SEMATTRS_FAAS_EXECUTION]: context.awsRequestId, + [SEMRESATTRS_FAAS_ID]: context.invokedFunctionArn, + [SEMRESATTRS_CLOUD_ACCOUNT_ID]: AwsLambdaInstrumentation._extractAccountId( context.invokedFunctionArn ), diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts index e8f9bea083..2088c4316f 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts @@ -33,8 +33,9 @@ import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { Context } from 'aws-lambda'; import * as assert from 'assert'; import { - SemanticAttributes, - SemanticResourceAttributes, + SEMATTRS_EXCEPTION_MESSAGE, + SEMATTRS_FAAS_EXECUTION, + SEMRESATTRS_FAAS_NAME, } from '@opentelemetry/semantic-conventions'; import { Context as OtelContext, @@ -56,7 +57,7 @@ const assertSpanSuccess = (span: ReadableSpan) => { assert.strictEqual(span.kind, SpanKind.SERVER); assert.strictEqual(span.name, 'my_function'); assert.strictEqual( - span.attributes[SemanticAttributes.FAAS_EXECUTION], + span.attributes[SEMATTRS_FAAS_EXECUTION], 'aws_request_id' ); assert.strictEqual(span.attributes['faas.id'], 'my_arn'); @@ -68,7 +69,7 @@ const assertSpanFailure = (span: ReadableSpan) => { assert.strictEqual(span.kind, SpanKind.SERVER); assert.strictEqual(span.name, 'my_function'); assert.strictEqual( - span.attributes[SemanticAttributes.FAAS_EXECUTION], + span.attributes[SEMATTRS_FAAS_EXECUTION], 'aws_request_id' ); assert.strictEqual(span.attributes['faas.id'], 'my_arn'); @@ -76,7 +77,7 @@ const assertSpanFailure = (span: ReadableSpan) => { assert.strictEqual(span.status.message, 'handler error'); assert.strictEqual(span.events.length, 1); assert.strictEqual( - span.events[0].attributes![SemanticAttributes.EXCEPTION_MESSAGE], + span.events[0].attributes![SEMATTRS_EXCEPTION_MESSAGE], 'handler error' ); }; @@ -841,10 +842,7 @@ describe('lambda handler', () => { it('sync - success', async () => { initializeHandler('lambda-test/async.handler', { requestHook: (span, { context }) => { - span.setAttribute( - SemanticResourceAttributes.FAAS_NAME, - context.functionName - ); + span.setAttribute(SEMRESATTRS_FAAS_NAME, context.functionName); }, }); @@ -853,7 +851,7 @@ describe('lambda handler', () => { const [span] = spans; assert.strictEqual(spans.length, 1); assert.strictEqual( - span.attributes[SemanticResourceAttributes.FAAS_NAME], + span.attributes[SEMRESATTRS_FAAS_NAME], ctx.functionName ); assertSpanSuccess(span); diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md index 11054375eb..f0fbfb8ae1 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [0.41.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-aws-sdk-v0.40.0...instrumentation-aws-sdk-v0.41.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/propagation-utils bumped from ^0.30.8 to ^0.30.9 + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0 + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/LICENSE b/plugins/node/opentelemetry-instrumentation-aws-sdk/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md b/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md index 2c9ee2ae7c..dc362c6a29 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md @@ -117,6 +117,54 @@ The instrumentation's config `preRequestHook`, `responseHook` and `sqsProcessHoo The `moduleVersionAttributeName` config option is removed. To add the aws-sdk package version to spans, use the `moduleVersion` attribute in hook info for `preRequestHook` and `responseHook` functions. +## 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 | Service | +| --------------------------------------------- | ---------------------------------------------------------------------------------------------- | -------- | +| `http.status_code` | (aws-sdk) HTTP response status code. | | +| `rpc.method` | The name of the (logical) method being called. | | +| `rpc.service` | The full (logical) name of the service being called. | | +| `rpc.system` | A string identifying the remoting system. | | +| `aws.dynamodb.attribute_definitions` | The JSON-serialized value of each item in the `AttributeDefinitions` request field. | dynamodb | +| `aws.dynamodb.consistent_read` | The value of the `ConsistentRead` request parameter. | dynamodb | +| `aws.dynamodb.consumed_capacity` | The JSON-serialized value of each item in the `ConsumedCapacity` response field. | dynamodb | +| `aws.dynamodb.count` | The value of the `Count` response parameter. | dynamodb | +| `aws.dynamodb.exclusive_start_table` | The value of the `ExclusiveStartTableName` request parameter. | dynamodb | +| `aws.dynamodb.global_secondary_index_updates` | The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. | dynamodb | +| `aws.dynamodb.global_secondary_indexes` | The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. | dynamodb | +| `aws.dynamodb.index_name` | The value of the `IndexName` request parameter. | dynamodb | +| `aws.dynamodb.item_collection_metrics` | The JSON-serialized value of the `ItemCollectionMetrics` response field. | dynamodb | +| `aws.dynamodb.limit` | The value of the `Limit` request parameter. | dynamodb | +| `aws.dynamodb.local_secondary_indexes` | The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. | dynamodb | +| `aws.dynamodb.projection` | The value of the `ProjectionExpression` request parameter. | dynamodb | +| `aws.dynamodb.provisioned_read_capacity` | The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. | dynamodb | +| `aws.dynamodb.provisioned_write_capacity` | The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. | dynamodb | +| `aws.dynamodb.scan_forward` | The value of the `ScanIndexForward` request parameter. | dynamodb | +| `aws.dynamodb.scanned_count` | The value of the `ScannedCount` response parameter. | dynamodb | +| `aws.dynamodb.segment` | The value of the `Segment` request parameter. | dynamodb | +| `aws.dynamodb.select` | The value of the `Select` request parameter. | dynamodb | +| `aws.dynamodb.table_count` | The number of items in the `TableNames` response parameter. | dynamodb | +| `aws.dynamodb.table_names` | The keys in the `RequestItems` object field. | dynamodb | +| `aws.dynamodb.total_segments` | The value of the `TotalSegments` request parameter. | dynamodb | +| `db.name` | The name of the database being accessed. | dynamodb | +| `db.operation` | The name of the operation being executed. | dynamodb | +| `db.statement` | The database statement being executed. | dynamodb | +| `db.system` | An identifier for the database management system (DBMS) product being used. | dynamodb | +| `faas.execution` | The execution ID of the current function execution. | lambda | +| `faas.invoked_name` | The name of the invoked function. | lambda | +| `faas.invoked_provider` | The cloud provider of the invoked function. | lambda | +| `faas.invoked_region` | The cloud region of the invoked function. | lambda | +| `messaging.destination` | The message destination name. | sns, sqs | +| `messaging.destination_kind` | The kind of message destination. | sns, sqs | +| `messaging.system` | A string identifying the messaging system. | sns, sqs | +| `messaging.operation` | A string identifying the kind of message consumption. | sqs | +| `messaging.message_id` | A value used by the messaging system as an identifier for the message. | sqs | +| `messaging.url` | The connection string. | sqs | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json index 9925809bb1..0500a453ef 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.40.0", + "version": "0.41.0", "description": "OpenTelemetry automatic instrumentation for the `aws-sdk` package", "keywords": [ "aws", @@ -45,9 +45,9 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/propagation-utils": "^0.30.8", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/propagation-utils": "^0.30.9", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { "@aws-sdk/client-dynamodb": "3.85.0", @@ -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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.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-aws-sdk/src/aws-sdk.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts index 349d2ff388..d20d480180 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts @@ -58,7 +58,7 @@ import { } from './utils'; import { propwrap } from './propwrap'; import { RequestMetadata } from './services/ServiceExtension'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_STATUS_CODE } from '@opentelemetry/semantic-conventions'; const V3_CLIENT_CONFIG_KEY = Symbol( 'opentelemetry.instrumentation.aws-sdk.client.config' @@ -72,24 +72,20 @@ type V2PluginRequest = AWS.Request & { [REQUEST_SPAN_KEY]?: Span; }; -export class AwsInstrumentation extends InstrumentationBase { +export class AwsInstrumentation extends InstrumentationBase { static readonly component = 'aws-sdk'; protected override _config!: AwsSdkInstrumentationConfig; private servicesExtensions: ServicesExtensions = new ServicesExtensions(); constructor(config: AwsSdkInstrumentationConfig = {}) { - super( - '@opentelemetry/instrumentation-aws-sdk', - VERSION, - Object.assign({}, config) - ); + super('@opentelemetry/instrumentation-aws-sdk', VERSION, config); } override setConfig(config: AwsSdkInstrumentationConfig = {}) { this._config = Object.assign({}, config); } - protected init(): InstrumentationModuleDefinition[] { + protected init(): InstrumentationModuleDefinition[] { const v3MiddlewareStackFileOldVersions = new InstrumentationNodeModuleFile( '@aws-sdk/middleware-stack/dist/cjs/MiddlewareStack.js', ['>=3.1.0 <3.35.0'], @@ -106,12 +102,13 @@ export class AwsInstrumentation extends InstrumentationBase { // as for aws-sdk v3.13.1, constructStack is exported from @aws-sdk/middleware-stack as // getter instead of function, which fails shimmer. // so we are patching the MiddlewareStack.js file directly to get around it. - const v3MiddlewareStack = new InstrumentationNodeModuleDefinition< - typeof AWS - >('@aws-sdk/middleware-stack', ['^3.1.0'], undefined, undefined, [ - v3MiddlewareStackFileOldVersions, - v3MiddlewareStackFileNewVersions, - ]); + const v3MiddlewareStack = new InstrumentationNodeModuleDefinition( + '@aws-sdk/middleware-stack', + ['^3.1.0'], + undefined, + undefined, + [v3MiddlewareStackFileOldVersions, v3MiddlewareStackFileNewVersions] + ); // Patch for @smithy/middleware-stack for @aws-sdk/* packages v3.363.0+. // As of @smithy/middleware-stack@2.1.0 `constructStack` is only available @@ -133,7 +130,7 @@ export class AwsInstrumentation extends InstrumentationBase { } ); - const v3SmithyClient = new InstrumentationNodeModuleDefinition( + const v3SmithyClient = new InstrumentationNodeModuleDefinition( '@aws-sdk/smithy-client', ['^3.1.0'], this.patchV3SmithyClient.bind(this), @@ -148,14 +145,14 @@ export class AwsInstrumentation extends InstrumentationBase { this.unpatchV3SmithyClient.bind(this) ); - const v2Request = new InstrumentationNodeModuleFile( + const v2Request = new InstrumentationNodeModuleFile( 'aws-sdk/lib/core.js', ['^2.308.0'], this.patchV2.bind(this), this.unpatchV2.bind(this) ); - const v2Module = new InstrumentationNodeModuleDefinition( + const v2Module = new InstrumentationNodeModuleDefinition( 'aws-sdk', ['^2.308.0'], undefined, @@ -173,9 +170,6 @@ export class AwsInstrumentation extends InstrumentationBase { } protected patchV3ConstructStack(moduleExports: any, moduleVersion?: string) { - diag.debug( - 'aws-sdk instrumentation: applying patch to aws-sdk v3 constructStack' - ); this._wrap( moduleExports, 'constructStack', @@ -185,17 +179,11 @@ export class AwsInstrumentation extends InstrumentationBase { } protected unpatchV3ConstructStack(moduleExports: any) { - diag.debug( - 'aws-sdk instrumentation: applying unpatch to aws-sdk v3 constructStack' - ); this._unwrap(moduleExports, 'constructStack'); return moduleExports; } protected patchV3SmithyClient(moduleExports: any) { - diag.debug( - 'aws-sdk instrumentation: applying patch to aws-sdk v3 client send' - ); this._wrap( moduleExports.Client.prototype, 'send', @@ -205,17 +193,11 @@ export class AwsInstrumentation extends InstrumentationBase { } protected unpatchV3SmithyClient(moduleExports: any) { - diag.debug( - 'aws-sdk instrumentation: applying patch to aws-sdk v3 constructStack' - ); this._unwrap(moduleExports.Client.prototype, 'send'); return moduleExports; } protected patchV2(moduleExports: any, moduleVersion?: string) { - diag.debug( - `aws-sdk instrumentation: applying patch to ${AwsInstrumentation.component}` - ); this.unpatchV2(moduleExports); this._wrap( moduleExports?.Request.prototype, @@ -369,10 +351,7 @@ export class AwsInstrumentation extends InstrumentationBase { const httpStatusCode = response.httpResponse?.statusCode; if (httpStatusCode) { - span.setAttribute( - SemanticAttributes.HTTP_STATUS_CODE, - httpStatusCode - ); + span.setAttribute(SEMATTRS_HTTP_STATUS_CODE, httpStatusCode); } span.end(); }); @@ -526,7 +505,7 @@ export class AwsInstrumentation extends InstrumentationBase { response.output?.$metadata?.httpStatusCode; if (httpStatusCode) { span.setAttribute( - SemanticAttributes.HTTP_STATUS_CODE, + SEMATTRS_HTTP_STATUS_CODE, httpStatusCode ); } diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/dynamodb.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/dynamodb.ts index 9407f32e34..499a5803bd 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/dynamodb.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/dynamodb.ts @@ -14,16 +14,40 @@ * limitations under the License. */ import { + Attributes, DiagLogger, Span, - SpanAttributes, SpanKind, Tracer, } from '@opentelemetry/api'; import { RequestMetadata, ServiceExtension } from './ServiceExtension'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_DYNAMODB, + SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, + SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ, + SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY, + SEMATTRS_AWS_DYNAMODB_COUNT, + SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE, + SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES, + SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES, + SEMATTRS_AWS_DYNAMODB_INDEX_NAME, + SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS, + SEMATTRS_AWS_DYNAMODB_LIMIT, + SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES, + SEMATTRS_AWS_DYNAMODB_PROJECTION, + SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY, + SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY, + SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD, + SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT, + SEMATTRS_AWS_DYNAMODB_SEGMENT, + SEMATTRS_AWS_DYNAMODB_SELECT, + SEMATTRS_AWS_DYNAMODB_TABLE_COUNT, + SEMATTRS_AWS_DYNAMODB_TABLE_NAMES, + SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS, + SEMATTRS_DB_NAME, + SEMATTRS_DB_OPERATION, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, } from '@opentelemetry/semantic-conventions'; import { AwsSdkInstrumentationConfig, @@ -46,10 +70,10 @@ export class DynamodbServiceExtension implements ServiceExtension { const isIncoming = false; const operation = normalizedRequest.commandName; - const spanAttributes: SpanAttributes = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.DYNAMODB, - [SemanticAttributes.DB_NAME]: normalizedRequest.commandInput?.TableName, - [SemanticAttributes.DB_OPERATION]: operation, + const spanAttributes: Attributes = { + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_DYNAMODB, + [SEMATTRS_DB_NAME]: normalizedRequest.commandInput?.TableName, + [SEMATTRS_DB_OPERATION]: operation, }; if (config.dynamoDBStatementSerializer) { @@ -60,7 +84,7 @@ export class DynamodbServiceExtension implements ServiceExtension { ); if (typeof sanitizedStatement === 'string') { - spanAttributes[SemanticAttributes.DB_STATEMENT] = sanitizedStatement; + spanAttributes[SEMATTRS_DB_STATEMENT] = sanitizedStatement; } } catch (err) { diag.error('failed to sanitize DynamoDB statement', err); @@ -72,11 +96,11 @@ export class DynamodbServiceExtension implements ServiceExtension { if (normalizedRequest.commandInput?.TableName) { // Necessary for commands with only 1 table name (example: CreateTable). Attribute is TableName not keys of RequestItems // single table name returned for operations like CreateTable - spanAttributes[SemanticAttributes.AWS_DYNAMODB_TABLE_NAMES] = [ + spanAttributes[SEMATTRS_AWS_DYNAMODB_TABLE_NAMES] = [ normalizedRequest.commandInput.TableName, ]; } else if (normalizedRequest.commandInput?.RequestItems) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_TABLE_NAMES] = Object.keys( + spanAttributes[SEMATTRS_AWS_DYNAMODB_TABLE_NAMES] = Object.keys( normalizedRequest.commandInput.RequestItems ); } @@ -84,13 +108,9 @@ export class DynamodbServiceExtension implements ServiceExtension { if (operation === 'CreateTable' || operation === 'UpdateTable') { // only check for ProvisionedThroughput since ReadCapacityUnits and WriteCapacity units are required attributes if (normalizedRequest.commandInput?.ProvisionedThroughput) { - spanAttributes[ - SemanticAttributes.AWS_DYNAMODB_PROVISIONED_READ_CAPACITY - ] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY] = normalizedRequest.commandInput.ProvisionedThroughput.ReadCapacityUnits; - spanAttributes[ - SemanticAttributes.AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY - ] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY] = normalizedRequest.commandInput.ProvisionedThroughput.WriteCapacityUnits; } } @@ -101,33 +121,31 @@ export class DynamodbServiceExtension implements ServiceExtension { operation === 'Query' ) { if (normalizedRequest.commandInput?.ConsistentRead) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_CONSISTENT_READ] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ] = normalizedRequest.commandInput.ConsistentRead; } } if (operation === 'Query' || operation === 'Scan') { if (normalizedRequest.commandInput?.ProjectionExpression) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_PROJECTION] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_PROJECTION] = normalizedRequest.commandInput.ProjectionExpression; } } if (operation === 'CreateTable') { if (normalizedRequest.commandInput?.GlobalSecondaryIndexes) { - spanAttributes[ - SemanticAttributes.AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES - ] = this.toArray( - normalizedRequest.commandInput.GlobalSecondaryIndexes - ).map((x: { [DictionaryKey: string]: any }) => JSON.stringify(x)); + spanAttributes[SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] = + this.toArray( + normalizedRequest.commandInput.GlobalSecondaryIndexes + ).map((x: { [DictionaryKey: string]: any }) => JSON.stringify(x)); } if (normalizedRequest.commandInput?.LocalSecondaryIndexes) { - spanAttributes[ - SemanticAttributes.AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES - ] = this.toArray( - normalizedRequest.commandInput.LocalSecondaryIndexes - ).map((x: { [DictionaryKey: string]: any }) => JSON.stringify(x)); + spanAttributes[SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES] = + this.toArray( + normalizedRequest.commandInput.LocalSecondaryIndexes + ).map((x: { [DictionaryKey: string]: any }) => JSON.stringify(x)); } } @@ -137,71 +155,70 @@ export class DynamodbServiceExtension implements ServiceExtension { operation === 'Scan' ) { if (normalizedRequest.commandInput?.Limit) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_LIMIT] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_LIMIT] = normalizedRequest.commandInput.Limit; } } if (operation === 'ListTables') { if (normalizedRequest.commandInput?.ExclusiveStartTableName) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_EXCLUSIVE_START_TABLE] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE] = normalizedRequest.commandInput.ExclusiveStartTableName; } } if (operation === 'Query') { if (normalizedRequest.commandInput?.ScanIndexForward) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_SCAN_FORWARD] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD] = normalizedRequest.commandInput.ScanIndexForward; } if (normalizedRequest.commandInput?.IndexName) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_INDEX_NAME] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_INDEX_NAME] = normalizedRequest.commandInput.IndexName; } if (normalizedRequest.commandInput?.Select) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_SELECT] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_SELECT] = normalizedRequest.commandInput.Select; } } if (operation === 'Scan') { if (normalizedRequest.commandInput?.Segment) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_SEGMENT] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_SEGMENT] = normalizedRequest.commandInput?.Segment; } if (normalizedRequest.commandInput?.TotalSegments) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_TOTAL_SEGMENTS] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS] = normalizedRequest.commandInput?.TotalSegments; } if (normalizedRequest.commandInput?.IndexName) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_INDEX_NAME] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_INDEX_NAME] = normalizedRequest.commandInput.IndexName; } if (normalizedRequest.commandInput?.Select) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_SELECT] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_SELECT] = normalizedRequest.commandInput.Select; } } if (operation === 'UpdateTable') { if (normalizedRequest.commandInput?.AttributeDefinitions) { - spanAttributes[SemanticAttributes.AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS] = + spanAttributes[SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS] = this.toArray(normalizedRequest.commandInput.AttributeDefinitions).map( (x: { [DictionaryKey: string]: any }) => JSON.stringify(x) ); } if (normalizedRequest.commandInput?.GlobalSecondaryIndexUpdates) { - spanAttributes[ - SemanticAttributes.AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES - ] = this.toArray( - normalizedRequest.commandInput.GlobalSecondaryIndexUpdates - ).map((x: { [DictionaryKey: string]: any }) => JSON.stringify(x)); + spanAttributes[SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES] = + this.toArray( + normalizedRequest.commandInput.GlobalSecondaryIndexUpdates + ).map((x: { [DictionaryKey: string]: any }) => JSON.stringify(x)); } } @@ -221,7 +238,7 @@ export class DynamodbServiceExtension implements ServiceExtension { ) { if (response.data?.ConsumedCapacity) { span.setAttribute( - SemanticAttributes.AWS_DYNAMODB_CONSUMED_CAPACITY, + SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY, toArray(response.data.ConsumedCapacity).map( (x: { [DictionaryKey: string]: any }) => JSON.stringify(x) ) @@ -230,7 +247,7 @@ export class DynamodbServiceExtension implements ServiceExtension { if (response.data?.ItemCollectionMetrics) { span.setAttribute( - SemanticAttributes.AWS_DYNAMODB_ITEM_COLLECTION_METRICS, + SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS, this.toArray(response.data.ItemCollectionMetrics).map( (x: { [DictionaryKey: string]: any }) => JSON.stringify(x) ) @@ -239,21 +256,18 @@ export class DynamodbServiceExtension implements ServiceExtension { if (response.data?.TableNames) { span.setAttribute( - SemanticAttributes.AWS_DYNAMODB_TABLE_COUNT, + SEMATTRS_AWS_DYNAMODB_TABLE_COUNT, response.data?.TableNames.length ); } if (response.data?.Count) { - span.setAttribute( - SemanticAttributes.AWS_DYNAMODB_COUNT, - response.data?.Count - ); + span.setAttribute(SEMATTRS_AWS_DYNAMODB_COUNT, response.data?.Count); } if (response.data?.ScannedCount) { span.setAttribute( - SemanticAttributes.AWS_DYNAMODB_SCANNED_COUNT, + SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT, response.data?.ScannedCount ); } diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/lambda.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/lambda.ts index 3254374966..3970c3c098 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/lambda.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/lambda.ts @@ -13,14 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { Span, SpanKind, Tracer, diag, Attributes } from '@opentelemetry/api'; import { - Span, - SpanKind, - Tracer, - diag, - SpanAttributes, -} from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; + SEMATTRS_FAAS_EXECUTION, + SEMATTRS_FAAS_INVOKED_NAME, + SEMATTRS_FAAS_INVOKED_PROVIDER, + SEMATTRS_FAAS_INVOKED_REGION, +} from '@opentelemetry/semantic-conventions'; import { AwsSdkInstrumentationConfig, NormalizedRequest, @@ -40,18 +39,17 @@ export class LambdaServiceExtension implements ServiceExtension { ): RequestMetadata { const functionName = this.extractFunctionName(request.commandInput); - let spanAttributes: SpanAttributes = {}; + let spanAttributes: Attributes = {}; let spanName: string | undefined; switch (request.commandName) { case 'Invoke': spanAttributes = { - [SemanticAttributes.FAAS_INVOKED_NAME]: functionName, - [SemanticAttributes.FAAS_INVOKED_PROVIDER]: 'aws', + [SEMATTRS_FAAS_INVOKED_NAME]: functionName, + [SEMATTRS_FAAS_INVOKED_PROVIDER]: 'aws', }; if (request.region) { - spanAttributes[SemanticAttributes.FAAS_INVOKED_REGION] = - request.region; + spanAttributes[SEMATTRS_FAAS_INVOKED_REGION] = request.region; } spanName = `${functionName} ${LambdaCommands.Invoke}`; break; @@ -87,10 +85,7 @@ export class LambdaServiceExtension implements ServiceExtension { switch (response.request.commandName) { case LambdaCommands.Invoke: { - span.setAttribute( - SemanticAttributes.FAAS_EXECUTION, - response.requestId - ); + span.setAttribute(SEMATTRS_FAAS_EXECUTION, response.requestId); } break; } diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sns.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sns.ts index f7416d0070..e825cdd309 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sns.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sns.ts @@ -13,10 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Span, Tracer, SpanKind, SpanAttributes } from '@opentelemetry/api'; +import { Span, Tracer, SpanKind, Attributes } from '@opentelemetry/api'; import { - MessagingDestinationKindValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_SYSTEM, } from '@opentelemetry/semantic-conventions'; import { NormalizedRequest, @@ -33,26 +35,26 @@ export class SnsServiceExtension implements ServiceExtension { ): RequestMetadata { let spanKind: SpanKind = SpanKind.CLIENT; let spanName = `SNS ${request.commandName}`; - const spanAttributes: SpanAttributes = { - [SemanticAttributes.MESSAGING_SYSTEM]: 'aws.sns', + const spanAttributes: Attributes = { + [SEMATTRS_MESSAGING_SYSTEM]: 'aws.sns', }; if (request.commandName === 'Publish') { spanKind = SpanKind.PRODUCER; - spanAttributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] = - MessagingDestinationKindValues.TOPIC; + spanAttributes[SEMATTRS_MESSAGING_DESTINATION_KIND] = + MESSAGINGDESTINATIONKINDVALUES_TOPIC; const { TopicArn, TargetArn, PhoneNumber } = request.commandInput; - spanAttributes[SemanticAttributes.MESSAGING_DESTINATION] = + spanAttributes[SEMATTRS_MESSAGING_DESTINATION] = this.extractDestinationName(TopicArn, TargetArn, PhoneNumber); - // ToDO: Use SpanAttributes.MESSAGING_DESTINATION_NAME when implemented + // ToDO: Use SEMATTRS_MESSAGING_DESTINATION_NAME when implemented spanAttributes['messaging.destination.name'] = TopicArn || TargetArn || PhoneNumber || 'unknown'; spanName = `${ PhoneNumber ? 'phone_number' - : spanAttributes[SemanticAttributes.MESSAGING_DESTINATION] + : spanAttributes[SEMATTRS_MESSAGING_DESTINATION] } send`; } diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts index d5052dfcae..07cedaa25d 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/sqs.ts @@ -21,7 +21,7 @@ import { trace, context, ROOT_CONTEXT, - SpanAttributes, + Attributes, } from '@opentelemetry/api'; import { pubsubPropagation } from '@opentelemetry/propagation-utils'; import { RequestMetadata, ServiceExtension } from './ServiceExtension'; @@ -32,9 +32,15 @@ import { NormalizedResponse, } from '../types'; import { - MessagingDestinationKindValues, - MessagingOperationValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_QUEUE, + MESSAGINGOPERATIONVALUES_PROCESS, + MESSAGINGOPERATIONVALUES_RECEIVE, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_MESSAGE_ID, + SEMATTRS_MESSAGING_OPERATION, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, } from '@opentelemetry/semantic-conventions'; import { contextGetter, @@ -53,12 +59,12 @@ export class SqsServiceExtension implements ServiceExtension { let spanKind: SpanKind = SpanKind.CLIENT; let spanName: string | undefined; - const spanAttributes: SpanAttributes = { - [SemanticAttributes.MESSAGING_SYSTEM]: 'aws.sqs', - [SemanticAttributes.MESSAGING_DESTINATION_KIND]: - MessagingDestinationKindValues.QUEUE, - [SemanticAttributes.MESSAGING_DESTINATION]: queueName, - [SemanticAttributes.MESSAGING_URL]: queueUrl, + const spanAttributes: Attributes = { + [SEMATTRS_MESSAGING_SYSTEM]: 'aws.sqs', + [SEMATTRS_MESSAGING_DESTINATION_KIND]: + MESSAGINGDESTINATIONKINDVALUES_QUEUE, + [SEMATTRS_MESSAGING_DESTINATION]: queueName, + [SEMATTRS_MESSAGING_URL]: queueUrl, }; let isIncoming = false; @@ -69,8 +75,8 @@ export class SqsServiceExtension implements ServiceExtension { isIncoming = true; spanKind = SpanKind.CONSUMER; spanName = `${queueName} receive`; - spanAttributes[SemanticAttributes.MESSAGING_OPERATION] = - MessagingOperationValues.RECEIVE; + spanAttributes[SEMATTRS_MESSAGING_OPERATION] = + MESSAGINGOPERATIONVALUES_RECEIVE; request.commandInput.MessageAttributeNames = addPropagationFieldsToAttributeNames( @@ -134,7 +140,7 @@ export class SqsServiceExtension implements ServiceExtension { switch (response.request.commandName) { case 'SendMessage': span.setAttribute( - SemanticAttributes.MESSAGING_MESSAGE_ID, + SEMATTRS_MESSAGING_MESSAGE_ID, response?.data?.MessageId ); break; @@ -164,14 +170,14 @@ export class SqsServiceExtension implements ServiceExtension { contextGetter ), attributes: { - [SemanticAttributes.MESSAGING_SYSTEM]: 'aws.sqs', - [SemanticAttributes.MESSAGING_DESTINATION]: queueName, - [SemanticAttributes.MESSAGING_DESTINATION_KIND]: - MessagingDestinationKindValues.QUEUE, - [SemanticAttributes.MESSAGING_MESSAGE_ID]: message.MessageId, - [SemanticAttributes.MESSAGING_URL]: queueUrl, - [SemanticAttributes.MESSAGING_OPERATION]: - MessagingOperationValues.PROCESS, + [SEMATTRS_MESSAGING_SYSTEM]: 'aws.sqs', + [SEMATTRS_MESSAGING_DESTINATION]: queueName, + [SEMATTRS_MESSAGING_DESTINATION_KIND]: + MESSAGINGDESTINATIONKINDVALUES_QUEUE, + [SEMATTRS_MESSAGING_MESSAGE_ID]: message.MessageId, + [SEMATTRS_MESSAGING_URL]: queueUrl, + [SEMATTRS_MESSAGING_OPERATION]: + MESSAGINGOPERATIONVALUES_PROCESS, }, }), processHook: (span: Span, message: SQS.Message) => diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/utils.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/utils.ts index df8cbc3e88..e3d0db6bdb 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/utils.ts @@ -14,8 +14,12 @@ * limitations under the License. */ import { NormalizedRequest } from './types'; -import { Context, SpanAttributes, context } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { Attributes, Context, context } from '@opentelemetry/api'; +import { + SEMATTRS_RPC_METHOD, + SEMATTRS_RPC_SERVICE, + SEMATTRS_RPC_SYSTEM, +} from '@opentelemetry/semantic-conventions'; import { AttributeNames } from './enums'; const toPascalCase = (str: string): string => @@ -60,11 +64,11 @@ export const normalizeV3Request = ( export const extractAttributesFromNormalizedRequest = ( normalizedRequest: NormalizedRequest -): SpanAttributes => { +): Attributes => { return { - [SemanticAttributes.RPC_SYSTEM]: 'aws-api', - [SemanticAttributes.RPC_METHOD]: normalizedRequest.commandName, - [SemanticAttributes.RPC_SERVICE]: normalizedRequest.serviceName, + [SEMATTRS_RPC_SYSTEM]: 'aws-api', + [SEMATTRS_RPC_METHOD]: normalizedRequest.commandName, + [SEMATTRS_RPC_SERVICE]: normalizedRequest.serviceName, [AttributeNames.AWS_REGION]: normalizedRequest.region, }; }; diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v2.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v2.test.ts index bf11de2060..545fe09bd0 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v2.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v2.test.ts @@ -32,7 +32,7 @@ import { SpanStatusCode, Span, SpanKind } from '@opentelemetry/api'; import { AttributeNames } from '../src/enums'; import { mockV2AwsSend } from './testing-utils'; import { expect } from 'expect'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_STATUS_CODE } from '@opentelemetry/semantic-conventions'; import { AWSError } from 'aws-sdk'; import { HttpResponse } from 'aws-sdk/lib/http_response'; @@ -131,9 +131,9 @@ describe('instrumentation-aws-sdk-v2', () => { expect(spanCreateBucket.attributes[AttributeNames.AWS_REGION]).toBe( 'us-east-1' ); - expect( - spanCreateBucket.attributes[SemanticAttributes.HTTP_STATUS_CODE] - ).toBe(200); + expect(spanCreateBucket.attributes[SEMATTRS_HTTP_STATUS_CODE]).toBe( + 200 + ); expect(spanCreateBucket.name).toBe('S3.CreateBucket'); expect(spanCreateBucket.kind).toEqual(SpanKind.CLIENT); @@ -159,9 +159,7 @@ describe('instrumentation-aws-sdk-v2', () => { 'us-east-1' ); expect(spanPutObject.name).toBe('S3.PutObject'); - expect( - spanPutObject.attributes[SemanticAttributes.HTTP_STATUS_CODE] - ).toBe(200); + expect(spanPutObject.attributes[SEMATTRS_HTTP_STATUS_CODE]).toBe(200); }); it('adds proper number of spans with correct attributes if both, promise and callback were used', async () => { @@ -210,9 +208,7 @@ describe('instrumentation-aws-sdk-v2', () => { expect(spanPutObjectCb.attributes[AttributeNames.AWS_REGION]).toBe( 'us-east-1' ); - expect( - spanPutObjectCb.attributes[SemanticAttributes.HTTP_STATUS_CODE] - ).toBe(200); + expect(spanPutObjectCb.attributes[SEMATTRS_HTTP_STATUS_CODE]).toBe(200); }); it('adds proper number of spans with correct attributes if only promise was used', async () => { @@ -248,9 +244,7 @@ describe('instrumentation-aws-sdk-v2', () => { expect(spanPutObjectCb.attributes[AttributeNames.AWS_REGION]).toBe( 'us-east-1' ); - expect( - spanPutObjectCb.attributes[SemanticAttributes.HTTP_STATUS_CODE] - ).toBe(200); + expect(spanPutObjectCb.attributes[SEMATTRS_HTTP_STATUS_CODE]).toBe(200); }); it('should create span if no callback is supplied', done => { @@ -304,9 +298,9 @@ describe('instrumentation-aws-sdk-v2', () => { }) ); - expect( - spanCreateBucket.attributes[SemanticAttributes.HTTP_STATUS_CODE] - ).toBe(400); + expect(spanCreateBucket.attributes[SEMATTRS_HTTP_STATUS_CODE]).toBe( + 400 + ); }); }); }); diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v3.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v3.test.ts index 3003da3051..8dee305175 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v3.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/aws-sdk-v3.test.ts @@ -42,9 +42,18 @@ import 'mocha'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { context, SpanStatusCode, trace, Span } from '@opentelemetry/api'; import { - MessagingDestinationKindValues, - MessagingOperationValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_QUEUE, + MESSAGINGOPERATIONVALUES_RECEIVE, + SEMATTRS_HTTP_STATUS_CODE, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_MESSAGE_ID, + SEMATTRS_MESSAGING_OPERATION, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, + SEMATTRS_RPC_METHOD, + SEMATTRS_RPC_SERVICE, + SEMATTRS_RPC_SYSTEM, } from '@opentelemetry/semantic-conventions'; import { AttributeNames } from '../src/enums'; import { expect } from 'expect'; @@ -72,15 +81,13 @@ describe('instrumentation-aws-sdk-v3', () => { await s3Client.putObject(params); expect(getTestSpans().length).toBe(1); const [span] = getTestSpans(); - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual('aws-api'); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( - 'PutObject' - ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual('S3'); + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual('PutObject'); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('S3'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); expect(span.name).toEqual('S3.PutObject'); expect(span.kind).toEqual(SpanKind.CLIENT); - expect(span.attributes[SemanticAttributes.HTTP_STATUS_CODE]).toEqual(200); + expect(span.attributes[SEMATTRS_HTTP_STATUS_CODE]).toEqual(200); }); it('callback interface', done => { @@ -98,18 +105,12 @@ describe('instrumentation-aws-sdk-v3', () => { s3Client.putObject(params, (err: any, data?: PutObjectCommandOutput) => { expect(getTestSpans().length).toBe(1); const [span] = getTestSpans(); - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual( - 'aws-api' - ); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( - 'PutObject' - ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual('S3'); + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual('PutObject'); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('S3'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); expect(span.name).toEqual('S3.PutObject'); - expect(span.attributes[SemanticAttributes.HTTP_STATUS_CODE]).toEqual( - 200 - ); + expect(span.attributes[SEMATTRS_HTTP_STATUS_CODE]).toEqual(200); done(); }); }); @@ -130,14 +131,12 @@ describe('instrumentation-aws-sdk-v3', () => { await client.send(new PutObjectCommand(params)); expect(getTestSpans().length).toBe(1); const [span] = getTestSpans(); - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual('aws-api'); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( - 'PutObject' - ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual('S3'); + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual('PutObject'); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('S3'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); expect(span.name).toEqual('S3.PutObject'); - expect(span.attributes[SemanticAttributes.HTTP_STATUS_CODE]).toEqual(200); + expect(span.attributes[SEMATTRS_HTTP_STATUS_CODE]).toEqual(200); }); it('aws error', async () => { @@ -165,13 +164,9 @@ describe('instrumentation-aws-sdk-v3', () => { expect(span.events.length).toBe(1); expect(span.events[0].name).toEqual('exception'); - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual( - 'aws-api' - ); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( - 'PutObject' - ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual('S3'); + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual('PutObject'); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('S3'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); expect(span.attributes[AttributeNames.AWS_REQUEST_ID]).toEqual( 'MS95GTS7KXQ34X2S' @@ -309,34 +304,26 @@ describe('instrumentation-aws-sdk-v3', () => { const [span] = getTestSpans(); // make sure we have the general aws attributes: - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual( - 'aws-api' - ); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( - 'SendMessage' - ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual('SQS'); + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual('SendMessage'); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('SQS'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); // custom messaging attributes - expect(span.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toEqual( - 'aws.sqs' + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual('aws.sqs'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND]).toEqual( + MESSAGINGDESTINATIONKINDVALUES_QUEUE ); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.QUEUE); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual('otel-demo-aws-sdk'); - expect(span.attributes[SemanticAttributes.MESSAGING_URL]).toEqual( + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + 'otel-demo-aws-sdk' + ); + expect(span.attributes[SEMATTRS_MESSAGING_URL]).toEqual( params.QueueUrl ); - expect( - span.attributes[SemanticAttributes.MESSAGING_MESSAGE_ID] - ).toEqual(response.MessageId); - expect(span.attributes[SemanticAttributes.HTTP_STATUS_CODE]).toEqual( - 200 + expect(span.attributes[SEMATTRS_MESSAGING_MESSAGE_ID]).toEqual( + response.MessageId ); + expect(span.attributes[SEMATTRS_HTTP_STATUS_CODE]).toEqual(200); }); it('sqs send message batch attributes', async () => { @@ -375,31 +362,25 @@ describe('instrumentation-aws-sdk-v3', () => { const [span] = getTestSpans(); // make sure we have the general aws attributes: - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual( - 'aws-api' - ); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual( 'SendMessageBatch' ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual('SQS'); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('SQS'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); // messaging semantic attributes - expect(span.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toEqual( - 'aws.sqs' + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual('aws.sqs'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND]).toEqual( + MESSAGINGDESTINATIONKINDVALUES_QUEUE ); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.QUEUE); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toEqual('otel-demo-aws-sdk'); - expect(span.attributes[SemanticAttributes.MESSAGING_URL]).toEqual( - params.QueueUrl + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( + 'otel-demo-aws-sdk' ); - expect(span.attributes[SemanticAttributes.HTTP_STATUS_CODE]).toEqual( - 200 + expect(span.attributes[SEMATTRS_MESSAGING_URL]).toEqual( + params.QueueUrl ); + expect(span.attributes[SEMATTRS_HTTP_STATUS_CODE]).toEqual(200); }); it('sqs receive add messaging attributes', done => { @@ -428,19 +409,13 @@ describe('instrumentation-aws-sdk-v3', () => { const [span] = getTestSpans(); // make sure we have the general aws attributes: - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual( - 'aws-api' - ); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual( 'ReceiveMessage' ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual( - 'SQS' - ); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('SQS'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); - expect(span.attributes[SemanticAttributes.HTTP_STATUS_CODE]).toEqual( - 200 - ); + expect(span.attributes[SEMATTRS_HTTP_STATUS_CODE]).toEqual(200); done(); }); }); @@ -474,8 +449,8 @@ describe('instrumentation-aws-sdk-v3', () => { expect(receiveCallbackSpan).toBeDefined(); const attributes = (receiveCallbackSpan as unknown as ReadableSpan) .attributes; - expect(attributes[SemanticAttributes.MESSAGING_OPERATION]).toMatch( - MessagingOperationValues.RECEIVE + expect(attributes[SEMATTRS_MESSAGING_OPERATION]).toMatch( + MESSAGINGOPERATIONVALUES_RECEIVE ); done(); }); diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/dynamodb.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/dynamodb.test.ts index ea4317c63d..de34fd8a84 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/dynamodb.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/dynamodb.test.ts @@ -30,8 +30,32 @@ import { AWSError } from 'aws-sdk'; import { mockV2AwsSend } from './testing-utils'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_DYNAMODB, + SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, + SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ, + SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY, + SEMATTRS_AWS_DYNAMODB_COUNT, + SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE, + SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES, + SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES, + SEMATTRS_AWS_DYNAMODB_INDEX_NAME, + SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS, + SEMATTRS_AWS_DYNAMODB_LIMIT, + SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES, + SEMATTRS_AWS_DYNAMODB_PROJECTION, + SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY, + SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY, + SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD, + SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT, + SEMATTRS_AWS_DYNAMODB_SEGMENT, + SEMATTRS_AWS_DYNAMODB_SELECT, + SEMATTRS_AWS_DYNAMODB_TABLE_COUNT, + SEMATTRS_AWS_DYNAMODB_TABLE_NAMES, + SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS, + SEMATTRS_DB_NAME, + SEMATTRS_DB_OPERATION, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, } from '@opentelemetry/semantic-conventions'; import { expect } from 'expect'; import type { ConsumedCapacity as ConsumedCapacityV2 } from 'aws-sdk/clients/dynamodb'; @@ -90,33 +114,27 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); - expect(attrs[SemanticAttributes.DB_NAME]).toStrictEqual('test-table'); - expect(attrs[SemanticAttributes.DB_OPERATION]).toStrictEqual('Query'); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_SCAN_FORWARD] - ).toStrictEqual(true); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_CONSISTENT_READ] - ).toStrictEqual(true); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_INDEX_NAME] - ).toStrictEqual('name_to_group'); - expect(attrs[SemanticAttributes.AWS_DYNAMODB_SELECT]).toStrictEqual( - 'ALL_ATTRIBUTES' + expect(attrs[SEMATTRS_DB_NAME]).toStrictEqual('test-table'); + expect(attrs[SEMATTRS_DB_OPERATION]).toStrictEqual('Query'); + expect(attrs[SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD]).toStrictEqual(true); + expect(attrs[SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ]).toStrictEqual( + true ); - expect(attrs[SemanticAttributes.AWS_DYNAMODB_LIMIT]).toStrictEqual( - 10 + expect(attrs[SEMATTRS_AWS_DYNAMODB_INDEX_NAME]).toStrictEqual( + 'name_to_group' ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_TABLE_NAMES] - ).toStrictEqual(['test-table']); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_PROJECTION] - ).toStrictEqual('id'); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs[SEMATTRS_AWS_DYNAMODB_SELECT]).toStrictEqual( + 'ALL_ATTRIBUTES' + ); + expect(attrs[SEMATTRS_AWS_DYNAMODB_LIMIT]).toStrictEqual(10); + expect(attrs[SEMATTRS_AWS_DYNAMODB_TABLE_NAMES]).toStrictEqual([ + 'test-table', + ]); + expect(attrs[SEMATTRS_AWS_DYNAMODB_PROJECTION]).toStrictEqual('id'); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -157,39 +175,29 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); - expect(attrs[SemanticAttributes.DB_NAME]).toStrictEqual('test-table'); - expect(attrs[SemanticAttributes.DB_OPERATION]).toStrictEqual('Scan'); - expect(attrs[SemanticAttributes.AWS_DYNAMODB_SEGMENT]).toStrictEqual( - 10 + expect(attrs[SEMATTRS_DB_NAME]).toStrictEqual('test-table'); + expect(attrs[SEMATTRS_DB_OPERATION]).toStrictEqual('Scan'); + expect(attrs[SEMATTRS_AWS_DYNAMODB_SEGMENT]).toStrictEqual(10); + expect(attrs[SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS]).toStrictEqual( + 100 ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_TOTAL_SEGMENTS] - ).toStrictEqual(100); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_INDEX_NAME] - ).toStrictEqual('index_name'); - expect(attrs[SemanticAttributes.AWS_DYNAMODB_SELECT]).toStrictEqual( - 'ALL_ATTRIBUTES' - ); - expect(attrs[SemanticAttributes.AWS_DYNAMODB_COUNT]).toStrictEqual( - 10 + expect(attrs[SEMATTRS_AWS_DYNAMODB_INDEX_NAME]).toStrictEqual( + 'index_name' ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_SCANNED_COUNT] - ).toStrictEqual(50); - expect(attrs[SemanticAttributes.AWS_DYNAMODB_LIMIT]).toStrictEqual( - 10 + expect(attrs[SEMATTRS_AWS_DYNAMODB_SELECT]).toStrictEqual( + 'ALL_ATTRIBUTES' ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_TABLE_NAMES] - ).toStrictEqual(['test-table']); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_PROJECTION] - ).toStrictEqual('id'); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs[SEMATTRS_AWS_DYNAMODB_COUNT]).toStrictEqual(10); + expect(attrs[SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT]).toStrictEqual(50); + expect(attrs[SEMATTRS_AWS_DYNAMODB_LIMIT]).toStrictEqual(10); + expect(attrs[SEMATTRS_AWS_DYNAMODB_TABLE_NAMES]).toStrictEqual([ + 'test-table', + ]); + expect(attrs[SEMATTRS_AWS_DYNAMODB_PROJECTION]).toStrictEqual('id'); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -226,16 +234,16 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_ITEM_COLLECTION_METRICS] + attrs[SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS] ).toStrictEqual([ JSON.stringify({ ItemCollectionKey: [], SizeEstimateRangeGB: [0] }), ]); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -321,29 +329,29 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_ITEM_COLLECTION_METRICS] + attrs[SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS] ).toStrictEqual([ JSON.stringify({ ItemCollectionKey: [], SizeEstimateRangeGB: [0] }), ]); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] + attrs[SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] ).toStrictEqual([JSON.stringify(globalSecondaryIndexMockData)]); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES] + attrs[SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES] ).toStrictEqual([JSON.stringify(localSecondaryIndexMockData)]); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_PROVISIONED_READ_CAPACITY] + attrs[SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY] ).toStrictEqual(20); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY] + attrs[SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY] ).toStrictEqual(30); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -394,14 +402,12 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); expect( - attrs[ - SemanticAttributes.AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES - ] + attrs[SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES] ).toStrictEqual([ JSON.stringify({ Update: { @@ -414,7 +420,7 @@ describe('DynamoDB', () => { }), ]); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS] + attrs[SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS] ).toStrictEqual([ JSON.stringify({ AttributeName: 'test_attr', @@ -422,12 +428,12 @@ describe('DynamoDB', () => { }), ]); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_PROVISIONED_READ_CAPACITY] + attrs[SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY] ).toStrictEqual(10); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY] + attrs[SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY] ).toStrictEqual(15); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -455,21 +461,17 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_EXCLUSIVE_START_TABLE] + attrs[SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE] ).toStrictEqual('start_table'); - expect(attrs[SemanticAttributes.AWS_DYNAMODB_LIMIT]).toStrictEqual( - 10 - ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_TABLE_COUNT] - ).toStrictEqual(3); + expect(attrs[SEMATTRS_AWS_DYNAMODB_LIMIT]).toStrictEqual(10); + expect(attrs[SEMATTRS_AWS_DYNAMODB_TABLE_COUNT]).toStrictEqual(3); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -511,19 +513,17 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); - expect(attrs[SemanticAttributes.DB_OPERATION]).toStrictEqual( - 'BatchGetItem' - ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_TABLE_NAMES] - ).toStrictEqual(['test-table']); + expect(attrs[SEMATTRS_DB_OPERATION]).toStrictEqual('BatchGetItem'); + expect(attrs[SEMATTRS_AWS_DYNAMODB_TABLE_NAMES]).toStrictEqual([ + 'test-table', + ]); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_CONSUMED_CAPACITY] + attrs[SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY] ).toBeUndefined(); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -556,23 +556,19 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB - ); - expect(attrs[SemanticAttributes.DB_OPERATION]).toStrictEqual( - 'BatchGetItem' + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_TABLE_NAMES] - ).toStrictEqual(['test-table']); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_CONSUMED_CAPACITY] - ).toStrictEqual( + expect(attrs[SEMATTRS_DB_OPERATION]).toStrictEqual('BatchGetItem'); + expect(attrs[SEMATTRS_AWS_DYNAMODB_TABLE_NAMES]).toStrictEqual([ + 'test-table', + ]); + expect(attrs[SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY]).toStrictEqual( consumedCapacityResponseMockData.map((x: ConsumedCapacity) => JSON.stringify(x) ) ); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -605,17 +601,15 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual('dynamodb'); - expect(attrs[SemanticAttributes.DB_OPERATION]).toStrictEqual( - 'BatchGetItem' - ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_TABLE_NAMES] - ).toStrictEqual(['test-table']); + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual('dynamodb'); + expect(attrs[SEMATTRS_DB_OPERATION]).toStrictEqual('BatchGetItem'); + expect(attrs[SEMATTRS_AWS_DYNAMODB_TABLE_NAMES]).toStrictEqual([ + 'test-table', + ]); expect( - attrs[SemanticAttributes.AWS_DYNAMODB_CONSUMED_CAPACITY] + attrs[SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY] ).toBeUndefined(); - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -644,15 +638,11 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); - expect(attrs[SemanticAttributes.DB_OPERATION]).toStrictEqual( - 'PutItem' - ); - expect( - attrs[SemanticAttributes.AWS_DYNAMODB_CONSUMED_CAPACITY] - ).toStrictEqual([ + expect(attrs[SEMATTRS_DB_OPERATION]).toStrictEqual('PutItem'); + expect(attrs[SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY]).toStrictEqual([ JSON.stringify({ TableName: 'test-table', CapacityUnits: 0.5, @@ -681,14 +671,12 @@ describe('DynamoDB', () => { const spans = getTestSpans(); expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_SYSTEM]).toStrictEqual( - DbSystemValues.DYNAMODB - ); - expect(attrs[SemanticAttributes.DB_OPERATION]).toStrictEqual( - 'PutItem' + expect(attrs[SEMATTRS_DB_SYSTEM]).toStrictEqual( + DBSYSTEMVALUES_DYNAMODB ); + expect(attrs[SEMATTRS_DB_OPERATION]).toStrictEqual('PutItem'); expect(attrs).not.toHaveProperty( - SemanticAttributes.AWS_DYNAMODB_CONSUMED_CAPACITY + SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY ); expect(err).toBeFalsy(); done(); @@ -753,7 +741,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -796,7 +784,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -839,7 +827,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs).not.toHaveProperty(SemanticAttributes.DB_STATEMENT); + expect(attrs).not.toHaveProperty(SEMATTRS_DB_STATEMENT); expect(err).toBeFalsy(); done(); } @@ -939,7 +927,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_STATEMENT]).toStrictEqual( + expect(attrs[SEMATTRS_DB_STATEMENT]).toStrictEqual( SERIALIZED_DB_STATEMENT ); expect(err).toBeFalsy(); @@ -1023,7 +1011,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_STATEMENT]).toStrictEqual( + expect(attrs[SEMATTRS_DB_STATEMENT]).toStrictEqual( SERIALIZED_DB_STATEMENT ); expect(err).toBeFalsy(); @@ -1072,7 +1060,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_STATEMENT]).toStrictEqual( + expect(attrs[SEMATTRS_DB_STATEMENT]).toStrictEqual( SERIALIZED_DB_STATEMENT ); expect(err).toBeFalsy(); @@ -1101,7 +1089,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_STATEMENT]).toStrictEqual( + expect(attrs[SEMATTRS_DB_STATEMENT]).toStrictEqual( SERIALIZED_DB_STATEMENT ); expect(err).toBeFalsy(); @@ -1136,7 +1124,7 @@ describe('DynamoDB', () => { expect(spans.length).toStrictEqual(1); const attrs = spans[0].attributes; - expect(attrs[SemanticAttributes.DB_STATEMENT]).toStrictEqual( + expect(attrs[SEMATTRS_DB_STATEMENT]).toStrictEqual( SERIALIZED_DB_STATEMENT ); expect(err).toBeFalsy(); diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/lambda.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/lambda.test.ts index be3965a872..36fc14d990 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/lambda.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/lambda.test.ts @@ -21,7 +21,11 @@ import { } from '@opentelemetry/contrib-test-utils'; registerInstrumentationTesting(new AwsInstrumentation()); -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_FAAS_EXECUTION, + SEMATTRS_FAAS_INVOKED_NAME, + SEMATTRS_FAAS_INVOKED_PROVIDER, +} from '@opentelemetry/semantic-conventions'; import { SpanKind } from '@opentelemetry/api'; import { Lambda, InvocationType } from '@aws-sdk/client-lambda'; @@ -90,9 +94,7 @@ describe('Lambda', () => { }; const span = await getInvokedSpan(params); - expect( - span.attributes[SemanticAttributes.FAAS_INVOKED_PROVIDER] - ).toEqual('aws'); + expect(span.attributes[SEMATTRS_FAAS_INVOKED_PROVIDER]).toEqual('aws'); }); it('should add the function name as a semantic attribute', async () => { @@ -107,7 +109,7 @@ describe('Lambda', () => { }; const span = await getInvokedSpan(params); - expect(span.attributes[SemanticAttributes.FAAS_INVOKED_NAME]).toEqual( + expect(span.attributes[SEMATTRS_FAAS_INVOKED_NAME]).toEqual( 'ot-test-function-name' ); }); @@ -347,12 +349,10 @@ describe('Lambda', () => { const [span] = getTestSpans(); expect(span.kind).toEqual(SpanKind.CLIENT); - expect(span.attributes[SemanticAttributes.FAAS_INVOKED_NAME]).toEqual( + expect(span.attributes[SEMATTRS_FAAS_INVOKED_NAME]).toEqual( 'ot-test-function-name' ); - expect( - span.attributes[SemanticAttributes.FAAS_INVOKED_PROVIDER] - ).toEqual('aws'); + expect(span.attributes[SEMATTRS_FAAS_INVOKED_PROVIDER]).toEqual('aws'); }); }); @@ -385,7 +385,7 @@ describe('Lambda', () => { expect(getTestSpans().length).toBe(1); const [span] = getTestSpans(); - expect(span.attributes[SemanticAttributes.FAAS_EXECUTION]).toEqual( + expect(span.attributes[SEMATTRS_FAAS_EXECUTION]).toEqual( '95882c2b-3fd2-485d-ada3-9fcb1ca65459' ); }); diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sns.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sns.test.ts index 36fa27e3d8..f8d4dd777f 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sns.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sns.test.ts @@ -31,8 +31,11 @@ import { expect } from 'expect'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as sinon from 'sinon'; import { - MessagingDestinationKindValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_TOPIC, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_RPC_METHOD, } from '@opentelemetry/semantic-conventions'; import { SpanKind } from '@opentelemetry/api'; @@ -78,21 +81,17 @@ describe('SNS - v2', () => { expect(publishSpans.length).toBe(1); const publishSpan = publishSpans[0]; - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toBe(MessagingDestinationKindValues.TOPIC); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toBe(topicName); - expect(publishSpan.attributes['messaging.destination.name']).toBe( - fakeARN + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND]).toBe( + MESSAGINGDESTINATIONKINDVALUES_TOPIC ); - expect(publishSpan.attributes[SemanticAttributes.RPC_METHOD]).toBe( - 'Publish' + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toBe( + topicName ); - expect(publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toBe( - 'aws.sns' + expect(publishSpan.attributes['messaging.destination.name']).toBe( + fakeARN ); + expect(publishSpan.attributes[SEMATTRS_RPC_METHOD]).toBe('Publish'); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toBe('aws.sns'); expect(publishSpan.kind).toBe(SpanKind.PRODUCER); }); @@ -111,9 +110,9 @@ describe('SNS - v2', () => { ); expect(publishSpans.length).toBe(1); const publishSpan = publishSpans[0]; - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toBe(PhoneNumber); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toBe( + PhoneNumber + ); expect(publishSpan.attributes['messaging.destination.name']).toBe( PhoneNumber ); @@ -158,12 +157,10 @@ describe('SNS - v2', () => { const createTopicSpan = createTopicSpans[0]; expect( - createTopicSpan.attributes[ - SemanticAttributes.MESSAGING_DESTINATION_KIND - ] + createTopicSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND] ).toBeUndefined(); expect( - createTopicSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] + createTopicSpan.attributes[SEMATTRS_MESSAGING_DESTINATION] ).toBeUndefined(); expect( createTopicSpan.attributes['messaging.destination.name'] @@ -208,21 +205,17 @@ describe('SNS - v3', () => { expect(publishSpans.length).toBe(1); const publishSpan = publishSpans[0]; - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toBe(MessagingDestinationKindValues.TOPIC); - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toBe(topicV3Name); - expect(publishSpan.attributes['messaging.destination.name']).toBe( - topicV3ARN + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND]).toBe( + MESSAGINGDESTINATIONKINDVALUES_TOPIC ); - expect(publishSpan.attributes[SemanticAttributes.RPC_METHOD]).toBe( - 'Publish' + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toBe( + topicV3Name ); - expect(publishSpan.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toBe( - 'aws.sns' + expect(publishSpan.attributes['messaging.destination.name']).toBe( + topicV3ARN ); + expect(publishSpan.attributes[SEMATTRS_RPC_METHOD]).toBe('Publish'); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_SYSTEM]).toBe('aws.sns'); expect(publishSpan.kind).toBe(SpanKind.PRODUCER); }); @@ -238,9 +231,9 @@ describe('SNS - v3', () => { ); expect(publishSpans.length).toBe(1); const publishSpan = publishSpans[0]; - expect( - publishSpan.attributes[SemanticAttributes.MESSAGING_DESTINATION] - ).toBe(PhoneNumber); + expect(publishSpan.attributes[SEMATTRS_MESSAGING_DESTINATION]).toBe( + PhoneNumber + ); }); }); }); diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts index f0bdd33599..e97d82bb2c 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts @@ -26,9 +26,19 @@ import { AWSError } from 'aws-sdk'; import type { SQS } from 'aws-sdk'; import { - MessagingDestinationKindValues, - MessagingOperationValues, - SemanticAttributes, + MESSAGINGDESTINATIONKINDVALUES_QUEUE, + MESSAGINGOPERATIONVALUES_PROCESS, + MESSAGINGOPERATIONVALUES_RECEIVE, + SEMATTRS_HTTP_STATUS_CODE, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_DESTINATION_KIND, + SEMATTRS_MESSAGING_MESSAGE_ID, + SEMATTRS_MESSAGING_OPERATION, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_URL, + SEMATTRS_RPC_METHOD, + SEMATTRS_RPC_SERVICE, + SEMATTRS_RPC_SYSTEM, } from '@opentelemetry/semantic-conventions'; import { context, @@ -179,15 +189,15 @@ describe('SQS', () => { ) => { const awsReceiveSpan = spans.filter( s => - s.attributes[SemanticAttributes.MESSAGING_OPERATION] === - MessagingOperationValues.RECEIVE + s.attributes[SEMATTRS_MESSAGING_OPERATION] === + MESSAGINGOPERATIONVALUES_RECEIVE ); expect(awsReceiveSpan.length).toBe(1); const processSpans = spans.filter( s => - s.attributes[SemanticAttributes.MESSAGING_OPERATION] === - MessagingOperationValues.PROCESS + s.attributes[SEMATTRS_MESSAGING_OPERATION] === + MESSAGINGOPERATIONVALUES_PROCESS ); expect(processSpans.length).toBe(2); expect(processSpans[0].parentSpanId).toStrictEqual( @@ -382,30 +392,24 @@ describe('SQS', () => { const [span] = getTestSpans(); // make sure we have the general aws attributes: - expect(span.attributes[SemanticAttributes.RPC_SYSTEM]).toEqual('aws-api'); - expect(span.attributes[SemanticAttributes.RPC_METHOD]).toEqual( - 'SendMessage' - ); - expect(span.attributes[SemanticAttributes.RPC_SERVICE]).toEqual('SQS'); + expect(span.attributes[SEMATTRS_RPC_SYSTEM]).toEqual('aws-api'); + expect(span.attributes[SEMATTRS_RPC_METHOD]).toEqual('SendMessage'); + expect(span.attributes[SEMATTRS_RPC_SERVICE]).toEqual('SQS'); expect(span.attributes[AttributeNames.AWS_REGION]).toEqual(region); // custom messaging attributes - expect(span.attributes[SemanticAttributes.MESSAGING_SYSTEM]).toEqual( - 'aws.sqs' + expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual('aws.sqs'); + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION_KIND]).toEqual( + MESSAGINGDESTINATIONKINDVALUES_QUEUE ); - expect( - span.attributes[SemanticAttributes.MESSAGING_DESTINATION_KIND] - ).toEqual(MessagingDestinationKindValues.QUEUE); - expect(span.attributes[SemanticAttributes.MESSAGING_DESTINATION]).toEqual( + expect(span.attributes[SEMATTRS_MESSAGING_DESTINATION]).toEqual( QueueName ); - expect(span.attributes[SemanticAttributes.MESSAGING_URL]).toEqual( - params.QueueUrl - ); - expect(span.attributes[SemanticAttributes.MESSAGING_MESSAGE_ID]).toEqual( + expect(span.attributes[SEMATTRS_MESSAGING_URL]).toEqual(params.QueueUrl); + expect(span.attributes[SEMATTRS_MESSAGING_MESSAGE_ID]).toEqual( response.MessageId ); - expect(span.attributes[SemanticAttributes.HTTP_STATUS_CODE]).toEqual(200); + expect(span.attributes[SEMATTRS_HTTP_STATUS_CODE]).toEqual(200); }); it('sqsProcessHook called and add message attribute to span', async () => { @@ -435,8 +439,8 @@ describe('SQS', () => { const processSpans = getTestSpans().filter( s => - s.attributes[SemanticAttributes.MESSAGING_OPERATION] === - MessagingOperationValues.PROCESS + s.attributes[SEMATTRS_MESSAGING_OPERATION] === + MESSAGINGOPERATIONVALUES_PROCESS ); expect(processSpans.length).toBe(2); expect( @@ -459,8 +463,8 @@ describe('SQS', () => { ); const processSpans = getTestSpans().filter( s => - s.attributes[SemanticAttributes.MESSAGING_OPERATION] === - MessagingOperationValues.PROCESS + s.attributes[SEMATTRS_MESSAGING_OPERATION] === + MESSAGINGOPERATIONVALUES_PROCESS ); expect(processSpans.length).toBe(2); }); @@ -488,8 +492,8 @@ describe('SQS', () => { const processSpans = getTestSpans().filter( s => - s.attributes[SemanticAttributes.MESSAGING_OPERATION] === - MessagingOperationValues.PROCESS + s.attributes[SEMATTRS_MESSAGING_OPERATION] === + MESSAGINGOPERATIONVALUES_PROCESS ); expect(processSpans.length).toBe(2); expect(processSpans[0].status.code).toStrictEqual(SpanStatusCode.UNSET); @@ -514,7 +518,7 @@ describe('SQS', () => { expect(spans.length).toBe(1); // Spot check a single attribute as a sanity check. - expect(spans[0].attributes[SemanticAttributes.RPC_METHOD]).toEqual( + expect(spans[0].attributes[SEMATTRS_RPC_METHOD]).toEqual( 'SendMessageBatch' ); }); diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md index 48e001d183..22ea9bc8c9 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-bunyan/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-bunyan-v0.37.0...instrumentation-bunyan-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/LICENSE b/plugins/node/opentelemetry-instrumentation-bunyan/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-bunyan/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/package.json b/plugins/node/opentelemetry-instrumentation-bunyan/package.json index 2ba62b7309..2392146e10 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.37.0", + "version": "0.38.0", "description": "OpenTelemetry instrumentation for bunyan", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/resources": "^1.8.0", - "@opentelemetry/sdk-logs": "^0.50.0", + "@opentelemetry/sdk-logs": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.0.0", @@ -63,8 +63,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/api-logs": "^0.50.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/api-logs": "^0.51.0", + "@opentelemetry/instrumentation": "^0.51.0", "@types/bunyan": "1.8.9" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-bunyan#readme" diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts index d3e76a74ce..0f218787ea 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts @@ -32,9 +32,7 @@ const DEFAULT_CONFIG: BunyanInstrumentationConfig = { disableLogCorrelation: false, }; -export class BunyanInstrumentation extends InstrumentationBase< - typeof BunyanLogger -> { +export class BunyanInstrumentation extends InstrumentationBase { constructor(config: BunyanInstrumentationConfig = {}) { super( '@opentelemetry/instrumentation-bunyan', @@ -45,11 +43,10 @@ export class BunyanInstrumentation extends InstrumentationBase< protected init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'bunyan', ['<2.0'], - (module: any, moduleVersion) => { - this._diag.debug(`Applying patch for bunyan@${moduleVersion}`); + (module: any) => { const instrumentation = this; const Logger = module[Symbol.toStringTag] === 'Module' @@ -106,7 +103,7 @@ export class BunyanInstrumentation extends InstrumentationBase< return this._config; } - override setConfig(config: BunyanInstrumentationConfig) { + override setConfig(config: BunyanInstrumentationConfig = {}) { this._config = Object.assign({}, DEFAULT_CONFIG, config); } diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md index 9409eb0758..8f9bcdec60 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-cassandra/CHANGELOG.md @@ -6,6 +6,26 @@ * 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-cassandra-driver-v0.37.0...instrumentation-cassandra-driver-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/LICENSE b/plugins/node/opentelemetry-instrumentation-cassandra/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-cassandra/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/README.md b/plugins/node/opentelemetry-instrumentation-cassandra/README.md index 637bcf4fa2..8743ebffaf 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/README.md +++ b/plugins/node/opentelemetry-instrumentation-cassandra/README.md @@ -49,6 +49,21 @@ await client.execute('select * from foo'); `>=4.4 <5.0` +## 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 | +| ----------------------- | ------------------------------------------------------------------------------ | +| `db.name` | This attribute is used to report the name of the database being accessed. | +| `db.statement` | The database statement being executed. | +| `db.system` | An identifier for the database management system (DBMS) product being used. | +| `db.user` | Username for accessing the database. | +| `net.peer.name` | Remote hostname or similar. | +| `net.peer.port` | Remote port number. | + ## Useful links * For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/package.json b/plugins/node/opentelemetry-instrumentation-cassandra/package.json index ce04542bba..73ffc747d6 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.37.0", + "version": "0.38.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -61,8 +61,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-cassandra#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts index fe2f9718e5..f11ffab83e 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts @@ -18,7 +18,7 @@ import { context, trace, Span, - SpanAttributes, + Attributes, SpanKind, SpanStatusCode, } from '@opentelemetry/api'; @@ -31,8 +31,13 @@ import { } from '@opentelemetry/instrumentation'; import { CassandraDriverInstrumentationConfig, ResultSet } from './types'; import { - SemanticAttributes, - DbSystemValues, + DBSYSTEMVALUES_CASSANDRA, + SEMATTRS_DB_NAME, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import { VERSION } from './version'; import { EventEmitter } from 'events'; @@ -48,13 +53,10 @@ export class CassandraDriverInstrumentation extends InstrumentationBase { } protected init() { - return new InstrumentationNodeModuleDefinition( + return new InstrumentationNodeModuleDefinition( 'cassandra-driver', supportedVersions, - (driverModule, moduleVersion) => { - this._diag.debug( - `Applying patch for cassandra-driver@${moduleVersion}` - ); + driverModule => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const Client = driverModule.Client.prototype as any; @@ -76,10 +78,7 @@ export class CassandraDriverInstrumentation extends InstrumentationBase { return driverModule; }, - (driverModule, moduleVersion) => { - this._diag.debug( - `Removing patch for cassandra-driver@${moduleVersion}` - ); + driverModule => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const Client = driverModule.Client.prototype as any; @@ -178,10 +177,10 @@ export class CassandraDriverInstrumentation extends InstrumentationBase { if (span !== undefined && conn !== undefined) { const port = parseInt(conn.port, 10); - span.setAttribute(SemanticAttributes.NET_PEER_NAME, conn.address); + span.setAttribute(SEMATTRS_NET_PEER_NAME, conn.address); if (!isNaN(port)) { - span.setAttribute(SemanticAttributes.NET_PEER_PORT, port); + span.setAttribute(SEMATTRS_NET_PEER_PORT, port); } } @@ -308,24 +307,24 @@ export class CassandraDriverInstrumentation extends InstrumentationBase { { op, query }: { op: string; query?: unknown }, client: CassandraDriver.Client ): Span { - const attributes: SpanAttributes = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.CASSANDRA, + const attributes: Attributes = { + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_CASSANDRA, }; if (this._shouldIncludeDbStatement() && query !== undefined) { const statement = truncateQuery(query, this._getMaxQueryLength()); - attributes[SemanticAttributes.DB_STATEMENT] = statement; + attributes[SEMATTRS_DB_STATEMENT] = statement; } // eslint-disable-next-line @typescript-eslint/no-explicit-any const user = (client as any).options?.credentials?.username; if (user) { - attributes[SemanticAttributes.DB_USER] = user; + attributes[SEMATTRS_DB_USER] = user; } if (client.keyspace) { - attributes[SemanticAttributes.DB_NAME] = client.keyspace; + attributes[SEMATTRS_DB_NAME] = client.keyspace; } return this.tracer.startSpan(`cassandra-driver.${op}`, { diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/test/cassandra-driver.test.ts b/plugins/node/opentelemetry-instrumentation-cassandra/test/cassandra-driver.test.ts index c7a802d4b8..c663ab0abe 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/test/cassandra-driver.test.ts +++ b/plugins/node/opentelemetry-instrumentation-cassandra/test/cassandra-driver.test.ts @@ -30,8 +30,13 @@ import { import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { - SemanticAttributes, - DbSystemValues, + DBSYSTEMVALUES_CASSANDRA, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_USER, + SEMATTRS_EXCEPTION_MESSAGE, + SEMATTRS_EXCEPTION_STACKTRACE, + SEMATTRS_EXCEPTION_TYPE, } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; import * as testUtils from '@opentelemetry/contrib-test-utils'; @@ -60,13 +65,13 @@ function assertSpan( customAttributes?: Attributes ) { const attributes: Attributes = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.CASSANDRA, - [SemanticAttributes.DB_USER]: 'cassandra', + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_CASSANDRA, + [SEMATTRS_DB_USER]: 'cassandra', ...customAttributes, }; if (query !== undefined) { - attributes[SemanticAttributes.DB_STATEMENT] = query; + attributes[SEMATTRS_DB_STATEMENT] = query; } const spanStatus = @@ -98,12 +103,12 @@ function assertErrorSpan( const [span] = spans; const attributes: Attributes = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.CASSANDRA, - [SemanticAttributes.DB_USER]: 'cassandra', + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_CASSANDRA, + [SEMATTRS_DB_USER]: 'cassandra', }; if (query !== undefined) { - attributes[SemanticAttributes.DB_STATEMENT] = query; + attributes[SEMATTRS_DB_STATEMENT] = query; } const events = [ @@ -111,9 +116,9 @@ function assertErrorSpan( name: 'exception', droppedAttributesCount: 0, attributes: { - [SemanticAttributes.EXCEPTION_STACKTRACE]: error.stack, - [SemanticAttributes.EXCEPTION_MESSAGE]: error.message, - [SemanticAttributes.EXCEPTION_TYPE]: String(error.code), + [SEMATTRS_EXCEPTION_STACKTRACE]: error.stack, + [SEMATTRS_EXCEPTION_MESSAGE]: error.message, + [SEMATTRS_EXCEPTION_TYPE]: String(error.code), }, time: span.events[0].time, }, diff --git a/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md index b131149ea0..58957c90b7 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-connect-v0.35.0...instrumentation-connect-v0.36.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-connect/LICENSE b/plugins/node/opentelemetry-instrumentation-connect/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-connect/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-connect/README.md b/plugins/node/opentelemetry-instrumentation-connect/README.md index 5f6cd30f7b..d16302b84a 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/README.md +++ b/plugins/node/opentelemetry-instrumentation-connect/README.md @@ -51,6 +51,16 @@ registerInstrumentations({ See [examples/connect](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/connect) for a short example. +## 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 | +| ------------ | ---------------------------------- | +| `http.route` | The matched route (path template). | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-connect/package.json b/plugins/node/opentelemetry-instrumentation-connect/package.json index 22a2df2ffc..dda633198c 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.35.0", + "version": "0.36.0", "description": "OpenTelemetry connect automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -56,8 +56,8 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/connect": "3.4.36" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-connect#readme" diff --git a/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts index 97a06d8a37..5b57f5f7bb 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { context, diag, Span, SpanOptions } from '@opentelemetry/api'; +import { context, Span, SpanOptions } from '@opentelemetry/api'; import { getRPCMetadata, RPCType } from '@opentelemetry/core'; import type { HandleFunction, NextFunction, Server } from 'connect'; import type { ServerResponse } from 'http'; @@ -31,7 +31,7 @@ import { InstrumentationNodeModuleDefinition, isWrapped, } from '@opentelemetry/instrumentation'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions'; import { replaceCurrentStackRoute, addNewStackLayer, @@ -41,26 +41,18 @@ import { export const ANONYMOUS_NAME = 'anonymous'; /** Connect instrumentation for OpenTelemetry */ -export class ConnectInstrumentation extends InstrumentationBase { +export class ConnectInstrumentation extends InstrumentationBase { constructor(config: InstrumentationConfig = {}) { - super( - '@opentelemetry/instrumentation-connect', - VERSION, - Object.assign({}, config) - ); + super('@opentelemetry/instrumentation-connect', VERSION, config); } init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'connect', ['^3.0.0'], - (moduleExports, moduleVersion) => { - diag.debug(`Applying patch for connect@${moduleVersion}`); + moduleExports => { return this._patchConstructor(moduleExports); - }, - (moduleExports, moduleVersion) => { - diag.debug(`Removing patch for connect@${moduleVersion}`); } ), ]; @@ -108,7 +100,7 @@ export class ConnectInstrumentation extends InstrumentationBase { const spanName = `${connectTypeName} - ${connectName}`; const options: SpanOptions = { attributes: { - [SemanticAttributes.HTTP_ROUTE]: routeName.length > 0 ? routeName : '/', + [SEMATTRS_HTTP_ROUTE]: routeName.length > 0 ? routeName : '/', [AttributeNames.CONNECT_TYPE]: connectType, [AttributeNames.CONNECT_NAME]: connectName, }, diff --git a/plugins/node/opentelemetry-instrumentation-connect/test/instrumentation.test.ts b/plugins/node/opentelemetry-instrumentation-connect/test/instrumentation.test.ts index c6ab9456d2..cc2ef79fb5 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/test/instrumentation.test.ts +++ b/plugins/node/opentelemetry-instrumentation-connect/test/instrumentation.test.ts @@ -17,7 +17,7 @@ import * as assert from 'assert'; import { context, trace } from '@opentelemetry/api'; import { RPCType, setRPCMetadata, RPCMetadata } from '@opentelemetry/core'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { @@ -144,7 +144,7 @@ describe('connect', () => { assert.deepStrictEqual(span.attributes, { 'connect.type': 'middleware', 'connect.name': ANONYMOUS_NAME, - [SemanticAttributes.HTTP_ROUTE]: '/', + [SEMATTRS_HTTP_ROUTE]: '/', }); assert.strictEqual(span.name, 'middleware - anonymous'); }); @@ -163,7 +163,7 @@ describe('connect', () => { assert.deepStrictEqual(span.attributes, { 'connect.type': 'middleware', 'connect.name': 'middleware1', - [SemanticAttributes.HTTP_ROUTE]: '/', + [SEMATTRS_HTTP_ROUTE]: '/', }); assert.strictEqual(span.name, 'middleware - middleware1'); }); @@ -181,7 +181,7 @@ describe('connect', () => { assert.deepStrictEqual(span.attributes, { 'connect.type': 'request_handler', 'connect.name': '/foo', - [SemanticAttributes.HTTP_ROUTE]: '/foo', + [SEMATTRS_HTTP_ROUTE]: '/foo', }); assert.strictEqual(span.name, 'request handler - /foo'); }); diff --git a/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md index 532bace379..ff4e23d5ae 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-dns/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.36.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-dns-v0.36.0...instrumentation-dns-v0.36.1) (2024-05-02) + + +### Bug Fixes + +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-dns-v0.35.0...instrumentation-dns-v0.36.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-dns/LICENSE b/plugins/node/opentelemetry-instrumentation-dns/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-dns/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-dns/package.json b/plugins/node/opentelemetry-instrumentation-dns/package.json index 6f28ccf5fb..f22e99e808 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.35.0", + "version": "0.36.1", "description": "OpenTelemetry dns automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -59,7 +59,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0", "semver": "^7.5.4" }, diff --git a/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts index 319a27e1c1..0be1211a60 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts @@ -15,6 +15,8 @@ */ import { LookupAddress } from 'dns'; +import type * as dns from 'dns'; +import * as dnsPromises from 'dns/promises'; import { diag, Span, SpanKind } from '@opentelemetry/api'; import { InstrumentationBase, @@ -27,8 +29,6 @@ import { DnsInstrumentationConfig } from './types'; import * as utils from './utils'; import { VERSION } from './version'; import { - Dns, - DnsPromises, LookupCallbackSignature, LookupPromiseSignature, } from './internal-types'; @@ -36,21 +36,22 @@ import { /** * Dns instrumentation for Opentelemetry */ -export class DnsInstrumentation extends InstrumentationBase { - constructor(protected override _config: DnsInstrumentationConfig = {}) { - super('@opentelemetry/instrumentation-dns', VERSION, _config); +export class DnsInstrumentation extends InstrumentationBase { + protected override _config!: DnsInstrumentationConfig; + + constructor(config: DnsInstrumentationConfig = {}) { + super('@opentelemetry/instrumentation-dns', VERSION, config); } init(): ( - | InstrumentationNodeModuleDefinition - | InstrumentationNodeModuleDefinition + | InstrumentationNodeModuleDefinition + | InstrumentationNodeModuleDefinition )[] { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'dns', ['*'], - moduleExports => { - diag.debug('Applying patch for dns'); + (moduleExports: typeof dns) => { if (isWrapped(moduleExports.lookup)) { this._unwrap(moduleExports, 'lookup'); } @@ -66,16 +67,14 @@ export class DnsInstrumentation extends InstrumentationBase { }, moduleExports => { if (moduleExports === undefined) return; - diag.debug('Removing patch for dns'); this._unwrap(moduleExports, 'lookup'); this._unwrap(moduleExports.promises, 'lookup'); } ), - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'dns/promises', ['*'], - moduleExports => { - diag.debug('Applying patch for dns/promises'); + (moduleExports: typeof dnsPromises) => { if (isWrapped(moduleExports.lookup)) { this._unwrap(moduleExports, 'lookup'); } @@ -85,7 +84,6 @@ export class DnsInstrumentation extends InstrumentationBase { }, moduleExports => { if (moduleExports === undefined) return; - diag.debug('Removing patch for dns/promises'); this._unwrap(moduleExports, 'lookup'); } ), @@ -107,7 +105,6 @@ export class DnsInstrumentation extends InstrumentationBase { private _getPatchLookupFunction( original: (hostname: string, ...args: unknown[]) => void ) { - diag.debug('patch lookup function'); const plugin = this; return function patchedLookup( this: {}, diff --git a/plugins/node/opentelemetry-instrumentation-dns/src/internal-types.ts b/plugins/node/opentelemetry-instrumentation-dns/src/internal-types.ts index 26638ba1a7..2a404e4326 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/src/internal-types.ts +++ b/plugins/node/opentelemetry-instrumentation-dns/src/internal-types.ts @@ -15,10 +15,6 @@ */ import type * as dns from 'dns'; -import type * as dnsPromises from 'dns/promises'; - -export type Dns = typeof dns; -export type DnsPromises = typeof dnsPromises; export type LookupFunction = (( hostname: string, diff --git a/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md index 1e48aed920..f236522440 100644 --- a/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-express-v0.37.0...instrumentation-express-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0 + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-express/LICENSE b/plugins/node/opentelemetry-instrumentation-express/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-express/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-express/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-express/README.md b/plugins/node/opentelemetry-instrumentation-express/README.md index 9818cc5e2d..f6758e09db 100644 --- a/plugins/node/opentelemetry-instrumentation-express/README.md +++ b/plugins/node/opentelemetry-instrumentation-express/README.md @@ -148,9 +148,9 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i Attributes collected: -| Attribute | Short Description | Notes | -| ------------ | ---------------------------------- | -------------------------- | -| `http.route` | The matched route (path template). | Key: `SEMATTRS_HTTP_ROUTE` | +| Attribute | Short Description | +| ------------ | ---------------------------------- | +| `http.route` | The matched route (path template). | ## Useful links diff --git a/plugins/node/opentelemetry-instrumentation-express/package.json b/plugins/node/opentelemetry-instrumentation-express/package.json index 6c3aa8a2c0..ea404c3154 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.37.0", + "version": "0.38.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/express": "4.17.18", @@ -64,7 +64,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-express#readme" diff --git a/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts index 3df15aa699..76da7ffe5f 100644 --- a/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts @@ -29,6 +29,7 @@ import { AttributeNames } from './enums/AttributeNames'; import { asErrorAndMessage, getLayerMetadata, + getLayerPath, isLayerIgnored, storeLayerPath, } from './utils'; @@ -49,15 +50,9 @@ import { } from './internal-types'; /** Express instrumentation for OpenTelemetry */ -export class ExpressInstrumentation extends InstrumentationBase< - typeof express -> { +export class ExpressInstrumentation extends InstrumentationBase { constructor(config: ExpressInstrumentationConfig = {}) { - super( - '@opentelemetry/instrumentation-express', - VERSION, - Object.assign({}, config) - ); + super('@opentelemetry/instrumentation-express', VERSION, config); } override setConfig(config: ExpressInstrumentationConfig = {}) { @@ -70,11 +65,10 @@ export class ExpressInstrumentation extends InstrumentationBase< init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'express', ['^4.0.0'], - (moduleExports, moduleVersion) => { - diag.debug(`Applying patch for express@${moduleVersion}`); + moduleExports => { const routerProto = moduleExports.Router as unknown as express.Router; // patch express.Router.route if (isWrapped(routerProto.route)) { @@ -99,9 +93,8 @@ export class ExpressInstrumentation extends InstrumentationBase< ); return moduleExports; }, - (moduleExports, moduleVersion) => { + moduleExports => { if (moduleExports === undefined) return; - diag.debug(`Removing patch for express@${moduleVersion}`); const routerProto = moduleExports.Router as unknown as express.Router; this._unwrap(routerProto, 'route'); this._unwrap(routerProto, 'use'); @@ -123,10 +116,7 @@ export class ExpressInstrumentation extends InstrumentationBase< ) { const route = original.apply(this, args); const layer = this.stack[this.stack.length - 1] as ExpressLayer; - instrumentation._applyPatch( - layer, - typeof args[0] === 'string' ? args[0] : undefined - ); + instrumentation._applyPatch(layer, getLayerPath(args)); return route; }; }; @@ -144,10 +134,7 @@ export class ExpressInstrumentation extends InstrumentationBase< ) { const route = original.apply(this, args); const layer = this.stack[this.stack.length - 1] as ExpressLayer; - instrumentation._applyPatch( - layer, - typeof args[0] === 'string' ? args[0] : undefined - ); + instrumentation._applyPatch(layer, getLayerPath(args)); return route; }; }; @@ -168,7 +155,7 @@ export class ExpressInstrumentation extends InstrumentationBase< instrumentation._applyPatch.call( instrumentation, layer, - typeof args[0] === 'string' ? args[0] : undefined + getLayerPath(args) ); return route; }; diff --git a/plugins/node/opentelemetry-instrumentation-express/src/types.ts b/plugins/node/opentelemetry-instrumentation-express/src/types.ts index 50d76df514..4ccb36e6af 100644 --- a/plugins/node/opentelemetry-instrumentation-express/src/types.ts +++ b/plugins/node/opentelemetry-instrumentation-express/src/types.ts @@ -18,6 +18,8 @@ import { Span } from '@opentelemetry/api'; import { InstrumentationConfig } from '@opentelemetry/instrumentation'; import { ExpressLayerType } from './enums/ExpressLayerType'; +export type LayerPathSegment = string | RegExp | number; + export type IgnoreMatcher = string | RegExp | ((name: string) => boolean); export type ExpressRequestInfo = { diff --git a/plugins/node/opentelemetry-instrumentation-express/src/utils.ts b/plugins/node/opentelemetry-instrumentation-express/src/utils.ts index 7e51b84124..fa7b0ee9a0 100644 --- a/plugins/node/opentelemetry-instrumentation-express/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-express/src/utils.ts @@ -15,7 +15,11 @@ */ import { Attributes } from '@opentelemetry/api'; -import { IgnoreMatcher, ExpressInstrumentationConfig } from './types'; +import { + IgnoreMatcher, + ExpressInstrumentationConfig, + LayerPathSegment, +} from './types'; import { ExpressLayerType } from './enums/ExpressLayerType'; import { AttributeNames } from './enums/AttributeNames'; import { @@ -145,3 +149,31 @@ export const asErrorAndMessage = ( error instanceof Error ? [error, error.message] : [String(error), String(error)]; + +/** + * Extracts the layer path from the route arguments + * + * @param args - Arguments of the route + * @returns The layer path + */ +export const getLayerPath = ( + args: [LayerPathSegment | LayerPathSegment[], ...unknown[]] +): string | undefined => { + if (Array.isArray(args[0])) { + return args[0].map(arg => extractLayerPathSegment(arg) || '').join(','); + } + + return extractLayerPathSegment(args[0]); +}; + +const extractLayerPathSegment = (arg: LayerPathSegment) => { + if (typeof arg === 'string') { + return arg; + } + + if (arg instanceof RegExp || typeof arg === 'number') { + return arg.toString(); + } + + return; +}; diff --git a/plugins/node/opentelemetry-instrumentation-express/test/express.test.ts b/plugins/node/opentelemetry-instrumentation-express/test/express.test.ts index f573a4a669..16c4602b36 100644 --- a/plugins/node/opentelemetry-instrumentation-express/test/express.test.ts +++ b/plugins/node/opentelemetry-instrumentation-express/test/express.test.ts @@ -566,4 +566,168 @@ describe('ExpressInstrumentation', () => { }, }); }); + + it('should set a correct transaction name for routes specified in RegEx', async () => { + await testUtils.runTestFixture({ + cwd: __dirname, + argv: ['fixtures/use-express-regex.mjs'], + env: { + NODE_OPTIONS: + '--experimental-loader=@opentelemetry/instrumentation/hook.mjs', + NODE_NO_WARNINGS: '1', + TEST_REGEX_ROUTE: '/test/regex', + }, + checkResult: (err, stdout, stderr) => { + assert.ifError(err); + }, + checkCollector: (collector: testUtils.TestCollector) => { + const spans = collector.sortedSpans; + + assert.strictEqual(spans[0].name, 'GET /\\/test\\/regex/'); + assert.strictEqual(spans[0].kind, SpanKind.CLIENT); + assert.strictEqual(spans[1].name, 'middleware - query'); + assert.strictEqual(spans[1].kind, SpanKind.SERVER); + assert.strictEqual(spans[1].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[2].name, 'middleware - expressInit'); + assert.strictEqual(spans[2].kind, SpanKind.SERVER); + assert.strictEqual(spans[2].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[3].name, 'middleware - simpleMiddleware'); + assert.strictEqual(spans[3].kind, SpanKind.SERVER); + assert.strictEqual(spans[3].parentSpanId, spans[0].spanId); + assert.strictEqual( + spans[4].name, + 'request handler - /\\/test\\/regex/' + ); + assert.strictEqual(spans[4].kind, SpanKind.SERVER); + assert.strictEqual(spans[4].parentSpanId, spans[0].spanId); + }, + }); + }); + + it('should set a correct transaction name for routes consisting of array including numbers', async () => { + await testUtils.runTestFixture({ + cwd: __dirname, + argv: ['fixtures/use-express-regex.mjs'], + env: { + NODE_OPTIONS: + '--experimental-loader=@opentelemetry/instrumentation/hook.mjs', + NODE_NO_WARNINGS: '1', + TEST_REGEX_ROUTE: '/test/6/test', + }, + checkResult: err => { + assert.ifError(err); + }, + checkCollector: (collector: testUtils.TestCollector) => { + const spans = collector.sortedSpans; + + assert.strictEqual(spans[0].name, 'GET /test,6,/test/'); + assert.strictEqual(spans[0].kind, SpanKind.CLIENT); + assert.strictEqual(spans[1].name, 'middleware - query'); + assert.strictEqual(spans[1].kind, SpanKind.SERVER); + assert.strictEqual(spans[1].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[2].name, 'middleware - expressInit'); + assert.strictEqual(spans[2].kind, SpanKind.SERVER); + assert.strictEqual(spans[2].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[3].name, 'middleware - simpleMiddleware'); + assert.strictEqual(spans[3].kind, SpanKind.SERVER); + assert.strictEqual(spans[3].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[4].name, 'request handler - /test,6,/test/'); + assert.strictEqual(spans[4].kind, SpanKind.SERVER); + assert.strictEqual(spans[4].parentSpanId, spans[0].spanId); + }, + }); + }); + + for (const segment of ['array1', 'array5']) { + it('should set a correct transaction name for routes consisting of arrays of routes', async () => { + await testUtils.runTestFixture({ + cwd: __dirname, + argv: ['fixtures/use-express-regex.mjs'], + env: { + NODE_OPTIONS: + '--experimental-loader=@opentelemetry/instrumentation/hook.mjs', + NODE_NO_WARNINGS: '1', + TEST_REGEX_ROUTE: `/test/${segment}`, + }, + checkResult: err => { + assert.ifError(err); + }, + checkCollector: (collector: testUtils.TestCollector) => { + const spans = collector.sortedSpans; + + assert.strictEqual( + spans[0].name, + 'GET /test/array1,/\\/test\\/array[2-9]/' + ); + assert.strictEqual(spans[0].kind, SpanKind.CLIENT); + assert.strictEqual(spans[1].name, 'middleware - query'); + assert.strictEqual(spans[1].kind, SpanKind.SERVER); + assert.strictEqual(spans[1].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[2].name, 'middleware - expressInit'); + assert.strictEqual(spans[2].kind, SpanKind.SERVER); + assert.strictEqual(spans[2].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[3].name, 'middleware - simpleMiddleware'); + assert.strictEqual(spans[3].kind, SpanKind.SERVER); + assert.strictEqual(spans[3].parentSpanId, spans[0].spanId); + assert.strictEqual( + spans[4].name, + 'request handler - /test/array1,/\\/test\\/array[2-9]/' + ); + assert.strictEqual(spans[4].kind, SpanKind.SERVER); + assert.strictEqual(spans[4].parentSpanId, spans[0].spanId); + }, + }); + }); + } + + for (const segment of [ + 'arr/545', + 'arr/required', + 'arr/required', + 'arr/requiredPath', + 'arr/required/lastParam', + 'arr55/required/lastParam', + 'arr/requiredPath/optionalPath/', + 'arr/requiredPath/optionalPath/lastParam', + ]) { + it('should handle more complex regexes in route arrays correctly', async () => { + await testUtils.runTestFixture({ + cwd: __dirname, + argv: ['fixtures/use-express-regex.mjs'], + env: { + NODE_OPTIONS: + '--experimental-loader=@opentelemetry/instrumentation/hook.mjs', + NODE_NO_WARNINGS: '1', + TEST_REGEX_ROUTE: `/test/${segment}`, + }, + checkResult: err => { + assert.ifError(err); + }, + checkCollector: (collector: testUtils.TestCollector) => { + const spans = collector.sortedSpans; + + assert.strictEqual( + spans[0].name, + 'GET /test/arr/:id,/\\/test\\/arr[0-9]*\\/required(path)?(\\/optionalPath)?\\/(lastParam)?/' + ); + assert.strictEqual(spans[0].kind, SpanKind.CLIENT); + assert.strictEqual(spans[1].name, 'middleware - query'); + assert.strictEqual(spans[1].kind, SpanKind.SERVER); + assert.strictEqual(spans[1].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[2].name, 'middleware - expressInit'); + assert.strictEqual(spans[2].kind, SpanKind.SERVER); + assert.strictEqual(spans[2].parentSpanId, spans[0].spanId); + assert.strictEqual(spans[3].name, 'middleware - simpleMiddleware'); + assert.strictEqual(spans[3].kind, SpanKind.SERVER); + assert.strictEqual(spans[3].parentSpanId, spans[0].spanId); + assert.strictEqual( + spans[4].name, + 'request handler - /test/arr/:id,/\\/test\\/arr[0-9]*\\/required(path)?(\\/optionalPath)?\\/(lastParam)?/' + ); + assert.strictEqual(spans[4].kind, SpanKind.SERVER); + assert.strictEqual(spans[4].parentSpanId, spans[0].spanId); + }, + }); + }); + } }); diff --git a/plugins/node/opentelemetry-instrumentation-express/test/fixtures/use-express-regex.mjs b/plugins/node/opentelemetry-instrumentation-express/test/fixtures/use-express-regex.mjs new file mode 100644 index 0000000000..8fc412841b --- /dev/null +++ b/plugins/node/opentelemetry-instrumentation-express/test/fixtures/use-express-regex.mjs @@ -0,0 +1,85 @@ +/* + * 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. + */ + +// Use express from an ES module: +// node --experimental-loader=@opentelemetry/instrumentation/hook.mjs use-express-regex.mjs + +import { promisify } from 'util'; +import { createTestNodeSdk } from '@opentelemetry/contrib-test-utils'; + +import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; +import { ExpressInstrumentation } from '../../build/src/index.js'; + +const sdk = createTestNodeSdk({ + serviceName: 'use-express-regex', + instrumentations: [new HttpInstrumentation(), new ExpressInstrumentation()], +}); +sdk.start(); + +import express from 'express'; +import * as http from 'http'; + +const app = express(); + +app.use(async function simpleMiddleware(req, res, next) { + // Wait a short delay to ensure this "middleware - ..." span clearly starts + // before the "router - ..." span. The test rely on a start-time-based sort + // of the produced spans. If they start in the same millisecond, then tests + // can be flaky. + await promisify(setTimeout)(10); + next(); +}); + +app.get( + [ + '/test/arr/:id', + /\/test\/arr[0-9]*\/required(path)?(\/optionalPath)?\/(lastParam)?/, + ], + (_req, res) => { + res.send({ response: 'response' }); + } +); + +app.get(/\/test\/regex/, (_req, res) => { + res.send({ response: 'response 2' }); +}); + +app.get(['/test/array1', /\/test\/array[2-9]/], (_req, res) => { + res.send({ response: 'response 3' }); +}); + +app.get(['/test', 6, /test/], (_req, res) => { + res.send({ response: 'response 4' }); +}); + +const server = http.createServer(app); +await new Promise(resolve => server.listen(0, resolve)); +const port = server.address().port; + +await new Promise(resolve => { + http.get( + `http://localhost:${port}${process.env.TEST_REGEX_ROUTE}`, + res => { + res.resume(); + res.on('end', () => { + resolve(); + }); + } + ); +}); + +await new Promise(resolve => server.close(resolve)); +await sdk.shutdown(); diff --git a/plugins/node/opentelemetry-instrumentation-express/test/utils.test.ts b/plugins/node/opentelemetry-instrumentation-express/test/utils.test.ts index fc927a9b7f..098bab4e8c 100644 --- a/plugins/node/opentelemetry-instrumentation-express/test/utils.test.ts +++ b/plugins/node/opentelemetry-instrumentation-express/test/utils.test.ts @@ -165,4 +165,28 @@ describe('Utils', () => { assert.strictEqual(message, '2'); }); }); + + describe('getLayerPath', () => { + it('should return path for a string route definition', () => { + assert.strictEqual(utils.getLayerPath(['/test']), '/test'); + }); + + it('should return path for a regex route definition', () => { + assert.strictEqual(utils.getLayerPath([/^\/test$/]), '/^\\/test$/'); + }); + + it('should return path for an array of route definitions', () => { + assert.strictEqual( + utils.getLayerPath([[/^\/test$/, '/test']]), + '/^\\/test$/,/test' + ); + }); + + it('should return path for a mixed array of route definitions', () => { + assert.strictEqual( + utils.getLayerPath([[/^\/test$/, '/test', /^\/test$/]]), + '/^\\/test$/,/test,/^\\/test$/' + ); + }); + }); }); diff --git a/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md index ccca7532ed..e74deb3ea1 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-fastify/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [0.36.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-fastify-v0.36.0...instrumentation-fastify-v0.36.1) (2024-05-02) + + +### Bug Fixes + +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-fastify-v0.35.0...instrumentation-fastify-v0.36.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0 + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-fastify/LICENSE b/plugins/node/opentelemetry-instrumentation-fastify/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-fastify/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-fastify/README.md b/plugins/node/opentelemetry-instrumentation-fastify/README.md index 9f230b7b5b..ffaf255868 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/README.md +++ b/plugins/node/opentelemetry-instrumentation-fastify/README.md @@ -74,9 +74,9 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i Attributes collected: -| Attribute | Short Description | Notes | -| ------------ | ---------------------------------- | -------------------------- | -| `http.route` | The matched route (path template). | Key: `SEMATTRS_HTTP_ROUTE` | +| Attribute | Short Description | +| ------------ | ---------------------------------- | +| `http.route` | The matched route (path template). | ## Useful links diff --git a/plugins/node/opentelemetry-instrumentation-fastify/package.json b/plugins/node/opentelemetry-instrumentation-fastify/package.json index 0f527fc875..f8ab73c62d 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.35.0", + "version": "0.36.1", "description": "OpenTelemetry fastify automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -43,11 +43,11 @@ "@opentelemetry/api": "^1.3.0" }, "devDependencies": { - "@fastify/express": "^2.0.2", + "@fastify/express": "^3.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation-http": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation-http": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/express": "4.17.18", @@ -65,7 +65,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.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 223ed28854..208a2e09a5 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts @@ -48,11 +48,7 @@ export const ANONYMOUS_NAME = 'anonymous'; /** Fastify instrumentation for OpenTelemetry */ export class FastifyInstrumentation extends InstrumentationBase { constructor(config: FastifyInstrumentationConfig = {}) { - super( - '@opentelemetry/instrumentation-fastify', - VERSION, - Object.assign({}, config) - ); + super('@opentelemetry/instrumentation-fastify', VERSION, config); } override setConfig(config: FastifyInstrumentationConfig = {}) { @@ -65,11 +61,10 @@ export class FastifyInstrumentation extends InstrumentationBase { init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'fastify', ['^3.0.0', '^4.0.0'], - (moduleExports, moduleVersion) => { - this._diag.debug(`Applying patch for fastify@${moduleVersion}`); + moduleExports => { return this._patchConstructor(moduleExports); } ), @@ -199,7 +194,6 @@ export class FastifyInstrumentation extends InstrumentationBase { fastify: () => FastifyInstance; }): () => FastifyInstance { const instrumentation = this; - this._diag.debug('Patching fastify constructor function'); function fastify(this: FastifyInstance, ...args: any) { const app: FastifyInstance = moduleExports.fastify.apply(this, args); diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md index 9d9de9fe99..c8706562c2 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-generic-pool-v0.35.0...instrumentation-generic-pool-v0.36.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/LICENSE b/plugins/node/opentelemetry-instrumentation-generic-pool/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json index 05466afff6..62f2ac2af7 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.35.0", + "version": "0.36.0", "description": "OpenTelemetry Generic Pool automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -59,7 +59,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-generic-pool#readme" diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts index 35a9266e36..adefe5a7be 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts @@ -28,21 +28,20 @@ import { VERSION } from './version'; const MODULE_NAME = 'generic-pool'; -export default class Instrumentation extends InstrumentationBase { +export default class Instrumentation extends InstrumentationBase { // only used for v2 - v2.3) private _isDisabled = false; constructor(config: InstrumentationConfig = {}) { - super(`@opentelemetry/instrumentation-${MODULE_NAME}`, VERSION); + super(`@opentelemetry/instrumentation-${MODULE_NAME}`, VERSION, config); } init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( MODULE_NAME, ['>=3'], - (moduleExports, moduleVersion) => { - api.diag.debug(`Applying patch for ${MODULE_NAME}@${moduleVersion}`); + moduleExports => { const Pool: any = moduleExports.Pool; if (isWrapped(Pool.prototype.acquire)) { this._unwrap(Pool.prototype, 'acquire'); @@ -54,18 +53,16 @@ export default class Instrumentation extends InstrumentationBase { ); return moduleExports; }, - (moduleExports, moduleVersion) => { - api.diag.debug(`Removing patch for ${MODULE_NAME}@${moduleVersion}`); + moduleExports => { const Pool: any = moduleExports.Pool; this._unwrap(Pool.prototype, 'acquire'); return moduleExports; } ), - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( MODULE_NAME, ['^2.4'], - (moduleExports, moduleVersion) => { - api.diag.debug(`Applying patch for ${MODULE_NAME}@${moduleVersion}`); + moduleExports => { const Pool: any = moduleExports.Pool; if (isWrapped(Pool.prototype.acquire)) { this._unwrap(Pool.prototype, 'acquire'); @@ -77,18 +74,16 @@ export default class Instrumentation extends InstrumentationBase { ); return moduleExports; }, - (moduleExports, moduleVersion) => { - api.diag.debug(`Removing patch for ${MODULE_NAME}@${moduleVersion}`); + moduleExports => { const Pool: any = moduleExports.Pool; this._unwrap(Pool.prototype, 'acquire'); return moduleExports; } ), - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( MODULE_NAME, ['2 - 2.3'], - (moduleExports, moduleVersion) => { - api.diag.debug(`Applying patch for ${MODULE_NAME}@${moduleVersion}`); + moduleExports => { this._isDisabled = false; if (isWrapped(moduleExports.Pool)) { this._unwrap(moduleExports, 'Pool'); @@ -96,8 +91,7 @@ export default class Instrumentation extends InstrumentationBase { this._wrap(moduleExports, 'Pool', this._poolWrapper.bind(this)); return moduleExports; }, - (moduleExports, moduleVersion) => { - api.diag.debug(`Removing patch for ${MODULE_NAME}@${moduleVersion}`); + moduleExports => { // since the object is created on the fly every time, we need to use // a boolean switch here to disable the instrumentation this._isDisabled = true; diff --git a/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md index 9a52f6e41b..0fa285f9f1 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-graphql/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-graphql-v0.39.0...instrumentation-graphql-v0.40.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-graphql/LICENSE b/plugins/node/opentelemetry-instrumentation-graphql/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-graphql/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index 9594358c0a..1ae2a4bdf9 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.39.0", + "version": "0.40.0", "description": "OpenTelemetry @opentelemetry/instrumentation-graphql automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -58,7 +58,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-graphql#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts index 0bb1bc2c3a..32fc2f4507 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts @@ -18,7 +18,6 @@ import { context, trace } from '@opentelemetry/api'; import { isWrapped, InstrumentationBase, - InstrumentationConfig, InstrumentationNodeModuleDefinition, InstrumentationNodeModuleFile, safeExecuteInTheMiddle, @@ -65,9 +64,7 @@ const DEFAULT_CONFIG: GraphQLInstrumentationConfig = { const supportedVersions = ['>=14 <17']; export class GraphQLInstrumentation extends InstrumentationBase { - constructor( - config: GraphQLInstrumentationConfig & InstrumentationConfig = {} - ) { + constructor(config: GraphQLInstrumentationConfig = {}) { super( '@opentelemetry/instrumentation-graphql', VERSION, @@ -84,7 +81,7 @@ export class GraphQLInstrumentation extends InstrumentationBase { } protected init() { - const module = new InstrumentationNodeModuleDefinition( + const module = new InstrumentationNodeModuleDefinition( 'graphql', supportedVersions ); @@ -95,16 +92,13 @@ export class GraphQLInstrumentation extends InstrumentationBase { return module; } - private _addPatchingExecute(): InstrumentationNodeModuleFile< - typeof graphqlTypes - > { - return new InstrumentationNodeModuleFile( + private _addPatchingExecute(): InstrumentationNodeModuleFile { + return new InstrumentationNodeModuleFile( 'graphql/execution/execute.js', supportedVersions, // cannot make it work with appropriate type as execute function has 2 //types and/cannot import function but only types - (moduleExports: any, moduleVersion) => { - this._diag.debug(`Applying patch for graphql@${moduleVersion} execute`); + (moduleExports: any) => { if (isWrapped(moduleExports.execute)) { this._unwrap(moduleExports, 'execute'); } @@ -115,61 +109,46 @@ export class GraphQLInstrumentation extends InstrumentationBase { ); return moduleExports; }, - (moduleExports, moduleVersion) => { + moduleExports => { if (moduleExports) { - this._diag.debug( - `Removing patch for graphql@${moduleVersion} execute` - ); this._unwrap(moduleExports, 'execute'); } } ); } - private _addPatchingParser(): InstrumentationNodeModuleFile< - typeof graphqlTypes - > { - return new InstrumentationNodeModuleFile( + private _addPatchingParser(): InstrumentationNodeModuleFile { + return new InstrumentationNodeModuleFile( 'graphql/language/parser.js', supportedVersions, - (moduleExports, moduleVersion) => { - this._diag.debug(`Applying patch for graphql@${moduleVersion} parse`); + (moduleExports: typeof graphqlTypes) => { if (isWrapped(moduleExports.parse)) { this._unwrap(moduleExports, 'parse'); } this._wrap(moduleExports, 'parse', this._patchParse()); return moduleExports; }, - (moduleExports, moduleVersion) => { + (moduleExports: typeof graphqlTypes) => { if (moduleExports) { - this._diag.debug(`Removing patch for graphql@${moduleVersion} parse`); this._unwrap(moduleExports, 'parse'); } } ); } - private _addPatchingValidate(): InstrumentationNodeModuleFile< - typeof graphqlTypes - > { - return new InstrumentationNodeModuleFile( + private _addPatchingValidate(): InstrumentationNodeModuleFile { + return new InstrumentationNodeModuleFile( 'graphql/validation/validate.js', supportedVersions, - (moduleExports, moduleVersion) => { - this._diag.debug( - `Applying patch for graphql@${moduleVersion} validate` - ); + moduleExports => { if (isWrapped(moduleExports.validate)) { this._unwrap(moduleExports, 'validate'); } this._wrap(moduleExports, 'validate', this._patchValidate()); return moduleExports; }, - (moduleExports, moduleVersion) => { + moduleExports => { if (moduleExports) { - this._diag.debug( - `Removing patch for graphql@${moduleVersion} validate` - ); this._unwrap(moduleExports, 'validate'); } } diff --git a/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml b/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml index 995b6c88d1..c1d07484cb 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml @@ -5,3 +5,7 @@ - versions: "^20.3.0" node: ">=14" commands: npm test + - versions: "^21.3.3" + node: ">=14.15.0" + commands: npm test + diff --git a/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md index 58289a6d2d..7bf0defa8b 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-hapi/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-hapi-v0.37.0...instrumentation-hapi-v0.38.0) (2024-05-02) + + +### Features + +* **instrumentation-hapi:** support v21 ([#1985](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1985)) ([eb6e8ef](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/eb6e8ef6b4c72710a98ed3590392b85c8c3b79e5)) + + +### Bug Fixes + +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-hapi-v0.36.0...instrumentation-hapi-v0.37.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-hapi/LICENSE b/plugins/node/opentelemetry-instrumentation-hapi/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-hapi/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-hapi/README.md b/plugins/node/opentelemetry-instrumentation-hapi/README.md index 5868e6a53c..d3cb9ec9ad 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/README.md +++ b/plugins/node/opentelemetry-instrumentation-hapi/README.md @@ -21,7 +21,7 @@ npm install --save @opentelemetry/instrumentation-hapi ### Supported Versions -- `>=17.0.0 <21` +- `>=17.0.0 <22` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-hapi/package.json b/plugins/node/opentelemetry-instrumentation-hapi/package.json index d595016b9b..0f3bda5fb2 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.36.0", + "version": "0.38.0", "description": "OpenTelemetry Hapi automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -43,13 +43,14 @@ "@opentelemetry/api": "^1.3.0" }, "devDependencies": { - "@hapi/hapi": "20.1.5", + "@hapi/hapi": "21.3.3", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^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", + "joi": "17.12.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", @@ -59,9 +60,8 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/hapi__hapi": "20.0.13" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-hapi#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts index 9644497626..ac930ffa68 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts @@ -23,8 +23,7 @@ import { isWrapped, } from '@opentelemetry/instrumentation'; -// types for @hapi/hapi are published under @types/hapi__hapi -import type * as Hapi from 'hapi__hapi'; +import type * as Hapi from '@hapi/hapi'; import { VERSION } from './version'; import { HapiComponentName, @@ -45,42 +44,38 @@ import { getExtMetadata, isDirectExtInput, isPatchableExtMethod, + getPluginFromInput, } from './utils'; /** Hapi instrumentation for OpenTelemetry */ export class HapiInstrumentation extends InstrumentationBase { - constructor(config?: InstrumentationConfig) { + constructor(config: InstrumentationConfig = {}) { super('@opentelemetry/instrumentation-hapi', VERSION, config); } protected init() { - return new InstrumentationNodeModuleDefinition( + return new InstrumentationNodeModuleDefinition( HapiComponentName, - ['>=17 <21'], - moduleExports => { + ['>=17 <22'], + (moduleExports: typeof Hapi) => { if (!isWrapped(moduleExports.server)) { - api.diag.debug('Patching Hapi.server'); - this._wrap(moduleExports, 'server', this._getServerPatch.bind(this)); + this._wrap( + moduleExports, + 'server', + this._getServerPatch.bind(this) as any + ); } - // Casting as any is necessary here due to an issue with the @types/hapi__hapi - // type definition for Hapi.Server. Hapi.Server (note the uppercase) can also function - // as a factory function, similarly to Hapi.server (lowercase), and so should - // also be supported and instrumented. This is an issue with the DefinitelyTyped repo. - // Function is defined at: https://github.com/hapijs/hapi/blob/main/lib/index.js#L9 if (!isWrapped(moduleExports.Server)) { - api.diag.debug('Patching Hapi.Server'); this._wrap( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - moduleExports as any, + moduleExports, 'Server', - this._getServerPatch.bind(this) + this._getServerPatch.bind(this) as any ); } return moduleExports; }, - moduleExports => { - api.diag.debug('Unpatching Hapi'); + (moduleExports: typeof Hapi) => { this._massUnwrap([moduleExports], ['server', 'Server']); } ); @@ -140,7 +135,6 @@ export class HapiInstrumentation extends InstrumentationBase { original: RegisterFunction ): RegisterFunction { const instrumentation: HapiInstrumentation = this; - api.diag.debug('Patching Hapi.Server register function'); return function register( this: Hapi.Server, pluginInput: HapiPluginInput, @@ -148,14 +142,12 @@ export class HapiInstrumentation extends InstrumentationBase { ) { if (Array.isArray(pluginInput)) { for (const pluginObj of pluginInput) { - instrumentation._wrapRegisterHandler( - pluginObj.plugin?.plugin ?? pluginObj.plugin ?? pluginObj - ); + const plugin = getPluginFromInput(pluginObj); + instrumentation._wrapRegisterHandler(plugin); } } else { - instrumentation._wrapRegisterHandler( - pluginInput.plugin?.plugin ?? pluginInput.plugin ?? pluginInput - ); + const plugin = getPluginFromInput(pluginInput); + instrumentation._wrapRegisterHandler(plugin); } return original.apply(this, [pluginInput, options]); }; @@ -176,7 +168,6 @@ export class HapiInstrumentation extends InstrumentationBase { pluginName?: string ) { const instrumentation: HapiInstrumentation = this; - api.diag.debug('Patching Hapi.Server ext function'); return function ext( this: ThisParameterType, @@ -238,7 +229,6 @@ export class HapiInstrumentation extends InstrumentationBase { pluginName?: string ) { const instrumentation: HapiInstrumentation = this; - api.diag.debug('Patching Hapi.Server route function'); return function route( this: Hapi.Server, route: HapiServerRouteInput @@ -275,7 +265,6 @@ export class HapiInstrumentation extends InstrumentationBase { const oldHandler = plugin.register; const self = this; const newRegisterHandler = function (server: Hapi.Server, options: T) { - server.route; self._wrap(server, 'route', original => { return instrumentation._getServerRoutePatch.bind(instrumentation)( original, @@ -315,7 +304,6 @@ export class HapiInstrumentation extends InstrumentationBase { pluginName?: string ): T { const instrumentation: HapiInstrumentation = this; - if (method instanceof Array) { for (let i = 0; i < method.length; i++) { method[i] = instrumentation._wrapExtMethods( @@ -378,13 +366,13 @@ export class HapiInstrumentation extends InstrumentationBase { const instrumentation: HapiInstrumentation = this; if (route[handlerPatched] === true) return route; route[handlerPatched] = true; - const oldHandler = route.options?.handler ?? route.handler; - if (typeof oldHandler === 'function') { - const newHandler: Hapi.Lifecycle.Method = async function ( - ...params: Parameters - ) { + + const wrapHandler: ( + oldHandler: Hapi.Lifecycle.Method + ) => Hapi.Lifecycle.Method = oldHandler => { + return async function (...params: Parameters) { if (api.trace.getSpan(api.context.active()) === undefined) { - return await oldHandler(...params); + return await oldHandler.call(this, ...params); } const rpcMetadata = getRPCMetadata(api.context.active()); if (rpcMetadata?.type === RPCType.HTTP) { @@ -397,7 +385,7 @@ export class HapiInstrumentation extends InstrumentationBase { try { return await api.context.with( api.trace.setSpan(api.context.active(), span), - () => oldHandler(...params) + () => oldHandler.call(this, ...params) ); } catch (err: any) { span.recordException(err); @@ -410,11 +398,25 @@ export class HapiInstrumentation extends InstrumentationBase { span.end(); } }; - if (route.options?.handler) { - route.options.handler = newHandler; - } else { - route.handler = newHandler; - } + }; + + if (typeof route.handler === 'function') { + route.handler = wrapHandler(route.handler as Hapi.Lifecycle.Method); + } else if (typeof route.options === 'function') { + const oldOptions = route.options; + route.options = function (server) { + const options = oldOptions(server); + if (typeof options.handler === 'function') { + options.handler = wrapHandler( + options.handler as Hapi.Lifecycle.Method + ); + } + return options; + }; + } else if (typeof route.options?.handler === 'function') { + route.options.handler = wrapHandler( + route.options.handler as Hapi.Lifecycle.Method + ); } return route; } diff --git a/plugins/node/opentelemetry-instrumentation-hapi/src/internal-types.ts b/plugins/node/opentelemetry-instrumentation-hapi/src/internal-types.ts index 8586d272d9..2c133199cb 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/src/internal-types.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/src/internal-types.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -// types for @hapi/hapi are published under @types/hapi__hapi -import type * as Hapi from 'hapi__hapi'; +import type * as Hapi from '@hapi/hapi'; export const HapiComponentName = '@hapi/hapi'; @@ -35,14 +34,9 @@ export type HapiServerRouteInput = export type PatchableServerRoute = Hapi.ServerRoute & { [handlerPatched]?: boolean; - options?: { - handler?: Hapi.Lifecycle.Method; - }; }; -export type HapiPluginObject = Hapi.ServerRegisterPluginObject & { - plugin: Hapi.ServerRegisterPluginObject; -}; +export type HapiPluginObject = Hapi.ServerRegisterPluginObject; export type HapiPluginInput = | HapiPluginObject diff --git a/plugins/node/opentelemetry-instrumentation-hapi/src/utils.ts b/plugins/node/opentelemetry-instrumentation-hapi/src/utils.ts index 14de861366..41b794c59e 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/src/utils.ts @@ -20,6 +20,7 @@ import type * as Hapi from '@hapi/hapi'; import { HapiLayerType, HapiLifecycleMethodNames, + HapiPluginObject, PatchableExtMethod, ServerExtDirectInput, } from './internal-types'; @@ -119,3 +120,15 @@ export const getExtMetadata = ( name: `ext - ${extPoint}`, }; }; + +export const getPluginFromInput = ( + pluginObj: HapiPluginObject +): Hapi.Plugin => { + if ('plugin' in pluginObj) { + if ('plugin' in pluginObj.plugin) { + return pluginObj.plugin.plugin; + } + return pluginObj.plugin; + } + return pluginObj; +}; diff --git a/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts b/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts index 86eb626c76..7ecd84384f 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts @@ -153,6 +153,52 @@ describe('Hapi Instrumentation - Core Tests', () => { }); }); + describe('when handler is returned by route.options function', () => { + it('should create a child span for single routes', async () => { + const rootSpan = tracer.startSpan('rootSpan'); + server.route({ + method: 'GET', + path: '/', + options: () => ({ + handler: (request, h) => { + return 'Hello World!'; + }, + }), + }); + + await server.start(); + assert.strictEqual(memoryExporter.getFinishedSpans().length, 0); + + await context.with( + trace.setSpan(context.active(), rootSpan), + async () => { + const res = await server.inject({ + method: 'GET', + url: '/', + }); + assert.strictEqual(res.statusCode, 200); + + rootSpan.end(); + assert.deepStrictEqual(memoryExporter.getFinishedSpans().length, 2); + + const requestHandlerSpan = memoryExporter + .getFinishedSpans() + .find(span => span.name === 'route - /'); + assert.notStrictEqual(requestHandlerSpan, undefined); + assert.strictEqual( + requestHandlerSpan?.attributes[AttributeNames.HAPI_TYPE], + HapiLayerType.ROUTER + ); + + const exportedRootSpan = memoryExporter + .getFinishedSpans() + .find(span => span.name === 'rootSpan'); + assert.notStrictEqual(exportedRootSpan, undefined); + } + ); + }); + }); + it('should instrument the Hapi.Server (note: uppercase) method', async () => { const rootSpan = tracer.startSpan('rootSpan'); server = new hapi.Server({ diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md index 6750af082e..9c9b2b3475 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-ioredis/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-ioredis-v0.39.0...instrumentation-ioredis-v0.40.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* **instrumentation-ioredis:** drop @types/ioredis dependency ([#2069](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2069)) ([a172f8a](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/a172f8affa2d54b13542c3dfc103dd54ccf031ad)) +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/redis-common bumped from ^0.36.1 to ^0.36.2 + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0 + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/LICENSE b/plugins/node/opentelemetry-instrumentation-ioredis/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-ioredis/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/package.json b/plugins/node/opentelemetry-instrumentation-ioredis/package.json index 4ecc2eb1b3..84895bca4d 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.39.0", + "version": "0.40.0", "description": "OpenTelemetry ioredis automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -49,9 +49,10 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", + "@types/ioredis4": "npm:@types/ioredis@4.28.10", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -63,12 +64,11 @@ "sinon": "15.2.0", "test-all-versions": "6.1.0", "ts-mocha": "10.0.0", - "typescript": "4.4.4", - "@types/ioredis4": "npm:@types/ioredis@4.28.10" + "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", "@opentelemetry/semantic-conventions": "^1.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-ioredis#readme" diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts index 0753518de3..00e3257ed4 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts @@ -35,18 +35,20 @@ const DEFAULT_CONFIG: IORedisInstrumentationConfig = { requireParentSpan: true, }; -export class IORedisInstrumentation extends InstrumentationBase { - constructor(_config: IORedisInstrumentationConfig = {}) { +export class IORedisInstrumentation extends InstrumentationBase { + protected override _config!: IORedisInstrumentationConfig; + + constructor(config: IORedisInstrumentationConfig = {}) { super( '@opentelemetry/instrumentation-ioredis', VERSION, - Object.assign({}, DEFAULT_CONFIG, _config) + Object.assign({}, DEFAULT_CONFIG, config) ); } - init(): InstrumentationNodeModuleDefinition[] { + init(): InstrumentationNodeModuleDefinition[] { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'ioredis', ['>1', '<6'], (module, moduleVersion?: string) => { @@ -54,7 +56,6 @@ export class IORedisInstrumentation extends InstrumentationBase { module[Symbol.toStringTag] === 'Module' ? module.default // ESM : module; // CommonJS - diag.debug('Applying patch for ioredis'); if (isWrapped(moduleExports.prototype.sendCommand)) { this._unwrap(moduleExports.prototype, 'sendCommand'); } @@ -79,7 +80,6 @@ export class IORedisInstrumentation extends InstrumentationBase { module[Symbol.toStringTag] === 'Module' ? module.default // ESM : module; // CommonJS - diag.debug('Removing patch for ioredis'); this._unwrap(moduleExports.prototype, 'sendCommand'); this._unwrap(moduleExports.prototype, 'connect'); } diff --git a/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md index edb2d1f024..3236c252cd 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-knex/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [0.36.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-knex-v0.36.0...instrumentation-knex-v0.36.1) (2024-05-02) + + +### Bug Fixes + +* **instr-knex:** set correct SpanKind for traces ([#2157](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2157)) ([2d07c18](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/2d07c1858bad8461dd7bd411e56f6305664ca331)) +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-knex-v0.35.0...instrumentation-knex-v0.36.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-knex/LICENSE b/plugins/node/opentelemetry-instrumentation-knex/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-knex/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-knex/README.md b/plugins/node/opentelemetry-instrumentation-knex/README.md index 05537459cc..ba3e97846e 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/README.md +++ b/plugins/node/opentelemetry-instrumentation-knex/README.md @@ -48,6 +48,24 @@ registerInstrumentations({ | ------- | ---- | ------- | ----------- | | `maxQueryLength` | `number` | `100` | Truncate `db.statement` attribute to a maximum length. If the statement is truncated `'..'` is added to it's end. Default `1022`. `-1` leaves `db.statement` untouched. | +## 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 | +| ----------------------- | ------------------------------------------------------------------------------ | +| `db.name` | This attribute is used to report the name of the database being accessed. | +| `db.operation` | The name of the operation being executed. | +| `db.sql.table` | The name of the primary table that the operation is acting upon. | +| `db.statement` | The database statement being executed. | +| `db.system` | An identifier for the database management system (DBMS) product being used. | +| `db.user` | Username for accessing the database. | +| `net.peer.name` | Remote hostname or similar. | +| `net.peer.port` | Remote port number. | +| `net.transport` | Transport protocol used. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-knex/package.json b/plugins/node/opentelemetry-instrumentation-knex/package.json index 0248695c58..b88ab6dc6e 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.35.0", + "version": "0.36.1", "description": "OpenTelemetry Knex automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -57,8 +57,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-knex#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts index 257232f278..762b9d1455 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts @@ -23,18 +23,26 @@ import { InstrumentationNodeModuleFile, isWrapped, } from '@opentelemetry/instrumentation'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_DB_NAME, + SEMATTRS_DB_OPERATION, + SEMATTRS_DB_SQL_TABLE, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, + SEMATTRS_NET_TRANSPORT, +} from '@opentelemetry/semantic-conventions'; import * as utils from './utils'; import * as types from './types'; -import type * as knex from 'knex'; - const contextSymbol = Symbol('opentelemetry.instrumentation-knex.context'); const DEFAULT_CONFIG: types.KnexInstrumentationConfig = { maxQueryLength: 1022, }; -export class KnexInstrumentation extends InstrumentationBase { +export class KnexInstrumentation extends InstrumentationBase { constructor(config: types.KnexInstrumentationConfig = {}) { super( `@opentelemetry/instrumentation-${constants.MODULE_NAME}`, @@ -44,7 +52,7 @@ export class KnexInstrumentation extends InstrumentationBase { } init() { - const module = new InstrumentationNodeModuleDefinition( + const module = new InstrumentationNodeModuleDefinition( constants.MODULE_NAME, constants.SUPPORTED_VERSIONS ); @@ -61,15 +69,11 @@ export class KnexInstrumentation extends InstrumentationBase { } private getRunnerNodeModuleFileInstrumentation(basePath: string) { - return new InstrumentationNodeModuleFile( + return new InstrumentationNodeModuleFile( `knex/${basePath}/runner.js`, constants.SUPPORTED_VERSIONS, (Runner: any, moduleVersion) => { - api.diag.debug( - `Applying ${basePath}/runner.js patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); this.ensureWrapped( - moduleVersion, Runner.prototype, 'query', this.createQueryWrapper(moduleVersion) @@ -77,9 +81,6 @@ export class KnexInstrumentation extends InstrumentationBase { return Runner; }, (Runner: any, moduleVersion) => { - api.diag.debug( - `Removing ${basePath}/runner.js patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); this._unwrap(Runner.prototype, 'query'); return Runner; } @@ -87,37 +88,28 @@ export class KnexInstrumentation extends InstrumentationBase { } private getClientNodeModuleFileInstrumentation(basePath: string) { - return new InstrumentationNodeModuleFile( + return new InstrumentationNodeModuleFile( `knex/${basePath}/client.js`, constants.SUPPORTED_VERSIONS, - (Client: any, moduleVersion) => { - api.diag.debug( - `Applying ${basePath}/client.js patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); + (Client: any) => { this.ensureWrapped( - moduleVersion, Client.prototype, 'queryBuilder', this.storeContext.bind(this) ); this.ensureWrapped( - moduleVersion, Client.prototype, 'schemaBuilder', this.storeContext.bind(this) ); this.ensureWrapped( - moduleVersion, Client.prototype, 'raw', this.storeContext.bind(this) ); return Client; }, - (Client: any, moduleVersion) => { - api.diag.debug( - `Removing ${basePath}/client.js patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); + (Client: any) => { this._unwrap(Client.prototype, 'queryBuilder'); this._unwrap(Client.prototype, 'schemaBuilder'); this._unwrap(Client.prototype, 'raw'); @@ -144,18 +136,18 @@ export class KnexInstrumentation extends InstrumentationBase { const attributes: api.SpanAttributes = { 'knex.version': moduleVersion, - [SemanticAttributes.DB_SYSTEM]: utils.mapSystem(config.client), - [SemanticAttributes.DB_SQL_TABLE]: table, - [SemanticAttributes.DB_OPERATION]: operation, - [SemanticAttributes.DB_USER]: config?.connection?.user, - [SemanticAttributes.DB_NAME]: name, - [SemanticAttributes.NET_PEER_NAME]: config?.connection?.host, - [SemanticAttributes.NET_PEER_PORT]: config?.connection?.port, - [SemanticAttributes.NET_TRANSPORT]: + [SEMATTRS_DB_SYSTEM]: utils.mapSystem(config.client), + [SEMATTRS_DB_SQL_TABLE]: table, + [SEMATTRS_DB_OPERATION]: operation, + [SEMATTRS_DB_USER]: config?.connection?.user, + [SEMATTRS_DB_NAME]: name, + [SEMATTRS_NET_PEER_NAME]: config?.connection?.host, + [SEMATTRS_NET_PEER_PORT]: config?.connection?.port, + [SEMATTRS_NET_TRANSPORT]: config?.connection?.filename === ':memory:' ? 'inproc' : undefined, }; if (maxLen !== 0) { - attributes[SemanticAttributes.DB_STATEMENT] = utils.limitLength( + attributes[SEMATTRS_DB_STATEMENT] = utils.limitLength( query?.sql, maxLen ); @@ -165,6 +157,7 @@ export class KnexInstrumentation extends InstrumentationBase { const span = instrumentation.tracer.startSpan( utils.getName(name, operation, table), { + kind: api.SpanKind.CLIENT, attributes, }, parent @@ -206,15 +199,7 @@ export class KnexInstrumentation extends InstrumentationBase { }; } - ensureWrapped( - moduleVersion: string | undefined, - obj: any, - methodName: string, - wrapper: (original: any) => any - ) { - api.diag.debug( - `Applying ${methodName} patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); + ensureWrapped(obj: any, methodName: string, wrapper: (original: any) => any) { if (isWrapped(obj[methodName])) { this._unwrap(obj, methodName); } diff --git a/plugins/node/opentelemetry-instrumentation-knex/src/utils.ts b/plugins/node/opentelemetry-instrumentation-knex/src/utils.ts index 6c7e6fbdba..da640ceae3 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/src/utils.ts @@ -14,7 +14,10 @@ * limitations under the License. */ -import { DbSystemValues } from '@opentelemetry/semantic-conventions'; +import { + DBSYSTEMVALUES_SQLITE, + DBSYSTEMVALUES_POSTGRESQL, +} from '@opentelemetry/semantic-conventions'; type Exception = { new (message: string): Exception; @@ -52,8 +55,8 @@ export const cloneErrorWithNewMessage = (err: Exception, message: string) => { }; const systemMap = new Map([ - ['sqlite3', DbSystemValues.SQLITE], - ['pg', DbSystemValues.POSTGRESQL], + ['sqlite3', DBSYSTEMVALUES_SQLITE], + ['pg', DBSYSTEMVALUES_POSTGRESQL], ]); export const mapSystem = (knexSystem: string) => { return systemMap.get(knexSystem) || knexSystem; diff --git a/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts index 1f660cf273..9072465c47 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/test/index.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { context, trace } from '@opentelemetry/api'; +import { SpanKind, context, trace } from '@opentelemetry/api'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { @@ -471,6 +471,7 @@ const assertSpans = (actualSpans: any[], expectedSpans: any[]) => { try { assert.notStrictEqual(span, undefined); assert.notStrictEqual(expected, undefined); + assert.strictEqual(span.kind, SpanKind.CLIENT); assertMatch(span.name, new RegExp(expected.op)); assertMatch(span.name, new RegExp(':memory:')); assert.strictEqual(span.attributes['db.system'], 'sqlite'); diff --git a/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md index 07c521997f..37d69e9450 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-koa/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-koa-v0.39.0...instrumentation-koa-v0.40.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0 + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-koa/LICENSE b/plugins/node/opentelemetry-instrumentation-koa/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-koa/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-koa/package.json b/plugins/node/opentelemetry-instrumentation-koa/package.json index e1a6f4f492..e9bf3f472e 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.39.0", + "version": "0.40.0", "description": "OpenTelemetry Koa automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -48,8 +48,8 @@ "@koa/router": "12.0.0", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/instrumentation-http": "^0.50.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/instrumentation-http": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -66,7 +66,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/koa": "2.14.0", "@types/koa__router": "12.0.3" diff --git a/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts index 69a14157cc..ab6c2927be 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts @@ -34,13 +34,9 @@ import { } from './internal-types'; /** Koa instrumentation for OpenTelemetry */ -export class KoaInstrumentation extends InstrumentationBase { +export class KoaInstrumentation extends InstrumentationBase { constructor(config: KoaInstrumentationConfig = {}) { - super( - '@opentelemetry/instrumentation-koa', - VERSION, - Object.assign({}, config) - ); + super('@opentelemetry/instrumentation-koa', VERSION, config); } override setConfig(config: KoaInstrumentationConfig = {}) { @@ -52,7 +48,7 @@ export class KoaInstrumentation extends InstrumentationBase { } protected init() { - return new InstrumentationNodeModuleDefinition( + return new InstrumentationNodeModuleDefinition( 'koa', ['^2.0.0'], (module: any) => { @@ -63,7 +59,6 @@ export class KoaInstrumentation extends InstrumentationBase { if (moduleExports == null) { return moduleExports; } - api.diag.debug('Patching Koa'); if (isWrapped(moduleExports.prototype.use)) { this._unwrap(moduleExports.prototype, 'use'); } @@ -79,7 +74,6 @@ export class KoaInstrumentation extends InstrumentationBase { module[Symbol.toStringTag] === 'Module' ? module.default // ESM : module; // CommonJS - api.diag.debug('Unpatching Koa'); if (isWrapped(moduleExports.prototype.use)) { this._unwrap(moduleExports.prototype, 'use'); } diff --git a/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md index 017dfd2c73..a33c58408f 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-memcached/CHANGELOG.md @@ -6,6 +6,26 @@ * 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-memcached-v0.35.0...instrumentation-memcached-v0.36.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-memcached/LICENSE b/plugins/node/opentelemetry-instrumentation-memcached/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-memcached/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-memcached/package.json b/plugins/node/opentelemetry-instrumentation-memcached/package.json index a329872649..d34a39820c 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.35.0", + "version": "0.36.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -60,7 +60,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0", "@types/memcached": "^2.2.6" }, diff --git a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts index afa205dad9..fba48b5434 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts @@ -29,7 +29,7 @@ import * as utils from './utils'; import { InstrumentationConfig } from './types'; import { VERSION } from './version'; -export class Instrumentation extends InstrumentationBase { +export class Instrumentation extends InstrumentationBase { static readonly COMPONENT = 'memcached'; static readonly COMMON_ATTRIBUTES = { [SemanticAttributes.DB_SYSTEM]: DbSystemValues.MEMCACHED, @@ -52,25 +52,18 @@ export class Instrumentation extends InstrumentationBase { init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'memcached', ['>=2.2'], - (moduleExports, moduleVersion) => { - this._diag.debug( - `Patching ${Instrumentation.COMPONENT}@${moduleVersion}` - ); + (moduleExports: typeof Memcached, moduleVersion) => { this.ensureWrapped( - moduleVersion, moduleExports.prototype, 'command', this.wrapCommand.bind(this, moduleVersion) ); return moduleExports; }, - (moduleExports, moduleVersion) => { - this._diag.debug( - `Unpatching ${Instrumentation.COMPONENT}@${moduleVersion}` - ); + (moduleExports: typeof Memcached) => { if (moduleExports === undefined) return; // `command` is documented API missing from the types this._unwrap(moduleExports.prototype, 'command' as keyof Memcached); @@ -175,14 +168,10 @@ export class Instrumentation extends InstrumentationBase { } private ensureWrapped( - moduleVersion: string | undefined, obj: any, methodName: string, wrapper: (original: any) => any ) { - this._diag.debug( - `Applying ${methodName} patch for ${Instrumentation.COMPONENT}@${moduleVersion}` - ); if (isWrapped(obj[methodName])) { this._unwrap(obj, methodName); } diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md index 7d67259001..2357e2c607 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-mongodb/CHANGELOG.md @@ -6,6 +6,26 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.43.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mongodb-v0.42.0...instrumentation-mongodb-v0.43.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/LICENSE b/plugins/node/opentelemetry-instrumentation-mongodb/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-mongodb/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/package.json b/plugins/node/opentelemetry-instrumentation-mongodb/package.json index f3d704c7da..a0e9f36e85 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.42.0", + "version": "0.43.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/bson": "4.0.5", @@ -66,7 +66,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.22.0" }, diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts index d5239d9706..7f9fa8e9c3 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts @@ -15,7 +15,6 @@ */ import { context, - diag, trace, Span, SpanKind, @@ -59,8 +58,10 @@ export class MongoDBInstrumentation extends InstrumentationBase { private _connectionsUsage!: UpDownCounter; private _poolName!: string; - constructor(protected override _config: MongoDBInstrumentationConfig = {}) { - super('@opentelemetry/instrumentation-mongodb', VERSION, _config); + protected override _config!: MongoDBInstrumentationConfig; + + constructor(config: MongoDBInstrumentationConfig = {}) { + super('@opentelemetry/instrumentation-mongodb', VERSION, config); } override _updateMetricInstruments() { @@ -91,13 +92,13 @@ export class MongoDBInstrumentation extends InstrumentationBase { const { v4PatchSessions, v4UnpatchSessions } = this._getV4SessionsPatches(); return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'mongodb', ['>=3.3 <4'], undefined, undefined, [ - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'mongodb/lib/core/wireprotocol/index.js', ['>=3.3 <4'], v3PatchConnection, @@ -105,37 +106,37 @@ export class MongoDBInstrumentation extends InstrumentationBase { ), ] ), - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'mongodb', ['4.*', '5.*', '6.*'], undefined, undefined, [ - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connection.js', ['4.*', '5.*', '>=6 <6.4'], v4PatchConnectionCallback, v4UnpatchConnection ), - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connection.js', ['>=6.4'], v4PatchConnectionPromise, v4UnpatchConnection ), - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connection_pool.js', ['4.*', '5.*', '>=6 <6.4'], v4PatchConnectionPool, v4UnpatchConnectionPool ), - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connect.js', ['4.*', '5.*', '6.*'], v4PatchConnect, v4UnpatchConnect ), - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'mongodb/lib/sessions.js', ['4.*', '5.*', '6.*'], v4PatchSessions, @@ -148,8 +149,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { private _getV3ConnectionPatches() { return { - v3PatchConnection: (moduleExports: T, moduleVersion?: string) => { - diag.debug(`Applying patch for mongodb@${moduleVersion}`); + v3PatchConnection: (moduleExports: T) => { // patch insert operation if (isWrapped(moduleExports.insert)) { this._unwrap(moduleExports, 'insert'); @@ -194,9 +194,8 @@ export class MongoDBInstrumentation extends InstrumentationBase { this._wrap(moduleExports, 'getMore', this._getV3PatchCursor()); return moduleExports; }, - v3UnpatchConnection: (moduleExports?: T, moduleVersion?: string) => { + v3UnpatchConnection: (moduleExports?: T) => { if (moduleExports === undefined) return; - diag.debug(`Removing internal patch for mongodb@${moduleVersion}`); this._unwrap(moduleExports, 'insert'); this._unwrap(moduleExports, 'remove'); this._unwrap(moduleExports, 'update'); @@ -209,8 +208,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { private _getV4SessionsPatches() { return { - v4PatchSessions: (moduleExports: any, moduleVersion?: string) => { - diag.debug(`Applying patch for mongodb@${moduleVersion}`); + v4PatchSessions: (moduleExports: any) => { if (isWrapped(moduleExports.acquire)) { this._unwrap(moduleExports, 'acquire'); } @@ -230,8 +228,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { ); return moduleExports; }, - v4UnpatchSessions: (moduleExports?: T, moduleVersion?: string) => { - diag.debug(`Removing internal patch for mongodb@${moduleVersion}`); + v4UnpatchSessions: (moduleExports?: T) => { if (moduleExports === undefined) return; if (isWrapped(moduleExports.acquire)) { this._unwrap(moduleExports, 'acquire'); @@ -294,8 +291,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { private _getV4ConnectionPoolPatches() { return { - v4PatchConnectionPool: (moduleExports: any, moduleVersion?: string) => { - diag.debug(`Applying patch for mongodb@${moduleVersion}`); + v4PatchConnectionPool: (moduleExports: any) => { const poolPrototype = moduleExports.ConnectionPool.prototype; if (isWrapped(poolPrototype.checkOut)) { @@ -309,11 +305,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { ); return moduleExports; }, - v4UnpatchConnectionPool: ( - moduleExports?: any, - moduleVersion?: string - ) => { - diag.debug(`Removing internal patch for mongodb@${moduleVersion}`); + v4UnpatchConnectionPool: (moduleExports?: any) => { if (moduleExports === undefined) return; this._unwrap(moduleExports.ConnectionPool.prototype, 'checkOut'); @@ -323,8 +315,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { private _getV4ConnectPatches() { return { - v4PatchConnect: (moduleExports: any, moduleVersion?: string) => { - diag.debug(`Applying patch for mongodb@${moduleVersion}`); + v4PatchConnect: (moduleExports: any) => { if (isWrapped(moduleExports.connect)) { this._unwrap(moduleExports, 'connect'); } @@ -332,8 +323,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { this._wrap(moduleExports, 'connect', this._getV4ConnectCommand()); return moduleExports; }, - v4UnpatchConnect: (moduleExports?: T, moduleVersion?: string) => { - diag.debug(`Removing internal patch for mongodb@${moduleVersion}`); + v4UnpatchConnect: (moduleExports?: T) => { if (moduleExports === undefined) return; this._unwrap(moduleExports, 'connect'); @@ -402,11 +392,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { // eslint-disable-next-line @typescript-eslint/no-unused-vars private _getV4ConnectionPatches() { return { - v4PatchConnectionCallback: ( - moduleExports: any, - moduleVersion?: string - ) => { - diag.debug(`Applying patch for mongodb@${moduleVersion}`); + v4PatchConnectionCallback: (moduleExports: any) => { // patch insert operation if (isWrapped(moduleExports.Connection.prototype.command)) { this._unwrap(moduleExports.Connection.prototype, 'command'); @@ -419,11 +405,7 @@ export class MongoDBInstrumentation extends InstrumentationBase { ); return moduleExports; }, - v4PatchConnectionPromise: ( - moduleExports: any, - moduleVersion?: string - ) => { - diag.debug(`Applying patch for mongodb@${moduleVersion}`); + v4PatchConnectionPromise: (moduleExports: any) => { // patch insert operation if (isWrapped(moduleExports.Connection.prototype.command)) { this._unwrap(moduleExports.Connection.prototype, 'command'); @@ -436,9 +418,8 @@ export class MongoDBInstrumentation extends InstrumentationBase { ); return moduleExports; }, - v4UnpatchConnection: (moduleExports?: any, moduleVersion?: string) => { + v4UnpatchConnection: (moduleExports?: any) => { if (moduleExports === undefined) return; - diag.debug(`Removing internal patch for mongodb@${moduleVersion}`); this._unwrap(moduleExports.Connection.prototype, 'command'); }, }; diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/tsconfig.json b/plugins/node/opentelemetry-instrumentation-mongodb/tsconfig.json index 5c3680dd33..28be80d266 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/tsconfig.json +++ b/plugins/node/opentelemetry-instrumentation-mongodb/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../../tsconfig.base", "compilerOptions": { "rootDir": ".", - "outDir": "build", - "skipLibCheck": true + "outDir": "build" }, "include": [ "src/**/*.ts", diff --git a/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md index de5e0cfc06..8ca1ed7f1e 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-mysql/CHANGELOG.md @@ -6,6 +6,33 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.38.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql-v0.38.0...instrumentation-mysql-v0.38.1) (2024-05-02) + + +### Bug Fixes + +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql-v0.37.0...instrumentation-mysql-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-mysql/LICENSE b/plugins/node/opentelemetry-instrumentation-mysql/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-mysql/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-mysql/README.md b/plugins/node/opentelemetry-instrumentation-mysql/README.md index 6b86badf8e..e632521fb6 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/README.md +++ b/plugins/node/opentelemetry-instrumentation-mysql/README.md @@ -49,6 +49,23 @@ See [examples/mysql](https://github.com/open-telemetry/opentelemetry-js-contrib/ | [`enhancedDatabaseReporting`](./src/types.ts#L24) | `boolean` | `false` | If true, an attribute containing the query's parameters will be attached the spans generated to represent the query | | +## 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 | +| ----------------------- | ------------------------------------------------------------------------------ | +| `db.connection_string` | The connection string used to connect to the database. | +| `db.name` | This attribute is used to report the name of the database being accessed. | +| `db.operation` | The name of the operation being executed. | +| `db.statement` | The database statement being executed. | +| `db.system` | An identifier for the database management system (DBMS) product being used. | +| `db.user` | Username for accessing the database. | +| `net.peer.name` | Remote hostname or similar. | +| `net.peer.port` | Remote port number. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-mysql/package.json b/plugins/node/opentelemetry-instrumentation-mysql/package.json index fccb9fe6ae..7c8a6bec9e 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.37.0", + "version": "0.38.1", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", @@ -59,8 +59,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mysql": "2.15.22" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-mysql#readme" diff --git a/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts index 8ef20b9e2b..cf43c406e6 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts @@ -17,7 +17,6 @@ import { context, Context, - diag, trace, Span, SpanKind, @@ -29,8 +28,9 @@ import { isWrapped, } from '@opentelemetry/instrumentation'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MYSQL, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, } from '@opentelemetry/semantic-conventions'; import type * as mysqlTypes from 'mysql'; import { AttributeNames } from './AttributeNames'; @@ -50,15 +50,13 @@ type getConnectionCallbackType = ( connection: mysqlTypes.PoolConnection ) => void; -export class MySQLInstrumentation extends InstrumentationBase< - typeof mysqlTypes -> { +export class MySQLInstrumentation extends InstrumentationBase { static readonly COMMON_ATTRIBUTES = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.MYSQL, + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_MYSQL, }; private _connectionsUsage!: UpDownCounter; - constructor(config?: MySQLInstrumentationConfig) { + constructor(config: MySQLInstrumentationConfig = {}) { super('@opentelemetry/instrumentation-mysql', VERSION, config); this._setMetricInstruments(); } @@ -81,13 +79,10 @@ export class MySQLInstrumentation extends InstrumentationBase< protected init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'mysql', ['2.*'], - (moduleExports, moduleVersion) => { - diag.debug(`Patching mysql@${moduleVersion}`); - - diag.debug('Patching mysql.createConnection'); + (moduleExports: typeof mysqlTypes) => { if (isWrapped(moduleExports.createConnection)) { this._unwrap(moduleExports, 'createConnection'); } @@ -97,7 +92,6 @@ export class MySQLInstrumentation extends InstrumentationBase< this._patchCreateConnection() as any ); - diag.debug('Patching mysql.createPool'); if (isWrapped(moduleExports.createPool)) { this._unwrap(moduleExports, 'createPool'); } @@ -107,7 +101,6 @@ export class MySQLInstrumentation extends InstrumentationBase< this._patchCreatePool() as any ); - diag.debug('Patching mysql.createPoolCluster'); if (isWrapped(moduleExports.createPoolCluster)) { this._unwrap(moduleExports, 'createPoolCluster'); } @@ -119,7 +112,7 @@ export class MySQLInstrumentation extends InstrumentationBase< return moduleExports; }, - moduleExports => { + (moduleExports: typeof mysqlTypes) => { if (moduleExports === undefined) return; this._unwrap(moduleExports, 'createConnection'); this._unwrap(moduleExports, 'createPool'); @@ -133,7 +126,6 @@ export class MySQLInstrumentation extends InstrumentationBase< private _patchCreateConnection() { return (originalCreateConnection: Function) => { const thisPlugin = this; - diag.debug('MySQLInstrumentation#patch: patched mysql createConnection'); return function createConnection( _connectionUri: string | mysqlTypes.ConnectionConfig @@ -156,7 +148,6 @@ export class MySQLInstrumentation extends InstrumentationBase< private _patchCreatePool() { return (originalCreatePool: Function) => { const thisPlugin = this; - diag.debug('MySQLInstrumentation#patch: patched mysql createPool'); return function createPool(_config: string | mysqlTypes.PoolConfig) { const pool = originalCreatePool(...arguments); @@ -176,7 +167,6 @@ export class MySQLInstrumentation extends InstrumentationBase< private _patchPoolEnd(pool: any) { return (originalPoolEnd: Function) => { const thisPlugin = this; - diag.debug('MySQLInstrumentation#patch: patched mysql pool end'); return function end(callback?: unknown) { const nAll = (pool as any)._allConnections.length; const nFree = (pool as any)._freeConnections.length; @@ -199,7 +189,6 @@ export class MySQLInstrumentation extends InstrumentationBase< private _patchCreatePoolCluster() { return (originalCreatePoolCluster: Function) => { const thisPlugin = this; - diag.debug('MySQLInstrumentation#patch: patched mysql createPoolCluster'); return function createPool(_config: string | mysqlTypes.PoolConfig) { const cluster = originalCreatePoolCluster(...arguments); @@ -218,7 +207,6 @@ export class MySQLInstrumentation extends InstrumentationBase< private _patchAdd(cluster: mysqlTypes.PoolCluster) { return (originalAdd: Function) => { const thisPlugin = this; - diag.debug('MySQLInstrumentation#patch: patched mysql pool cluster add'); return function add(id: string, config: unknown) { // Unwrap if unpatch has been called if (!thisPlugin['_enabled']) { @@ -244,9 +232,6 @@ export class MySQLInstrumentation extends InstrumentationBase< private _patchGetConnection(pool: mysqlTypes.Pool | mysqlTypes.PoolCluster) { return (originalGetConnection: Function) => { const thisPlugin = this; - diag.debug( - 'MySQLInstrumentation#patch: patched mysql pool getConnection' - ); return function getConnection( arg1?: unknown, @@ -311,7 +296,6 @@ export class MySQLInstrumentation extends InstrumentationBase< private _patchQuery(connection: mysqlTypes.Connection | mysqlTypes.Pool) { return (originalQuery: Function): mysqlTypes.QueryFunction => { const thisPlugin = this; - diag.debug('MySQLInstrumentation: patched mysql query'); return function query( query: string | mysqlTypes.Query | mysqlTypes.QueryOptions, @@ -331,10 +315,7 @@ export class MySQLInstrumentation extends InstrumentationBase< }, }); - span.setAttribute( - SemanticAttributes.DB_STATEMENT, - getDbStatement(query) - ); + span.setAttribute(SEMATTRS_DB_STATEMENT, getDbStatement(query)); const instrumentationConfig: MySQLInstrumentationConfig = thisPlugin.getConfig(); diff --git a/plugins/node/opentelemetry-instrumentation-mysql/src/utils.ts b/plugins/node/opentelemetry-instrumentation-mysql/src/utils.ts index 05eb1d809f..8230052d0e 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql/src/utils.ts @@ -14,8 +14,14 @@ * limitations under the License. */ -import { SpanAttributes } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { Attributes } from '@opentelemetry/api'; +import { + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_DB_NAME, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; import type { ConnectionConfig, PoolActualConfig, @@ -25,37 +31,29 @@ import type { import type * as mysqlTypes from 'mysql'; /** - * Get an SpanAttributes map from a mysql connection config object + * Get an Attributes map from a mysql connection config object * * @param config ConnectionConfig */ export function getConnectionAttributes( config: ConnectionConfig | PoolActualConfig -): SpanAttributes { +): Attributes { const { host, port, database, user } = getConfig(config); const portNumber = parseInt(port, 10); if (!isNaN(portNumber)) { return { - [SemanticAttributes.NET_PEER_NAME]: host, - [SemanticAttributes.NET_PEER_PORT]: portNumber, - [SemanticAttributes.DB_CONNECTION_STRING]: getJDBCString( - host, - port, - database - ), - [SemanticAttributes.DB_NAME]: database, - [SemanticAttributes.DB_USER]: user, + [SEMATTRS_NET_PEER_NAME]: host, + [SEMATTRS_NET_PEER_PORT]: portNumber, + [SEMATTRS_DB_CONNECTION_STRING]: getJDBCString(host, port, database), + [SEMATTRS_DB_NAME]: database, + [SEMATTRS_DB_USER]: user, }; } return { - [SemanticAttributes.NET_PEER_NAME]: host, - [SemanticAttributes.DB_CONNECTION_STRING]: getJDBCString( - host, - port, - database - ), - [SemanticAttributes.DB_NAME]: database, - [SemanticAttributes.DB_USER]: user, + [SEMATTRS_NET_PEER_NAME]: host, + [SEMATTRS_DB_CONNECTION_STRING]: getJDBCString(host, port, database), + [SEMATTRS_DB_NAME]: database, + [SEMATTRS_DB_USER]: user, }; } diff --git a/plugins/node/opentelemetry-instrumentation-mysql/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-mysql/test/index.test.ts index eaef649b3c..676081d47e 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql/test/index.test.ts @@ -17,8 +17,13 @@ import { context, Context, trace, SpanStatusCode } from '@opentelemetry/api'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MYSQL, + SEMATTRS_DB_NAME, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import * as testUtils from '@opentelemetry/contrib-test-utils'; import { @@ -868,15 +873,12 @@ function assertSpan( values?: any, errorMessage?: string ) { - assert.strictEqual( - span.attributes[SemanticAttributes.DB_SYSTEM], - DbSystemValues.MYSQL - ); - assert.strictEqual(span.attributes[SemanticAttributes.DB_NAME], database); - assert.strictEqual(span.attributes[SemanticAttributes.NET_PEER_PORT], port); - assert.strictEqual(span.attributes[SemanticAttributes.NET_PEER_NAME], host); - assert.strictEqual(span.attributes[SemanticAttributes.DB_USER], user); - assert.strictEqual(span.attributes[SemanticAttributes.DB_STATEMENT], sql); + assert.strictEqual(span.attributes[SEMATTRS_DB_SYSTEM], DBSYSTEMVALUES_MYSQL); + assert.strictEqual(span.attributes[SEMATTRS_DB_NAME], database); + assert.strictEqual(span.attributes[SEMATTRS_NET_PEER_PORT], port); + assert.strictEqual(span.attributes[SEMATTRS_NET_PEER_NAME], host); + assert.strictEqual(span.attributes[SEMATTRS_DB_USER], user); + assert.strictEqual(span.attributes[SEMATTRS_DB_STATEMENT], sql); if (errorMessage) { assert.strictEqual(span.status.message, errorMessage); assert.strictEqual(span.status.code, SpanStatusCode.ERROR); diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md index 2e7ce19c41..54125f5ba2 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-mysql2/CHANGELOG.md @@ -6,6 +6,35 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.38.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql2-v0.38.0...instrumentation-mysql2-v0.38.1) (2024-05-02) + + +### Bug Fixes + +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-mysql2-v0.37.0...instrumentation-mysql2-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/sql-common bumped from ^0.40.0 to ^0.40.1 + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/LICENSE b/plugins/node/opentelemetry-instrumentation-mysql2/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-mysql2/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/README.md b/plugins/node/opentelemetry-instrumentation-mysql2/README.md index 04f15355ef..a0f3c73658 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/README.md +++ b/plugins/node/opentelemetry-instrumentation-mysql2/README.md @@ -49,6 +49,22 @@ You can set the following instrumentation options: | `responseHook` | `MySQL2InstrumentationExecutionResponseHook` (function) | Function for adding custom attributes from db response | | `addSqlCommenterCommentToQueries` | `boolean` | If true, adds [sqlcommenter](https://github.com/open-telemetry/opentelemetry-sqlcommenter) specification compliant comment to queries with tracing context (default false). _NOTE: A comment will not be added to queries that already contain `--` or `/* ... */` in them, even if these are not actually part of comments_ | +## 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 | +| ----------------------- | ------------------------------------------------------------------------------ | +| `db.connection_string` | The connection string used to connect to the database. | +| `db.name` | This attribute is used to report the name of the database being accessed. | +| `db.statement` | The database statement being executed. | +| `db.system` | An identifier for the database management system (DBMS) product being used. | +| `db.user` | Username for accessing the database. | +| `net.peer.name` | Remote hostname or similar. | +| `net.peer.port` | Remote port number. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/package.json b/plugins/node/opentelemetry-instrumentation-mysql2/package.json index b20fb7aaf6..7ae9310af3 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.37.0", + "version": "0.38.1", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -61,9 +61,9 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@opentelemetry/sql-common": "^0.40.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@opentelemetry/sql-common": "^0.40.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-mysql2#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts index ea792f8025..ade7fd117f 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts @@ -22,8 +22,9 @@ import { safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MYSQL, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, } from '@opentelemetry/semantic-conventions'; import { addSqlCommenterComment } from '@opentelemetry/sql-common'; import type * as mysqlTypes from 'mysql2'; @@ -38,26 +39,23 @@ import { VERSION } from './version'; type formatType = typeof mysqlTypes.format; -export class MySQL2Instrumentation extends InstrumentationBase { +export class MySQL2Instrumentation extends InstrumentationBase { static readonly COMMON_ATTRIBUTES = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.MYSQL, + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_MYSQL, }; - constructor(config?: MySQL2InstrumentationConfig) { + constructor(config: MySQL2InstrumentationConfig = {}) { super('@opentelemetry/instrumentation-mysql2', VERSION, config); } protected init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'mysql2', ['>= 1.4.2 < 4.0'], - (moduleExports: any, moduleVersion) => { - api.diag.debug(`Patching mysql2@${moduleVersion}`); - + (moduleExports: any) => { const ConnectionPrototype: mysqlTypes.Connection = moduleExports.Connection.prototype; - api.diag.debug('Patching Connection.prototype.query'); if (isWrapped(ConnectionPrototype.query)) { this._unwrap(ConnectionPrototype, 'query'); } @@ -92,8 +90,6 @@ export class MySQL2Instrumentation extends InstrumentationBase { private _patchQuery(format: formatType, isPrepared: boolean) { return (originalQuery: Function): Function => { const thisPlugin = this; - api.diag.debug('MySQL2Instrumentation: patched mysql query/execute'); - return function query( this: mysqlTypes.Connection, query: string | mysqlTypes.Query | mysqlTypes.QueryOptions, @@ -115,11 +111,7 @@ export class MySQL2Instrumentation extends InstrumentationBase { attributes: { ...MySQL2Instrumentation.COMMON_ATTRIBUTES, ...getConnectionAttributes(this.config), - [SemanticAttributes.DB_STATEMENT]: getDbStatement( - query, - format, - values - ), + [SEMATTRS_DB_STATEMENT]: getDbStatement(query, format, values), }, }); diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/utils.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/utils.ts index 82333c109f..cfd9f2ef0f 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/utils.ts @@ -14,8 +14,14 @@ * limitations under the License. */ -import { SpanAttributes } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { Attributes } from '@opentelemetry/api'; +import { + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_DB_NAME, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; /* Following types declare an expectation on mysql2 types and define a subset we @@ -42,35 +48,27 @@ interface Config { connectionConfig?: Config; } /** - * Get an SpanAttributes map from a mysql connection config object + * Get an Attributes map from a mysql connection config object * * @param config ConnectionConfig */ -export function getConnectionAttributes(config: Config): SpanAttributes { +export function getConnectionAttributes(config: Config): Attributes { const { host, port, database, user } = getConfig(config); const portNumber = parseInt(port, 10); if (!isNaN(portNumber)) { return { - [SemanticAttributes.NET_PEER_NAME]: host, - [SemanticAttributes.NET_PEER_PORT]: portNumber, - [SemanticAttributes.DB_CONNECTION_STRING]: getJDBCString( - host, - port, - database - ), - [SemanticAttributes.DB_NAME]: database, - [SemanticAttributes.DB_USER]: user, + [SEMATTRS_NET_PEER_NAME]: host, + [SEMATTRS_NET_PEER_PORT]: portNumber, + [SEMATTRS_DB_CONNECTION_STRING]: getJDBCString(host, port, database), + [SEMATTRS_DB_NAME]: database, + [SEMATTRS_DB_USER]: user, }; } return { - [SemanticAttributes.NET_PEER_NAME]: host, - [SemanticAttributes.DB_CONNECTION_STRING]: getJDBCString( - host, - port, - database - ), - [SemanticAttributes.DB_NAME]: database, - [SemanticAttributes.DB_USER]: user, + [SEMATTRS_NET_PEER_NAME]: host, + [SEMATTRS_DB_CONNECTION_STRING]: getJDBCString(host, port, database), + [SEMATTRS_DB_NAME]: database, + [SEMATTRS_DB_USER]: user, }; } diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/test/mysql.test.ts b/plugins/node/opentelemetry-instrumentation-mysql2/test/mysql.test.ts index 4c7a4bab23..7b2bfe74ee 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/test/mysql.test.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/test/mysql.test.ts @@ -18,8 +18,13 @@ import * as semver from 'semver'; import { context, trace, SpanStatusCode } from '@opentelemetry/api'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MYSQL, + SEMATTRS_DB_NAME, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_USER, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import * as testUtils from '@opentelemetry/contrib-test-utils'; import { @@ -177,10 +182,7 @@ describe('mysql2@2.x', () => { query.on('end', () => { const spans = memoryExporter.getFinishedSpans(); assert.strictEqual(spans[0].name, 'SELECT'); - assert.strictEqual( - spans[0].attributes[SemanticAttributes.DB_STATEMENT], - sql - ); + assert.strictEqual(spans[0].attributes[SEMATTRS_DB_STATEMENT], sql); done(); }); }); @@ -198,7 +200,7 @@ describe('mysql2@2.x', () => { const spans = memoryExporter.getFinishedSpans(); assert.strictEqual(spans[0].name, 'SELECT'); assert.strictEqual( - spans[0].attributes[SemanticAttributes.DB_STATEMENT], + spans[0].attributes[SEMATTRS_DB_STATEMENT], query.sql ); done(); @@ -1215,16 +1217,13 @@ function assertSpan( values?: any, errorMessage?: string ) { + assert.strictEqual(span.attributes[SEMATTRS_DB_SYSTEM], DBSYSTEMVALUES_MYSQL); + assert.strictEqual(span.attributes[SEMATTRS_DB_NAME], database); + assert.strictEqual(span.attributes[SEMATTRS_NET_PEER_PORT], port); + assert.strictEqual(span.attributes[SEMATTRS_NET_PEER_NAME], host); + assert.strictEqual(span.attributes[SEMATTRS_DB_USER], user); assert.strictEqual( - span.attributes[SemanticAttributes.DB_SYSTEM], - DbSystemValues.MYSQL - ); - assert.strictEqual(span.attributes[SemanticAttributes.DB_NAME], database); - assert.strictEqual(span.attributes[SemanticAttributes.NET_PEER_PORT], port); - assert.strictEqual(span.attributes[SemanticAttributes.NET_PEER_NAME], host); - assert.strictEqual(span.attributes[SemanticAttributes.DB_USER], user); - assert.strictEqual( - span.attributes[SemanticAttributes.DB_STATEMENT], + span.attributes[SEMATTRS_DB_STATEMENT], mysqlTypes.format(sql, values) ); if (errorMessage) { diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md index 20baee6a63..3419f0bc3b 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.37.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-nestjs-core-v0.37.0...instrumentation-nestjs-core-v0.37.1) (2024-05-02) + + +### Performance Improvements + +* **instrumentation-nestjs-core:** extract reusable span attributes to outer scope ([#2087](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2087)) ([405472d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/405472df3b1d218daab79e9caa7c8a51c3d7a7bf)) + +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-nestjs-core-v0.36.0...instrumentation-nestjs-core-v0.37.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/LICENSE b/plugins/node/opentelemetry-instrumentation-nestjs-core/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json index b831d12ff9..d6b7964932 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.36.0", + "version": "0.37.1", "description": "OpenTelemetry NestJS automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -70,7 +70,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-nestjs-core#readme" diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts index 98922126fa..29b86aadba 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts @@ -29,32 +29,20 @@ import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; import { VERSION } from './version'; import { AttributeNames, NestType } from './enums'; -export class Instrumentation extends InstrumentationBase { +export class Instrumentation extends InstrumentationBase { static readonly COMPONENT = '@nestjs/core'; static readonly COMMON_ATTRIBUTES = { component: Instrumentation.COMPONENT, }; constructor(config: InstrumentationConfig = {}) { - super('@opentelemetry/instrumentation-nestjs-core', VERSION); + super('@opentelemetry/instrumentation-nestjs-core', VERSION, config); } init() { - const module = new InstrumentationNodeModuleDefinition( + const module = new InstrumentationNodeModuleDefinition( Instrumentation.COMPONENT, - ['>=4.0.0'], - (moduleExports, moduleVersion) => { - this._diag.debug( - `Patching ${Instrumentation.COMPONENT}@${moduleVersion}` - ); - return moduleExports; - }, - (moduleExports, moduleVersion) => { - this._diag.debug( - `Unpatching ${Instrumentation.COMPONENT}@${moduleVersion}` - ); - if (moduleExports === undefined) return; - } + ['>=4.0.0'] ); module.files.push( @@ -66,12 +54,11 @@ export class Instrumentation extends InstrumentationBase { } getNestFactoryFileInstrumentation(versions: string[]) { - return new InstrumentationNodeModuleFile( + return new InstrumentationNodeModuleFile( '@nestjs/core/nest-factory.js', versions, (NestFactoryStatic: any, moduleVersion?: string) => { this.ensureWrapped( - moduleVersion, NestFactoryStatic.NestFactoryStatic.prototype, 'create', createWrapNestFactoryCreate(this.tracer, moduleVersion) @@ -85,12 +72,11 @@ export class Instrumentation extends InstrumentationBase { } getRouterExecutionContextFileInstrumentation(versions: string[]) { - return new InstrumentationNodeModuleFile( + return new InstrumentationNodeModuleFile( '@nestjs/core/router/router-execution-context.js', versions, (RouterExecutionContext: any, moduleVersion?: string) => { this.ensureWrapped( - moduleVersion, RouterExecutionContext.RouterExecutionContext.prototype, 'create', createWrapCreateHandler(this.tracer, moduleVersion) @@ -107,14 +93,10 @@ export class Instrumentation extends InstrumentationBase { } private ensureWrapped( - moduleVersion: string | undefined, obj: any, methodName: string, wrapper: (original: any) => any ) { - this._diag.debug( - `Applying ${methodName} patch for ${Instrumentation.COMPONENT}@${moduleVersion}` - ); if (isWrapped(obj[methodName])) { this._unwrap(obj, methodName); } @@ -166,21 +148,21 @@ function createWrapCreateHandler(tracer: api.Tracer, moduleVersion?: string) { ) { arguments[1] = createWrapHandler(tracer, moduleVersion, callback); const handler = original.apply(this, arguments as any); + const callbackName = callback.name; + const instanceName = + instance.constructor && instance.constructor.name + ? instance.constructor.name + : 'UnnamedInstance'; + const spanName = callbackName + ? `${instanceName}.${callbackName}` + : instanceName; + return function ( this: any, req: any, res: any, next: (...args: any[]) => unknown ) { - const callbackName = callback.name; - const instanceName = - instance.constructor && instance.constructor.name - ? instance.constructor.name - : 'UnnamedInstance'; - const spanName = callbackName - ? `${instanceName}.${callbackName}` - : instanceName; - const span = tracer.startSpan(spanName, { attributes: { ...Instrumentation.COMMON_ATTRIBUTES, @@ -215,15 +197,17 @@ function createWrapHandler( moduleVersion: string | undefined, handler: Function ) { + const spanName = handler.name || 'anonymous nest handler'; + const options = { + attributes: { + ...Instrumentation.COMMON_ATTRIBUTES, + [AttributeNames.VERSION]: moduleVersion, + [AttributeNames.TYPE]: NestType.REQUEST_HANDLER, + [AttributeNames.CALLBACK]: handler.name, + }, + }; const wrappedHandler = function (this: RouterExecutionContext) { - const span = tracer.startSpan(handler.name || 'anonymous nest handler', { - attributes: { - ...Instrumentation.COMMON_ATTRIBUTES, - [AttributeNames.VERSION]: moduleVersion, - [AttributeNames.TYPE]: NestType.REQUEST_HANDLER, - [AttributeNames.CALLBACK]: handler.name, - }, - }); + const span = tracer.startSpan(spanName, options); const spanContext = api.trace.setSpan(api.context.active(), span); return api.context.with(spanContext, async () => { diff --git a/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md index d9b707ccae..ff9a1f694e 100644 --- a/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-net/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.36.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-net-v0.35.0...instrumentation-net-v0.36.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-net/LICENSE b/plugins/node/opentelemetry-instrumentation-net/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-net/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-net/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-net/package.json b/plugins/node/opentelemetry-instrumentation-net/package.json index 60f25541be..41eb0902b7 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.35.0", + "version": "0.36.0", "description": "OpenTelemetry net module automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -58,7 +58,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-net#readme" diff --git a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts index e3aa6f1e33..b832473ef4 100644 --- a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { diag, Span, SpanStatusCode, context, trace } from '@opentelemetry/api'; +import { Span, SpanStatusCode, context, trace } from '@opentelemetry/api'; import { InstrumentationBase, InstrumentationConfig, @@ -27,24 +27,24 @@ import { NetTransportValues, } from '@opentelemetry/semantic-conventions'; import { TLSAttributes } from './types'; -import { Net, NormalizedOptions, SocketEvent } from './internal-types'; +import { NormalizedOptions, SocketEvent } from './internal-types'; import { getNormalizedArgs, IPC_TRANSPORT } from './utils'; import { VERSION } from './version'; import { Socket } from 'net'; import { TLSSocket } from 'tls'; +import type * as net from 'net'; -export class NetInstrumentation extends InstrumentationBase { - constructor(_config?: InstrumentationConfig) { - super('@opentelemetry/instrumentation-net', VERSION, _config); +export class NetInstrumentation extends InstrumentationBase { + constructor(config: InstrumentationConfig = {}) { + super('@opentelemetry/instrumentation-net', VERSION, config); } - init(): InstrumentationNodeModuleDefinition[] { + init(): InstrumentationNodeModuleDefinition[] { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'net', ['*'], - moduleExports => { - diag.debug('Applying patch for net module'); + (moduleExports: typeof net) => { if (isWrapped(moduleExports.Socket.prototype.connect)) { this._unwrap(moduleExports.Socket.prototype, 'connect'); } @@ -56,9 +56,8 @@ export class NetInstrumentation extends InstrumentationBase { ); return moduleExports; }, - moduleExports => { + (moduleExports: typeof net) => { if (moduleExports === undefined) return; - diag.debug('Removing patch from net module'); this._unwrap(moduleExports.Socket.prototype, 'connect'); } ), diff --git a/plugins/node/opentelemetry-instrumentation-net/src/internal-types.ts b/plugins/node/opentelemetry-instrumentation-net/src/internal-types.ts index a9cb63f735..79726c77aa 100644 --- a/plugins/node/opentelemetry-instrumentation-net/src/internal-types.ts +++ b/plugins/node/opentelemetry-instrumentation-net/src/internal-types.ts @@ -14,10 +14,6 @@ * limitations under the License. */ -import type * as net from 'net'; - -export type Net = typeof net; - export interface NormalizedOptions { host?: string; port?: number; diff --git a/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md index d7abf286d3..ff4aaae86e 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-pg/CHANGELOG.md @@ -6,6 +6,28 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.41.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-pg-v0.40.0...instrumentation-pg-v0.41.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/sql-common bumped from ^0.40.0 to ^0.40.1 + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-pg/LICENSE b/plugins/node/opentelemetry-instrumentation-pg/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-pg/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index c99ceeaf68..d12a2348e5 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.40.0", + "version": "0.41.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -71,9 +71,9 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", - "@opentelemetry/sql-common": "^0.40.0", + "@opentelemetry/sql-common": "^0.40.1", "@types/pg": "8.6.1", "@types/pg-pool": "2.0.4" }, diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts index abe4e65c5e..38ccad0fe4 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts @@ -44,19 +44,14 @@ import { SpanNames } from './enums/SpanNames'; export class PgInstrumentation extends InstrumentationBase { constructor(config: PgInstrumentationConfig = {}) { - super( - '@opentelemetry/instrumentation-pg', - VERSION, - Object.assign({}, config) - ); + super('@opentelemetry/instrumentation-pg', VERSION, config); } protected init() { - const modulePG = new InstrumentationNodeModuleDefinition( + const modulePG = new InstrumentationNodeModuleDefinition( 'pg', ['8.*'], - (module: any, moduleVersion) => { - this._diag.debug(`Applying patch for pg@${moduleVersion}`); + (module: any) => { const moduleExports: typeof pgTypes = module[Symbol.toStringTag] === 'Module' ? module.default // ESM @@ -83,25 +78,21 @@ export class PgInstrumentation extends InstrumentationBase { return module; }, - (module: any, moduleVersion) => { + (module: any) => { const moduleExports: typeof pgTypes = module[Symbol.toStringTag] === 'Module' ? module.default // ESM : module; // CommonJS - this._diag.debug(`Removing patch for pg@${moduleVersion}`); if (isWrapped(moduleExports.Client.prototype.query)) { this._unwrap(moduleExports.Client.prototype, 'query'); } } ); - const modulePGPool = new InstrumentationNodeModuleDefinition< - typeof pgPoolTypes - >( + const modulePGPool = new InstrumentationNodeModuleDefinition( 'pg-pool', ['2.*', '3.*'], - (moduleExports, moduleVersion) => { - this._diag.debug(`Applying patch for pg-pool@${moduleVersion}`); + (moduleExports: typeof pgPoolTypes) => { if (isWrapped(moduleExports.prototype.connect)) { this._unwrap(moduleExports.prototype, 'connect'); } @@ -112,8 +103,7 @@ export class PgInstrumentation extends InstrumentationBase { ); return moduleExports; }, - (moduleExports, moduleVersion) => { - this._diag.debug(`Removing patch for pg-pool@${moduleVersion}`); + (moduleExports: typeof pgPoolTypes) => { if (isWrapped(moduleExports.prototype.connect)) { this._unwrap(moduleExports.prototype, 'connect'); } diff --git a/plugins/node/opentelemetry-instrumentation-pino/.tav.yml b/plugins/node/opentelemetry-instrumentation-pino/.tav.yml index ca1f8bbabc..94d5d5f97e 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-pino/.tav.yml @@ -1,5 +1,8 @@ pino: - - versions: "^8.16.2 || 8.12.1 || 8.8.0 || 8.4.0 || 8.0.0 || ^7.11.0 || 7.8.0 || 7.2.0 || ^6.13.3 || 5.17.0 || 5.14.0" + - versions: "^9.0.0" + node: ">=18" + commands: npm run test + - versions: "^8.21.0 || 8.20.0 || 8.16.2 || 8.12.1 || 8.8.0 || 8.4.0 || 8.0.0 || ^7.11.0 || 7.8.0 || 7.2.0 || ^6.13.3 || 5.17.0 || 5.14.0" node: ">=14" commands: npm run test - versions: "^7.11.0 || 7.8.0 || 7.2.0 || ^6.13.1 || 5.17.0 || 5.14.0" diff --git a/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md index 90f157fe24..c5027eb721 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-pino/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-pino-v0.38.0...instrumentation-pino-v0.39.0) (2024-05-02) + + +### Features + +* **pino:** support new pino version ^9.0.0 ([#2163](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2163)) ([585b833](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/585b833dc8e911c17b483e871f752ad4988cee5a)) + +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-pino-v0.37.0...instrumentation-pino-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0 + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-pino/LICENSE b/plugins/node/opentelemetry-instrumentation-pino/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-pino/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-pino/README.md b/plugins/node/opentelemetry-instrumentation-pino/README.md index 7d8c7393f1..377ce7aa6e 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/README.md +++ b/plugins/node/opentelemetry-instrumentation-pino/README.md @@ -63,7 +63,7 @@ When no span context is active or the span context is invalid, injection is skip ### Supported versions -`>=5.14.0 <9` +`>=5.14.0 <10` ## Useful links diff --git a/plugins/node/opentelemetry-instrumentation-pino/package.json b/plugins/node/opentelemetry-instrumentation-pino/package.json index 6e16aae45d..7cf0afeec6 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.37.0", + "version": "0.39.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -64,7 +64,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-pino#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts index 3c5824b359..96a0796cc5 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts @@ -29,7 +29,7 @@ import { import { PinoInstrumentationConfig } from './types'; import { VERSION } from './version'; -const pinoVersions = ['>=5.14.0 <9']; +const pinoVersions = ['>=5.14.0 <10']; const DEFAULT_LOG_KEYS = { traceId: 'trace_id', @@ -44,57 +44,52 @@ export class PinoInstrumentation extends InstrumentationBase { protected init() { return [ - new InstrumentationNodeModuleDefinition( - 'pino', - pinoVersions, - (module, moduleVersion?: string) => { - diag.debug(`Applying patch for pino@${moduleVersion}`); - const isESM = module[Symbol.toStringTag] === 'Module'; - const moduleExports = isESM ? module.default : module; - const instrumentation = this; - const patchedPino = Object.assign((...args: unknown[]) => { - if (args.length === 0) { - return moduleExports({ + new InstrumentationNodeModuleDefinition('pino', pinoVersions, module => { + const isESM = module[Symbol.toStringTag] === 'Module'; + const moduleExports = isESM ? module.default : module; + const instrumentation = this; + const patchedPino = Object.assign((...args: unknown[]) => { + if (args.length === 0) { + return moduleExports({ + mixin: instrumentation._getMixinFunction(), + }); + } + + if (args.length === 1) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const optsOrStream = args[0] as any; + if ( + typeof optsOrStream === 'string' || + typeof optsOrStream?.write === 'function' + ) { + args.splice(0, 0, { mixin: instrumentation._getMixinFunction(), }); + return moduleExports(...args); } + } - if (args.length === 1) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const optsOrStream = args[0] as any; - if ( - typeof optsOrStream === 'string' || - typeof optsOrStream?.write === 'function' - ) { - args.splice(0, 0, { - mixin: instrumentation._getMixinFunction(), - }); - return moduleExports(...args); - } - } - - args[0] = instrumentation._combineOptions(args[0]); + args[0] = instrumentation._combineOptions(args[0]); - return moduleExports(...args); - }, moduleExports); + return moduleExports(...args); + }, moduleExports); - if (typeof patchedPino.pino === 'function') { - patchedPino.pino = patchedPino; - } - if (typeof patchedPino.default === 'function') { - patchedPino.default = patchedPino; - } - if (isESM) { - if (module.pino) { - // This was added in pino@6.8.0 (https://github.com/pinojs/pino/pull/936). - module.pino = patchedPino; - } - module.default = patchedPino; + if (typeof patchedPino.pino === 'function') { + patchedPino.pino = patchedPino; + } + if (typeof patchedPino.default === 'function') { + patchedPino.default = patchedPino; + } + if (isESM) { + if (module.pino) { + // This was added in pino@6.8.0 (https://github.com/pinojs/pino/pull/936). + module.pino = patchedPino; } - - return patchedPino; + module.default = patchedPino; } - ), + + return patchedPino; + }), ]; } @@ -102,7 +97,7 @@ export class PinoInstrumentation extends InstrumentationBase { return this._config; } - override setConfig(config: PinoInstrumentationConfig) { + override setConfig(config: PinoInstrumentationConfig = {}) { this._config = config; } diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md index a8df9ad4aa..6a8dfd06b8 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-redis-4/CHANGELOG.md @@ -12,6 +12,28 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-redis-4-v0.38.0...instrumentation-redis-4-v0.39.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/redis-common bumped from ^0.36.1 to ^0.36.2 + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/LICENSE b/plugins/node/opentelemetry-instrumentation-redis-4/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-redis-4/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/README.md b/plugins/node/opentelemetry-instrumentation-redis-4/README.md index dec67f105d..19eea1b33a 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/README.md +++ b/plugins/node/opentelemetry-instrumentation-redis-4/README.md @@ -71,6 +71,20 @@ const redisInstrumentation = new RedisInstrumentation({ }); ``` +## 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 | +| ---------------------- | ---------------------------------------------------------------------------- | +| `db.connection_string` | The connection string used to connect to the database (without credentials). | +| `db.statement` | The database statement being executed. | +| `db.system` | An identifier for the database management system (DBMS) product being used. | +| `net.peer.name` | Remote hostname or similar, see note below. | +| `net.peer.port` | Remote port number. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/package.json b/plugins/node/opentelemetry-instrumentation-redis-4/package.json index 08077ae594..23d061c895 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.38.0", + "version": "0.39.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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/core": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -66,9 +66,9 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-redis-4#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts index e018845e2d..75ae380965 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts @@ -15,7 +15,6 @@ */ import { - diag, trace, context, SpanKind, @@ -32,7 +31,7 @@ import { getClientAttributes } from './utils'; import { defaultDbStatementSerializer } from '@opentelemetry/redis-common'; import { RedisInstrumentationConfig } from './types'; import { VERSION } from './version'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_DB_STATEMENT } from '@opentelemetry/semantic-conventions'; import type { MultiErrorReply } from './internal-types'; const OTEL_OPEN_SPANS = Symbol( @@ -52,11 +51,13 @@ const DEFAULT_CONFIG: RedisInstrumentationConfig = { requireParentSpan: false, }; -export class RedisInstrumentation extends InstrumentationBase { +export class RedisInstrumentation extends InstrumentationBase { static readonly COMPONENT = 'redis'; - constructor(protected override _config: RedisInstrumentationConfig = {}) { - super('@opentelemetry/instrumentation-redis-4', VERSION, _config); + protected override _config!: RedisInstrumentationConfig; + + constructor(config: RedisInstrumentationConfig = {}) { + super('@opentelemetry/instrumentation-redis-4', VERSION, config); } override setConfig(config: RedisInstrumentationConfig = {}) { @@ -75,8 +76,8 @@ export class RedisInstrumentation extends InstrumentationBase { private _getInstrumentationNodeModuleDefinition( basePackageName: string - ): InstrumentationNodeModuleDefinition { - const commanderModuleFile = new InstrumentationNodeModuleFile( + ): InstrumentationNodeModuleDefinition { + const commanderModuleFile = new InstrumentationNodeModuleFile( `${basePackageName}/dist/lib/commander.js`, ['^1.0.0'], (moduleExports: any, moduleVersion?: string) => { @@ -96,7 +97,6 @@ export class RedisInstrumentation extends InstrumentationBase { : 'attachCommands'; // this is the function that extend a redis client with a list of commands. // the function patches the commandExecutor to record a span - this._diag.debug('Patching redis commands executor'); if (isWrapped(moduleExports?.[functionToPatch])) { this._unwrap(moduleExports, functionToPatch); } @@ -109,7 +109,6 @@ export class RedisInstrumentation extends InstrumentationBase { return moduleExports; }, (moduleExports: any) => { - this._diag.debug('Unpatching redis commands executor'); if (isWrapped(moduleExports?.extendWithCommands)) { this._unwrap(moduleExports, 'extendWithCommands'); } @@ -119,11 +118,10 @@ export class RedisInstrumentation extends InstrumentationBase { } ); - const multiCommanderModule = new InstrumentationNodeModuleFile( + const multiCommanderModule = new InstrumentationNodeModuleFile( `${basePackageName}/dist/lib/client/multi-command.js`, ['^1.0.0'], (moduleExports: any) => { - this._diag.debug('Patching redis multi commands executor'); const redisClientMultiCommandPrototype = moduleExports?.default?.prototype; @@ -148,7 +146,6 @@ export class RedisInstrumentation extends InstrumentationBase { return moduleExports; }, (moduleExports: any) => { - this._diag.debug('Unpatching redis multi commands executor'); const redisClientMultiCommandPrototype = moduleExports?.default?.prototype; if (isWrapped(redisClientMultiCommandPrototype?.exec)) { @@ -160,11 +157,10 @@ export class RedisInstrumentation extends InstrumentationBase { } ); - const clientIndexModule = new InstrumentationNodeModuleFile( + const clientIndexModule = new InstrumentationNodeModuleFile( `${basePackageName}/dist/lib/client/index.js`, ['^1.0.0'], (moduleExports: any) => { - this._diag.debug('Patching redis client'); const redisClientPrototype = moduleExports?.default?.prototype; // In some @redis/client versions 'multi' is a method. In later @@ -211,7 +207,6 @@ export class RedisInstrumentation extends InstrumentationBase { return moduleExports; }, (moduleExports: any) => { - this._diag.debug('Unpatching redis client'); const redisClientPrototype = moduleExports?.default?.prototype; if (isWrapped(redisClientPrototype?.multi)) { this._unwrap(redisClientPrototype, 'multi'); @@ -225,20 +220,13 @@ export class RedisInstrumentation extends InstrumentationBase { } ); - return new InstrumentationNodeModuleDefinition( + return new InstrumentationNodeModuleDefinition( basePackageName, ['^1.0.0'], - (moduleExports: any, moduleVersion?: string) => { - diag.debug( - `Patching ${basePackageName}/client@${moduleVersion} (redis@^4.0.0)` - ); + (moduleExports: any) => { return moduleExports; }, - (_moduleExports: any, moduleVersion?: string) => { - diag.debug( - `Unpatching ${basePackageName}/client@${moduleVersion} (redis@^4.0.0)` - ); - }, + () => {}, [commanderModuleFile, multiCommanderModule, clientIndexModule] ); } @@ -405,7 +393,7 @@ export class RedisInstrumentation extends InstrumentationBase { try { const dbStatement = dbStatementSerializer(commandName, commandArgs); if (dbStatement != null) { - attributes[SemanticAttributes.DB_STATEMENT] = dbStatement; + attributes[SEMATTRS_DB_STATEMENT] = dbStatement; } } catch (e) { this._diag.error('dbStatementSerializer throw an exception', e, { diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/src/utils.ts b/plugins/node/opentelemetry-instrumentation-redis-4/src/utils.ts index 4275f10175..7bdbf768ac 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-redis-4/src/utils.ts @@ -15,8 +15,11 @@ */ import { Attributes, DiagLogger } from '@opentelemetry/api'; import { - DbSystemValues, - SemanticAttributes, + SEMATTRS_DB_SYSTEM, + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, + DBSYSTEMVALUES_REDIS, } from '@opentelemetry/semantic-conventions'; export function getClientAttributes( @@ -24,10 +27,10 @@ export function getClientAttributes( options: any ): Attributes { return { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.REDIS, - [SemanticAttributes.NET_PEER_NAME]: options?.socket?.host, - [SemanticAttributes.NET_PEER_PORT]: options?.socket?.port, - [SemanticAttributes.DB_CONNECTION_STRING]: + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_REDIS, + [SEMATTRS_NET_PEER_NAME]: options?.socket?.host, + [SEMATTRS_NET_PEER_PORT]: options?.socket?.port, + [SEMATTRS_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(diag, options?.url), }; } diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/test/redis.test.ts b/plugins/node/opentelemetry-instrumentation-redis-4/test/redis.test.ts index 713c2130fe..6200b4c1eb 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/test/redis.test.ts +++ b/plugins/node/opentelemetry-instrumentation-redis-4/test/redis.test.ts @@ -41,7 +41,14 @@ import { trace, context, } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_EXCEPTION_MESSAGE, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; import { RedisResponseCustomAttributeFunction } from '../src/types'; import { hrTimeToMilliseconds, suppressTracing } from '@opentelemetry/core'; @@ -94,24 +101,21 @@ describe('redis@^4.0.0', () => { assert.ok(setSpan); assert.strictEqual(setSpan?.kind, SpanKind.CLIENT); assert.strictEqual(setSpan?.name, 'redis-SET'); + assert.strictEqual(setSpan?.attributes[SEMATTRS_DB_SYSTEM], 'redis'); assert.strictEqual( - setSpan?.attributes[SemanticAttributes.DB_SYSTEM], - 'redis' - ); - assert.strictEqual( - setSpan?.attributes[SemanticAttributes.DB_STATEMENT], + setSpan?.attributes[SEMATTRS_DB_STATEMENT], 'SET key [1 other arguments]' ); assert.strictEqual( - setSpan?.attributes[SemanticAttributes.NET_PEER_NAME], + setSpan?.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - setSpan?.attributes[SemanticAttributes.NET_PEER_PORT], + setSpan?.attributes[SEMATTRS_NET_PEER_PORT], redisTestConfig.port ); assert.strictEqual( - setSpan?.attributes[SemanticAttributes.DB_CONNECTION_STRING], + setSpan?.attributes[SEMATTRS_DB_CONNECTION_STRING], redisTestUrl ); @@ -119,24 +123,18 @@ describe('redis@^4.0.0', () => { assert.ok(getSpan); assert.strictEqual(getSpan?.kind, SpanKind.CLIENT); assert.strictEqual(getSpan?.name, 'redis-GET'); + assert.strictEqual(getSpan?.attributes[SEMATTRS_DB_SYSTEM], 'redis'); + assert.strictEqual(getSpan?.attributes[SEMATTRS_DB_STATEMENT], 'GET key'); assert.strictEqual( - getSpan?.attributes[SemanticAttributes.DB_SYSTEM], - 'redis' - ); - assert.strictEqual( - getSpan?.attributes[SemanticAttributes.DB_STATEMENT], - 'GET key' - ); - assert.strictEqual( - getSpan?.attributes[SemanticAttributes.NET_PEER_NAME], + getSpan?.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - getSpan?.attributes[SemanticAttributes.NET_PEER_PORT], + getSpan?.attributes[SEMATTRS_NET_PEER_PORT], redisTestConfig.port ); assert.strictEqual( - getSpan?.attributes[SemanticAttributes.DB_CONNECTION_STRING], + getSpan?.attributes[SEMATTRS_DB_CONNECTION_STRING], redisTestUrl ); }); @@ -149,15 +147,15 @@ describe('redis@^4.0.0', () => { assert.ok(setSpan); assert.strictEqual( - setSpan?.attributes[SemanticAttributes.DB_STATEMENT], + setSpan?.attributes[SEMATTRS_DB_STATEMENT], 'SET key [1 other arguments]' ); assert.strictEqual( - setSpan?.attributes[SemanticAttributes.NET_PEER_NAME], + setSpan?.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - setSpan?.attributes[SemanticAttributes.NET_PEER_PORT], + setSpan?.attributes[SEMATTRS_NET_PEER_PORT], redisTestConfig.port ); }); @@ -180,7 +178,7 @@ describe('redis@^4.0.0', () => { ); assert.strictEqual(exceptions.length, 1); assert.strictEqual( - exceptions?.[0].attributes?.[SemanticAttributes.EXCEPTION_MESSAGE], + exceptions?.[0].attributes?.[SEMATTRS_EXCEPTION_MESSAGE], 'ERR value is not an integer or out of range' ); }); @@ -202,20 +200,17 @@ describe('redis@^4.0.0', () => { assert.strictEqual(span.name, 'redis-connect'); + assert.strictEqual(span.attributes[SEMATTRS_DB_SYSTEM], 'redis'); assert.strictEqual( - span.attributes[SemanticAttributes.DB_SYSTEM], - 'redis' - ); - assert.strictEqual( - span.attributes[SemanticAttributes.NET_PEER_NAME], + span.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - span.attributes[SemanticAttributes.NET_PEER_PORT], + span.attributes[SEMATTRS_NET_PEER_PORT], redisTestConfig.port ); assert.strictEqual( - span.attributes[SemanticAttributes.DB_CONNECTION_STRING], + span.attributes[SEMATTRS_DB_CONNECTION_STRING], redisTestUrl ); }); @@ -235,7 +230,7 @@ describe('redis@^4.0.0', () => { assert.strictEqual(span.name, 'redis-connect'); assert.strictEqual(span.status.code, SpanStatusCode.ERROR); assert.strictEqual( - span.attributes[SemanticAttributes.DB_CONNECTION_STRING], + span.attributes[SEMATTRS_DB_CONNECTION_STRING], redisURL ); }); @@ -258,11 +253,11 @@ describe('redis@^4.0.0', () => { assert.strictEqual(span.name, 'redis-connect'); assert.strictEqual(span.status.code, SpanStatusCode.ERROR); assert.strictEqual( - span.attributes[SemanticAttributes.NET_PEER_NAME], + span.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - span.attributes[SemanticAttributes.DB_CONNECTION_STRING], + span.attributes[SEMATTRS_DB_CONNECTION_STRING], expectAttributeConnString ); }); @@ -285,11 +280,11 @@ describe('redis@^4.0.0', () => { assert.strictEqual(span.name, 'redis-connect'); assert.strictEqual(span.status.code, SpanStatusCode.ERROR); assert.strictEqual( - span.attributes[SemanticAttributes.NET_PEER_NAME], + span.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - span.attributes[SemanticAttributes.DB_CONNECTION_STRING], + span.attributes[SEMATTRS_DB_CONNECTION_STRING], expectAttributeConnString ); }); @@ -314,38 +309,38 @@ describe('redis@^4.0.0', () => { assert.ok(multiSetSpan); assert.strictEqual(multiSetSpan.name, 'redis-SET'); assert.strictEqual( - multiSetSpan.attributes[SemanticAttributes.DB_STATEMENT], + multiSetSpan.attributes[SEMATTRS_DB_STATEMENT], 'SET key [1 other arguments]' ); assert.strictEqual( - multiSetSpan?.attributes[SemanticAttributes.NET_PEER_NAME], + multiSetSpan?.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - multiSetSpan?.attributes[SemanticAttributes.NET_PEER_PORT], + multiSetSpan?.attributes[SEMATTRS_NET_PEER_PORT], redisTestConfig.port ); assert.strictEqual( - multiSetSpan?.attributes[SemanticAttributes.DB_CONNECTION_STRING], + multiSetSpan?.attributes[SEMATTRS_DB_CONNECTION_STRING], redisTestUrl ); assert.ok(multiGetSpan); assert.strictEqual(multiGetSpan.name, 'redis-GET'); assert.strictEqual( - multiGetSpan.attributes[SemanticAttributes.DB_STATEMENT], + multiGetSpan.attributes[SEMATTRS_DB_STATEMENT], 'GET another-key' ); assert.strictEqual( - multiGetSpan?.attributes[SemanticAttributes.NET_PEER_NAME], + multiGetSpan?.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - multiGetSpan?.attributes[SemanticAttributes.NET_PEER_PORT], + multiGetSpan?.attributes[SEMATTRS_NET_PEER_PORT], redisTestConfig.port ); assert.strictEqual( - multiGetSpan?.attributes[SemanticAttributes.DB_CONNECTION_STRING], + multiGetSpan?.attributes[SEMATTRS_DB_CONNECTION_STRING], redisTestUrl ); }); @@ -360,19 +355,19 @@ describe('redis@^4.0.0', () => { const [multiSetSpan] = getTestSpans(); assert.ok(multiSetSpan); assert.strictEqual( - multiSetSpan.attributes[SemanticAttributes.DB_STATEMENT], + multiSetSpan.attributes[SEMATTRS_DB_STATEMENT], 'SET key [1 other arguments]' ); assert.strictEqual( - multiSetSpan?.attributes[SemanticAttributes.NET_PEER_NAME], + multiSetSpan?.attributes[SEMATTRS_NET_PEER_NAME], redisTestConfig.host ); assert.strictEqual( - multiSetSpan?.attributes[SemanticAttributes.NET_PEER_PORT], + multiSetSpan?.attributes[SEMATTRS_NET_PEER_PORT], redisTestConfig.port ); assert.strictEqual( - multiSetSpan?.attributes[SemanticAttributes.DB_CONNECTION_STRING], + multiSetSpan?.attributes[SEMATTRS_DB_CONNECTION_STRING], redisTestUrl ); }); @@ -513,7 +508,7 @@ describe('redis@^4.0.0', () => { await client.set('key', 'value'); const [span] = getTestSpans(); assert.strictEqual( - span.attributes[SemanticAttributes.DB_STATEMENT], + span.attributes[SEMATTRS_DB_STATEMENT], 'SET key value' ); }); @@ -527,7 +522,7 @@ describe('redis@^4.0.0', () => { await client.set('key', 'value'); const [span] = getTestSpans(); assert.ok(span); - assert.ok(!(SemanticAttributes.DB_STATEMENT in span.attributes)); + assert.ok(!(SEMATTRS_DB_STATEMENT in span.attributes)); }); }); diff --git a/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md index 180b361521..cd856dc0a7 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-redis/CHANGELOG.md @@ -12,6 +12,36 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0 +## [0.39.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-redis-v0.39.0...instrumentation-redis-v0.39.1) (2024-05-02) + + +### Bug Fixes + +* **instrumentation-redis:** Take host and port used for connection ([#2072](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2072)) ([3ad9fdf](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/3ad9fdfe1e18e597f31bb546d9b00824a7d1ffe9)) +* remove unuseful patch message from instrumentations ([#2161](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2161)) ([34f56e0](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/34f56e0e28a0873b69a499c9e91798b19fea8e96)) + +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-redis-v0.38.0...instrumentation-redis-v0.39.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/redis-common bumped from ^0.36.1 to ^0.36.2 + * devDependencies + * @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.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) diff --git a/plugins/node/opentelemetry-instrumentation-redis/LICENSE b/plugins/node/opentelemetry-instrumentation-redis/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-redis/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-redis/README.md b/plugins/node/opentelemetry-instrumentation-redis/README.md index 693edfdd21..f345f9ac02 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/README.md +++ b/plugins/node/opentelemetry-instrumentation-redis/README.md @@ -74,6 +74,20 @@ const redisInstrumentation = new RedisInstrumentation({ }); ``` +## 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 | +|------------------------|--------------------------------------------------------------| +| `db.connection_string` | URL to Redis server address, of the form `redis://host:port` | +| `db.statement` | Executed Redis statement | +| `db.system` | Database identifier; always `redis` | +| `net.peer.name` | Hostname or IP of the connected Redis server | +| `net.peer.port` | Port of the connected Redis server | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-redis/package.json b/plugins/node/opentelemetry-instrumentation-redis/package.json index 67d8fc6c1a..4515a23f3d 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.38.0", + "version": "0.39.1", "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.38.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/mocha": "7.0.2", @@ -66,9 +66,9 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-redis#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts index 819daa3398..8d6f2ba88d 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { diag } from '@opentelemetry/api'; import { isWrapped, InstrumentationBase, @@ -35,8 +34,10 @@ const DEFAULT_CONFIG: RedisInstrumentationConfig = { export class RedisInstrumentation extends InstrumentationBase { static readonly COMPONENT = 'redis'; - constructor(protected override _config: RedisInstrumentationConfig = {}) { - super('@opentelemetry/instrumentation-redis', VERSION, _config); + protected override _config!: RedisInstrumentationConfig; + + constructor(config: RedisInstrumentationConfig = {}) { + super('@opentelemetry/instrumentation-redis', VERSION, config); } override setConfig(config: RedisInstrumentationConfig = {}) { @@ -45,12 +46,10 @@ export class RedisInstrumentation extends InstrumentationBase { protected init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( 'redis', ['^2.6.0', '^3.0.0'], - (moduleExports, moduleVersion) => { - diag.debug(`Patching redis@${moduleVersion}`); - diag.debug('Patching redis.RedisClient.internal_send_command'); + moduleExports => { if ( isWrapped( moduleExports.RedisClient.prototype['internal_send_command'] @@ -67,7 +66,6 @@ export class RedisInstrumentation extends InstrumentationBase { this._getPatchInternalSendCommand() ); - diag.debug('patching redis.RedisClient.create_stream'); if (isWrapped(moduleExports.RedisClient.prototype['create_stream'])) { this._unwrap(moduleExports.RedisClient.prototype, 'create_stream'); } @@ -77,7 +75,6 @@ export class RedisInstrumentation extends InstrumentationBase { this._getPatchCreateStream() ); - diag.debug('patching redis.createClient'); if (isWrapped(moduleExports.createClient)) { this._unwrap(moduleExports, 'createClient'); } diff --git a/plugins/node/opentelemetry-instrumentation-redis/src/internal-types.ts b/plugins/node/opentelemetry-instrumentation-redis/src/internal-types.ts index 99e2efe829..545a1927e4 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/src/internal-types.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/src/internal-types.ts @@ -14,9 +14,9 @@ * limitations under the License. */ export interface RedisPluginClientTypes { - options?: { - host: string; - port: string; + connection_options?: { + port?: string; + host?: string; }; address?: string; diff --git a/plugins/node/opentelemetry-instrumentation-redis/src/utils.ts b/plugins/node/opentelemetry-instrumentation-redis/src/utils.ts index 7575e51376..d863089f30 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/src/utils.ts @@ -28,8 +28,12 @@ import { RedisCommand, RedisInstrumentationConfig } from './types'; import { EventEmitter } from 'events'; import { RedisInstrumentation } from './'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_REDIS, + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import { safeExecuteInTheMiddle } from '@opentelemetry/instrumentation'; import { RedisPluginClientTypes } from './internal-types'; @@ -100,25 +104,22 @@ export const getTracedInternalSendCommand = ( { kind: SpanKind.CLIENT, attributes: { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.REDIS, - [SemanticAttributes.DB_STATEMENT]: dbStatementSerializer( - cmd.command, - cmd.args - ), + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_REDIS, + [SEMATTRS_DB_STATEMENT]: dbStatementSerializer(cmd.command, cmd.args), }, } ); // Set attributes for not explicitly typed RedisPluginClientTypes - if (this.options) { + if (this.connection_options) { span.setAttributes({ - [SemanticAttributes.NET_PEER_NAME]: this.options.host, - [SemanticAttributes.NET_PEER_PORT]: this.options.port, + [SEMATTRS_NET_PEER_NAME]: this.connection_options.host, + [SEMATTRS_NET_PEER_PORT]: this.connection_options.port, }); } if (this.address) { span.setAttribute( - SemanticAttributes.DB_CONNECTION_STRING, + SEMATTRS_DB_CONNECTION_STRING, `redis://${this.address}` ); } diff --git a/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts b/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts index 01d449a57e..13113a2f3d 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts @@ -32,8 +32,12 @@ import { import * as assert from 'assert'; import { RedisInstrumentation } from '../src'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_REDIS, + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; const instrumentation = new RedisInstrumentation(); @@ -47,16 +51,16 @@ const memoryExporter = new InMemorySpanExporter(); const CONFIG = { host: process.env.OPENTELEMETRY_REDIS_HOST || 'localhost', - port: process.env.OPENTELEMETRY_REDIS_PORT || '63790', + port: Number(process.env.OPENTELEMETRY_REDIS_PORT || 63790), }; const URL = `redis://${CONFIG.host}:${CONFIG.port}`; const DEFAULT_ATTRIBUTES = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.REDIS, - [SemanticAttributes.NET_PEER_NAME]: CONFIG.host, - [SemanticAttributes.NET_PEER_PORT]: CONFIG.port, - [SemanticAttributes.DB_CONNECTION_STRING]: URL, + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_REDIS, + [SEMATTRS_NET_PEER_NAME]: CONFIG.host, + [SEMATTRS_NET_PEER_PORT]: CONFIG.port, + [SEMATTRS_DB_CONNECTION_STRING]: URL, }; const unsetStatus: SpanStatus = { @@ -192,7 +196,7 @@ describe('redis@2.x', () => { it(`should create a child span for ${operation.description}`, done => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: `${operation.command} ${operation.expectedDbStatement}`, + [SEMATTRS_DB_STATEMENT]: `${operation.command} ${operation.expectedDbStatement}`, }; const span = tracer.startSpan('test span'); context.with(trace.setSpan(context.active(), span), () => { @@ -281,7 +285,7 @@ describe('redis@2.x', () => { operation.args ); assert.strictEqual( - endedSpans[0].attributes[SemanticAttributes.DB_STATEMENT], + endedSpans[0].attributes[SEMATTRS_DB_STATEMENT], expectedStatement ); done(); diff --git a/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md index 65e7120fbe..a3a982f861 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-restify/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-restify-v0.37.0...instrumentation-restify-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-restify/LICENSE b/plugins/node/opentelemetry-instrumentation-restify/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-restify/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-restify/README.md b/plugins/node/opentelemetry-instrumentation-restify/README.md index 2e16ea7490..fd9b7fc7cd 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/README.md +++ b/plugins/node/opentelemetry-instrumentation-restify/README.md @@ -62,6 +62,16 @@ const restifyInstrumentation = new RestifyInstrumentation({ }); ``` +## 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 | +| ------------ | ---------------------------------- | +| `http.route` | The matched route (path template). | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-restify/package.json b/plugins/node/opentelemetry-instrumentation-restify/package.json index ddd13d9b97..1113783ecc 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.37.0", + "version": "0.38.0", "description": "OpenTelemetry restify automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -62,8 +62,8 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-restify#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts index 9efe444502..a00c24ba98 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts @@ -20,7 +20,7 @@ import type * as restify from 'restify'; import * as api from '@opentelemetry/api'; import type { Server } from 'restify'; import { LayerType } from './types'; -import * as AttributeNames from './enums/AttributeNames'; +import { AttributeNames } from './enums/AttributeNames'; import { VERSION } from './version'; import * as constants from './constants'; import { @@ -30,19 +30,17 @@ import { isWrapped, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions'; import { isPromise, isAsyncFunction } from './utils'; import { getRPCMetadata, RPCType } from '@opentelemetry/core'; import type { RestifyInstrumentationConfig } from './types'; -const { diag } = api; - -export class RestifyInstrumentation extends InstrumentationBase { +export class RestifyInstrumentation extends InstrumentationBase { constructor(config: RestifyInstrumentationConfig = {}) { super( `@opentelemetry/instrumentation-${constants.MODULE_NAME}`, VERSION, - Object.assign({}, config) + config ); } @@ -58,7 +56,7 @@ export class RestifyInstrumentation extends InstrumentationBase { } init() { - const module = new InstrumentationNodeModuleDefinition( + const module = new InstrumentationNodeModuleDefinition( constants.MODULE_NAME, constants.SUPPORTED_VERSIONS, (moduleExports, moduleVersion) => { @@ -68,13 +66,10 @@ export class RestifyInstrumentation extends InstrumentationBase { ); module.files.push( - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'restify/lib/server.js', constants.SUPPORTED_VERSIONS, - (moduleExports, moduleVersion) => { - diag.debug( - `Applying patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); + moduleExports => { this._isDisabled = false; const Server: any = moduleExports; for (const name of constants.RESTIFY_METHODS) { @@ -99,10 +94,7 @@ export class RestifyInstrumentation extends InstrumentationBase { } return moduleExports; }, - (moduleExports, moduleVersion) => { - diag.debug( - `Removing patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); + moduleExports => { this._isDisabled = true; if (moduleExports) { const Server: any = moduleExports; @@ -185,11 +177,11 @@ export class RestifyInstrumentation extends InstrumentationBase { ? `request handler - ${route}` : `middleware - ${fnName || 'anonymous'}`; const attributes = { - [AttributeNames.AttributeNames.NAME]: fnName, - [AttributeNames.AttributeNames.VERSION]: this._moduleVersion || 'n/a', - [AttributeNames.AttributeNames.TYPE]: metadata.type, - [AttributeNames.AttributeNames.METHOD]: metadata.methodName, - [SemanticAttributes.HTTP_ROUTE]: route, + [AttributeNames.NAME]: fnName, + [AttributeNames.VERSION]: this._moduleVersion || 'n/a', + [AttributeNames.TYPE]: metadata.type, + [AttributeNames.METHOD]: metadata.methodName, + [SEMATTRS_HTTP_ROUTE]: route, }; const span = this.tracer.startSpan( spanName, diff --git a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts index 6af016aed0..bea8b196a0 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts @@ -15,7 +15,7 @@ */ import { context, trace, Span } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_METHOD } from '@opentelemetry/semantic-conventions'; import { RPCMetadata, RPCType, setRPCMetadata } from '@opentelemetry/core'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; @@ -493,10 +493,7 @@ describe('Restify Instrumentation', () => { describe('using requestHook in config', () => { it('calls requestHook provided function when set in config', async () => { const requestHook = (span: Span, info: RestifyRequestInfo) => { - span.setAttribute( - SemanticAttributes.HTTP_METHOD, - info.request.method - ); + span.setAttribute(SEMATTRS_HTTP_METHOD, info.request.method); span.setAttribute('restify.layer', info.layerType); }; @@ -518,10 +515,7 @@ describe('Restify Instrumentation', () => { // span from get const span = memoryExporter.getFinishedSpans()[2]; assert.notStrictEqual(span, undefined); - assert.strictEqual( - span.attributes[SemanticAttributes.HTTP_METHOD], - 'GET' - ); + assert.strictEqual(span.attributes[SEMATTRS_HTTP_METHOD], 'GET'); assert.strictEqual( span.attributes['restify.layer'], 'request_handler' @@ -533,10 +527,7 @@ describe('Restify Instrumentation', () => { it('does not propagate an error from a requestHook that throws exception', async () => { const requestHook = (span: Span, info: RestifyRequestInfo) => { - span.setAttribute( - SemanticAttributes.HTTP_METHOD, - info.request.method - ); + span.setAttribute(SEMATTRS_HTTP_METHOD, info.request.method); throw Error('error thrown in requestHook'); }; @@ -559,10 +550,7 @@ describe('Restify Instrumentation', () => { // span from get const span = memoryExporter.getFinishedSpans()[2]; assert.notStrictEqual(span, undefined); - assert.strictEqual( - span.attributes[SemanticAttributes.HTTP_METHOD], - 'GET' - ); + assert.strictEqual(span.attributes[SEMATTRS_HTTP_METHOD], 'GET'); } } ); diff --git a/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md index 45643528b8..f0c10e6024 100644 --- a/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-router/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-router-v0.36.0...instrumentation-router-v0.37.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-router/LICENSE b/plugins/node/opentelemetry-instrumentation-router/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-router/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-router/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-router/README.md b/plugins/node/opentelemetry-instrumentation-router/README.md index 427dcc7a9f..152a9cf081 100644 --- a/plugins/node/opentelemetry-instrumentation-router/README.md +++ b/plugins/node/opentelemetry-instrumentation-router/README.md @@ -40,6 +40,16 @@ registerInstrumentations({ See [examples/router](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/router) for a short example. +## 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 | +| ------------ | ---------------------------------- | +| `http.route` | The matched route (path template). | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-router/package.json b/plugins/node/opentelemetry-instrumentation-router/package.json index b57544e4de..7ea1a851e9 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.36.0", + "version": "0.37.0", "description": "OpenTelemetry Router automatic instrumentation package", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -56,8 +56,8 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.22.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-router#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts index 8733daf1ab..fb02262e30 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts @@ -22,7 +22,7 @@ import { InstrumentationNodeModuleFile, isWrapped, } from '@opentelemetry/instrumentation'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_HTTP_ROUTE } from '@opentelemetry/semantic-conventions'; import * as http from 'http'; import type * as Router from 'router'; @@ -34,8 +34,8 @@ import * as utils from './utils'; import AttributeNames from './enums/AttributeNames'; import LayerType from './enums/LayerType'; -export default class RouterInstrumentation extends InstrumentationBase { - constructor(config?: InstrumentationConfig) { +export default class RouterInstrumentation extends InstrumentationBase { + constructor(config: InstrumentationConfig = {}) { super( `@opentelemetry/instrumentation-${constants.MODULE_NAME}`, VERSION, @@ -46,32 +46,20 @@ export default class RouterInstrumentation extends InstrumentationBase { private _moduleVersion?: string; init() { - const module = new InstrumentationNodeModuleDefinition( + const module = new InstrumentationNodeModuleDefinition( constants.MODULE_NAME, constants.SUPPORTED_VERSIONS, (moduleExports, moduleVersion) => { - api.diag.debug( - `Applying patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); this._moduleVersion = moduleVersion; return moduleExports; - }, - (moduleExports, moduleVersion) => { - api.diag.debug( - `Removing patch for ${constants.MODULE_NAME}@${moduleVersion}` - ); - return moduleExports; } ); module.files.push( - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'router/lib/layer.js', constants.SUPPORTED_VERSIONS, - (moduleExports, moduleVersion) => { - api.diag.debug( - `Applying patch for "lib/layer.js" of ${constants.MODULE_NAME}@${moduleVersion}` - ); + moduleExports => { const Layer: any = moduleExports; if (isWrapped(Layer.prototype.handle_request)) { this._unwrap(Layer.prototype, 'handle_request'); @@ -91,10 +79,7 @@ export default class RouterInstrumentation extends InstrumentationBase { ); return moduleExports; }, - (moduleExports, moduleVersion) => { - api.diag.debug( - `Removing patch for "lib/layer.js" of ${constants.MODULE_NAME}@${moduleVersion}` - ); + moduleExports => { const Layer: any = moduleExports; this._unwrap(Layer.prototype, 'handle_request'); this._unwrap(Layer.prototype, 'handle_error'); @@ -182,7 +167,7 @@ export default class RouterInstrumentation extends InstrumentationBase { [AttributeNames.NAME]: fnName, [AttributeNames.VERSION]: this._moduleVersion, [AttributeNames.TYPE]: type, - [SemanticAttributes.HTTP_ROUTE]: route, + [SEMATTRS_HTTP_ROUTE]: route, }; const parent = api.context.active(); diff --git a/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md index 9fbe11524d..3bca394376 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-winston/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-winston-v0.36.0...instrumentation-winston-v0.37.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* **instrumentation-winston:** Allow log level to be configured for log sending ([#2016](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2016)) ([b903bce](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/b903bce15d6ba4fa44daeaf6785abd6ed94cb5ff)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @opentelemetry/winston-transport bumped from ^0.2.0 to ^0.3.0 + ## [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) diff --git a/plugins/node/opentelemetry-instrumentation-winston/LICENSE b/plugins/node/opentelemetry-instrumentation-winston/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/LICENSE +++ b/plugins/node/opentelemetry-instrumentation-winston/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/node/opentelemetry-instrumentation-winston/README.md b/plugins/node/opentelemetry-instrumentation-winston/README.md index d6bcbcca99..90d80acc66 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/README.md +++ b/plugins/node/opentelemetry-instrumentation-winston/README.md @@ -60,6 +60,7 @@ logger.info('foobar'); | Option | Type | Description | | ----------------------- | ----------------- | ----------- | | `disableLogSending` | `boolean` | Whether to disable [log sending](#log-sending). Default `false`. | +| `logSeverity` | `SeverityNumber` | Control severity level for [log sending](#log-sending). Default `SeverityNumber.UNSPECIFIED`, it will use Winston Logger's current level when unspecified. | | `disableLogCorrelation` | `boolean` | Whether to disable [log correlation](#log-correlation). Default `false`. | | `logHook` | `LogHookFunction` | An option hook to inject additional context to a log record after trace-context has been added. This requires `disableLogCorrelation` to be false. | diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index faeb6280f3..ecfd90546c 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.36.0", + "version": "0.37.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.2.0", + "@opentelemetry/winston-transport": "^0.3.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -64,7 +64,8 @@ "winston2": "npm:winston@2.4.7" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0" + "@opentelemetry/api-logs": "^0.51.0", + "@opentelemetry/instrumentation": "^0.51.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-winston#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts index d89107144c..4d4b1cfcc5 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts @@ -15,6 +15,7 @@ */ import { context, trace, isSpanContextValid, Span } from '@opentelemetry/api'; +import { SeverityNumber } from '@opentelemetry/api-logs'; import { InstrumentationBase, InstrumentationNodeModuleDefinition, @@ -24,8 +25,8 @@ import { } from '@opentelemetry/instrumentation'; import type { WinstonInstrumentationConfig } from './types'; import type { - Winston2LogMethod, Winston2LoggerModule, + Winston2LogMethod, Winston3ConfigureMethod, Winston3LogMethod, Winston3Logger, @@ -42,17 +43,16 @@ export class WinstonInstrumentation extends InstrumentationBase { protected init() { const winstons3instrumentationNodeModuleDefinition = - new InstrumentationNodeModuleDefinition<{}>( + new InstrumentationNodeModuleDefinition( 'winston', winston3Versions, moduleExports => moduleExports, () => {}, [ - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'winston/lib/winston/logger.js', winston3Versions, - (logger, moduleVersion) => { - this._diag.debug(`Applying patch for winston@${moduleVersion}`); + (logger: Winston3Logger) => { if (isWrapped(logger.prototype['write'])) { this._unwrap(logger.prototype, 'write'); } @@ -70,9 +70,8 @@ export class WinstonInstrumentation extends InstrumentationBase { return logger; }, - (logger, moduleVersion) => { + (logger: Winston3Logger) => { if (logger === undefined) return; - this._diag.debug(`Removing patch for winston@${moduleVersion}`); this._unwrap(logger.prototype, 'write'); this._unwrap(logger.prototype, 'configure'); } @@ -81,17 +80,16 @@ export class WinstonInstrumentation extends InstrumentationBase { ); const winstons2instrumentationNodeModuleDefinition = - new InstrumentationNodeModuleDefinition<{}>( + new InstrumentationNodeModuleDefinition( 'winston', winstonPre3Versions, moduleExports => moduleExports, () => {}, [ - new InstrumentationNodeModuleFile( + new InstrumentationNodeModuleFile( 'winston/lib/winston/logger.js', winstonPre3Versions, - (fileExports, moduleVersion) => { - this._diag.debug(`Applying patch for winston@${moduleVersion}`); + (fileExports: Winston2LoggerModule) => { const proto = fileExports.Logger.prototype; if (isWrapped(proto.log)) { @@ -101,9 +99,8 @@ export class WinstonInstrumentation extends InstrumentationBase { return fileExports; }, - (fileExports, moduleVersion) => { + (fileExports: Winston2LoggerModule) => { if (fileExports === undefined) return; - this._diag.debug(`Removing patch for winston@${moduleVersion}`); this._unwrap(fileExports.Logger.prototype, 'log'); } ), @@ -119,7 +116,7 @@ export class WinstonInstrumentation extends InstrumentationBase { return this._config; } - override setConfig(config: WinstonInstrumentationConfig) { + override setConfig(config: WinstonInstrumentationConfig = {}) { this._config = config; } @@ -206,7 +203,17 @@ export class WinstonInstrumentation extends InstrumentationBase { let newTransports = Array.isArray(originalTransports) ? originalTransports : []; - const openTelemetryTransport = new OpenTelemetryTransportV3(); + let transportOptions = {}; + if (config.logSeverity) { + const winstonLevel = instrumentation._winstonLevelFromSeverity( + config.logSeverity, + args[0].levels + ); + transportOptions = { level: winstonLevel }; + } + const openTelemetryTransport = new OpenTelemetryTransportV3( + transportOptions + ); if (originalTransports && !Array.isArray(originalTransports)) { newTransports = [originalTransports]; } @@ -244,4 +251,118 @@ export class WinstonInstrumentation extends InstrumentationBase { } return record; } + + private _winstonLevelFromSeverity( + severity: SeverityNumber, + winstonLevels: { [key: string]: number } | undefined + ): string | undefined { + if (winstonLevels) { + if (isNpmLevels(winstonLevels)) { + if (severity >= SeverityNumber.ERROR) { + return 'error'; + } else if (severity >= SeverityNumber.WARN) { + return 'warn'; + } else if (severity >= SeverityNumber.INFO) { + return 'info'; + } else if (severity >= SeverityNumber.DEBUG3) { + return 'http'; + } else if (severity >= SeverityNumber.DEBUG2) { + return 'verbose'; + } else if (severity >= SeverityNumber.DEBUG) { + return 'debug'; + } else if (severity >= SeverityNumber.TRACE) { + return 'silly'; + } + } else if (isCliLevels(winstonLevels)) { + if (severity >= SeverityNumber.ERROR) { + return 'error'; + } else if (severity >= SeverityNumber.WARN) { + return 'warn'; + } else if (severity >= SeverityNumber.INFO3) { + return 'help'; + } else if (severity >= SeverityNumber.INFO2) { + return 'data'; + } else if (severity >= SeverityNumber.INFO) { + return 'info'; + } else if (severity >= SeverityNumber.DEBUG) { + return 'debug'; + } else if (severity >= SeverityNumber.TRACE4) { + return 'prompt'; + } else if (severity >= SeverityNumber.TRACE3) { + return 'verbose'; + } else if (severity >= SeverityNumber.TRACE2) { + return 'input'; + } else if (severity >= SeverityNumber.TRACE) { + return 'silly'; + } + } else if (isSyslogLevels(winstonLevels)) { + if (severity >= SeverityNumber.FATAL2) { + return 'emerg'; + } else if (severity >= SeverityNumber.FATAL) { + return 'alert'; + } else if (severity >= SeverityNumber.ERROR2) { + return 'crit'; + } else if (severity >= SeverityNumber.ERROR) { + return 'error'; + } else if (severity >= SeverityNumber.WARN) { + return 'warning'; + } else if (severity >= SeverityNumber.INFO2) { + return 'notice'; + } else if (severity >= SeverityNumber.INFO) { + return 'info'; + } else if (severity >= SeverityNumber.TRACE) { + return 'debug'; + } + } + // Unknown level + this._diag.warn( + 'failed to configure severity with existing winston levels' + ); + } + + function isCliLevels(arg: any): boolean { + return ( + arg && + arg.error !== undefined && + arg.warn && + arg.help && + arg.data && + arg.info && + arg.debug && + arg.prompt && + arg.verbose && + arg.input && + arg.silly + ); + } + + function isNpmLevels(arg: any): boolean { + return ( + arg && + arg.error !== undefined && + arg.warn && + arg.info && + arg.http && + arg.verbose && + arg.debug && + arg.silly + ); + } + + function isSyslogLevels(arg: any): boolean { + return ( + arg && + arg.emerg !== undefined && + arg.alert && + arg.crit && + arg.error && + arg.warning && + arg.notice && + arg.info && + arg.debug + ); + } + + return; + } } diff --git a/plugins/node/opentelemetry-instrumentation-winston/src/internal-types.ts b/plugins/node/opentelemetry-instrumentation-winston/src/internal-types.ts index cba7ee90d2..e71eff3c83 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/src/internal-types.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/src/internal-types.ts @@ -22,7 +22,6 @@ import type { export type Winston3LogMethod = Winston3Logger['write']; export type Winston3ConfigureMethod = Winston3Logger['configure']; export type { Winston3Logger }; - export type { Winston2LogMethod }; export type Winston2LoggerModule = { Logger: Winston2Logger & { diff --git a/plugins/node/opentelemetry-instrumentation-winston/src/types.ts b/plugins/node/opentelemetry-instrumentation-winston/src/types.ts index 5621bc8797..e6fabea502 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/src/types.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/src/types.ts @@ -15,6 +15,7 @@ */ import { Span } from '@opentelemetry/api'; +import { SeverityNumber } from '@opentelemetry/api-logs'; import { InstrumentationConfig } from '@opentelemetry/instrumentation'; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -28,6 +29,11 @@ export interface WinstonInstrumentationConfig extends InstrumentationConfig { */ disableLogSending?: boolean; + /** + * Control Log sending severity level, logs will be sent for specified severity and higher. + */ + logSeverity?: SeverityNumber; + /** * Whether to disable the injection trace-context fields, and possibly other * fields from `logHook()`, into log records for log correlation. diff --git a/plugins/node/opentelemetry-instrumentation-winston/test/winston.test.ts b/plugins/node/opentelemetry-instrumentation-winston/test/winston.test.ts index fe62a946b9..2ecb4eab37 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/test/winston.test.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/test/winston.test.ts @@ -383,4 +383,89 @@ describe('WinstonInstrumentation', () => { } }); }); + describe('logSeverity config', () => { + beforeEach(() => { + instrumentation.setConfig({ + disableLogSending: false, + }); + memoryLogExporter.getFinishedLogRecords().length = 0; // clear + }); + + it('npm levels', () => { + if (!isWinston2) { + instrumentation.setConfig({ + disableLogSending: false, + logSeverity: SeverityNumber.DEBUG, + }); + initLogger(LevelsType.npm); + logger.log('silly', 'silly'); + logger.log('debug', 'debug'); + logger.log('verbose', 'verbose'); + logger.log('http', 'http'); + logger.log('info', 'info'); + logger.log('warn', 'warn'); + logger.log('error', 'error'); + const logRecords = memoryLogExporter.getFinishedLogRecords(); + assert.strictEqual(logRecords.length, 6); + assert.strictEqual(logRecords[0].body, 'debug'); + assert.strictEqual(logRecords[1].body, 'verbose'); + assert.strictEqual(logRecords[2].body, 'http'); + assert.strictEqual(logRecords[3].body, 'info'); + assert.strictEqual(logRecords[4].body, 'warn'); + assert.strictEqual(logRecords[5].body, 'error'); + } + }); + + it('cli levels', () => { + if (!isWinston2) { + instrumentation.setConfig({ + disableLogSending: false, + logSeverity: SeverityNumber.INFO, + }); + initLogger(LevelsType.cli); + logger.log('silly', 'silly'); + logger.log('input', 'input'); + logger.log('verbose', 'verbose'); + logger.log('prompt', 'prompt'); + logger.log('debug', 'debug'); + logger.log('info', 'info'); + logger.log('data', 'data'); + logger.log('help', 'help'); + logger.log('warn', 'warn'); + logger.log('error', 'error'); + const logRecords = memoryLogExporter.getFinishedLogRecords(); + assert.strictEqual(logRecords.length, 5); + assert.strictEqual(logRecords[0].body, 'info'); + assert.strictEqual(logRecords[1].body, 'data'); + assert.strictEqual(logRecords[2].body, 'help'); + assert.strictEqual(logRecords[3].body, 'warn'); + assert.strictEqual(logRecords[4].body, 'error'); + } + }); + + it('syslog levels', () => { + if (!isWinston2) { + instrumentation.setConfig({ + disableLogSending: false, + logSeverity: SeverityNumber.WARN, + }); + initLogger(LevelsType.syslog); + logger.log('debug', 'debug'); + logger.log('info', 'info'); + logger.log('notice', 'notice'); + logger.log('warning', 'warning'); + logger.log('error', 'error'); + logger.log('crit', 'crit'); + logger.log('alert', 'alert'); + logger.log('emerg', 'emerg'); + const logRecords = memoryLogExporter.getFinishedLogRecords(); + assert.strictEqual(logRecords.length, 5); + assert.strictEqual(logRecords[0].body, 'warning'); + assert.strictEqual(logRecords[1].body, 'error'); + assert.strictEqual(logRecords[2].body, 'crit'); + assert.strictEqual(logRecords[3].body, 'alert'); + assert.strictEqual(logRecords[4].body, 'emerg'); + } + }); + }); }); diff --git a/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md b/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md index df45a2651b..d4750f9920 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md +++ b/plugins/web/opentelemetry-instrumentation-document-load/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-document-load-v0.37.0...instrumentation-document-load-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/web/opentelemetry-instrumentation-document-load/LICENSE b/plugins/web/opentelemetry-instrumentation-document-load/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/LICENSE +++ b/plugins/web/opentelemetry-instrumentation-document-load/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/web/opentelemetry-instrumentation-document-load/README.md b/plugins/web/opentelemetry-instrumentation-document-load/README.md index 4ec62269ae..3d87e40398 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/README.md +++ b/plugins/web/opentelemetry-instrumentation-document-load/README.md @@ -117,10 +117,10 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i Attributes collected: -| Attribute | Short Description | Notes | -| ----------------- | ------------------------------------------------------------------------------ | ------------------------------- | -| `http.url` | Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]` | Key: `SEMATTRS_HTTP_URL` | -| `http.user_agent` | Value of the HTTP User-Agent header sent by the client | Key: `SEMATTRS_HTTP_USER_AGENT` | +| Attribute | Short Description | +| ----------------- | ------------------------------------------------------------------------------ | +| `http.url` | Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]` | +| `http.user_agent` | Value of the HTTP User-Agent header sent by the client | ## Useful links diff --git a/plugins/web/opentelemetry-instrumentation-document-load/package.json b/plugins/web/opentelemetry-instrumentation-document-load/package.json index 7d1a1de173..f849a1de3d 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.37.0", + "version": "0.38.0", "description": "OpenTelemetry document-load automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -69,7 +69,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.15.0", "@opentelemetry/semantic-conventions": "^1.22.0" diff --git a/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts b/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts index ecc84b9f76..f3837177a0 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts +++ b/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts @@ -52,7 +52,7 @@ import { /** * This class represents a document load plugin */ -export class DocumentLoadInstrumentation extends InstrumentationBase { +export class DocumentLoadInstrumentation extends InstrumentationBase { readonly component: string = 'document-load'; readonly version: string = '1'; moduleName = this.component; diff --git a/plugins/web/opentelemetry-instrumentation-document-load/test/documentLoad.test.ts b/plugins/web/opentelemetry-instrumentation-document-load/test/documentLoad.test.ts index 3dbf64dbe7..a0aba71c3e 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/test/documentLoad.test.ts +++ b/plugins/web/opentelemetry-instrumentation-document-load/test/documentLoad.test.ts @@ -555,43 +555,44 @@ describe('DocumentLoad Instrumentation', () => { assert.strictEqual(rootSpan.attributes['http.user_agent'], userAgent); ensureNetworkEventsExists(fsEvents); + assert.strictEqual(fsEvents.length, 8); - assert.strictEqual(rsEvents[0].name, PTN.FETCH_START); - assert.strictEqual(rsEvents[1].name, PTN.UNLOAD_EVENT_START); - assert.strictEqual(rsEvents[2].name, PTN.UNLOAD_EVENT_END); - assert.strictEqual(rsEvents[3].name, PTN.DOM_INTERACTIVE); - assert.strictEqual( - rsEvents[4].name, - PTN.DOM_CONTENT_LOADED_EVENT_START - ); - assert.strictEqual(rsEvents[5].name, PTN.DOM_CONTENT_LOADED_EVENT_END); - assert.strictEqual(rsEvents[6].name, PTN.DOM_COMPLETE); - assert.strictEqual(rsEvents[7].name, PTN.LOAD_EVENT_START); - assert.strictEqual(rsEvents[8].name, PTN.LOAD_EVENT_END); + const rsEventNames = rsEvents.map(e => e.name); + // Allow the unloadEvent{Start,End} events to be missing. Tests that + // are simulating a fallback to window.performance.timing are using + // values (entriesFallback) for that result in those network span + // events being dropped after https://github.com/open-telemetry/opentelemetry-js/pull/4486 + // (@opentelemetry/sdk-trace-web@1.24.0). + const expectedRsEventNames = + rsEventNames[1] === PTN.UNLOAD_EVENT_START + ? [ + PTN.FETCH_START, + PTN.UNLOAD_EVENT_START, + PTN.UNLOAD_EVENT_END, + PTN.DOM_INTERACTIVE, + PTN.DOM_CONTENT_LOADED_EVENT_START, + PTN.DOM_CONTENT_LOADED_EVENT_END, + PTN.DOM_COMPLETE, + PTN.LOAD_EVENT_START, + PTN.LOAD_EVENT_END, + ] + : [ + PTN.FETCH_START, + PTN.DOM_INTERACTIVE, + PTN.DOM_CONTENT_LOADED_EVENT_START, + PTN.DOM_CONTENT_LOADED_EVENT_END, + PTN.DOM_COMPLETE, + PTN.LOAD_EVENT_START, + PTN.LOAD_EVENT_END, + ]; + assert.deepStrictEqual(rsEventNames, expectedRsEventNames); - assert.strictEqual(fsEvents.length, 8); - assert.strictEqual(rsEvents.length, 9); assert.strictEqual(exporter.getFinishedSpans().length, 2); done(); }); }); } - describe('when navigation entries types are NOT available then fallback to "performance.timing"', () => { - const sandbox = sinon.createSandbox(); - beforeEach(() => { - sandbox.stub(window.performance, 'getEntriesByType').value(undefined); - sandbox.stub(window.performance, 'timing').get(() => { - return entriesFallback; - }); - }); - afterEach(() => { - sandbox.restore(); - }); - - shouldExportCorrectSpan(); - }); - describe('when getEntriesByType is not defined then fallback to "performance.timing"', () => { const sandbox = sinon.createSandbox(); beforeEach(() => { diff --git a/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md b/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md index 5e8311cd24..8c28eafded 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md +++ b/plugins/web/opentelemetry-instrumentation-long-task/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-long-task-v0.37.0...instrumentation-long-task-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + ## [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) diff --git a/plugins/web/opentelemetry-instrumentation-long-task/package.json b/plugins/web/opentelemetry-instrumentation-long-task/package.json index 0c230f899d..8e74d81397 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.37.0", + "version": "0.38.0", "description": "OpenTelemetry long task API automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -79,7 +79,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-web": "^1.8.0" }, "peerDependencies": { diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md b/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md index 20ecf917d0..729fe2ec9f 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-user-interaction-v0.37.0...instrumentation-user-interaction-v0.38.0) (2024-04-25) + + +### Features + +* **deps:** update otel-js to 0.51.0 ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) +* remove generic type from instrumentations ([80cbee7](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/80cbee73130c65c8ccd78384485a7be8d2a4a84b)) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [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) diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/LICENSE b/plugins/web/opentelemetry-instrumentation-user-interaction/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/LICENSE +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json index 8f2658f700..d51c3877ea 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.37.0", + "version": "0.38.0", "description": "OpenTelemetry UserInteraction automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -52,7 +52,7 @@ "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-zone-peer-dep": "^1.8.0", - "@opentelemetry/instrumentation-xml-http-request": "^0.50.0", + "@opentelemetry/instrumentation-xml-http-request": "^0.51.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@types/jquery": "3.5.20", "@types/mocha": "7.0.2", @@ -81,7 +81,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/sdk-trace-web": "^1.8.0" }, "peerDependencies": { diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts b/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts index e8be5e3fc5..ea05bddbf1 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts @@ -49,7 +49,7 @@ function defaultShouldPreventSpanCreation() { * If zone.js is available then it patches the zone otherwise it patches * addEventListener of HTMLElement */ -export class UserInteractionInstrumentation extends InstrumentationBase { +export class UserInteractionInstrumentation extends InstrumentationBase { readonly version = VERSION; readonly moduleName: string = 'user-interaction'; private _spansData = new WeakMap(); @@ -67,7 +67,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase private _eventNames: Set; private _shouldPreventSpanCreation: ShouldPreventSpanCreation; - constructor(config?: UserInteractionInstrumentationConfig) { + constructor(config: UserInteractionInstrumentationConfig = {}) { super('@opentelemetry/instrumentation-user-interaction', VERSION, config); this._eventNames = new Set(config?.eventNames ?? DEFAULT_EVENT_NAMES); this._shouldPreventSpanCreation = diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esm.json b/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esm.json index 2eb13ff857..379f547a46 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esm.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esm.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "src", "outDir": "build/esm", - "skipLibCheck": true, "tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo" }, "include": [ diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esnext.json b/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esnext.json index b7a30a41f1..cb78dd6ff3 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esnext.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.esnext.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "src", "outDir": "build/esnext", - "skipLibCheck": true, "tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo" }, "include": [ diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.json b/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.json index 5c3680dd33..28be80d266 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/tsconfig.json @@ -2,8 +2,7 @@ "extends": "../../../tsconfig.base", "compilerOptions": { "rootDir": ".", - "outDir": "build", - "skipLibCheck": true + "outDir": "build" }, "include": [ "src/**/*.ts", diff --git a/plugins/web/opentelemetry-plugin-react-load/CHANGELOG.md b/plugins/web/opentelemetry-plugin-react-load/CHANGELOG.md index 6c1904c9d4..20e4ba31cb 100644 --- a/plugins/web/opentelemetry-plugin-react-load/CHANGELOG.md +++ b/plugins/web/opentelemetry-plugin-react-load/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.30.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/plugin-react-load-v0.30.0...plugin-react-load-v0.30.1) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.30.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/plugin-react-load-v0.29.1...plugin-react-load-v0.30.0) (2023-11-13) diff --git a/plugins/web/opentelemetry-plugin-react-load/LICENSE b/plugins/web/opentelemetry-plugin-react-load/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/plugins/web/opentelemetry-plugin-react-load/LICENSE +++ b/plugins/web/opentelemetry-plugin-react-load/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/plugins/web/opentelemetry-plugin-react-load/package.json b/plugins/web/opentelemetry-plugin-react-load/package.json index 9e5f01403d..686bdcc371 100644 --- a/plugins/web/opentelemetry-plugin-react-load/package.json +++ b/plugins/web/opentelemetry-plugin-react-load/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/plugin-react-load", - "version": "0.30.0", + "version": "0.30.1", "description": "OpenTelemetry React loading automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/propagators/opentelemetry-propagator-aws-xray/CHANGELOG.md b/propagators/opentelemetry-propagator-aws-xray/CHANGELOG.md deleted file mode 100644 index 3a072e7e09..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/CHANGELOG.md +++ /dev/null @@ -1,62 +0,0 @@ -# Changelog - -## [1.3.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.3.0...propagator-aws-xray-v1.3.1) (2023-08-14) - - -### Bug Fixes - -* Revert "feat(minification): Add importHelpers and tslib as a dependency ([#1545](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1545))" ([#1611](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1611)) ([e5bca5f](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/e5bca5fe5b27adc59c8de8fe4087d38b69d93bd4)) - -## [1.3.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.2.1...propagator-aws-xray-v1.3.0) (2023-07-12) - - -### Features - -* **minification:** Add importHelpers and tslib as a dependency ([#1545](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1545)) ([65f612e](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/65f612e35c4d67b9935dc3a9155588b35d915482)) - -## [1.2.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.2.0...propagator-aws-xray-v1.2.1) (2023-05-16) - - -### Bug Fixes - -* **eslint-config:** replace gts with prettier and eslint ([#1439](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1439)) ([2571c37](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/2571c371be1b5738442200cab2415b6a04c32aab)) - -## [1.2.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.1.1...propagator-aws-xray-v1.2.0) (2023-02-07) - - -### Features - -* **propagator/aws-xray:** Extract X-Ray header in a case-insensitive fashion ([#1328](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1328)) ([4227d8a](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4227d8a3df7b0782d76844e89d452e0432a704f4)) - -## [1.1.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.1.0...propagator-aws-xray-v1.1.1) (2022-11-02) - - -### Bug Fixes - -* address webpack memory issue for browser tests ([#1264](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1264)) ([c7f08fe](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/c7f08fed51bca68b0c522769c3c589102b98ec93)) - -## [1.1.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.0.1...propagator-aws-xray-v1.1.0) (2022-05-14) - - -### Features - -* add supported node versions for all packages ([#973](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/973)) ([baaacbd](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/baaacbdd35ca4baab0afae64647aa8c0380ee4b7)) -* remove colors dependency ([#943](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/943)) ([b21b96c](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/b21b96c1a3a4f871370f970d6b2825f00e1fe595)), closes [#826](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/826) -* update webpack outside of examples ([#963](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/963)) ([9a58648](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/9a586480ed6a7677fb1283a61d05540345c52617)) -* use Otel SDK 1.2/0.28 ([#984](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/984)) ([098c2ed](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/098c2ed6f9c5ab7bd865685018c0777245aab3b7)) - -### [1.0.1](https://www.github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.0.0...propagator-aws-xray-v1.0.1) (2022-01-24) - - -### Bug Fixes - -* fix CI by forcing colors@1.4.0 ([#825](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/825)) ([0ec9f08](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/0ec9f080520fe0f146a915a656300ef53a151ace)) -* rename lerna's --include-filtered-dependencies option ([#817](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/817)) ([cf268e7](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/cf268e7a92b7800ad6dbec9ca77466f9ee03ee1a)) - -## [1.0.0](https://www.github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v0.25.0...propagator-aws-xray-v1.0.0) (2021-10-22) - - -### Features - -* bumped aws components to 1.0 ([#658](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/658)) ([44d21fe](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/44d21fe5030d2f64bedde1efc50a1173e0c49f3d)) -* support API and SDK 1.0 ([#706](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/706)) ([096b694](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/096b694bbc3079f0ab4ee0462869b10eb8185202)) diff --git a/propagators/opentelemetry-propagator-aws-xray/README.md b/propagators/opentelemetry-propagator-aws-xray/README.md deleted file mode 100644 index 9f2cb4e307..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# OpenTelemetry Propagator AWS X-Ray - -[![NPM Published Version][npm-img]][npm-url] -[![Apache License][license-image]][license-image] - -The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for systems that are using AWS `X-Amzn-Trace-Id` format. -This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. -`TraceState` is currently not propagated. - -## Status - -| Maturity | [Component Owner](../../.github/component_owners.yml) | Compatibility | -| ----------------------------------------- | ----------------------------------------------------- | --------------------- | -| [Stable](../../../CONTRIBUTING.md#stable) | @carolabadeer | API 1.0+
SDK 1.0+ | - -## Installation - -```sh -npm install --save @opentelemetry/propagator-aws-xray -``` - -## Usage - -In the [global tracer configuration file](https://opentelemetry.io/docs/instrumentation/js/getting-started/nodejs/#setup), configure the following: - -```js -const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); -const { AWSXRayPropagator } = require('@opentelemetry/propagator-aws-xray'); -// ... - -const provider = new NodeTracerProvider(); - -// Set the global trace context propagator to use X-Ray formatted trace header -provider.register({ - propagator: new AWSXRayPropagator() -}); -``` - -## Propagator Details - -Example header:`X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1` - -The header consists of three parts: the root trace ID, the parent ID and the sampling decision. - -### Root - The AWS X-Ray format trace ID - -* Format: (spec-version)-(timestamp)-(UUID) - * spec_version - The version of the AWS X-Ray header format. Currently, only "1" is valid. - * timestamp - 32-bit number in base16 format, corresponds to the first 8 characters of the OpenTelemetry trace ID. Note, while X-Ray calls this timestamp, for the purpose of propagation it is opaque and any value will work. - * UUID - 96-bit random number in base16 format, corresponds to the last 10 characters of the OpenTelemetry trace ID. - -Root is analogous to the [OpenTelemetry Trace ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext), with some small format changes. -For additional reading, see the [AWS X-Ray Trace ID](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-sendingdata.html#xray-api-traceids) public documentation. - -### Parent - The ID of the AWS X-Ray Segment - -* 64-bit random number in base16 format. Populated from the [OpenTelemetry Span ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). - -### Sampled - The sampling decision - -* Defined in the AWS X-Ray specification as a tri-state field, with "0", "1" and "?" as valid values. Only "0" and "1" are used in this propagator. If "?", a new trace will be started. -* Populated from the [OpenTelemetry trace flags](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). - -## 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/propagator-aws-xray -[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fpropagator-aws-xray.svg diff --git a/propagators/opentelemetry-propagator-aws-xray/karma.conf.js b/propagators/opentelemetry-propagator-aws-xray/karma.conf.js deleted file mode 100644 index edcd9f055f..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/karma.conf.js +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * Copyright 2020, 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 - * - * 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. - */ - -const karmaWebpackConfig = require('../../karma.webpack'); -const karmaBaseConfig = require('../../karma.base'); - -module.exports = (config) => { - config.set(Object.assign({}, karmaBaseConfig, { - webpack: karmaWebpackConfig - })) -}; diff --git a/propagators/opentelemetry-propagator-aws-xray/package.json b/propagators/opentelemetry-propagator-aws-xray/package.json deleted file mode 100644 index f96cceba01..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "@opentelemetry/propagator-aws-xray", - "version": "1.3.1", - "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", - "main": "build/src/index.js", - "module": "build/esm/index.js", - "types": "build/src/index.d.ts", - "repository": "open-telemetry/opentelemetry-js-contrib", - "scripts": { - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/propagator-aws-xray --include-dependencies", - "prewatch": "npm run precompile", - "compile": "tsc --build tsconfig.json tsconfig.esm.json", - "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", - "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", - "test:browser": "nyc karma start --single-run", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", - "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", - "prepublishOnly": "npm run compile" - }, - "keywords": [ - "opentelemetry", - "nodejs", - "tracing", - "profiling", - "awsxray" - ], - "author": "OpenTelemetry Authors", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - }, - "files": [ - "build/esm/**/*.js", - "build/esm/**/*.js.map", - "build/esm/**/*.d.ts", - "build/src/**/*.js", - "build/src/**/*.js.map", - "build/src/**/*.d.ts" - ], - "publishConfig": { - "access": "public" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0" - }, - "devDependencies": { - "@opentelemetry/api": "^1.0.0", - "@types/mocha": "8.2.3", - "@types/node": "18.6.5", - "@types/webpack-env": "1.16.2", - "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "karma": "6.3.16", - "karma-chrome-launcher": "^3.1.1", - "karma-coverage-istanbul-reporter": "3.0.3", - "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.36", - "karma-webpack": "4.0.2", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "ts-loader": "8.3.0", - "ts-mocha": "10.0.0", - "typescript": "4.4.4", - "webpack": "4.46.0" - }, - "dependencies": { - "@opentelemetry/core": "^1.0.0" - }, - "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/propagators/opentelemetry-propagator-aws-xray#readme" -} diff --git a/propagators/opentelemetry-propagator-aws-xray/src/AWSXRayPropagator.ts b/propagators/opentelemetry-propagator-aws-xray/src/AWSXRayPropagator.ts deleted file mode 100644 index e06568d9ee..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/src/AWSXRayPropagator.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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 { - trace, - Context, - TextMapPropagator, - SpanContext, - TraceFlags, - TextMapSetter, - TextMapGetter, - isSpanContextValid, - isValidSpanId, - isValidTraceId, - INVALID_TRACEID, - INVALID_SPANID, - INVALID_SPAN_CONTEXT, -} from '@opentelemetry/api'; - -export const AWSXRAY_TRACE_ID_HEADER = 'x-amzn-trace-id'; - -const TRACE_HEADER_DELIMITER = ';'; -const KV_DELIMITER = '='; - -const TRACE_ID_KEY = 'Root'; -const TRACE_ID_LENGTH = 35; -const TRACE_ID_VERSION = '1'; -const TRACE_ID_DELIMITER = '-'; -const TRACE_ID_DELIMITER_INDEX_1 = 1; -const TRACE_ID_DELIMITER_INDEX_2 = 10; -const TRACE_ID_FIRST_PART_LENGTH = 8; - -const PARENT_ID_KEY = 'Parent'; - -const SAMPLED_FLAG_KEY = 'Sampled'; -const IS_SAMPLED = '1'; -const NOT_SAMPLED = '0'; - -/** - * Implementation of the AWS X-Ray Trace Header propagation protocol. See AWS - * Tracing header spec - * - * An example AWS Xray Tracing Header is shown below: - * X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1 - */ -export class AWSXRayPropagator implements TextMapPropagator { - inject(context: Context, carrier: unknown, setter: TextMapSetter) { - const spanContext = trace.getSpan(context)?.spanContext(); - if (!spanContext || !isSpanContextValid(spanContext)) return; - - const otTraceId = spanContext.traceId; - const timestamp = otTraceId.substring(0, TRACE_ID_FIRST_PART_LENGTH); - const randomNumber = otTraceId.substring(TRACE_ID_FIRST_PART_LENGTH); - - const parentId = spanContext.spanId; - const samplingFlag = - (TraceFlags.SAMPLED & spanContext.traceFlags) === TraceFlags.SAMPLED - ? IS_SAMPLED - : NOT_SAMPLED; - // TODO: Add OT trace state to the X-Ray trace header - - const traceHeader = `Root=1-${timestamp}-${randomNumber};Parent=${parentId};Sampled=${samplingFlag}`; - setter.set(carrier, AWSXRAY_TRACE_ID_HEADER, traceHeader); - } - - extract(context: Context, carrier: unknown, getter: TextMapGetter): Context { - const spanContext = this.getSpanContextFromHeader(carrier, getter); - if (!isSpanContextValid(spanContext)) return context; - - return trace.setSpan(context, trace.wrapSpanContext(spanContext)); - } - - fields(): string[] { - return [AWSXRAY_TRACE_ID_HEADER]; - } - - private getSpanContextFromHeader( - carrier: unknown, - getter: TextMapGetter - ): SpanContext { - const headerKeys = getter.keys(carrier); - const relevantHeaderKey = headerKeys.find(e => { - return e.toLowerCase() === AWSXRAY_TRACE_ID_HEADER; - }); - if (!relevantHeaderKey) { - return INVALID_SPAN_CONTEXT; - } - const traceHeader = getter.get(carrier, relevantHeaderKey); - - if (!traceHeader || typeof traceHeader !== 'string') { - return INVALID_SPAN_CONTEXT; - } - - let pos = 0; - let trimmedPart: string; - let parsedTraceId = INVALID_TRACEID; - let parsedSpanId = INVALID_SPANID; - let parsedTraceFlags = null; - while (pos < traceHeader.length) { - const delimiterIndex = traceHeader.indexOf(TRACE_HEADER_DELIMITER, pos); - if (delimiterIndex >= 0) { - trimmedPart = traceHeader.substring(pos, delimiterIndex).trim(); - pos = delimiterIndex + 1; - } else { - //last part - trimmedPart = traceHeader.substring(pos).trim(); - pos = traceHeader.length; - } - const equalsIndex = trimmedPart.indexOf(KV_DELIMITER); - - const value = trimmedPart.substring(equalsIndex + 1); - - if (trimmedPart.startsWith(TRACE_ID_KEY)) { - parsedTraceId = AWSXRayPropagator._parseTraceId(value); - } else if (trimmedPart.startsWith(PARENT_ID_KEY)) { - parsedSpanId = AWSXRayPropagator._parseSpanId(value); - } else if (trimmedPart.startsWith(SAMPLED_FLAG_KEY)) { - parsedTraceFlags = AWSXRayPropagator._parseTraceFlag(value); - } - } - if (parsedTraceFlags === null) { - return INVALID_SPAN_CONTEXT; - } - const resultSpanContext: SpanContext = { - traceId: parsedTraceId, - spanId: parsedSpanId, - traceFlags: parsedTraceFlags, - isRemote: true, - }; - if (!isSpanContextValid(resultSpanContext)) { - return INVALID_SPAN_CONTEXT; - } - return resultSpanContext; - } - - private static _parseTraceId(xrayTraceId: string): string { - // Check length of trace id - if (xrayTraceId.length !== TRACE_ID_LENGTH) { - return INVALID_TRACEID; - } - - // Check version trace id version - if (!xrayTraceId.startsWith(TRACE_ID_VERSION)) { - return INVALID_TRACEID; - } - - // Check delimiters - if ( - xrayTraceId.charAt(TRACE_ID_DELIMITER_INDEX_1) !== TRACE_ID_DELIMITER || - xrayTraceId.charAt(TRACE_ID_DELIMITER_INDEX_2) !== TRACE_ID_DELIMITER - ) { - return INVALID_TRACEID; - } - - const epochPart = xrayTraceId.substring( - TRACE_ID_DELIMITER_INDEX_1 + 1, - TRACE_ID_DELIMITER_INDEX_2 - ); - const uniquePart = xrayTraceId.substring( - TRACE_ID_DELIMITER_INDEX_2 + 1, - TRACE_ID_LENGTH - ); - const resTraceId = epochPart + uniquePart; - - // Check the content of trace id - if (!isValidTraceId(resTraceId)) { - return INVALID_TRACEID; - } - - return resTraceId; - } - - private static _parseSpanId(xrayParentId: string): string { - return isValidSpanId(xrayParentId) ? xrayParentId : INVALID_SPANID; - } - - private static _parseTraceFlag(xraySampledFlag: string): TraceFlags | null { - if (xraySampledFlag === NOT_SAMPLED) { - return TraceFlags.NONE; - } - if (xraySampledFlag === IS_SAMPLED) { - return TraceFlags.SAMPLED; - } - return null; - } -} diff --git a/propagators/opentelemetry-propagator-aws-xray/test/AWSXRayPropagator.test.ts b/propagators/opentelemetry-propagator-aws-xray/test/AWSXRayPropagator.test.ts deleted file mode 100644 index 5cf47916d5..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/test/AWSXRayPropagator.test.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* - * 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 { - defaultTextMapGetter, - defaultTextMapSetter, - INVALID_SPAN_CONTEXT, - ROOT_CONTEXT, - SpanContext, - TraceFlags, - trace, -} from '@opentelemetry/api'; -import { TraceState } from '@opentelemetry/core'; - -import { AWSXRAY_TRACE_ID_HEADER, AWSXRayPropagator } from '../src'; - -describe('AWSXRayPropagator', () => { - const xrayPropagator = new AWSXRayPropagator(); - const TRACE_ID = '8a3c60f7d188f8fa79d48a391a778fa6'; - const SPAN_ID = '53995c3f42cd8ad8'; - const SAMPLED_TRACE_FLAG = TraceFlags.SAMPLED; - const NOT_SAMPLED_TRACE_FLAG = TraceFlags.NONE; - - let carrier: { [key: string]: unknown }; - - beforeEach(() => { - carrier = {}; - }); - - describe('.inject()', () => { - it('should inject sampled context', () => { - const spanContext: SpanContext = { - traceId: TRACE_ID, - spanId: SPAN_ID, - traceFlags: SAMPLED_TRACE_FLAG, - }; - xrayPropagator.inject( - trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), - carrier, - defaultTextMapSetter - ); - - assert.deepStrictEqual( - carrier[AWSXRAY_TRACE_ID_HEADER], - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1' - ); - }); - - it('should inject not sampled context', () => { - const spanContext: SpanContext = { - traceId: TRACE_ID, - spanId: SPAN_ID, - traceFlags: NOT_SAMPLED_TRACE_FLAG, - }; - xrayPropagator.inject( - trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), - carrier, - defaultTextMapSetter - ); - - assert.deepStrictEqual( - carrier[AWSXRAY_TRACE_ID_HEADER], - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=0' - ); - }); - - it('should inject with TraceState', () => { - const traceState = new TraceState(); - traceState.set('foo', 'bar'); - const spanContext: SpanContext = { - traceId: TRACE_ID, - spanId: SPAN_ID, - traceFlags: SAMPLED_TRACE_FLAG, - traceState: traceState, - }; - xrayPropagator.inject( - trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), - carrier, - defaultTextMapSetter - ); - - // TODO: assert trace state when the propagator supports it - assert.deepStrictEqual( - carrier[AWSXRAY_TRACE_ID_HEADER], - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1' - ); - }); - - it('inject without spanContext - should inject nothing', () => { - xrayPropagator.inject(ROOT_CONTEXT, carrier, defaultTextMapSetter); - - assert.deepStrictEqual(carrier, {}); - }); - - it('inject default invalid spanContext - should inject nothing', () => { - xrayPropagator.inject( - trace.setSpan( - ROOT_CONTEXT, - trace.wrapSpanContext(INVALID_SPAN_CONTEXT) - ), - carrier, - defaultTextMapSetter - ); - - assert.deepStrictEqual(carrier, {}); - }); - }); - - describe('.extract()', () => { - it('extract nothing from context', () => { - // context remains untouched - assert.strictEqual( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter), - ROOT_CONTEXT - ); - }); - - it('should extract sampled context', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should extract sampled context with arbitrary order', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Parent=53995c3f42cd8ad8;Sampled=1;Root=1-8a3c60f7-d188f8fa79d48a391a778fa6'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should extract context with additional fields', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - // TODO: assert additional fields when the propagator supports it - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('extract empty header value - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = ''; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceId - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-abcdefgh-ijklmnopabcdefghijklmnop;Parent=53995c3f42cd8ad8;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceId size - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa600;Parent=53995c3f42cd8ad8;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceId delimiter - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1*8a3c60f7+d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid spanId - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=abcdefghijklmnop;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid spanId size - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad800;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceFlags - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled='; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceFlags length - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=10220'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract nonnumeric invalid traceFlags - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=a'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid aws xray version - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=2-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extracts context in a case-insensitive fashion', () => { - carrier[AWSXRAY_TRACE_ID_HEADER.toUpperCase()] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - describe('.fields()', () => { - it('should return a field with AWS X-Ray Trace ID header', () => { - const expectedField = xrayPropagator.fields(); - - assert.deepStrictEqual([AWSXRAY_TRACE_ID_HEADER], expectedField); - }); - }); - }); -}); diff --git a/propagators/opentelemetry-propagator-aws-xray/test/index-webpack.ts b/propagators/opentelemetry-propagator-aws-xray/test/index-webpack.ts deleted file mode 100644 index 061a48ccfa..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/test/index-webpack.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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. - */ -const testsContext = require.context('.', true, /test$/); -testsContext.keys().forEach(testsContext); - -const srcContext = require.context('.', true, /src$/); -srcContext.keys().forEach(srcContext); diff --git a/propagators/opentelemetry-propagator-aws-xray/tsconfig.esm.json b/propagators/opentelemetry-propagator-aws-xray/tsconfig.esm.json deleted file mode 100644 index a94adff6aa..0000000000 --- a/propagators/opentelemetry-propagator-aws-xray/tsconfig.esm.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.base.esm.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build/esm", - "tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md b/propagators/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md index 55adb18c00..f6b5c40c3f 100644 --- a/propagators/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md +++ b/propagators/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.27.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-grpc-census-binary-v0.27.1...propagator-grpc-census-binary-v0.27.2) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.27.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-grpc-census-binary-v0.27.0...propagator-grpc-census-binary-v0.27.1) (2023-08-14) diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/LICENSE b/propagators/opentelemetry-propagator-grpc-census-binary/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/propagators/opentelemetry-propagator-grpc-census-binary/LICENSE +++ b/propagators/opentelemetry-propagator-grpc-census-binary/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/package.json b/propagators/opentelemetry-propagator-grpc-census-binary/package.json index 604e091845..383d1cb1fb 100644 --- a/propagators/opentelemetry-propagator-grpc-census-binary/package.json +++ b/propagators/opentelemetry-propagator-grpc-census-binary/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-grpc-census-binary", - "version": "0.27.1", + "version": "0.27.2", "description": "OpenTelemetry gRPC Census propagator provides a context propagator for OpenTelemetry that can use the gRPC binary header: 'grpc-trace-bin' for interoperability with OpenCensus", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/propagators/opentelemetry-propagator-instana/CHANGELOG.md b/propagators/opentelemetry-propagator-instana/CHANGELOG.md index 087b0b72f1..3e73530daf 100644 --- a/propagators/opentelemetry-propagator-instana/CHANGELOG.md +++ b/propagators/opentelemetry-propagator-instana/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-instana-v0.3.1...propagator-instana-v0.3.2) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.3.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-instana-v0.3.0...propagator-instana-v0.3.1) (2023-08-14) diff --git a/propagators/opentelemetry-propagator-instana/LICENSE b/propagators/opentelemetry-propagator-instana/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/propagators/opentelemetry-propagator-instana/LICENSE +++ b/propagators/opentelemetry-propagator-instana/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/propagators/opentelemetry-propagator-instana/package.json b/propagators/opentelemetry-propagator-instana/package.json index 3011ba9cc0..7bf4bd036c 100644 --- a/propagators/opentelemetry-propagator-instana/package.json +++ b/propagators/opentelemetry-propagator-instana/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-instana", - "version": "0.3.1", + "version": "0.3.2", "description": "The OpenTelemetry Instana Propagator implements the propagation format used by IBM Observability by Instana", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/propagators/opentelemetry-propagator-ot-trace/CHANGELOG.md b/propagators/opentelemetry-propagator-ot-trace/CHANGELOG.md index 85778a7dec..0ee89eb51e 100644 --- a/propagators/opentelemetry-propagator-ot-trace/CHANGELOG.md +++ b/propagators/opentelemetry-propagator-ot-trace/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.27.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-ot-trace-v0.27.1...propagator-ot-trace-v0.27.2) (2024-04-25) + + +### Bug Fixes + +* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2)) + ## [0.27.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-ot-trace-v0.27.0...propagator-ot-trace-v0.27.1) (2023-08-14) diff --git a/propagators/opentelemetry-propagator-ot-trace/LICENSE b/propagators/opentelemetry-propagator-ot-trace/LICENSE index e50e8c80f9..261eeb9e9f 100644 --- a/propagators/opentelemetry-propagator-ot-trace/LICENSE +++ b/propagators/opentelemetry-propagator-ot-trace/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2022] OpenTelemetry Authors + 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. diff --git a/propagators/opentelemetry-propagator-ot-trace/package.json b/propagators/opentelemetry-propagator-ot-trace/package.json index f65c0d1ebd..20ceb7a58f 100644 --- a/propagators/opentelemetry-propagator-ot-trace/package.json +++ b/propagators/opentelemetry-propagator-ot-trace/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-ot-trace", - "version": "0.27.1", + "version": "0.27.2", "description": "The OpenTelemetry OTTracepropagator implements the propagation format used by the \"basic tracer\" implementations from the OpenTracing project", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/release-please-config.json b/release-please-config.json index c0cace7d26..8142b3b582 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -15,6 +15,7 @@ "detectors/node/opentelemetry-resource-detector-instana": {}, "metapackages/auto-instrumentations-node": {}, "metapackages/auto-instrumentations-web": {}, + "packages/baggage-span-processor": {}, "packages/opentelemetry-host-metrics": {}, "packages/opentelemetry-id-generator-aws-xray": {}, "packages/opentelemetry-propagation-utils": {}, @@ -63,9 +64,8 @@ "plugins/web/opentelemetry-instrumentation-long-task": {}, "plugins/web/opentelemetry-instrumentation-user-interaction": {}, "plugins/web/opentelemetry-plugin-react-load": {}, - "propagators/opentelemetry-propagator-aws-xray": {}, "propagators/opentelemetry-propagator-grpc-census-binary": {}, "propagators/opentelemetry-propagator-instana": {}, "propagators/opentelemetry-propagator-ot-trace": {} } -} \ No newline at end of file +}