diff --git a/.github/component-label-map.yml b/.github/component-label-map.yml index 5a9fc3af56..c766a864d0 100644 --- a/.github/component-label-map.yml +++ b/.github/component-label-map.yml @@ -71,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/** diff --git a/.github/component_owners.yml b/.github/component_owners.yml index cafc2a7065..0565ca3edf 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: @@ -55,6 +58,8 @@ components: - henrinormak plugins/node/instrumentation-fs: - rauno56 + plugins/node/instrumentation-kafkajs: + - seemk plugins/node/instrumentation-lru-memoizer: - blumamir plugins/node/instrumentation-mongoose: diff --git a/.github/markdown-lint.yml b/.github/markdown-lint.yml new file mode 100644 index 0000000000..f4885f1be4 --- /dev/null +++ b/.github/markdown-lint.yml @@ -0,0 +1,5 @@ +# MD004 - Unordered list style +# This rule is triggered when the symbols used in the document for unordered list items do not match the configured unordered list style +# * Item 1 // Error: Unordered list style [Expected: dash; Actual: asterisk] +MD004: + style: dash \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6e8697f563..0622459ce0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,6 +19,7 @@ jobs: - name: Lint markdown files uses: avto-dev/markdown-lint@v1 with: + config: '.github/markdown-lint.yml' ignore: "./**/CHANGELOG.md" args: "./**/*.md" diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6bf4f04da7..6e877b65fa 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -24,7 +24,7 @@ jobs: run: | npm ci - - uses: google-github-actions/release-please-action@v4 + - uses: googleapis/release-please-action@f3969c04a4ec81d7a9aa4010d84ae6a7602f86a7 # v4.1.1 id: release with: token: ${{secrets.RELEASE_PR_TOKEN}} @@ -55,14 +55,14 @@ jobs: # get main again - name: Checkout Repository # only checkout if a release has been created - if: ${{ steps.release.outputs.release_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.release_created }} + if: ${{ steps.release.outputs.releases_created }} run: | npm ci npm run compile @@ -72,7 +72,7 @@ jobs: # 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.release_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..ecf86e37d3 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - node: ["14", "16", "18.18.2"] + node: ["14", "16", "18", "20"] runs-on: ubuntu-latest services: mongo: @@ -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..e10f27b183 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -9,9 +9,9 @@ jobs: strategy: fail-fast: false matrix: - node: ["14", "16", "18.18.2"] + node: ["14", "16", "18", "20"] include: - - node: 18.18.2 + - node: 18 code-coverage: true runs-on: ubuntu-latest services: @@ -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 b5d6facdda..5225c39db0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,62 +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-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.5.0", + "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.1", + "metapackages/auto-instrumentations-web": "0.39.0", + "packages/baggage-span-processor": "0.2.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-kafkajs": "0.0.1", + "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.1", + "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.1", + "plugins/node/opentelemetry-instrumentation-dns": "0.36.1", + "plugins/node/opentelemetry-instrumentation-express": "0.39.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-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/README.md b/README.md index 91e3b7e0f8..0a952b33a9 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,10 @@ A repository for OpenTelemetry JavaScript contributions that are not part of the This project includes: -* [Instrumentations & other plugins](./plugins), -* [Metapackages](./metapackages), -* [Context Propagators](./propagators), -* [Resource Detectors](./detectors). +- [Instrumentations & other plugins](./plugins), +- [Metapackages](./metapackages), +- [Context Propagators](./propagators), +- [Resource Detectors](./detectors). **Instrumentations**: OpenTelemetry can collect tracing data automatically using instrumentations. Vendors/Users can also create and use their own. @@ -59,9 +59,9 @@ Stability level for components in this repository follow the definitions in [CON Packages in this repository have a variable range of support for Node.JS and browser versions which for each package depend on -* the activeness of the owners of those packages, -* used techniques or runtime features and -* in the case of the auto-instrumentations, the supported runtime versions for the underlying package. +- the activeness of the owners of those packages, +- used techniques or runtime features and +- in the case of the auto-instrumentations, the supported runtime versions for the underlying package. See the `README.md` files and the `engines` field in the `package.json` files for the respective packages for support information about that package. @@ -79,9 +79,9 @@ We'd love your help! Use tags [up-for-grabs][up-for-grabs-issues] and [good firs ## Useful links -* For more information on OpenTelemetry, visit [OpenTelemetry.io](https://opentelemetry.io/) -* For help or feedback on this project, join us in [GitHub Discussions][discussions-url] or in [Slack](https://cloud-native.slack.com/archives/C01NL1GRPQR) -* For more 3rd party components for JS as well as other languages, check [OpenTelemetry Registry](https://opentelemetry.io/registry/) +- For more information on OpenTelemetry, visit [OpenTelemetry.io](https://opentelemetry.io/) +- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] or in [Slack](https://cloud-native.slack.com/archives/C01NL1GRPQR) +- For more 3rd party components for JS as well as other languages, check [OpenTelemetry Registry](https://opentelemetry.io/registry/) ## License diff --git a/RELEASING.md b/RELEASING.md index 80da03cbd0..6c65f0a119 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -9,15 +9,15 @@ For posterity, or in the event of any failures with release-please, the process Manual Release Process Steps: -* [Update to latest locally](#update-to-latest-locally) -* [Create a new branch](#create-a-new-branch) -* [Prepare each package for release](#prepare-each-package-for-release) -* [Use the Changelog to create a GitHub Release](#use-the-changelog-to-create-a-github-release) -* [Create a new PR](#create-a-new-pr) -* [Merge and pull](#merge-and-pull) -* [Publish all packages](#publish-all-packages) -* [Publish the GitHub Release](#publish-the-github-release) -* [Update CHANGELOG](#update-changelog) +- [Update to latest locally](#update-to-latest-locally) +- [Create a new branch](#create-a-new-branch) +- [Prepare each package for release](#prepare-each-package-for-release) +- [Use the Changelog to create a GitHub Release](#use-the-changelog-to-create-a-github-release) +- [Create a new PR](#create-a-new-pr) +- [Merge and pull](#merge-and-pull) +- [Publish all packages](#publish-all-packages) +- [Publish the GitHub Release](#publish-the-github-release) +- [Update CHANGELOG](#update-changelog) ## Update to latest locally @@ -31,9 +31,9 @@ Create a new branch called `x.y.z-proposal` from the current commit. Decide on the next `major.minor.patch` release number based on [semver](http://semver.org/) guidelines. -* Use `npm install` command to initialize all package directories -* Use `lerna publish --skip-npm --no-git-tag-version --no-push` to bump the version in all `package.json` -* Use `npm run bootstrap` to generate latest `version.ts` files +- Use `npm install` command to initialize all package directories +- Use `lerna publish --skip-npm --no-git-tag-version --no-push` to bump the version in all `package.json` +- Use `npm run bootstrap` to generate latest `version.ts` files ## Use the Changelog to create a GitHub Release @@ -58,10 +58,10 @@ It will print something like: ## Unreleased (2018-05-24) #### :bug: Bug Fix -* [#198](https://github.com/my-org/my-repo/pull/198) Avoid an infinite loop ([@helpful-hacker](https://github.com/helpful-hacker)) +- [#198](https://github.com/my-org/my-repo/pull/198) Avoid an infinite loop ([@helpful-hacker](https://github.com/helpful-hacker)) #### :house: Internal -* [#183](https://github.com/my-org/my-repo/pull/183) Standardize error messages ([@careful-coder](https://github.com/careful-coder)) +- [#183](https://github.com/my-org/my-repo/pull/183) Standardize error messages ([@careful-coder](https://github.com/careful-coder)) #### Commiters: 2 - Helpful Hacker ([@helpful-hacker](https://github.com/helpful-hacker)) @@ -112,10 +112,10 @@ Publish the GitHub release, ensuring that the tag points to the newly landed com ## Update CHANGELOG -* After releasing is done, update the [CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-js/blob/main/CHANGELOG.md) and start new Unreleased label. -* Create a new commit with the exact title: `Post Release: update CHANGELOG.md`. -* Go through PR review and merge it to GitHub main branch. +- After releasing is done, update the [CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-js/blob/main/CHANGELOG.md) and start new Unreleased label. +- Create a new commit with the exact title: `Post Release: update CHANGELOG.md`. +- Go through PR review and merge it to GitHub main branch. ## Known Issues -* The `examples/` and `getting-started/` folders are not part of lerna packages, we need to manually bump the version in `package.json`. +- The `examples/` and `getting-started/` folders are not part of lerna packages, we need to manually bump the version in `package.json`. diff --git a/archive/opentelemetry-browser-extension-autoinjection/README.md b/archive/opentelemetry-browser-extension-autoinjection/README.md index 5235741193..4d15bec1ce 100644 --- a/archive/opentelemetry-browser-extension-autoinjection/README.md +++ b/archive/opentelemetry-browser-extension-autoinjection/README.md @@ -13,9 +13,9 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. ## Supported Environments -* Google Chrome (with [Manifest Version 3](https://developer.chrome.com/docs/extensions/mv3/intro/) support) -* Chromium (with Manifest Version 2) -* Firefox (*unstable*, with Manifest Version 2) +- Google Chrome (with [Manifest Version 3](https://developer.chrome.com/docs/extensions/mv3/intro/) support) +- Chromium (with Manifest Version 2) +- Firefox (*unstable*, with Manifest Version 2) ## Installation @@ -32,9 +32,9 @@ npm run build This will create a so-called unpacked extension into the `build/` folder you now can load into your browser: -* Open a new browser window and go to chrome://extensions -* Turn on "Developer Mode" -* Click on "Load unpacked" and select the `build/mv3` (or `build/mv2`) folder, which contains the extension +- Open a new browser window and go to chrome://extensions +- Turn on "Developer Mode" +- Click on "Load unpacked" and select the `build/mv3` (or `build/mv2`) folder, which contains the extension If all goes well you should see the extension listed: diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/.eslintignore b/archive/opentelemetry-propagator-grpc-census-binary/.eslintignore similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/.eslintignore rename to archive/opentelemetry-propagator-grpc-census-binary/.eslintignore diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/.eslintrc.js b/archive/opentelemetry-propagator-grpc-census-binary/.eslintrc.js similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/.eslintrc.js rename to archive/opentelemetry-propagator-grpc-census-binary/.eslintrc.js diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md b/archive/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md similarity index 85% rename from propagators/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md rename to archive/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md index 55adb18c00..f6b5c40c3f 100644 --- a/propagators/opentelemetry-propagator-grpc-census-binary/CHANGELOG.md +++ b/archive/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/archive/opentelemetry-propagator-grpc-census-binary/LICENSE similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/LICENSE rename to archive/opentelemetry-propagator-grpc-census-binary/LICENSE diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/README.md b/archive/opentelemetry-propagator-grpc-census-binary/README.md similarity index 89% rename from propagators/opentelemetry-propagator-grpc-census-binary/README.md rename to archive/opentelemetry-propagator-grpc-census-binary/README.md index ca758ec9ce..0b9cc0caf9 100644 --- a/propagators/opentelemetry-propagator-grpc-census-binary/README.md +++ b/archive/opentelemetry-propagator-grpc-census-binary/README.md @@ -5,8 +5,8 @@ OpenTelemetry gRPC Census propagator provides gRPC header propagation for systems that use the OpenCensus 'grpc-trace-bin' binary header format. This allows for context propagation when either: -* incoming gRPC calls come from services already instrumented using OpenCensus -* outgoing gRPC calls go to services already instrumented using OpenCensus +- incoming gRPC calls come from services already instrumented using OpenCensus +- outgoing gRPC calls go to services already instrumented using OpenCensus This propagator works in conjunction with the OpenTelemetry [gRPC plugin](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/exporter-trace-otlp-grpc). @@ -43,9 +43,9 @@ See [binary-format.ts](https://github.com/census-instrumentation/opencensus-node ## 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] +- 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 diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/package.json b/archive/opentelemetry-propagator-grpc-census-binary/package.json similarity index 98% rename from propagators/opentelemetry-propagator-grpc-census-binary/package.json rename to archive/opentelemetry-propagator-grpc-census-binary/package.json index 604e091845..383d1cb1fb 100644 --- a/propagators/opentelemetry-propagator-grpc-census-binary/package.json +++ b/archive/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-grpc-census-binary/src/BinaryTraceContext.ts b/archive/opentelemetry-propagator-grpc-census-binary/src/BinaryTraceContext.ts similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/src/BinaryTraceContext.ts rename to archive/opentelemetry-propagator-grpc-census-binary/src/BinaryTraceContext.ts diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/src/GrpcCensusPropagator.ts b/archive/opentelemetry-propagator-grpc-census-binary/src/GrpcCensusPropagator.ts similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/src/GrpcCensusPropagator.ts rename to archive/opentelemetry-propagator-grpc-census-binary/src/GrpcCensusPropagator.ts diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/src/index.ts b/archive/opentelemetry-propagator-grpc-census-binary/src/index.ts similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/src/index.ts rename to archive/opentelemetry-propagator-grpc-census-binary/src/index.ts diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/test/BinaryTraceContext.test.ts b/archive/opentelemetry-propagator-grpc-census-binary/test/BinaryTraceContext.test.ts similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/test/BinaryTraceContext.test.ts rename to archive/opentelemetry-propagator-grpc-census-binary/test/BinaryTraceContext.test.ts diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/test/GrpcCensusPropagator.test.ts b/archive/opentelemetry-propagator-grpc-census-binary/test/GrpcCensusPropagator.test.ts similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/test/GrpcCensusPropagator.test.ts rename to archive/opentelemetry-propagator-grpc-census-binary/test/GrpcCensusPropagator.test.ts diff --git a/propagators/opentelemetry-propagator-grpc-census-binary/tsconfig.json b/archive/opentelemetry-propagator-grpc-census-binary/tsconfig.json similarity index 100% rename from propagators/opentelemetry-propagator-grpc-census-binary/tsconfig.json rename to archive/opentelemetry-propagator-grpc-census-binary/tsconfig.json 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/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..d824077ae8 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md +++ b/detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md @@ -66,6 +66,27 @@ * devDependencies * @opentelemetry/contrib-test-utils bumped from ^0.35.1 to ^0.36.0 +## [1.5.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-aws-v1.4.2...resource-detector-aws-v1.5.0) (2024-05-15) + + +### Features + +* add support for cloud.resource_id to AWS ECS detector ([#1936](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1936)) ([cc71492](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/cc714922b931ce39595ef0b257114b4e797ba6a9)) + +## [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/README.md b/detectors/node/opentelemetry-resource-detector-aws/README.md index aeb075c237..e903be6fef 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/README.md +++ b/detectors/node/opentelemetry-resource-detector-aws/README.md @@ -84,7 +84,8 @@ Populates `container` for containers running on [Amazon ECS](https://aws.amazon. | cloud.platform | The cloud platform. In this context, it's always "aws_ecs" | | cloud.provider | The cloud provider. In this context, it's always "aws" | | cloud.region | Parsed value from the `TaskARN` | -| container.id | Value of from file `/proc/self/cgroup` | +| cloud.resource_id | Value of `ContainerARN` from `ECS_CONTAINER_METADATA_URI_V4/task` request | +| container.id | Value from file `/proc/self/cgroup` | | container.name | The hostname of the operating system | ### AWS EKS Detector diff --git a/detectors/node/opentelemetry-resource-detector-aws/package.json b/detectors/node/opentelemetry-resource-detector-aws/package.json index 6b611bc099..6874a1b73c 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.5.0", "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-aws/src/detectors/AwsEcsDetector.ts b/detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsEcsDetector.ts index e2e35af236..0c5a9f0624 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsEcsDetector.ts +++ b/detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsEcsDetector.ts @@ -41,6 +41,8 @@ import { CLOUDPROVIDERVALUES_AWS, CLOUDPLATFORMVALUES_AWS_ECS, } from '@opentelemetry/semantic-conventions'; +// Patch until the OpenTelemetry SDK is updated to ship this attribute +import { SemanticResourceAttributes as AdditionalSemanticResourceAttributes } from './SemanticResourceAttributes'; import * as http from 'http'; import * as util from 'util'; import * as fs from 'fs'; @@ -170,6 +172,7 @@ export class AwsEcsDetector implements Detector { [SEMRESATTRS_CLOUD_ACCOUNT_ID]: accountId, [SEMRESATTRS_CLOUD_REGION]: region, + [AdditionalSemanticResourceAttributes.CLOUD_RESOURCE_ID]: containerArn, }; // The availability zone is not available in all Fargate runtimes diff --git a/detectors/node/opentelemetry-resource-detector-aws/src/detectors/SemanticResourceAttributes.ts b/detectors/node/opentelemetry-resource-detector-aws/src/detectors/SemanticResourceAttributes.ts new file mode 100644 index 0000000000..24efaebd07 --- /dev/null +++ b/detectors/node/opentelemetry-resource-detector-aws/src/detectors/SemanticResourceAttributes.ts @@ -0,0 +1,23 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export const SemanticResourceAttributes = { + /** + * Cloud provider-specific native identifier of the monitored cloud resource + * (e.g. an ARN on AWS, a fully qualified resource ID on Azure, a full resource + * name on GCP) + */ + CLOUD_RESOURCE_ID: 'cloud.resource_id', +}; diff --git a/detectors/node/opentelemetry-resource-detector-aws/test/detectors/AwsEcsDetector.test.ts b/detectors/node/opentelemetry-resource-detector-aws/test/detectors/AwsEcsDetector.test.ts index 6c9200b9cd..659b3afaab 100644 --- a/detectors/node/opentelemetry-resource-detector-aws/test/detectors/AwsEcsDetector.test.ts +++ b/detectors/node/opentelemetry-resource-detector-aws/test/detectors/AwsEcsDetector.test.ts @@ -42,6 +42,8 @@ import { CLOUDPROVIDERVALUES_AWS, CLOUDPLATFORMVALUES_AWS_ECS, } from '@opentelemetry/semantic-conventions'; +// Patch until the OpenTelemetry SDK is updated to ship this attribute +import { SemanticResourceAttributes as AdditionalSemanticResourceAttributes } from '../../src/detectors/SemanticResourceAttributes'; import { readFileSync } from 'fs'; import * as os from 'os'; import { join } from 'path'; @@ -81,6 +83,10 @@ const assertEcsResource = ( resource.attributes[SEMRESATTRS_AWS_ECS_CONTAINER_ARN], validations.containerArn ); + assert.strictEqual( + resource.attributes[AdditionalSemanticResourceAttributes.CLOUD_RESOURCE_ID], + validations.containerArn + ); if (validations.clusterArn) assert.strictEqual( resource.attributes[SEMRESATTRS_AWS_ECS_CLUSTER_ARN], 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/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/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/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/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/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/eslint.config.js b/eslint.config.js index e342425670..71488af0c9 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -20,7 +20,7 @@ module.exports = { "no-shadow": "off", "node/no-deprecated-api": ["warn"], "header/header": ["error", "block", [{ - pattern: / \* Copyright The OpenTelemetry Authors[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an \"AS IS\" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\./gm, + pattern: / \* Copyright The OpenTelemetry Authors(, .+)*[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an \"AS IS\" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\./gm, template: `\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n ` }]] 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/README.md b/incubator/opentelemetry-sampler-aws-xray/README.md index 5454b1e970..96852f6ab0 100644 --- a/incubator/opentelemetry-sampler-aws-xray/README.md +++ b/incubator/opentelemetry-sampler-aws-xray/README.md @@ -52,6 +52,10 @@ For more details on setting up the global tracer provider to send traces to AWS Please note that AWS Lambda does not support X-Ray remote sampling. +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - [More information on OpenTelemetry](https://opentelemetry.io/) diff --git a/incubator/opentelemetry-sampler-aws-xray/package.json b/incubator/opentelemetry-sampler-aws-xray/package.json index 6ae26444a3..6b137eef6b 100644 --- a/incubator/opentelemetry-sampler-aws-xray/package.json +++ b/incubator/opentelemetry-sampler-aws-xray/package.json @@ -46,7 +46,6 @@ "dependencies": { "@opentelemetry/core": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", "axios": "^1.3.5" }, "devDependencies": { @@ -55,16 +54,16 @@ "@types/mocha": "8.2.3", "@types/node": "18.6.5", "@types/sinon": "10.0.18", + "@typescript-eslint/eslint-plugin": "5.8.1", + "@typescript-eslint/parser": "5.8.1", "eslint": "8.7.0", "expect": "29.2.0", "mocha": "7.2.0", "nock": "13.3.3", + "nyc": "15.1.0", "sinon": "15.2.0", "ts-mocha": "10.0.0", - "nyc": "15.1.0", - "typescript": "4.4.4", - "@typescript-eslint/eslint-plugin": "5.8.1", - "@typescript-eslint/parser": "5.8.1" + "typescript": "4.4.4" }, "engines": { "node": ">=14" diff --git a/metapackages/auto-instrumentations-node/CHANGELOG.md b/metapackages/auto-instrumentations-node/CHANGELOG.md index b69ff3972e..c41024c926 100644 --- a/metapackages/auto-instrumentations-node/CHANGELOG.md +++ b/metapackages/auto-instrumentations-node/CHANGELOG.md @@ -152,6 +152,102 @@ * dependencies * @opentelemetry/instrumentation-aws-sdk bumped from ^0.38.0 to ^0.38.1 +## [0.46.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/auto-instrumentations-node-v0.46.0...auto-instrumentations-node-v0.46.1) (2024-05-15) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @opentelemetry/instrumentation-aws-lambda bumped from ^0.41.0 to ^0.41.1 + * @opentelemetry/instrumentation-connect bumped from ^0.36.0 to ^0.36.1 + * @opentelemetry/instrumentation-express bumped from ^0.38.0 to ^0.39.0 + * @opentelemetry/resource-detector-aws bumped from ^1.4.2 to ^1.5.0 + +## [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/README.md b/metapackages/auto-instrumentations-node/README.md index dccf55a266..6d74119d8d 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,serviceinstance" 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..bfa0616529 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.1", "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.1", + "@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.1", + "@opentelemetry/instrumentation-cucumber": "^0.6.0", + "@opentelemetry/instrumentation-dataloader": "^0.9.0", + "@opentelemetry/instrumentation-dns": "^0.36.1", + "@opentelemetry/instrumentation-express": "^0.39.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.5.0", + "@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/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 1bfd2fcf51..30b61cfd9a 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.5.0", "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.1", "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.1", + "@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.1", + "@opentelemetry/instrumentation-cucumber": "^0.6.0", + "@opentelemetry/instrumentation-dataloader": "^0.9.0", + "@opentelemetry/instrumentation-dns": "^0.36.1", + "@opentelemetry/instrumentation-express": "^0.39.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.5.0", + "@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", @@ -350,14 +352,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 +5124,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 +5187,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/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "@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/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/iron": { + "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/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 +8542,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.1.tgz", + "integrity": "sha512-E3skn949Pk1z2XtXu/lxf6QAZpawuTM/IUEXcAzpiUkTd73Hmvw26FiN3cJuTmkpM5hZzHwkomVdtrh/n/zzwA==", "dependencies": { "@opentelemetry/api": "^1.0.0" }, @@ -8215,10 +8560,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.1.tgz", + "integrity": "sha512-R5r6DO4kgEOVBxFXhXjwospLQkv+sYxwCfjvoZBe7Zm6KKXAV9kDSJhi/D1BweowdZmO+sdbENLs374gER8hpQ==", "engines": { "node": ">=14" }, @@ -8227,11 +8576,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.24.1.tgz", + "integrity": "sha512-pt5KLJws1m+rHTeEA6uootoyiuZlCt7j90dmdjXnqx4JZH6sFWqWB5IW1gOukDY7Ym3cNKjtoh3/uK0KuSRBfg==", "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.23.0", + "@opentelemetry/context-zone-peer-dep": "1.24.1", "zone.js": "^0.11.0 || ^0.13.0 || ^0.14.0" }, "engines": { @@ -8239,9 +8588,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.24.1.tgz", + "integrity": "sha512-s67becvBZFFjSLKSiy8ia2m7htsC4gsk8J/X0368FzBYseb/26daYr4ewx6tKcAsmZqJA7402cTQirv175x5BA==", "engines": { "node": ">=14" }, @@ -8255,11 +8604,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz", + "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==", "dependencies": { - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8269,13 +8618,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-1.24.1.tgz", + "integrity": "sha512-zrcY76PVR4itZD2oxQdFgnvS/Lst1CxmMofOhngvTDIXVqSTEf00QfmdIQUljwmycYwxZIvbJ445k3AGRBbZKQ==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1", "jaeger-client": "^3.15.0" }, "engines": { @@ -8286,16 +8635,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.51.1.tgz", + "integrity": "sha512-P9+Hkszih95ITvldGZ+kXvj9HpD1QfS+PwooyHK72GYA+Bgm+yUSAsDkUkDms8+s9HW6poxURv3LcjaMuBBpVQ==", "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.1", + "@opentelemetry/otlp-grpc-exporter-base": "0.51.1", + "@opentelemetry/otlp-transformer": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" }, "engines": { "node": ">=14" @@ -8305,15 +8654,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.51.1.tgz", + "integrity": "sha512-n+LhLPsX07URh+HhV2SHVSvz1t4G/l/CE5BjpmhAPqeTceFac1VpyQkavWEJbvnK5bUEXijWt4LxAxFpt2fXyw==", "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.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", + "@opentelemetry/otlp-transformer": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" }, "engines": { "node": ">=14" @@ -8323,16 +8672,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.51.1.tgz", + "integrity": "sha512-SE9f0/6V6EeXC9i+WA4WFjS1EYgaBCpAnI5+lxWvZ7iO7EU1IvHvZhP6Kojr0nLldo83gqg6G7OWFqsID3uF+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.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", + "@opentelemetry/otlp-proto-exporter-base": "0.51.1", + "@opentelemetry/otlp-transformer": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" }, "engines": { "node": ">=14" @@ -8342,14 +8691,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.24.1.tgz", + "integrity": "sha512-+Rl/VFmu2n6eaRMnVbyfZx1DqR/1KNyWebYuHyQBZaEAVIn/ZLgmofRpXN1X2nhJ4BNaptQUNxAstCYYz6dKoQ==", "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.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8367,13 +8716,13 @@ "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.1.tgz", + "integrity": "sha512-JIrvhpgqY6437QIqToyozrUG1h5UhwHkaGK/WAX+fkrpyPtc+RO5FkRtUd9BH0MibabHHvqsnBGKfKVijbmp8w==", "dependencies": { - "@opentelemetry/api-logs": "0.50.0", + "@opentelemetry/api-logs": "0.51.1", "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.7.1", + "import-in-the-middle": "1.7.4", "require-in-the-middle": "^7.1.1", "semver": "^7.5.2", "shimmer": "^1.2.1" @@ -8434,14 +8783,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fetch/-/instrumentation-fetch-0.51.1.tgz", + "integrity": "sha512-LzciqAnJmmYaXWo2hlrN99NMbYbExo6n6lBKBeMHAi7X/ddhCSOsgSNVbF3kDB7P++PJhjYqLT3hy6SU4AFHcg==", "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.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/sdk-trace-web": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8463,12 +8812,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.51.1.tgz", + "integrity": "sha512-coRTugFL7De/VNH/1NqPlxnfik87jS+jBXsny+Y/lMhXIA3x8t71IyL9ihuewkD+lNtIxIz6Y7Sq6kPuOqz5dQ==", "dependencies": { - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8482,13 +8831,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.51.1.tgz", + "integrity": "sha512-6b3nZnFFEz/3xZ6w8bVxctPUWIPWiXuPQ725530JgxnN1cvYFd8CJ75PrHZNjynmzSSnqBkN3ef4R9N+RpMh8Q==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/semantic-conventions": "1.24.1", "semver": "^7.5.2" }, "engines": { @@ -8502,6 +8851,10 @@ "resolved": "plugins/node/opentelemetry-instrumentation-ioredis", "link": true }, + "node_modules/@opentelemetry/instrumentation-kafkajs": { + "resolved": "plugins/node/instrumentation-kafkajs", + "link": true + }, "node_modules/@opentelemetry/instrumentation-knex": { "resolved": "plugins/node/opentelemetry-instrumentation-knex", "link": true @@ -8595,14 +8948,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-xml-http-request/-/instrumentation-xml-http-request-0.51.1.tgz", + "integrity": "sha512-CrQZxADNFr9M3aCgjM3/KXDz12lBrZA5LW+btfgNb78hsLNwqxThtFvXOHr86UsOzJt+h9m4yDeH6YLEvCTBbw==", "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.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/sdk-trace-web": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8612,11 +8965,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.51.1.tgz", + "integrity": "sha512-UYlnOYyDdzo1Gw559EHCzru0RwhvuXCwoH8jGo9J4gO1TE58GjnEmIjomMsKBCym3qWNJfIQXw+9SZCV0DdQNg==", "dependencies": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.1" }, "engines": { "node": ">=14" @@ -8626,13 +8979,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.51.1.tgz", + "integrity": "sha512-ZAS+4pq8o7dsugGTwV9s6JMKSxi+guIHdn0acOv0bqj26e9pWDFx5Ky+bI0aY46uR9Y0JyXqY+KAEYM/SO3DFA==", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", "protobufjs": "^7.2.3" }, "engines": { @@ -8643,12 +8996,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.51.1.tgz", + "integrity": "sha512-gxxxwfk0inDMb5DLeuxQ3L8TtptxSiTNHE4nnAJH34IQXAVRhXSXW1rK8PmDKDngRPIZ6J7ncUCjjIn8b+AgqQ==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", "protobufjs": "^7.2.3" }, "engines": { @@ -8659,16 +9012,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.51.1.tgz", + "integrity": "sha512-OppYOXwV9LQqqtYUCywqoOqX/JT9LQ5/FMuPZ//eTkvuHdUC4ZMwz2c6uSoT2R90GWvvGnF1iEqTGyTT3xAt2Q==", "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.1", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-logs": "0.51.1", + "@opentelemetry/sdk-metrics": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" }, "engines": { "node": ">=14" @@ -8686,25 +9039,25 @@ "link": true }, "node_modules/@opentelemetry/propagator-aws-xray": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-1.3.1.tgz", - "integrity": "sha512-6fDMzFlt5r6VWv7MUd0eOpglXPFqykW8CnOuUxJ1VZyLy6mV1bzBlzpsqEmhx1bjvZYvH93vhGkQZqrm95mlrQ==", + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-1.24.1.tgz", + "integrity": "sha512-RzwoLe6QzsYGcpmxxDbbbgSpe3ncxSM4dtFHXh/rCYGjyq0nZGXKvk26mJtWZ4kQ3nuiIoqSZueIuGmt/mvOTA==", "dependencies": { - "@opentelemetry/core": "^1.0.0" + "@opentelemetry/core": "1.24.1" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.0" + "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.24.1.tgz", + "integrity": "sha512-nda97ZwhpZKyUJTXqQuKzNhPMUgMLunbbGWn8kroBwegn+nh6OhtyGkrVQsQLNdVKJl0KeB5z0ZgeWszrYhwFw==", "dependencies": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.1" }, "engines": { "node": ">=14" @@ -8713,20 +9066,16 @@ "@opentelemetry/api": ">=1.0.0 <1.9.0" } }, - "node_modules/@opentelemetry/propagator-grpc-census-binary": { - "resolved": "propagators/opentelemetry-propagator-grpc-census-binary", - "link": true - }, "node_modules/@opentelemetry/propagator-instana": { "resolved": "propagators/opentelemetry-propagator-instana", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.24.1.tgz", + "integrity": "sha512-7bRBJn3FG1l195A1m+xXRHvgzAOBsfmRi9uZ5Da18oTh7BLmNDiA8+kpk51FpTsU1PCikPVpRDNPhKVB6lyzZg==", "dependencies": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.1" }, "engines": { "node": ">=14" @@ -8772,12 +9121,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz", + "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8787,12 +9136,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.51.1.tgz", + "integrity": "sha512-ULQQtl82b673PpZc5/0EtH4V+BrwVOgKJZEB7tYZnGTG3I98tQVk89S9/JSixomDr++F4ih+LSJTCqIKBz+MQQ==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1" }, "engines": { "node": ">=14" @@ -8803,12 +9152,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.1.tgz", + "integrity": "sha512-FrAqCbbGao9iKI+Mgh+OsC9+U2YMoXnlDHe06yH7dvavCKzE3S892dGtX54+WhSFVxHR/TMRVJiK/CV93GR0TQ==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1", "lodash.merge": "^4.6.2" }, "engines": { @@ -8819,23 +9168,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.51.1.tgz", + "integrity": "sha512-GgmNF9C+6esr8PIJxCqHw84rEOkYm6XdFWZ2+Wyc3qaUt92ACoN7uSw5iKNvaUq62W0xii1wsGxwHzyENtPP8w==", + "dependencies": { + "@opentelemetry/api-logs": "0.51.1", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/exporter-trace-otlp-grpc": "0.51.1", + "@opentelemetry/exporter-trace-otlp-http": "0.51.1", + "@opentelemetry/exporter-trace-otlp-proto": "0.51.1", + "@opentelemetry/exporter-zipkin": "1.24.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-logs": "0.51.1", + "@opentelemetry/sdk-metrics": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/sdk-trace-node": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8845,13 +9194,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz", + "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8861,15 +9210,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.24.1.tgz", + "integrity": "sha512-/FZX8uWaGIAwsDhqI8VvQ+qWtfMNlXjaFYGc+vmxgdRFppCSSIRwrPyIhJO1qx61okyYhoyxVEZAfoiNxrfJCg==", + "dependencies": { + "@opentelemetry/context-async-hooks": "1.24.1", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/propagator-b3": "1.24.1", + "@opentelemetry/propagator-jaeger": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", "semver": "^7.5.2" }, "engines": { @@ -8880,13 +9229,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.24.1.tgz", + "integrity": "sha512-0w+aKRai9VREeo3VrtW+hcbrE2Fl/uKL7G+oXgRNf6pI9QLaEGuEzUTX+oxXVPBadzjOd+5dqCHYdX7UeVjzwA==", "dependencies": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" }, "engines": { "node": ">=14" @@ -8896,9 +9245,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz", + "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==", "engines": { "node": ">=14" } @@ -9374,6 +9723,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" } @@ -9381,12 +9731,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", @@ -10406,22 +10758,6 @@ "@types/node": "*" } }, - "node_modules/@types/bytebuffer": { - "version": "5.0.48", - "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.48.tgz", - "integrity": "sha512-ormKm68NtTOtR8C/4jyRJEYbwKABXRkHHR/1fmkiuFbCQkltgtXSUGfldCSmJzvuyJvmBzWjBbOi79Ry/oJQug==", - "dev": true, - "dependencies": { - "@types/long": "^3.0.0", - "@types/node": "*" - } - }, - "node_modules/@types/bytebuffer/node_modules/@types/long": { - "version": "3.0.32", - "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==", - "dev": true - }, "node_modules/@types/chai": { "version": "4.3.12", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.12.tgz", @@ -10533,42 +10869,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", @@ -10704,11 +11004,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", @@ -11917,10 +12212,10 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "peerDependencies": { "acorn": "^8" } @@ -12461,16 +12756,6 @@ "node": ">=0.10.0" } }, - "node_modules/ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha512-JGQaNxpaCJz9Bd1JvVaFIHuWn9S+l3xhN17R0V/vmUDiGE0QngNMXhjlqpwqV+91plWz9Fg+Lt28Lj7p5vjs8A==", - "dev": true, - "dependencies": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -13424,27 +13709,6 @@ "node": ">=10" } }, - "node_modules/bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==", - "dev": true, - "dependencies": { - "long": "~3" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/bytebuffer/node_modules/long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -13937,9 +14201,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==" }, "node_modules/class-transformer": { "version": "0.5.1", @@ -14246,15 +14510,6 @@ "type-is": "^1.6.16" } }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -14337,15 +14592,6 @@ "text-hex": "1.0.x" } }, - "node_modules/colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha512-Rel466v0EnmKPcsxHo91L4kgPs/6XF7Pu2LJNszq9lXYwi5CFWEeIiRaTX5ym7PPMdj4udDHkLSVC1//JVkZQg==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/columnify": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", @@ -18816,176 +19062,6 @@ "node": ">=4.x" } }, - "node_modules/grpc": { - "version": "1.24.11", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.11.tgz", - "integrity": "sha512-8/AQdFCzCeCDWW3SoaMNp6ccbRvTQEH1O1u1uFtt29eWsg5gSZCJ3m6fbkduEIh3smY7WAPP+LgVJ5n3nZRxcA==", - "deprecated": "This library will not receive further updates other than security fixes. We recommend using @grpc/grpc-js instead.", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.4", - "@types/bytebuffer": "^5.0.40", - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "protobufjs": "^5.0.3" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/grpc/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "node_modules/grpc/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/grpc/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/grpc/node_modules/protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "dev": true, - "dependencies": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - }, - "bin": { - "pbjs": "bin/pbjs" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/grpc/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "node_modules/grpc/node_modules/yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg==", - "dev": true, - "dependencies": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -19631,12 +19707,12 @@ } }, "node_modules/import-in-the-middle": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.1.tgz", - "integrity": "sha512-1LrZPDtW+atAxH42S6288qyDFNQ2YCty+2mxEPRtfazH6Z5QwkaBSTS2ods7hnVJioF6rkRfNoA6A/MstpFXLg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz", + "integrity": "sha512-Lk+qzWmiQuRPPulGQeK5qq0v32k2bHnWrRPFgqyvhw7Kkov5L6MOLOIU3pcWeujc9W4q54Cp3Q2WV16eQkc7Bg==", "dependencies": { "acorn": "^8.8.2", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "cjs-module-lexer": "^1.2.2", "module-details-from-path": "^1.0.3" } @@ -19890,15 +19966,6 @@ "node": ">= 0.10" } }, - "node_modules/invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ioredis": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.2.tgz", @@ -21329,6 +21396,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", @@ -21628,6 +21696,15 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/kafkajs": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/kafkajs/-/kafkajs-2.2.4.tgz", + "integrity": "sha512-j/YeapB1vfPT2iOIUn/vxdyKEuhuY2PxMBvf5JWux6iSaukAccrMtXEY/Lb7OvavDhOWME589bpLrEdnVHjfjA==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/kareem": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", @@ -22232,18 +22309,6 @@ "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", "dev": true }, - "node_modules/lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", - "dev": true, - "dependencies": { - "invert-kv": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lerna": { "version": "6.6.2", "resolved": "https://registry.npmjs.org/lerna/-/lerna-6.6.2.tgz", @@ -23290,12 +23355,6 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, - "node_modules/lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg==", - "dev": true - }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -25644,7 +25703,8 @@ "version": "2.18.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", - "dev": true + "dev": true, + "optional": true }, "node_modules/nanocolors": { "version": "0.2.13", @@ -27716,12 +27776,6 @@ "node": ">= 0.8.0" } }, - "node_modules/optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha512-f8lTJm4LKirX+45xsFhuRNjA4f46QVLQKfGoNH7e2AEWS+24eM4XNH4pQ8Tw2LISCIvbST/wNcLdtgvgcqVaxA==", - "dev": true - }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -27828,18 +27882,6 @@ "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", "dev": true }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "dev": true, - "dependencies": { - "lcid": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -35848,18 +35890,6 @@ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true }, - "node_modules/window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw==", - "dev": true, - "bin": { - "window-size": "cli.js" - }, - "engines": { - "node": ">= 0.10.0" - } - }, "node_modules/winston": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", @@ -36621,9 +36651,40 @@ "tslib": "^2.0.0" } }, + "packages/baggage-span-processor": { + "name": "@opentelemetry/baggage-span-processor", + "version": "0.2.0", + "license": "Apache-2.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" + }, + "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", @@ -36656,7 +36717,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" @@ -36698,11 +36759,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", @@ -36728,7 +36789,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", @@ -36750,7 +36811,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" @@ -36773,14 +36834,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" @@ -36799,10 +36860,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": { @@ -36829,16 +36890,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/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", @@ -36869,11 +36930,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", @@ -36936,10 +36997,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", @@ -36965,12 +37026,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", @@ -36995,16 +37055,424 @@ "@opentelemetry/api": "^1.3.0" } }, + "plugins/node/instrumentation-kafkajs": { + "name": "@opentelemetry/instrumentation-kafkajs", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.24.0" + }, + "devDependencies": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/sdk-trace-base": "^1.24.0", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "@types/sinon": "^10.0.11", + "kafkajs": "^2.2.4", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "sinon": "15.2.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dependencies": { + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/node_modules/@opentelemetry/contrib-test-utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/contrib-test-utils/-/contrib-test-utils-0.38.0.tgz", + "integrity": "sha512-wdFiZfkCIuQ93Z3JXs1lIjEIabIGxfpEqwdLVYXLhASd8JBRlqLQ4bg0/FRa8Nnd+0BZr3U6Rihg/y8WC3z1ig==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "^1.0.0", + "@opentelemetry/exporter-jaeger": "^1.3.1", + "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/resources": "^1.8.0", + "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-node": "^1.8.0", + "@opentelemetry/semantic-conventions": "^1.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/semantic-conventions": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "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" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "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" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "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" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/resources": "1.23.0", + "@opentelemetry/sdk-trace-base": "1.23.0", + "@opentelemetry/semantic-conventions": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dependencies": { + "@opentelemetry/api-logs": "0.50.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" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@grpc/grpc-js": "^1.7.1", + "@opentelemetry/core": "1.23.0", + "@opentelemetry/otlp-exporter-base": "0.50.0", + "protobufjs": "^7.2.3" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/otlp-exporter-base": "0.50.0", + "protobufjs": "^7.2.3" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "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" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/semantic-conventions": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/resources": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.4.0 <1.9.0", + "@opentelemetry/api-logs": ">=0.39.1" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/resources": "1.23.0", + "lodash.merge": "^4.6.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "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" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "dependencies": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/resources": "1.23.0", + "@opentelemetry/semantic-conventions": "1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "dev": true, + "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", + "semver": "^7.5.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.9.0" + } + }, + "plugins/node/instrumentation-kafkajs/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==", + "engines": { + "node": ">=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", @@ -37032,16 +37500,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/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", @@ -37069,10 +37537,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", @@ -37109,15 +37577,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", @@ -37358,17 +37826,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", @@ -37389,11 +37857,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", @@ -37421,13 +37889,13 @@ }, "plugins/node/opentelemetry-instrumentation-aws-lambda": { "name": "@opentelemetry/instrumentation-aws-lambda", - "version": "0.40.0", + "version": "0.41.1", "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", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/aws-lambda": "8.10.122" }, "devDependencies": { @@ -37453,13 +37921,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", @@ -37469,7 +37937,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", @@ -37501,20 +37969,20 @@ }, "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", + "@opentelemetry/semantic-conventions": "^1.23.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -37544,16 +38012,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", @@ -37577,12 +38045,12 @@ }, "plugins/node/opentelemetry-instrumentation-connect": { "name": "@opentelemetry/instrumentation-connect", - "version": "0.35.0", + "version": "0.36.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", "@types/connect": "3.4.36" }, "devDependencies": { @@ -37616,11 +38084,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/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", "semver": "^7.5.4" }, "devDependencies": { @@ -37649,17 +38116,17 @@ }, "plugins/node/opentelemetry-instrumentation-express": { "name": "@opentelemetry/instrumentation-express", - "version": "0.37.0", + "version": "0.39.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", @@ -37684,19 +38151,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", @@ -37733,11 +38200,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/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -37798,15 +38264,15 @@ }, "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", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.3.1", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "graphql": "^16.5.0", @@ -37832,22 +38298,23 @@ }, "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.22.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/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", "@types/node": "18.6.5", + "joi": "17.12.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", @@ -37864,17 +38331,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/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.23.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", @@ -37900,10 +38367,10 @@ }, "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/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { @@ -37930,11 +38397,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" @@ -37943,8 +38410,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", @@ -37968,17 +38435,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/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.23.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", @@ -38000,17 +38467,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", @@ -38194,17 +38661,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/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", @@ -38227,17 +38694,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/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", - "@opentelemetry/sql-common": "^0.40.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", @@ -38293,11 +38760,11 @@ }, "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/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.23.0" }, "devDependencies": { "@nestjs/common": "9.4.3", @@ -38366,11 +38833,11 @@ }, "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/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.23.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -38396,19 +38863,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", @@ -38435,15 +38902,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", @@ -38502,17 +38969,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/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", @@ -38536,17 +39003,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/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", @@ -38584,11 +39051,11 @@ }, "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/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { @@ -38651,10 +39118,10 @@ }, "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/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0" }, "devDependencies": { @@ -38680,18 +39147,18 @@ }, "plugins/node/opentelemetry-instrumentation-winston": { "name": "@opentelemetry/instrumentation-winston", - "version": "0.36.0", + "version": "0.37.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" }, "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", @@ -38715,11 +39182,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" @@ -38756,11 +39223,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": { @@ -38802,11 +39269,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": { @@ -38814,7 +39281,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", @@ -38851,14 +39318,13 @@ }, "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", "@opentelemetry/core": "^1.0.0", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0", "shimmer": "^1.2.1" }, "devDependencies": { @@ -38904,7 +39370,8 @@ }, "propagators/opentelemetry-propagator-grpc-census-binary": { "name": "@opentelemetry/propagator-grpc-census-binary", - "version": "0.27.1", + "version": "0.27.2", + "extraneous": true, "license": "Apache-2.0", "devDependencies": { "@opentelemetry/api": "^1.0.0", @@ -38927,7 +39394,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", @@ -39160,7 +39627,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", @@ -43080,9 +43547,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", @@ -43134,297 +43601,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": { @@ -45464,9 +46307,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.1.tgz", + "integrity": "sha512-E3skn949Pk1z2XtXu/lxf6QAZpawuTM/IUEXcAzpiUkTd73Hmvw26FiN3cJuTmkpM5hZzHwkomVdtrh/n/zzwA==", "requires": { "@opentelemetry/api": "^1.0.0" } @@ -45475,50 +46318,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.1", + "@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.1", + "@opentelemetry/instrumentation-cucumber": "^0.6.0", + "@opentelemetry/instrumentation-dataloader": "^0.9.0", + "@opentelemetry/instrumentation-dns": "^0.36.1", + "@opentelemetry/instrumentation-express": "^0.39.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.5.0", + "@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", @@ -45536,11 +46381,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", @@ -45572,25 +46417,48 @@ } } }, + "@opentelemetry/baggage-span-processor": { + "version": "file:packages/baggage-span-processor", + "requires": { + "@opentelemetry/api": "^1.0.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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.1.tgz", + "integrity": "sha512-R5r6DO4kgEOVBxFXhXjwospLQkv+sYxwCfjvoZBe7Zm6KKXAV9kDSJhi/D1BweowdZmO+sdbENLs374gER8hpQ==", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.24.1.tgz", + "integrity": "sha512-pt5KLJws1m+rHTeEA6uootoyiuZlCt7j90dmdjXnqx4JZH6sFWqWB5IW1gOukDY7Ym3cNKjtoh3/uK0KuSRBfg==", "requires": { - "@opentelemetry/context-zone-peer-dep": "1.23.0", + "@opentelemetry/context-zone-peer-dep": "1.24.1", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.24.1.tgz", + "integrity": "sha512-s67becvBZFFjSLKSiy8ia2m7htsC4gsk8J/X0368FzBYseb/26daYr4ewx6tKcAsmZqJA7402cTQirv175x5BA==", "requires": {} }, "@opentelemetry/contrib-test-utils": { @@ -45599,9 +46467,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", @@ -45610,71 +46478,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz", + "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==", "requires": { - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/semantic-conventions": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-1.24.1.tgz", + "integrity": "sha512-zrcY76PVR4itZD2oxQdFgnvS/Lst1CxmMofOhngvTDIXVqSTEf00QfmdIQUljwmycYwxZIvbJ445k3AGRBbZKQ==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.51.1.tgz", + "integrity": "sha512-P9+Hkszih95ITvldGZ+kXvj9HpD1QfS+PwooyHK72GYA+Bgm+yUSAsDkUkDms8+s9HW6poxURv3LcjaMuBBpVQ==", "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.1", + "@opentelemetry/otlp-grpc-exporter-base": "0.51.1", + "@opentelemetry/otlp-transformer": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.51.1.tgz", + "integrity": "sha512-n+LhLPsX07URh+HhV2SHVSvz1t4G/l/CE5BjpmhAPqeTceFac1VpyQkavWEJbvnK5bUEXijWt4LxAxFpt2fXyw==", "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.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", + "@opentelemetry/otlp-transformer": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.51.1.tgz", + "integrity": "sha512-SE9f0/6V6EeXC9i+WA4WFjS1EYgaBCpAnI5+lxWvZ7iO7EU1IvHvZhP6Kojr0nLldo83gqg6G7OWFqsID3uF+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.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", + "@opentelemetry/otlp-proto-exporter-base": "0.51.1", + "@opentelemetry/otlp-transformer": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.24.1.tgz", + "integrity": "sha512-+Rl/VFmu2n6eaRMnVbyfZx1DqR/1KNyWebYuHyQBZaEAVIn/ZLgmofRpXN1X2nhJ4BNaptQUNxAstCYYz6dKoQ==", "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.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" } }, "@opentelemetry/host-metrics": { @@ -45737,13 +46605,13 @@ } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.1.tgz", + "integrity": "sha512-JIrvhpgqY6437QIqToyozrUG1h5UhwHkaGK/WAX+fkrpyPtc+RO5FkRtUd9BH0MibabHHvqsnBGKfKVijbmp8w==", "requires": { - "@opentelemetry/api-logs": "0.50.0", + "@opentelemetry/api-logs": "0.51.1", "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.7.1", + "import-in-the-middle": "1.7.4", "require-in-the-middle": "^7.1.1", "semver": "^7.5.2", "shimmer": "^1.2.1" @@ -45753,9 +46621,9 @@ "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/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/amqplib": "^0.5.17", "@types/lodash": "4.14.199", @@ -45786,13 +46654,13 @@ "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", "@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/aws-lambda": "8.10.122", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -45813,12 +46681,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", @@ -45847,13 +46715,13 @@ "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", + "@opentelemetry/semantic-conventions": "^1.23.0", "@types/bunyan": "1.8.9", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -45883,11 +46751,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", @@ -45907,10 +46775,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", @@ -45938,10 +46806,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", @@ -45982,71 +46850,241 @@ } } }, - "@opentelemetry/instrumentation-dataloader": { - "version": "file:plugins/node/instrumentation-dataloader", + "@opentelemetry/instrumentation-dataloader": { + "version": "file:plugins/node/instrumentation-dataloader", + "requires": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/context-async-hooks": "^1.8.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", + "@types/node": "18.6.5", + "dataloader": "2.2.2", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "test-all-versions": "6.1.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + } + }, + "@opentelemetry/instrumentation-dns": { + "version": "file:plugins/node/opentelemetry-instrumentation-dns", + "requires": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/core": "^1.8.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", + "@types/node": "18.6.5", + "@types/semver": "7.5.3", + "@types/shimmer": "1.0.3", + "@types/sinon": "10.0.18", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "semver": "^7.5.4", + "sinon": "15.2.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + } + }, + "@opentelemetry/instrumentation-document-load": { + "version": "file:plugins/web/opentelemetry-instrumentation-document-load", + "requires": { + "@babel/core": "7.22.17", + "@jsdevtools/coverage-istanbul-loader": "3.0.5", + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/core": "^1.8.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", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@types/chai": "^4.3.10", + "@types/mocha": "8.2.3", + "@types/node": "18.6.5", + "@types/sinon": "10.0.18", + "@web/dev-server-esbuild": "^1.0.1", + "@web/dev-server-rollup": "^0.6.1", + "@web/test-runner": "^0.18.0", + "chai": "^4.3.10", + "sinon": "15.2.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/instrumentation-express": { + "version": "file:plugins/node/opentelemetry-instrumentation-express", + "requires": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/context-async-hooks": "^1.8.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/core": "^1.8.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", + "@types/express": "4.17.18", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "@types/sinon": "10.0.18", + "express": "4.19.2", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "sinon": "15.2.0", + "test-all-versions": "6.1.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + } + }, + "@opentelemetry/instrumentation-fastify": { + "version": "file:plugins/node/opentelemetry-instrumentation-fastify", + "requires": { + "@fastify/express": "^3.0.0", + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/context-async-hooks": "^1.8.0", + "@opentelemetry/contrib-test-utils": "^0.39.0", + "@opentelemetry/core": "^1.8.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", + "@types/express": "4.17.18", + "@types/mocha": "7.0.2", + "@types/node": "18.15.3", + "@types/semver": "7.5.5", + "fastify": "4.18.0", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "semver": "^7.5.4", + "test-all-versions": "6.1.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + }, + "dependencies": { + "@types/node": { + "version": "18.15.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", + "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==", + "dev": true + }, + "@types/semver": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", + "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "dev": true + } + } + }, + "@opentelemetry/instrumentation-fetch": { + "version": "0.51.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fetch/-/instrumentation-fetch-0.51.1.tgz", + "integrity": "sha512-LzciqAnJmmYaXWo2hlrN99NMbYbExo6n6lBKBeMHAi7X/ddhCSOsgSNVbF3kDB7P++PJhjYqLT3hy6SU4AFHcg==", + "requires": { + "@opentelemetry/core": "1.24.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/sdk-trace-web": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" + } + }, + "@opentelemetry/instrumentation-fs": { + "version": "file:plugins/node/instrumentation-fs", + "requires": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/context-async-hooks": "^1.8.0", + "@opentelemetry/core": "^1.8.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", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "@types/sinon": "^10.0.11", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "sinon": "15.2.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + } + }, + "@opentelemetry/instrumentation-generic-pool": { + "version": "file:plugins/node/opentelemetry-instrumentation-generic-pool", + "requires": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/context-async-hooks": "^1.8.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-node": "^1.8.0", + "@types/generic-pool": "^3.1.9", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "@types/semver": "7.5.3", + "generic-pool": "3.8.2", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "semver": "7.5.4", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@opentelemetry/instrumentation-graphql": { + "version": "file:plugins/node/opentelemetry-instrumentation-graphql", "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", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@types/mocha": "8.2.3", "@types/node": "18.6.5", - "dataloader": "2.2.2", + "graphql": "^16.5.0", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", "test-all-versions": "6.1.0", "ts-mocha": "10.0.0", "typescript": "4.4.4" - } - }, - "@opentelemetry/instrumentation-dns": { - "version": "file:plugins/node/opentelemetry-instrumentation-dns", - "requires": { - "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.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/semver": "7.5.3", - "@types/shimmer": "1.0.3", - "@types/sinon": "10.0.18", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "semver": "^7.5.4", - "sinon": "15.2.0", - "ts-mocha": "10.0.0", - "typescript": "4.4.4" - } - }, - "@opentelemetry/instrumentation-document-load": { - "version": "file:plugins/web/opentelemetry-instrumentation-document-load", - "requires": { - "@babel/core": "7.22.17", - "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/sdk-trace-base": "^1.0.0", - "@opentelemetry/sdk-trace-web": "^1.15.0", - "@opentelemetry/semantic-conventions": "^1.22.0", - "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-node-resolve": "^15.2.3", - "@types/chai": "^4.3.10", - "@types/mocha": "8.2.3", - "@types/node": "18.6.5", - "@types/sinon": "10.0.18", - "@web/dev-server-esbuild": "^1.0.1", - "@web/dev-server-rollup": "^0.6.1", - "@web/test-runner": "^0.18.0", - "chai": "^4.3.10", - "sinon": "15.2.0", - "typescript": "4.4.4" }, "dependencies": { "@types/mocha": { @@ -46057,253 +47095,355 @@ } } }, - "@opentelemetry/instrumentation-express": { - "version": "file:plugins/node/opentelemetry-instrumentation-express", + "@opentelemetry/instrumentation-grpc": { + "version": "0.51.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.51.1.tgz", + "integrity": "sha512-coRTugFL7De/VNH/1NqPlxnfik87jS+jBXsny+Y/lMhXIA3x8t71IyL9ihuewkD+lNtIxIz6Y7Sq6kPuOqz5dQ==", "requires": { - "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/contrib-test-utils": "^0.38.0", - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.22.0", - "@types/express": "4.17.18", - "@types/mocha": "7.0.2", - "@types/node": "18.6.5", - "@types/sinon": "10.0.18", - "express": "4.19.2", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "sinon": "15.2.0", - "test-all-versions": "6.1.0", - "ts-mocha": "10.0.0", - "typescript": "4.4.4" + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/semantic-conventions": "1.24.1" } }, - "@opentelemetry/instrumentation-fastify": { - "version": "file:plugins/node/opentelemetry-instrumentation-fastify", + "@opentelemetry/instrumentation-hapi": { + "version": "file:plugins/node/opentelemetry-instrumentation-hapi", "requires": { - "@fastify/express": "^2.0.2", + "@hapi/hapi": "21.3.3", "@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/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0", - "@types/express": "4.17.18", "@types/mocha": "7.0.2", - "@types/node": "18.15.3", - "@types/semver": "7.5.5", - "fastify": "4.18.0", + "@types/node": "18.6.5", + "joi": "17.12.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", - "semver": "^7.5.4", "test-all-versions": "6.1.0", "ts-mocha": "10.0.0", "typescript": "4.4.4" - }, - "dependencies": { - "@types/node": { - "version": "18.15.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", - "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==", - "dev": true - }, - "@types/semver": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", - "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", - "dev": true - } } }, - "@opentelemetry/instrumentation-fetch": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fetch/-/instrumentation-fetch-0.50.0.tgz", - "integrity": "sha512-CayteluGJbrfDvzEFQ0EWqLFkNAcO9H7nfDHptZjtonBpJRWF170XZoMkJVC2bxp0lIVwyuw6WlnGVRSNwEtKA==", + "@opentelemetry/instrumentation-http": { + "version": "0.51.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.51.1.tgz", + "integrity": "sha512-6b3nZnFFEz/3xZ6w8bVxctPUWIPWiXuPQ725530JgxnN1cvYFd8CJ75PrHZNjynmzSSnqBkN3ef4R9N+RpMh8Q==", "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.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/semantic-conventions": "1.24.1", + "semver": "^7.5.2" } }, - "@opentelemetry/instrumentation-fs": { - "version": "file:plugins/node/instrumentation-fs", + "@opentelemetry/instrumentation-ioredis": { + "version": "file:plugins/node/opentelemetry-instrumentation-ioredis", "requires": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/resources": "^1.8.0", + "@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.23.0", + "@types/ioredis4": "npm:@types/ioredis@4.28.10", "@types/mocha": "7.0.2", "@types/node": "18.6.5", - "@types/sinon": "^10.0.11", + "@types/sinon": "10.0.18", + "cross-env": "7.0.3", + "ioredis": "5.2.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", "sinon": "15.2.0", + "test-all-versions": "6.1.0", "ts-mocha": "10.0.0", "typescript": "4.4.4" } }, - "@opentelemetry/instrumentation-generic-pool": { - "version": "file:plugins/node/opentelemetry-instrumentation-generic-pool", + "@opentelemetry/instrumentation-kafkajs": { + "version": "file:plugins/node/instrumentation-kafkajs", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/generic-pool": "^3.1.9", + "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/sdk-trace-base": "^1.24.0", + "@opentelemetry/semantic-conventions": "^1.24.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "generic-pool": "3.8.2", + "@types/sinon": "^10.0.11", + "kafkajs": "^2.2.4", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", - "semver": "7.5.4", + "sinon": "15.2.0", "ts-mocha": "10.0.0", "typescript": "4.4.4" }, "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "@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==", + "requires": { + "@opentelemetry/api": "^1.0.0" + } + }, + "@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==", + "dev": true, + "requires": {} + }, + "@opentelemetry/contrib-test-utils": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/contrib-test-utils/-/contrib-test-utils-0.38.0.tgz", + "integrity": "sha512-wdFiZfkCIuQ93Z3JXs1lIjEIabIGxfpEqwdLVYXLhASd8JBRlqLQ4bg0/FRa8Nnd+0BZr3U6Rihg/y8WC3z1ig==", "dev": true, "requires": { - "yallist": "^4.0.0" + "@opentelemetry/core": "^1.0.0", + "@opentelemetry/exporter-jaeger": "^1.3.1", + "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/resources": "^1.8.0", + "@opentelemetry/sdk-node": "^0.50.0", + "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-node": "^1.8.0", + "@opentelemetry/semantic-conventions": "^1.0.0" } }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "@opentelemetry/core": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.23.0.tgz", + "integrity": "sha512-hdQ/a9TMzMQF/BO8Cz1juA43/L5YGtCSiKoOHmrTEf7VMDAZgy8ucpWx3eQTnQ3gBloRcWtzvcrMZABC3PTSKQ==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "@opentelemetry/semantic-conventions": "1.23.0" } }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "@opentelemetry/instrumentation-graphql": { - "version": "file:plugins/node/opentelemetry-instrumentation-graphql", - "requires": { - "@opentelemetry/api": "^1.3.0", - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.3.1", - "@types/mocha": "8.2.3", - "@types/node": "18.6.5", - "graphql": "^16.5.0", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "test-all-versions": "6.1.0", - "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/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==", + "dev": true, + "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/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==", + "dev": true, + "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/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==", + "dev": true, + "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/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==", + "dev": true, + "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/instrumentation": { + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.50.0.tgz", + "integrity": "sha512-bhGhbJiZKpuu7wTaSak4hyZcFPlnDeuSF/2vglze8B4w2LubcSbbOnkVTzTs5SXtzh4Xz8eRjaNnAm+u2GYufQ==", + "requires": { + "@opentelemetry/api-logs": "0.50.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/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==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.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==", + "dev": true, + "requires": { + "@grpc/grpc-js": "^1.7.1", + "@opentelemetry/core": "1.23.0", + "@opentelemetry/otlp-exporter-base": "0.50.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==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/otlp-exporter-base": "0.50.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==", + "dev": true, + "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/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==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.0" + } + }, + "@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==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.0" + } + }, + "@opentelemetry/resources": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.23.0.tgz", + "integrity": "sha512-iPRLfVfcEQynYGo7e4Di+ti+YQTAY0h5mQEUJcHlU9JOqpb4x965O6PZ+wMcwYVY63G96KtdS86YCM1BF1vQZg==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/semantic-conventions": "1.23.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==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/resources": "1.23.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==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/resources": "1.23.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==", + "dev": true, + "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" + } + }, + "@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==", + "dev": true, + "requires": { + "@opentelemetry/core": "1.23.0", + "@opentelemetry/resources": "1.23.0", + "@opentelemetry/semantic-conventions": "1.23.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==", + "dev": true, + "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", + "semver": "^7.5.2" + } + }, + "@opentelemetry/semantic-conventions": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.23.0.tgz", + "integrity": "sha512-MiqFvfOzfR31t8cc74CTP1OZfz7MbqpAnLCra8NqQoaHJX6ncIRTdYOQYBDQ2uFISDq0WY8Y9dDTWvsgzzBYRg==" } } }, - "@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==", - "requires": { - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0" - } - }, - "@opentelemetry/instrumentation-hapi": { - "version": "file:plugins/node/opentelemetry-instrumentation-hapi", - "requires": { - "@hapi/hapi": "20.1.5", - "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-async-hooks": "^1.8.0", - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.50.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", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "test-all-versions": "6.1.0", - "ts-mocha": "10.0.0", - "typescript": "4.4.4" - } - }, - "@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==", - "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/instrumentation": "0.50.0", - "@opentelemetry/semantic-conventions": "1.23.0", - "semver": "^7.5.2" - } - }, - "@opentelemetry/instrumentation-ioredis": { - "version": "file:plugins/node/opentelemetry-instrumentation-ioredis", - "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/sdk-trace-base": "^1.8.0", - "@opentelemetry/sdk-trace-node": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/ioredis4": "npm:@types/ioredis@4.28.10", - "@types/mocha": "7.0.2", - "@types/node": "18.6.5", - "@types/sinon": "10.0.18", - "cross-env": "7.0.3", - "ioredis": "5.2.2", - "mocha": "7.2.0", - "nyc": "15.1.0", - "rimraf": "5.0.5", - "sinon": "15.2.0", - "test-all-versions": "6.1.0", - "ts-mocha": "10.0.0", - "typescript": "4.4.4" - } - }, "@opentelemetry/instrumentation-knex": { "version": "file:plugins/node/opentelemetry-instrumentation-knex", "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.22.0", @@ -46324,10 +47464,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", @@ -46353,7 +47493,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", @@ -46386,8 +47526,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", @@ -46414,11 +47554,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.23.0", "@types/memcached": "^2.2.6", "@types/mocha": "7.0.2", "@types/node": "18.6.5", @@ -46436,8 +47576,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", @@ -46565,9 +47705,9 @@ "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.22.0", "@types/mocha": "8.2.3", @@ -46595,8 +47735,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.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.22.0", @@ -46618,11 +47758,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.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/semver": "7.5.3", @@ -46672,10 +47812,10 @@ "@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", + "@opentelemetry/semantic-conventions": "^1.23.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/semver": "7.5.3", @@ -46723,10 +47863,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.23.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -46743,12 +47883,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", @@ -46772,8 +47912,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", @@ -46822,9 +47962,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.22.0", @@ -46846,10 +47986,10 @@ "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.22.0", @@ -46887,7 +48027,7 @@ "@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.22.0", @@ -46936,7 +48076,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.22.0", @@ -46954,7 +48094,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", @@ -46986,10 +48126,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", @@ -47179,10 +48319,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", @@ -47200,7 +48340,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", @@ -47225,8 +48365,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", @@ -47259,12 +48399,12 @@ "version": "file:plugins/node/opentelemetry-instrumentation-winston", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/api-logs": "^0.50.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", @@ -47281,56 +48421,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-xml-http-request/-/instrumentation-xml-http-request-0.51.1.tgz", + "integrity": "sha512-CrQZxADNFr9M3aCgjM3/KXDz12lBrZA5LW+btfgNb78hsLNwqxThtFvXOHr86UsOzJt+h9m4yDeH6YLEvCTBbw==", "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.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/sdk-trace-web": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.51.1.tgz", + "integrity": "sha512-UYlnOYyDdzo1Gw559EHCzru0RwhvuXCwoH8jGo9J4gO1TE58GjnEmIjomMsKBCym3qWNJfIQXw+9SZCV0DdQNg==", "requires": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.51.1.tgz", + "integrity": "sha512-ZAS+4pq8o7dsugGTwV9s6JMKSxi+guIHdn0acOv0bqj26e9pWDFx5Ky+bI0aY46uR9Y0JyXqY+KAEYM/SO3DFA==", "requires": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.51.1.tgz", + "integrity": "sha512-gxxxwfk0inDMb5DLeuxQ3L8TtptxSiTNHE4nnAJH34IQXAVRhXSXW1rK8PmDKDngRPIZ6J7ncUCjjIn8b+AgqQ==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/otlp-exporter-base": "0.50.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/otlp-exporter-base": "0.51.1", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.51.1.tgz", + "integrity": "sha512-OppYOXwV9LQqqtYUCywqoOqX/JT9LQ5/FMuPZ//eTkvuHdUC4ZMwz2c6uSoT2R90GWvvGnF1iEqTGyTT3xAt2Q==", "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.1", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-logs": "0.51.1", + "@opentelemetry/sdk-metrics": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1" } }, "@opentelemetry/plugin-react-load": { @@ -47344,7 +48484,6 @@ "@opentelemetry/propagator-b3": "^1.3.1", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/react": "17.0.67", @@ -47379,7 +48518,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", @@ -47400,34 +48539,19 @@ } }, "@opentelemetry/propagator-aws-xray": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-1.3.1.tgz", - "integrity": "sha512-6fDMzFlt5r6VWv7MUd0eOpglXPFqykW8CnOuUxJ1VZyLy6mV1bzBlzpsqEmhx1bjvZYvH93vhGkQZqrm95mlrQ==", + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-1.24.1.tgz", + "integrity": "sha512-RzwoLe6QzsYGcpmxxDbbbgSpe3ncxSM4dtFHXh/rCYGjyq0nZGXKvk26mJtWZ4kQ3nuiIoqSZueIuGmt/mvOTA==", "requires": { - "@opentelemetry/core": "^1.0.0" + "@opentelemetry/core": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.24.1.tgz", + "integrity": "sha512-nda97ZwhpZKyUJTXqQuKzNhPMUgMLunbbGWn8kroBwegn+nh6OhtyGkrVQsQLNdVKJl0KeB5z0ZgeWszrYhwFw==", "requires": { - "@opentelemetry/core": "1.23.0" - } - }, - "@opentelemetry/propagator-grpc-census-binary": { - "version": "file:propagators/opentelemetry-propagator-grpc-census-binary", - "requires": { - "@opentelemetry/api": "^1.0.0", - "@types/mocha": "7.0.2", - "@types/node": "18.6.5", - "grpc": "1.24.11", - "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" + "@opentelemetry/core": "1.24.1" } }, "@opentelemetry/propagator-instana": { @@ -47602,11 +48726,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.24.1.tgz", + "integrity": "sha512-7bRBJn3FG1l195A1m+xXRHvgzAOBsfmRi9uZ5Da18oTh7BLmNDiA8+kpk51FpTsU1PCikPVpRDNPhKVB6lyzZg==", "requires": { - "@opentelemetry/core": "1.23.0" + "@opentelemetry/core": "1.24.1" } }, "@opentelemetry/propagator-ot-trace": { @@ -47662,7 +48786,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", @@ -47689,7 +48813,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", @@ -47717,7 +48841,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", @@ -47743,7 +48867,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", @@ -47771,7 +48895,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", @@ -47823,9 +48947,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", @@ -47847,90 +48971,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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz", + "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.51.1.tgz", + "integrity": "sha512-ULQQtl82b673PpZc5/0EtH4V+BrwVOgKJZEB7tYZnGTG3I98tQVk89S9/JSixomDr++F4ih+LSJTCqIKBz+MQQ==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.1.tgz", + "integrity": "sha512-FrAqCbbGao9iKI+Mgh+OsC9+U2YMoXnlDHe06yH7dvavCKzE3S892dGtX54+WhSFVxHR/TMRVJiK/CV93GR0TQ==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.51.1.tgz", + "integrity": "sha512-GgmNF9C+6esr8PIJxCqHw84rEOkYm6XdFWZ2+Wyc3qaUt92ACoN7uSw5iKNvaUq62W0xii1wsGxwHzyENtPP8w==", + "requires": { + "@opentelemetry/api-logs": "0.51.1", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/exporter-trace-otlp-grpc": "0.51.1", + "@opentelemetry/exporter-trace-otlp-http": "0.51.1", + "@opentelemetry/exporter-trace-otlp-proto": "0.51.1", + "@opentelemetry/exporter-zipkin": "1.24.1", + "@opentelemetry/instrumentation": "0.51.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/sdk-logs": "0.51.1", + "@opentelemetry/sdk-metrics": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/sdk-trace-node": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz", + "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/resources": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/resources": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.24.1.tgz", + "integrity": "sha512-/FZX8uWaGIAwsDhqI8VvQ+qWtfMNlXjaFYGc+vmxgdRFppCSSIRwrPyIhJO1qx61okyYhoyxVEZAfoiNxrfJCg==", + "requires": { + "@opentelemetry/context-async-hooks": "1.24.1", + "@opentelemetry/core": "1.24.1", + "@opentelemetry/propagator-b3": "1.24.1", + "@opentelemetry/propagator-jaeger": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", "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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-1.24.1.tgz", + "integrity": "sha512-0w+aKRai9VREeo3VrtW+hcbrE2Fl/uKL7G+oXgRNf6pI9QLaEGuEzUTX+oxXVPBadzjOd+5dqCHYdX7UeVjzwA==", "requires": { - "@opentelemetry/core": "1.23.0", - "@opentelemetry/sdk-trace-base": "1.23.0", - "@opentelemetry/semantic-conventions": "1.23.0" + "@opentelemetry/core": "1.24.1", + "@opentelemetry/sdk-trace-base": "1.24.1", + "@opentelemetry/semantic-conventions": "1.24.1" } }, "@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.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz", + "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==" }, "@opentelemetry/sql-common": { "version": "file:packages/opentelemetry-sql-common", @@ -47948,7 +49072,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", @@ -48284,6 +49408,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" } @@ -48291,12 +49416,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", @@ -49160,24 +50287,6 @@ "@types/node": "*" } }, - "@types/bytebuffer": { - "version": "5.0.48", - "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.48.tgz", - "integrity": "sha512-ormKm68NtTOtR8C/4jyRJEYbwKABXRkHHR/1fmkiuFbCQkltgtXSUGfldCSmJzvuyJvmBzWjBbOi79Ry/oJQug==", - "dev": true, - "requires": { - "@types/long": "^3.0.0", - "@types/node": "*" - }, - "dependencies": { - "@types/long": { - "version": "3.0.32", - "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==", - "dev": true - } - } - }, "@types/chai": { "version": "4.3.12", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.12.tgz", @@ -49288,42 +50397,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", @@ -49458,11 +50531,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", @@ -50460,10 +51528,10 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" }, - "acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "requires": {} }, "acorn-jsx": { @@ -50876,16 +51944,6 @@ "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true }, - "ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha512-JGQaNxpaCJz9Bd1JvVaFIHuWn9S+l3xhN17R0V/vmUDiGE0QngNMXhjlqpwqV+91plWz9Fg+Lt28Lj7p5vjs8A==", - "dev": true, - "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, "asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -51650,23 +52708,6 @@ "integrity": "sha512-NNiBxKgxybMBtWdmvx7ZITJi4ZG+CYUgwOSZTfqB1qogkRHrhbQE/R2r5Fh94X+InN5MCYz6SvB/ejHMj/HbsQ==", "dev": true }, - "bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==", - "dev": true, - "requires": { - "long": "~3" - }, - "dependencies": { - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", - "dev": true - } - } - }, "bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -52034,9 +53075,9 @@ } }, "cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==" }, "class-transformer": { "version": "0.5.1", @@ -52265,12 +53306,6 @@ "type-is": "^1.6.16" } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "dev": true - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -52344,12 +53379,6 @@ "text-hex": "1.0.x" } }, - "colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha512-Rel466v0EnmKPcsxHo91L4kgPs/6XF7Pu2LJNszq9lXYwi5CFWEeIiRaTX5ym7PPMdj4udDHkLSVC1//JVkZQg==", - "dev": true - }, "columnify": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", @@ -55904,140 +56933,6 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, - "grpc": { - "version": "1.24.11", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.11.tgz", - "integrity": "sha512-8/AQdFCzCeCDWW3SoaMNp6ccbRvTQEH1O1u1uFtt29eWsg5gSZCJ3m6fbkduEIh3smY7WAPP+LgVJ5n3nZRxcA==", - "dev": true, - "requires": { - "@mapbox/node-pre-gyp": "^1.0.4", - "@types/bytebuffer": "^5.0.40", - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "protobufjs": "^5.0.3" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "dev": true, - "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg==", - "dev": true, - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - } - } - }, "handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -56552,12 +57447,12 @@ } }, "import-in-the-middle": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.1.tgz", - "integrity": "sha512-1LrZPDtW+atAxH42S6288qyDFNQ2YCty+2mxEPRtfazH6Z5QwkaBSTS2ods7hnVJioF6rkRfNoA6A/MstpFXLg==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz", + "integrity": "sha512-Lk+qzWmiQuRPPulGQeK5qq0v32k2bHnWrRPFgqyvhw7Kkov5L6MOLOIU3pcWeujc9W4q54Cp3Q2WV16eQkc7Bg==", "requires": { "acorn": "^8.8.2", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "cjs-module-lexer": "^1.2.2", "module-details-from-path": "^1.0.3" } @@ -56752,12 +57647,6 @@ "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", - "dev": true - }, "ioredis": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.2.2.tgz", @@ -57793,6 +58682,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", @@ -58054,6 +58944,12 @@ "safe-buffer": "^5.0.1" } }, + "kafkajs": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/kafkajs/-/kafkajs-2.2.4.tgz", + "integrity": "sha512-j/YeapB1vfPT2iOIUn/vxdyKEuhuY2PxMBvf5JWux6iSaukAccrMtXEY/Lb7OvavDhOWME589bpLrEdnVHjfjA==", + "dev": true + }, "kareem": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", @@ -58540,15 +59436,6 @@ "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", "dev": true }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, "lerna": { "version": "6.6.2", "resolved": "https://registry.npmjs.org/lerna/-/lerna-6.6.2.tgz", @@ -59378,12 +60265,6 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, - "lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg==", - "dev": true - }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -61327,7 +62208,8 @@ "version": "2.18.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", - "dev": true + "dev": true, + "optional": true }, "nanocolors": { "version": "0.2.13", @@ -62976,12 +63858,6 @@ "type-check": "^0.4.0" } }, - "optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha512-f8lTJm4LKirX+45xsFhuRNjA4f46QVLQKfGoNH7e2AEWS+24eM4XNH4pQ8Tw2LISCIvbST/wNcLdtgvgcqVaxA==", - "dev": true - }, "ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -63060,15 +63936,6 @@ "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", "dev": true }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -69340,12 +70207,6 @@ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", "dev": true }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw==", - "dev": true - }, "winston": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", diff --git a/packages/baggage-span-processor/.eslintignore b/packages/baggage-span-processor/.eslintignore new file mode 100644 index 0000000000..378eac25d3 --- /dev/null +++ b/packages/baggage-span-processor/.eslintignore @@ -0,0 +1 @@ +build diff --git a/packages/baggage-span-processor/.eslintrc.js b/packages/baggage-span-processor/.eslintrc.js new file mode 100644 index 0000000000..f726f3becb --- /dev/null +++ b/packages/baggage-span-processor/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + "env": { + "mocha": 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..9aa5d8b2bf --- /dev/null +++ b/packages/baggage-span-processor/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## [0.2.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/baggage-span-processor-v0.1.0...baggage-span-processor-v0.2.0) (2024-05-15) + + +### Features + +* Add new baggage span processor package ([#2114](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2114)) ([695177b](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/695177b69cfb51f70064dc1ee615383d560aa62a)) + +## 0.1.0 + +Initial version. diff --git a/packages/baggage-span-processor/LICENSE b/packages/baggage-span-processor/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/packages/baggage-span-processor/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/baggage-span-processor/README.md b/packages/baggage-span-processor/README.md new file mode 100644 index 0000000000..0b6af08d91 --- /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/baggage-span-processor +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fbaggage-span-processor.svg diff --git a/packages/baggage-span-processor/package.json b/packages/baggage-span-processor/package.json new file mode 100644 index 0000000000..1c59e37c80 --- /dev/null +++ b/packages/baggage-span-processor/package.json @@ -0,0 +1,59 @@ +{ + "name": "@opentelemetry/baggage-span-processor", + "version": "0.2.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/packages/baggage-span-processor/src/index.ts b/packages/baggage-span-processor/src/index.ts new file mode 100644 index 0000000000..39e175e9b3 --- /dev/null +++ b/packages/baggage-span-processor/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { 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/packages/baggage-span-processor/tsconfig.json b/packages/baggage-span-processor/tsconfig.json new file mode 100644 index 0000000000..4078877ce6 --- /dev/null +++ b/packages/baggage-span-processor/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.base", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ] +} 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/README.md b/packages/opentelemetry-host-metrics/README.md index d9635f1acf..f613fba2a6 100644 --- a/packages/opentelemetry-host-metrics/README.md +++ b/packages/opentelemetry-host-metrics/README.md @@ -5,9 +5,9 @@ This module provides automatic collection of Host Metrics which includes metrics for: -* CPU -* Memory -* Network +- CPU +- Memory +- Network Compatible with OpenTelemetry JS API and SDK `1.0+`. @@ -41,9 +41,9 @@ hostMetrics.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] +- 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 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/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/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/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/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/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/README.md b/packages/winston-transport/README.md index 6bfa2079c0..977d2da610 100644 --- a/packages/winston-transport/README.md +++ b/packages/winston-transport/README.md @@ -55,9 +55,9 @@ Winston `3.x` ## 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] +- 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 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/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/package.json b/plugins/node/instrumentation-amqplib/package.json index 5b7202cf4a..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/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 16224096fc..c81e2b51a3 100644 --- a/plugins/node/instrumentation-amqplib/src/amqplib.ts +++ b/plugins/node/instrumentation-amqplib/src/amqplib.ts @@ -77,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, 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/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/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-kafkajs/.eslintignore b/plugins/node/instrumentation-kafkajs/.eslintignore new file mode 100644 index 0000000000..378eac25d3 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/.eslintignore @@ -0,0 +1 @@ +build diff --git a/plugins/node/instrumentation-kafkajs/.eslintrc.js b/plugins/node/instrumentation-kafkajs/.eslintrc.js new file mode 100644 index 0000000000..f756f4488b --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + "env": { + "mocha": true, + "node": true + }, + ...require('../../../eslint.config.js') +} diff --git a/plugins/node/instrumentation-kafkajs/LICENSE b/plugins/node/instrumentation-kafkajs/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/plugins/node/instrumentation-kafkajs/NOTICE b/plugins/node/instrumentation-kafkajs/NOTICE new file mode 100644 index 0000000000..5c83fd9609 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/NOTICE @@ -0,0 +1,8 @@ +[Based on the instrumentation written by Aspecto](https://github.com/aspecto-io/opentelemetry-ext-js/tree/master/packages/instrumentation-kafkajs). + +The library contains the following changes compared to the original: +* The codebase was converted to TypeScript. +* bufferTextMapGetter compares propagation headers in a case insensitive manner. +* Removed `moduleVersionAttributeName` configuration option. +* Changed the function signature of `producerHook` and `consumerHook`. +* Removed `messaging.destination_kind` attribute. diff --git a/plugins/node/instrumentation-kafkajs/README.md b/plugins/node/instrumentation-kafkajs/README.md new file mode 100644 index 0000000000..9f00d430e2 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/README.md @@ -0,0 +1,76 @@ +# OpenTelemetry `kafkajs` Instrumentation for Node.js + +[![NPM Published Version][npm-img]][npm-url] +[![Apache License][license-image]][license-image] + +This module provides automatic instrumentation for the [`kafkajs`](https://www.npmjs.com/package/kafkajs) package, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle. + +If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience. + +Compatible with OpenTelemetry JS API and SDK `1.0+`. + +## Installation + +```bash +npm install --save @opentelemetry/instrumentation-kafkajs +``` + +### Supported versions + +- `<3.0.0` + +## Usage + +```js +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); +const { KafkaJsInstrumentation } = require('@opentelemetry/instrumentation-kafkajs'); +const { registerInstrumentations } = require('@opentelemetry/instrumentation'); + +const provider = new NodeTracerProvider(); +provider.register(); + +registerInstrumentations({ + instrumentations: [ + new KafkaJsInstrumentation({ + // see below for available configuration + }), + ], +}); +``` + +### Instrumentation Options + +You can set the following: + +| Options | Type | Description | +| ---------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `producerHook` | `KafkaProducerCustomAttributeFunction` | Function called before a producer message is sent. Allows for adding custom attributes to the span. | +| `consumerHook` | `KafkaConsumerCustomAttributeFunction` | Function called before a consumer message is processed. Allows for adding custom attributes to the span. | + +## Semantic Conventions + +This package uses `@opentelemetry/semantic-conventions` version `1.24+`, 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.system` | An identifier for the messaging system being used. | +| `messaging.destination` | The message destination name. | +| `messaging.operation` | A string identifying the kind of messaging operation. | + +## Useful links + +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-kafkajs +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-kafkajs.svg diff --git a/plugins/node/instrumentation-kafkajs/package.json b/plugins/node/instrumentation-kafkajs/package.json new file mode 100644 index 0000000000..7e6ff384e1 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/package.json @@ -0,0 +1,64 @@ +{ + "name": "@opentelemetry/instrumentation-kafkajs", + "version": "0.0.1", + "description": "OpenTelemetry automatic instrumentation package for kafkajs", + "main": "build/src/index.js", + "types": "build/src/index.d.ts", + "repository": "open-telemetry/opentelemetry-js-contrib", + "scripts": { + "test": "ts-mocha --require @opentelemetry/contrib-test-utils -p tsconfig.json 'test/**/*.test.ts'", + "tdd": "npm run test -- --watch-extensions ts --watch", + "clean": "rimraf build/*", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix", + "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-kafkajs --include-dependencies", + "prewatch": "npm run precompile", + "prepublishOnly": "npm run compile", + "version:update": "node ../../../scripts/version-update.js", + "compile": "tsc -p ." + }, + "keywords": [ + "kafkajs", + "instrumentation", + "nodejs", + "opentelemetry", + "profiling", + "tracing" + ], + "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.3.0" + }, + "devDependencies": { + "@opentelemetry/api": "^1.3.0", + "@opentelemetry/contrib-test-utils": "^0.38.0", + "@opentelemetry/sdk-trace-base": "^1.24.0", + "@types/mocha": "7.0.2", + "@types/node": "18.6.5", + "@types/sinon": "^10.0.11", + "kafkajs": "^2.2.4", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "5.0.5", + "sinon": "15.2.0", + "ts-mocha": "10.0.0", + "typescript": "4.4.4" + }, + "dependencies": { + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/semantic-conventions": "^1.24.0" + }, + "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-kafkajs#readme" +} diff --git a/plugins/node/instrumentation-kafkajs/src/index.ts b/plugins/node/instrumentation-kafkajs/src/index.ts new file mode 100644 index 0000000000..91c7641c95 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/src/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright The OpenTelemetry Authors, Aspecto + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './instrumentation'; +export * from './types'; diff --git a/plugins/node/instrumentation-kafkajs/src/instrumentation.ts b/plugins/node/instrumentation-kafkajs/src/instrumentation.ts new file mode 100644 index 0000000000..09762e8e6f --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/src/instrumentation.ts @@ -0,0 +1,407 @@ +/* + * Copyright The OpenTelemetry Authors, Aspecto + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + SpanKind, + Span, + SpanStatusCode, + Context, + propagation, + Link, + trace, + context, + ROOT_CONTEXT, +} from '@opentelemetry/api'; +import { + MESSAGINGOPERATIONVALUES_PROCESS, + MESSAGINGOPERATIONVALUES_RECEIVE, + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_OPERATION, +} from '@opentelemetry/semantic-conventions'; +import type * as kafkaJs from 'kafkajs'; +import type { + EachBatchHandler, + EachMessageHandler, + Producer, + RecordMetadata, + Message, + ConsumerRunConfig, + KafkaMessage, + Consumer, +} from 'kafkajs'; +import { KafkaJsInstrumentationConfig } from './types'; +import { VERSION } from './version'; +import { bufferTextMapGetter } from './propagator'; +import { + InstrumentationBase, + InstrumentationNodeModuleDefinition, + safeExecuteInTheMiddle, + isWrapped, +} from '@opentelemetry/instrumentation'; + +export class KafkaJsInstrumentation extends InstrumentationBase { + protected override _config!: KafkaJsInstrumentationConfig; + + constructor(config: KafkaJsInstrumentationConfig = {}) { + super('@opentelemetry/instrumentation-kafkajs', VERSION, config); + } + + protected init() { + const unpatch = (moduleExports: typeof kafkaJs) => { + if (isWrapped(moduleExports?.Kafka?.prototype.producer)) { + this._unwrap(moduleExports.Kafka.prototype, 'producer'); + } + if (isWrapped(moduleExports?.Kafka?.prototype.consumer)) { + this._unwrap(moduleExports.Kafka.prototype, 'consumer'); + } + }; + + const module = new InstrumentationNodeModuleDefinition( + 'kafkajs', + ['< 3'], + (moduleExports: typeof kafkaJs) => { + unpatch(moduleExports); + this._wrap( + moduleExports?.Kafka?.prototype, + 'producer', + this._getProducerPatch() + ); + this._wrap( + moduleExports?.Kafka?.prototype, + 'consumer', + this._getConsumerPatch() + ); + + return moduleExports; + }, + unpatch + ); + return module; + } + + private _getConsumerPatch() { + const instrumentation = this; + return (original: kafkaJs.Kafka['consumer']) => { + return function consumer( + this: kafkaJs.Kafka, + ...args: Parameters + ) { + const newConsumer: Consumer = original.apply(this, args); + + if (isWrapped(newConsumer.run)) { + instrumentation._unwrap(newConsumer, 'run'); + } + + instrumentation._wrap( + newConsumer, + 'run', + instrumentation._getConsumerRunPatch() + ); + + return newConsumer; + }; + }; + } + + private _getProducerPatch() { + const instrumentation = this; + return (original: kafkaJs.Kafka['producer']) => { + return function consumer( + this: kafkaJs.Kafka, + ...args: Parameters + ) { + const newProducer: Producer = original.apply(this, args); + + if (isWrapped(newProducer.sendBatch)) { + instrumentation._unwrap(newProducer, 'sendBatch'); + } + instrumentation._wrap( + newProducer, + 'sendBatch', + instrumentation._getProducerSendBatchPatch() + ); + + if (isWrapped(newProducer.send)) { + instrumentation._unwrap(newProducer, 'send'); + } + instrumentation._wrap( + newProducer, + 'send', + instrumentation._getProducerSendPatch() + ); + + return newProducer; + }; + }; + } + + private _getConsumerRunPatch() { + const instrumentation = this; + return (original: Consumer['run']) => { + return function run( + this: Consumer, + ...args: Parameters + ): ReturnType { + const config = args[0]; + if (config?.eachMessage) { + if (isWrapped(config.eachMessage)) { + instrumentation._unwrap(config, 'eachMessage'); + } + instrumentation._wrap( + config, + 'eachMessage', + instrumentation._getConsumerEachMessagePatch() + ); + } + if (config?.eachBatch) { + if (isWrapped(config.eachBatch)) { + instrumentation._unwrap(config, 'eachBatch'); + } + instrumentation._wrap( + config, + 'eachBatch', + instrumentation._getConsumerEachBatchPatch() + ); + } + return original.call(this, config); + }; + }; + } + + private _getConsumerEachMessagePatch() { + const instrumentation = this; + return (original: ConsumerRunConfig['eachMessage']) => { + return function eachMessage( + this: unknown, + ...args: Parameters + ): Promise { + const payload = args[0]; + const propagatedContext: Context = propagation.extract( + ROOT_CONTEXT, + payload.message.headers, + bufferTextMapGetter + ); + const span = instrumentation._startConsumerSpan( + payload.topic, + payload.message, + MESSAGINGOPERATIONVALUES_PROCESS, + propagatedContext + ); + + const eachMessagePromise = context.with( + trace.setSpan(propagatedContext, span), + () => { + return original!.apply(this, args); + } + ); + return instrumentation._endSpansOnPromise([span], eachMessagePromise); + }; + }; + } + + private _getConsumerEachBatchPatch() { + return (original: ConsumerRunConfig['eachBatch']) => { + const instrumentation = this; + return function eachBatch( + this: unknown, + ...args: Parameters + ): Promise { + const payload = args[0]; + // https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/messaging.md#topic-with-multiple-consumers + const receivingSpan = instrumentation._startConsumerSpan( + payload.batch.topic, + undefined, + MESSAGINGOPERATIONVALUES_RECEIVE, + ROOT_CONTEXT + ); + return context.with( + trace.setSpan(context.active(), receivingSpan), + () => { + const spans = payload.batch.messages.map( + (message: KafkaMessage) => { + const propagatedContext: Context = propagation.extract( + ROOT_CONTEXT, + message.headers, + bufferTextMapGetter + ); + const spanContext = trace + .getSpan(propagatedContext) + ?.spanContext(); + let origSpanLink: Link | undefined; + if (spanContext) { + origSpanLink = { + context: spanContext, + }; + } + return instrumentation._startConsumerSpan( + payload.batch.topic, + message, + MESSAGINGOPERATIONVALUES_PROCESS, + undefined, + origSpanLink + ); + } + ); + const batchMessagePromise: Promise = original!.apply( + this, + args + ); + spans.unshift(receivingSpan); + return instrumentation._endSpansOnPromise( + spans, + batchMessagePromise + ); + } + ); + }; + }; + } + + private _getProducerSendBatchPatch() { + const instrumentation = this; + return (original: Producer['sendBatch']) => { + return function sendBatch( + this: Producer, + ...args: Parameters + ): ReturnType { + const batch = args[0]; + const messages = batch.topicMessages || []; + const spans: Span[] = messages + .map(topicMessage => + topicMessage.messages.map(message => + instrumentation._startProducerSpan(topicMessage.topic, message) + ) + ) + .reduce((acc, val) => acc.concat(val), []); + + const origSendResult: Promise = original.apply( + this, + args + ); + return instrumentation._endSpansOnPromise(spans, origSendResult); + }; + }; + } + + private _getProducerSendPatch() { + const instrumentation = this; + return (original: Producer['send']) => { + return function send( + this: Producer, + ...args: Parameters + ): ReturnType { + const record = args[0]; + const spans: Span[] = record.messages.map(message => { + return instrumentation._startProducerSpan(record.topic, message); + }); + + const origSendResult: Promise = original.apply( + this, + args + ); + return instrumentation._endSpansOnPromise(spans, origSendResult); + }; + }; + } + + private _endSpansOnPromise( + spans: Span[], + sendPromise: Promise + ): Promise { + return Promise.resolve(sendPromise) + .catch(reason => { + let errorMessage: string; + if (typeof reason === 'string') errorMessage = reason; + else if ( + typeof reason === 'object' && + Object.prototype.hasOwnProperty.call(reason, 'message') + ) + errorMessage = reason.message; + + spans.forEach(span => + span.setStatus({ + code: SpanStatusCode.ERROR, + message: errorMessage, + }) + ); + + throw reason; + }) + .finally(() => { + spans.forEach(span => span.end()); + }); + } + + private _startConsumerSpan( + topic: string, + message: KafkaMessage | undefined, + operation: string, + context: Context | undefined, + link?: Link + ) { + const span = this.tracer.startSpan( + topic, + { + kind: SpanKind.CONSUMER, + attributes: { + [SEMATTRS_MESSAGING_SYSTEM]: 'kafka', + [SEMATTRS_MESSAGING_DESTINATION]: topic, + [SEMATTRS_MESSAGING_OPERATION]: operation, + }, + links: link ? [link] : [], + }, + context + ); + + if (this._config?.consumerHook && message) { + safeExecuteInTheMiddle( + () => this._config.consumerHook!(span, { topic, message }), + e => { + if (e) this._diag.error('consumerHook error', e); + }, + true + ); + } + + return span; + } + + private _startProducerSpan(topic: string, message: Message) { + const span = this.tracer.startSpan(topic, { + kind: SpanKind.PRODUCER, + attributes: { + [SEMATTRS_MESSAGING_SYSTEM]: 'kafka', + [SEMATTRS_MESSAGING_DESTINATION]: topic, + }, + }); + + message.headers = message.headers ?? {}; + propagation.inject(trace.setSpan(context.active(), span), message.headers); + + if (this._config?.producerHook) { + safeExecuteInTheMiddle( + () => this._config.producerHook!(span, { topic, message }), + e => { + if (e) this._diag.error('producerHook error', e); + }, + true + ); + } + + return span; + } +} diff --git a/plugins/node/instrumentation-kafkajs/src/propagator.ts b/plugins/node/instrumentation-kafkajs/src/propagator.ts new file mode 100644 index 0000000000..abe2b1ee8b --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/src/propagator.ts @@ -0,0 +1,43 @@ +/* + * Copyright The OpenTelemetry Authors, Aspecto + * + * 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 { TextMapGetter } from '@opentelemetry/api'; + +/* +same as open telemetry's `defaultTextMapGetter`, +but also handle case where header is buffer, +adding toString() to make sure string is returned +*/ +export const bufferTextMapGetter: TextMapGetter = { + get(carrier, key) { + if (!carrier) { + return undefined; + } + + const keys = Object.keys(carrier); + + for (const carrierKey of keys) { + if (carrierKey === key || carrierKey.toLowerCase() === key) { + return carrier[carrierKey]?.toString(); + } + } + + return undefined; + }, + + keys(carrier) { + return carrier ? Object.keys(carrier) : []; + }, +}; diff --git a/plugins/node/instrumentation-kafkajs/src/types.ts b/plugins/node/instrumentation-kafkajs/src/types.ts new file mode 100644 index 0000000000..3c660ffdc8 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/src/types.ts @@ -0,0 +1,46 @@ +/* + * Copyright The OpenTelemetry Authors, Aspecto + * + * 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 { Span } from '@opentelemetry/api'; +import { InstrumentationConfig } from '@opentelemetry/instrumentation'; + +export interface KafkajsMessage { + key?: Buffer | string | null; + value: Buffer | string | null; + partition?: number; + headers?: Record; + timestamp?: string; +} + +export interface MessageInfo { + topic: string; + message: T; +} + +export interface KafkaProducerCustomAttributeFunction { + (span: Span, info: MessageInfo): void; +} + +export interface KafkaConsumerCustomAttributeFunction { + (span: Span, info: MessageInfo): void; +} + +export interface KafkaJsInstrumentationConfig extends InstrumentationConfig { + /** hook for adding custom attributes before producer message is sent */ + producerHook?: KafkaProducerCustomAttributeFunction; + + /** hook for adding custom attributes before consumer message is processed */ + consumerHook?: KafkaConsumerCustomAttributeFunction; +} diff --git a/plugins/node/instrumentation-kafkajs/test/DummyPropagation.ts b/plugins/node/instrumentation-kafkajs/test/DummyPropagation.ts new file mode 100644 index 0000000000..5daa6d65a7 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/test/DummyPropagation.ts @@ -0,0 +1,64 @@ +/* + * Copyright The OpenTelemetry Authors, Aspecto + * + * 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, + TraceFlags, + TextMapPropagator, + TextMapSetter, + TextMapGetter, + trace, +} from '@opentelemetry/api'; + +export class DummyPropagation implements TextMapPropagator { + static TRACE_CONTEXT_KEY = 'x-dummy-trace-id'; + static SPAN_CONTEXT_KEY = 'x-dummy-span-id'; + + extract(context: Context, carrier: unknown, getter: TextMapGetter) { + const extractedSpanContext = { + traceId: getter.get( + carrier, + DummyPropagation.TRACE_CONTEXT_KEY + ) as string, + spanId: getter.get(carrier, DummyPropagation.SPAN_CONTEXT_KEY) as string, + traceFlags: TraceFlags.SAMPLED, + }; + + if (!extractedSpanContext.traceId || !extractedSpanContext.spanId) + return context; + + return trace.setSpanContext(context, extractedSpanContext); + } + + inject(context: Context, carrier: unknown, setter: TextMapSetter): void { + const spanContext = trace.getSpanContext(context); + if (!spanContext) return; + + setter.set( + carrier, + DummyPropagation.TRACE_CONTEXT_KEY, + spanContext.traceId + ); + setter.set(carrier, DummyPropagation.SPAN_CONTEXT_KEY, spanContext.spanId); + } + + fields(): string[] { + return [ + DummyPropagation.TRACE_CONTEXT_KEY, + DummyPropagation.SPAN_CONTEXT_KEY, + ]; + } +} diff --git a/plugins/node/instrumentation-kafkajs/test/kafkajs.test.ts b/plugins/node/instrumentation-kafkajs/test/kafkajs.test.ts new file mode 100644 index 0000000000..258dddd7d0 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/test/kafkajs.test.ts @@ -0,0 +1,885 @@ +/* + * Copyright The OpenTelemetry Authors, Aspecto + * + * 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 { KafkaJsInstrumentation, KafkaJsInstrumentationConfig } from '../src'; +import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; +import { + propagation, + context, + SpanKind, + SpanStatusCode, + Baggage, +} from '@opentelemetry/api'; +import { + SEMATTRS_MESSAGING_SYSTEM, + SEMATTRS_MESSAGING_DESTINATION, + SEMATTRS_MESSAGING_OPERATION, +} from '@opentelemetry/semantic-conventions'; +import { + getTestSpans, + registerInstrumentationTesting, +} from '@opentelemetry/contrib-test-utils'; +import { W3CBaggagePropagator, CompositePropagator } from '@opentelemetry/core'; + +const instrumentation = registerInstrumentationTesting( + new KafkaJsInstrumentation() +); + +import * as kafkajs from 'kafkajs'; +import { + Kafka, + ProducerRecord, + RecordMetadata, + Producer, + ProducerBatch, + Message, + Consumer, + ConsumerRunConfig, + EachBatchPayload, + EachMessagePayload, + KafkaMessage, +} from 'kafkajs'; +import { DummyPropagation } from './DummyPropagation'; +import { bufferTextMapGetter } from '../src/propagator'; + +describe('instrumentation-kafkajs', () => { + propagation.setGlobalPropagator( + new CompositePropagator({ + propagators: [new DummyPropagation(), new W3CBaggagePropagator()], + }) + ); + + const kafka = new Kafka({ + clientId: 'unit-tests', + brokers: ['testing_mock_host:1234'], + }); + + let producer: Producer; + let messagesSent: Message[] = []; + + const patchProducerSend = (cb: () => Promise) => { + const origProducerFactory = kafkajs.Kafka.prototype.producer; + kafkajs.Kafka.prototype.producer = function (...args): Producer { + const producer = origProducerFactory.apply(this, args); + + producer.send = function (record: ProducerRecord) { + messagesSent.push(...record.messages); + return cb(); + }; + + producer.sendBatch = function (batch: ProducerBatch) { + batch.topicMessages?.forEach(topicMessages => + messagesSent.push(...topicMessages.messages) + ); + return cb(); + }; + + return producer; + }; + }; + + let consumer: Consumer; + let runConfig: ConsumerRunConfig | undefined; + + const storeRunConfig = () => { + const origConsumerFactory = kafkajs.Kafka.prototype.consumer; + kafkajs.Kafka.prototype.consumer = function (...args): Consumer { + const consumer: Consumer = origConsumerFactory.apply(this, args); + consumer.run = function (config?: ConsumerRunConfig): Promise { + runConfig = config; + return Promise.resolve(); + }; + return consumer; + }; + }; + + beforeEach(() => { + messagesSent = []; + }); + + describe('producer', () => { + const expectKafkaHeadersToMatchSpanContext = ( + kafkaMessage: Message, + span: ReadableSpan + ) => { + assert.strictEqual( + kafkaMessage.headers?.[DummyPropagation.TRACE_CONTEXT_KEY], + span.spanContext().traceId + ); + assert.strictEqual( + kafkaMessage.headers?.[DummyPropagation.SPAN_CONTEXT_KEY], + span.spanContext().spanId + ); + }; + + describe('successful send', () => { + beforeEach(async () => { + patchProducerSend(async (): Promise => { + return [ + { + topicName: 'topic-name-1', + partition: 0, + errorCode: 123, + offset: '18', + timestamp: '123456', + }, + ]; + }); + instrumentation.disable(); + instrumentation.enable(); + producer = kafka.producer(); + }); + + it('simple send create span with right attributes, pass return value correctly and propagate context', async () => { + const res: RecordMetadata[] = await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'testing message content', + }, + ], + }); + + assert.strictEqual(res.length, 1); + assert.strictEqual(res[0].topicName, 'topic-name-1'); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual(span.kind, SpanKind.PRODUCER); + assert.strictEqual(span.name, 'topic-name-1'); + assert.strictEqual(span.status.code, SpanStatusCode.UNSET); + assert.strictEqual(span.attributes[SEMATTRS_MESSAGING_SYSTEM], 'kafka'); + assert.strictEqual( + span.attributes[SEMATTRS_MESSAGING_DESTINATION], + 'topic-name-1' + ); + + assert.strictEqual(messagesSent.length, 1); + expectKafkaHeadersToMatchSpanContext( + messagesSent[0], + span as ReadableSpan + ); + }); + + it('send two messages', async () => { + await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'message1', + }, + { + value: 'message2', + }, + ], + }); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 2); + assert.strictEqual(spans[0].name, 'topic-name-1'); + assert.strictEqual(spans[1].name, 'topic-name-1'); + + assert.strictEqual(messagesSent.length, 2); + expectKafkaHeadersToMatchSpanContext( + messagesSent[0], + spans[0] as ReadableSpan + ); + expectKafkaHeadersToMatchSpanContext( + messagesSent[1], + spans[1] as ReadableSpan + ); + }); + + it('send batch', async () => { + await producer.sendBatch({ + topicMessages: [ + { + topic: 'topic-name-1', + messages: [ + { + value: 'message1-1', + }, + { + value: 'message1-2', + }, + ], + }, + { + topic: 'topic-name-2', + messages: [ + { + value: 'message2-1', + }, + ], + }, + ], + }); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 3); + assert.strictEqual(spans[0].name, 'topic-name-1'); + assert.strictEqual(spans[1].name, 'topic-name-1'); + assert.strictEqual(spans[2].name, 'topic-name-2'); + + assert.strictEqual(messagesSent.length, 3); + for (let i = 0; i < 3; i++) { + expectKafkaHeadersToMatchSpanContext( + messagesSent[i], + spans[i] as ReadableSpan + ); + } + }); + }); + + describe('failed send', () => { + beforeEach(async () => { + patchProducerSend((): Promise => { + return Promise.reject( + new Error('error thrown from kafka client send') + ); + }); + instrumentation.disable(); + instrumentation.enable(); + producer = kafka.producer(); + }); + + it('error in send create failed span', async () => { + try { + await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'testing message content', + }, + ], + }); + } catch (err) {} + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual(span.status.code, SpanStatusCode.ERROR); + assert.strictEqual( + span.status.message, + 'error thrown from kafka client send' + ); + }); + + it('error in send with multiple messages create failed spans', async () => { + try { + await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'testing message content 1', + }, + { + value: 'testing message content 2', + }, + ], + }); + } catch (err) {} + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 2); + spans.forEach(span => { + assert.strictEqual(span.status.code, SpanStatusCode.ERROR); + assert.strictEqual( + span.status.message, + 'error thrown from kafka client send' + ); + }); + }); + + it('error in sendBatch should set error to all spans', async () => { + try { + await producer.sendBatch({ + topicMessages: [ + { + topic: 'topic-name-1', + messages: [ + { + value: 'message1-1', + }, + { + value: 'message1-2', + }, + ], + }, + { + topic: 'topic-name-2', + messages: [ + { + value: 'message2-1', + }, + ], + }, + ], + }); + } catch (err) {} + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 3); + spans.forEach(span => { + assert.strictEqual(span.status.code, SpanStatusCode.ERROR); + assert.strictEqual( + span.status.message, + 'error thrown from kafka client send' + ); + }); + }); + }); + + describe('producer hook successful', () => { + beforeEach(async () => { + patchProducerSend(async (): Promise => []); + + const config: KafkaJsInstrumentationConfig = { + producerHook: (span, info) => { + span.setAttribute( + 'attribute-from-hook', + info.message.value as string + ); + }, + }; + instrumentation.disable(); + instrumentation.setConfig(config); + instrumentation.enable(); + producer = kafka.producer(); + }); + + it('producer hook add span attribute with value from message', async () => { + await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'testing message content', + }, + ], + }); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual( + span.attributes['attribute-from-hook'], + 'testing message content' + ); + }); + }); + + describe('producer hook throw, should still create span', () => { + beforeEach(async () => { + patchProducerSend(async (): Promise => []); + + const config: KafkaJsInstrumentationConfig = { + producerHook: (_span, _info) => { + throw new Error('error thrown from producer hook'); + }, + }; + instrumentation.disable(); + instrumentation.setConfig(config); + instrumentation.enable(); + producer = kafka.producer(); + }); + + it('producer hook add span attribute with value from message', async () => { + await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'testing message content', + }, + ], + }); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual(span.status.code, SpanStatusCode.UNSET); + }); + }); + }); + + describe('consumer', () => { + const createKafkaMessage = (offset: string): KafkaMessage => { + return { + key: Buffer.from('message-key', 'utf8'), + value: Buffer.from('message content', 'utf8'), + timestamp: '1234', + size: 10, + attributes: 1, + offset: offset, + }; + }; + + const createEachMessagePayload = (): EachMessagePayload => { + return { + topic: 'topic-name-1', + partition: 0, + message: createKafkaMessage('123'), + heartbeat: async () => {}, + pause: () => () => {}, + }; + }; + + const createEachBatchPayload = (): EachBatchPayload => { + return { + batch: { + topic: 'topic-name-1', + partition: 1234, + highWatermark: '4567', + messages: [createKafkaMessage('124'), createKafkaMessage('125')], + }, + } as EachBatchPayload; + }; + + beforeEach(() => { + storeRunConfig(); + }); + + describe('successful eachMessage', () => { + beforeEach(async () => { + instrumentation.disable(); + instrumentation.enable(); + consumer = kafka.consumer({ + groupId: 'testing-group-id', + }); + }); + + it('consume eachMessage create span with expected attributes', async () => { + consumer.run({ + eachMessage: async ( + _payload: EachMessagePayload + ): Promise => {}, + }); + const payload: EachMessagePayload = createEachMessagePayload(); + await runConfig?.eachMessage!(payload); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual(span.name, 'topic-name-1'); + assert.strictEqual(span.parentSpanId, undefined); + assert.strictEqual(span.kind, SpanKind.CONSUMER); + assert.strictEqual(span.status.code, SpanStatusCode.UNSET); + assert.strictEqual(span.attributes[SEMATTRS_MESSAGING_SYSTEM], 'kafka'); + assert.strictEqual( + span.attributes[SEMATTRS_MESSAGING_DESTINATION], + 'topic-name-1' + ); + assert.strictEqual( + span.attributes[SEMATTRS_MESSAGING_OPERATION], + 'process' + ); + }); + + it('consumer eachMessage with non promise return value', async () => { + consumer.run({ + // the usecase of kafkajs callback not returning promise + // is not typescript valid, but it might (and is) implemented in real life (nestjs) + // and does not break the library. + eachMessage: async (_payload: EachMessagePayload) => {}, + }); + const payload: EachMessagePayload = createEachMessagePayload(); + await runConfig?.eachMessage!(payload); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + }); + }); + + describe('successful consumer hook', () => { + beforeEach(async () => { + const config: KafkaJsInstrumentationConfig = { + consumerHook: (span, info) => { + span.setAttribute( + 'attribute key from hook', + info.message.value!.toString() + ); + }, + }; + instrumentation.disable(); + instrumentation.setConfig(config); + instrumentation.enable(); + consumer = kafka.consumer({ + groupId: 'testing-group-id', + }); + consumer.run({ + eachMessage: async ( + _payload: EachMessagePayload + ): Promise => {}, + }); + }); + + it('consume hook adds attribute to span', async () => { + const payload: EachMessagePayload = createEachMessagePayload(); + await runConfig?.eachMessage!(payload); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual( + span.attributes['attribute key from hook'], + payload.message.value?.toString() + ); + }); + }); + + describe('throwing consumer hook', () => { + beforeEach(async () => { + const config: KafkaJsInstrumentationConfig = { + consumerHook: (_span, _info) => { + throw new Error('error thrown from consumer hook'); + }, + }; + instrumentation.disable(); + instrumentation.setConfig(config); + instrumentation.enable(); + consumer = kafka.consumer({ + groupId: 'testing-group-id', + }); + consumer.run({ + eachMessage: async ( + _payload: EachMessagePayload + ): Promise => {}, + }); + }); + + it('consume hook adds attribute to span', async () => { + const payload: EachMessagePayload = createEachMessagePayload(); + await runConfig?.eachMessage!(payload); + + const spans = getTestSpans(); + // span should still be created + assert.strictEqual(spans.length, 1); + }); + }); + + describe('eachMessage throws', () => { + beforeEach(async () => { + instrumentation.disable(); + instrumentation.enable(); + consumer = kafka.consumer({ + groupId: 'testing-group-id', + }); + }); + + it('Error message written in the span status', async () => { + const errorToThrow = new Error( + 'error thrown from eachMessage callback' + ); + consumer.run({ + eachMessage: async (_payload: EachMessagePayload): Promise => { + throw errorToThrow; + }, + }); + + const payload: EachMessagePayload = createEachMessagePayload(); + let exception; + try { + await runConfig?.eachMessage!(payload); + } catch (e) { + exception = e; + } + assert.deepStrictEqual(exception, errorToThrow); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual(span.status.code, SpanStatusCode.ERROR); + assert.strictEqual( + span.status.message, + 'error thrown from eachMessage callback' + ); + }); + + it('throwing object with no message', async () => { + const objectToThrow = { + nonMessageProperty: 'the thrown object has no `message` property', + }; + consumer.run({ + eachMessage: async (_payload: EachMessagePayload): Promise => { + throw objectToThrow; + }, + }); + + const payload: EachMessagePayload = createEachMessagePayload(); + let exception; + try { + await runConfig?.eachMessage!(payload); + } catch (e) { + exception = e; + } + assert.deepStrictEqual(exception, objectToThrow); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual(span.status.code, SpanStatusCode.ERROR); + assert.strictEqual(span.status.message, undefined); + }); + + it('throwing non object', async () => { + consumer.run({ + eachMessage: async (_payload: EachMessagePayload): Promise => { + throw undefined; + }, + }); + + const payload: EachMessagePayload = createEachMessagePayload(); + let exception = null; + try { + await runConfig?.eachMessage!(payload); + } catch (e) { + exception = e; + } + assert.strictEqual(exception, undefined); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 1); + const span = spans[0]; + assert.strictEqual(span.status.code, SpanStatusCode.ERROR); + assert.strictEqual(span.status.message, undefined); + }); + }); + + describe('successful eachBatch', () => { + beforeEach(async () => { + instrumentation.disable(); + instrumentation.enable(); + consumer = kafka.consumer({ + groupId: 'testing-group-id', + }); + }); + + it('consume eachBatch create span with expected attributes', async () => { + consumer.run({ + eachBatch: async (_payload: EachBatchPayload): Promise => {}, + }); + const payload: EachBatchPayload = createEachBatchPayload(); + await runConfig?.eachBatch!(payload); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 3); + spans.forEach(span => { + assert.strictEqual(span.name, 'topic-name-1'); + assert.strictEqual(span.status.code, SpanStatusCode.UNSET); + assert.strictEqual( + span.attributes[SEMATTRS_MESSAGING_SYSTEM], + 'kafka' + ); + assert.strictEqual( + span.attributes[SEMATTRS_MESSAGING_DESTINATION], + 'topic-name-1' + ); + }); + + const [recvSpan, msg1Span, msg2Span] = spans; + + assert.strictEqual(recvSpan.parentSpanId, undefined); + assert.strictEqual( + recvSpan.attributes[SEMATTRS_MESSAGING_OPERATION], + 'receive' + ); + + assert.strictEqual( + msg1Span.parentSpanId, + recvSpan.spanContext().spanId + ); + assert.strictEqual( + msg1Span.attributes[SEMATTRS_MESSAGING_OPERATION], + 'process' + ); + + assert.strictEqual( + msg2Span.parentSpanId, + recvSpan.spanContext().spanId + ); + assert.strictEqual( + msg2Span.attributes[SEMATTRS_MESSAGING_OPERATION], + 'process' + ); + }); + + it('consumer eachBatch with non promise return value', async () => { + consumer.run({ + // the usecase of kafkajs callback not returning promise + // is not typescript valid, but it might (and is) implemented in real life (nestjs) + // and does not break the library. + eachBatch: async (_payload: EachBatchPayload) => { + return; + }, + }); + const payload: EachBatchPayload = createEachBatchPayload(); + await runConfig?.eachBatch!(payload); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 3); + }); + }); + }); + + describe('context propagation', () => { + beforeEach(() => { + patchProducerSend(async (): Promise => []); + storeRunConfig(); + instrumentation.disable(); + instrumentation.enable(); + producer = kafka.producer(); + consumer = kafka.consumer({ groupId: 'testing-group-id' }); + }); + + it('context injected in producer is extracted in consumer', async () => { + let callbackBaggage: Baggage | undefined; + consumer.run({ + eachMessage: async (_payload: EachMessagePayload): Promise => { + callbackBaggage = propagation.getBaggage(context.active()); + }, + }); + + await context.with( + propagation.setBaggage( + context.active(), + propagation.createBaggage({ foo: { value: 'bar' } }) + ), + async () => { + await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'testing message content', + }, + ], + }); + } + ); + + assert.strictEqual(messagesSent.length, 1); + const consumerPayload: EachMessagePayload = { + topic: 'topic-name-1', + partition: 0, + message: { + key: Buffer.alloc(0), + value: Buffer.alloc(0), + timestamp: '1234', + attributes: 0, + offset: '0', + headers: messagesSent[0].headers ?? {}, + }, + heartbeat: async () => {}, + pause: () => () => {}, + }; + await runConfig?.eachMessage!(consumerPayload); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 2); + const [producerSpan, consumerSpan] = spans; + assert.strictEqual( + consumerSpan.spanContext().traceId, + producerSpan.spanContext().traceId + ); + assert.strictEqual( + consumerSpan.parentSpanId, + producerSpan.spanContext().spanId + ); + assert.strictEqual(callbackBaggage!.getAllEntries().length, 1); + assert.strictEqual(callbackBaggage!.getEntry('foo')?.value, 'bar'); + }); + + it('context injected in producer is extracted as links in batch consumer', async () => { + consumer.run({ + eachBatch: async (_payload: EachBatchPayload): Promise => {}, + }); + + await producer.send({ + topic: 'topic-name-1', + messages: [ + { + value: 'testing message content', + }, + ], + }); + + assert.strictEqual(messagesSent.length, 1); + const consumerPayload: EachBatchPayload = { + batch: { + topic: 'topic-name-1', + partition: 0, + highWatermark: '1234', + messages: [ + { + key: Buffer.alloc(0), + value: Buffer.alloc(0), + timestamp: '1234', + size: 0, + attributes: 0, + offset: '0', + headers: messagesSent[0].headers, + }, + ], + }, + } as EachBatchPayload; + await runConfig?.eachBatch!(consumerPayload); + + const spans = getTestSpans(); + assert.strictEqual(spans.length, 3); + const [producerSpan, receivingSpan, processingSpan] = spans; + + // processing span should be the child of receiving span and link to relevant producer + assert.strictEqual( + processingSpan.spanContext().traceId, + receivingSpan.spanContext().traceId + ); + assert.strictEqual( + processingSpan.parentSpanId, + receivingSpan.spanContext().spanId + ); + assert.strictEqual(processingSpan.links.length, 1); + assert.strictEqual( + processingSpan.links[0].context.traceId, + producerSpan.spanContext().traceId + ); + assert.strictEqual( + processingSpan.links[0].context.spanId, + producerSpan.spanContext().spanId + ); + + // receiving span should start a new trace + assert.strictEqual(receivingSpan.parentSpanId, undefined); + assert.notStrictEqual( + receivingSpan.spanContext().traceId, + producerSpan.spanContext().traceId + ); + }); + }); + + describe('bufferTextMapGetter', () => { + it('is possible to retrieve keys case insensitively', () => { + assert.strictEqual( + bufferTextMapGetter.get( + { + 'X-B3-Trace-Id': '123', + }, + 'x-b3-trace-id' + ), + '123' + ); + }); + }); +}); diff --git a/plugins/node/instrumentation-kafkajs/tsconfig.json b/plugins/node/instrumentation-kafkajs/tsconfig.json new file mode 100644 index 0000000000..28be80d266 --- /dev/null +++ b/plugins/node/instrumentation-kafkajs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.base", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ] +} 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/README.md b/plugins/node/instrumentation-lru-memoizer/README.md index b76f1f5abf..d59881a792 100644 --- a/plugins/node/instrumentation-lru-memoizer/README.md +++ b/plugins/node/instrumentation-lru-memoizer/README.md @@ -1,9 +1,9 @@ -# OpenTelemetry lru-memorizer Instrumentation for Node.js +# OpenTelemetry lru-memoizer Instrumentation for Node.js [![NPM Published Version][npm-img]][npm-url] [![Apache License][license-image]][license-image] -This module provides automatic instrumentation for the [`lru-memorizer`](https://github.com/jfromaniello/lru-memoizer) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle. +This module provides automatic instrumentation for the [`lru-memoizer`](https://github.com/jfromaniello/lru-memoizer) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle. If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience. @@ -40,6 +40,10 @@ registerInstrumentations({ }) ``` +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - For more information on OpenTelemetry, visit: 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/package.json b/plugins/node/instrumentation-mongoose/package.json index dbafc9af61..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,7 +61,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/instrumentation-mongoose#readme" diff --git a/plugins/node/instrumentation-mongoose/src/mongoose.ts b/plugins/node/instrumentation-mongoose/src/mongoose.ts index 96bf8f3734..ff76b33735 100644 --- a/plugins/node/instrumentation-mongoose/src/mongoose.ts +++ b/plugins/node/instrumentation-mongoose/src/mongoose.ts @@ -57,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), @@ -126,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; @@ -142,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 ( @@ -184,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 ( @@ -227,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 ( @@ -276,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()); @@ -291,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()); 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/package.json b/plugins/node/instrumentation-runtime-node/package.json index f4bf1bd946..1d0759a869 100644 --- a/plugins/node/instrumentation-runtime-node/package.json +++ b/plugins/node/instrumentation-runtime-node/package.json @@ -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/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/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md b/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md index 6bfef574ff..6ba8902186 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-aws-lambda-v0.41.0...instrumentation-aws-lambda-v0.41.1) (2024-05-15) + + +### Bug Fixes + +* **aws-lambda:** update semconv package and readme ([#2181](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2181)) ([b432929](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/b432929f4b5682e7879c50682547cea25790c588)) + +## [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/README.md b/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md index 8a3c533c5c..59543ddb2d 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md @@ -82,6 +82,18 @@ The `lambdaHandler` should be specified as a string in the format `. diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index 92b33aefc3..425b3860b4 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.1", "description": "OpenTelemetry AWS Lambda automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -56,10 +56,10 @@ "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", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/aws-lambda": "8.10.122" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-aws-lambda#readme" 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/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/README.md b/plugins/node/opentelemetry-instrumentation-bunyan/README.md index 3b13bd7667..84bf360858 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/README.md +++ b/plugins/node/opentelemetry-instrumentation-bunyan/README.md @@ -118,6 +118,10 @@ const logger = bunyan.createLogger({ }); ``` +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/package.json b/plugins/node/opentelemetry-instrumentation-bunyan/package.json index 2ba62b7309..e9721696df 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,10 +46,10 @@ "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", + "@opentelemetry/semantic-conventions": "^1.23.0", "@types/mocha": "7.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -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-bunyan/test/bunyan.test.ts b/plugins/node/opentelemetry-instrumentation-bunyan/test/bunyan.test.ts index 13f2cf3356..deaf2fb1e7 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/test/bunyan.test.ts +++ b/plugins/node/opentelemetry-instrumentation-bunyan/test/bunyan.test.ts @@ -28,7 +28,7 @@ import { import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { isWrapped } from '@opentelemetry/instrumentation'; import { Resource } from '@opentelemetry/resources'; -import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { Writable } from 'stream'; @@ -48,7 +48,7 @@ tracerProvider.addSpanProcessor( const tracer = tracerProvider.getTracer('default'); const resource = new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'test-instrumentation-bunyan', + [SEMRESATTRS_SERVICE_NAME]: 'test-instrumentation-bunyan', }); const loggerProvider = new LoggerProvider({ resource }); const memExporter = new InMemoryLogRecordExporter(); 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/README.md b/plugins/node/opentelemetry-instrumentation-cassandra/README.md index 637bcf4fa2..ce80ed50ee 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/README.md +++ b/plugins/node/opentelemetry-instrumentation-cassandra/README.md @@ -49,11 +49,26 @@ 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: -* For more about OpenTelemetry JavaScript: -* For help or feedback on this project, join us in [GitHub Discussions][discussions-url] +- 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 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..4cb07d3b39 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-connect/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.36.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-connect-v0.36.0...instrumentation-connect-v0.36.1) (2024-05-15) + + +### Bug Fixes + +* **instrumentation-connect:** add source maps to package ([#2200](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2200)) ([1ffc631](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/1ffc631a7fed330b1677ed17bad87b305edcbed7)) + +## [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/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..07e97d8ced 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.1", "description": "OpenTelemetry connect automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -32,6 +32,7 @@ }, "files": [ "build/src/**/*.js", + "build/src/**/*.js.map", "build/src/**/*.d.ts" ], "publishConfig": { @@ -56,8 +57,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/README.md b/plugins/node/opentelemetry-instrumentation-dns/README.md index 70265054a6..74d7e2a7bd 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/README.md +++ b/plugins/node/opentelemetry-instrumentation-dns/README.md @@ -46,6 +46,10 @@ DNS instrumentation has currently one option. You can set the following: | ------- | ---- | ----------- | | [`ignoreHostnames`](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-dns/src/types.ts#L99) | `IgnoreMatcher | IgnoreMatcher[]` | DNS instrumentation will not trace all requests that match hostnames | +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-dns/package.json b/plugins/node/opentelemetry-instrumentation-dns/package.json index 6f28ccf5fb..e43d0f8a44 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,8 +59,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", - "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/instrumentation": "^0.51.0", "semver": "^7.5.4" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-dns#readme" 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..06caf59945 100644 --- a/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md +++ b/plugins/node/opentelemetry-instrumentation-express/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [0.39.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/instrumentation-express-v0.38.0...instrumentation-express-v0.39.0) (2024-05-15) + + +### Features + +* **instrumentation-express:** Support non-string routes ([#2008](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2008)) ([525bbba](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/525bbba67accc20eeb96899ab7dc9ccb125a4b2d)) + +## [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/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..63ada7f239 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.39.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/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/README.md b/plugins/node/opentelemetry-instrumentation-generic-pool/README.md index c839c0345c..ea9dee4228 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/README.md +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/README.md @@ -38,6 +38,10 @@ registerInstrumentations({ }); ``` +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json index 05466afff6..637560de0b 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,8 +59,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@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/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/README.md b/plugins/node/opentelemetry-instrumentation-graphql/README.md index aa8877be23..9344e8ed19 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/README.md +++ b/plugins/node/opentelemetry-instrumentation-graphql/README.md @@ -116,6 +116,10 @@ Downstream spans in the context of all resolvers will be child of the first span Can be found [here](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/graphql) +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index 9594358c0a..bdcb66cc6e 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", @@ -46,7 +46,7 @@ "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/sdk-trace-base": "^1.8.0", - "@opentelemetry/semantic-conventions": "^1.3.1", + "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mocha": "8.2.3", "@types/node": "18.6.5", "graphql": "^16.5.0", @@ -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-graphql/test/graphql.test.ts b/plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts index 3522290110..661304a212 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts +++ b/plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts @@ -21,7 +21,7 @@ import { SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; import { Span, SpanStatusCode } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_EXCEPTION_MESSAGE } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; import type * as graphqlTypes from 'graphql'; import { GraphQLInstrumentation } from '../src'; @@ -1399,7 +1399,7 @@ describe('graphql', () => { const resolveEvent = resolveSpan.events[0]; assert.deepStrictEqual(resolveEvent.name, 'exception'); assert.deepStrictEqual( - resolveEvent.attributes?.[SemanticAttributes.EXCEPTION_MESSAGE], + resolveEvent.attributes?.[SEMATTRS_EXCEPTION_MESSAGE], 'sync resolver error from tests' ); 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/README.md b/plugins/node/opentelemetry-instrumentation-hapi/README.md index 5868e6a53c..c9b4062ea5 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 @@ -66,6 +66,17 @@ The dev dependency of `@hapi/podium@4.1.1` is required to force the compatible t This package provides automatic tracing for hapi server routes and [request lifecycle](https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle) extensions defined either directly or via a Hapi plugin. +## 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.method` | HTTP method | +| `http.route` | Route assigned to handler. Ex: `/users/:id` | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-hapi/package.json b/plugins/node/opentelemetry-instrumentation-hapi/package.json index d595016b9b..f0f454b0dc 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,15 @@ "@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/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", "@types/node": "18.6.5", + "joi": "17.12.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "5.0.5", @@ -59,9 +61,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.22.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..0b18fc5dfd 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,42 @@ 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'], + (module: any) => { + const moduleExports: typeof Hapi = + module[Symbol.toStringTag] === 'Module' ? module.default : module; 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'); + (module: any) => { + const moduleExports: typeof Hapi = + module[Symbol.toStringTag] === 'Module' ? module.default : module; this._massUnwrap([moduleExports], ['server', 'Server']); } ); @@ -140,7 +139,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 +146,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 +172,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 +233,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 +269,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 +308,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 +370,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 +389,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 +402,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..c8b829e25a 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/src/utils.ts @@ -15,11 +15,15 @@ */ import { SpanAttributes } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_HTTP_METHOD, + SEMATTRS_HTTP_ROUTE, +} from '@opentelemetry/semantic-conventions'; import type * as Hapi from '@hapi/hapi'; import { HapiLayerType, HapiLifecycleMethodNames, + HapiPluginObject, PatchableExtMethod, ServerExtDirectInput, } from './internal-types'; @@ -76,8 +80,8 @@ export const getRouteMetadata = ( if (pluginName) { return { attributes: { - [SemanticAttributes.HTTP_ROUTE]: route.path, - [SemanticAttributes.HTTP_METHOD]: route.method, + [SEMATTRS_HTTP_ROUTE]: route.path, + [SEMATTRS_HTTP_METHOD]: route.method, [AttributeNames.HAPI_TYPE]: HapiLayerType.PLUGIN, [AttributeNames.PLUGIN_NAME]: pluginName, }, @@ -86,8 +90,8 @@ export const getRouteMetadata = ( } return { attributes: { - [SemanticAttributes.HTTP_ROUTE]: route.path, - [SemanticAttributes.HTTP_METHOD]: route.method, + [SEMATTRS_HTTP_ROUTE]: route.path, + [SEMATTRS_HTTP_METHOD]: route.method, [AttributeNames.HAPI_TYPE]: HapiLayerType.ROUTER, }, name: `route - ${route.path}`, @@ -119,3 +123,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/fixtures/use-hapi.mjs b/plugins/node/opentelemetry-instrumentation-hapi/test/fixtures/use-hapi.mjs new file mode 100644 index 0000000000..f79b48f8e3 --- /dev/null +++ b/plugins/node/opentelemetry-instrumentation-hapi/test/fixtures/use-hapi.mjs @@ -0,0 +1,64 @@ +/* + * 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 hapi from an ES module: +// node --experimental-loader=@opentelemetry/instrumentation/hook.mjs use-hapi.mjs + +import { createTestNodeSdk } from '@opentelemetry/contrib-test-utils'; + +import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; +import { HapiInstrumentation } from '../../build/src/index.js'; + +const sdk = createTestNodeSdk({ + serviceName: 'use-hapi', + instrumentations: [ + new HttpInstrumentation(), + new HapiInstrumentation() + ] +}) +sdk.start(); + +import Hapi from '@hapi/hapi'; +import http from 'http'; + +// Start a Hapi server. +const server = new Hapi.Server({ + port: 0, + host: 'localhost' +}); + +server.route({ + method: 'GET', + path: '/route/{param}', + handler: function() { + return { hello: 'world' }; + } +}); + +await server.start(); + +// Make a single request to it. +await new Promise(resolve => { + http.get(`http://${server.info.host}:${server.info.port}/route/test`, (res) => { + res.resume(); + res.on('end', () => { + resolve(); + }); + }) +}); + +await server.stop(); +await sdk.shutdown(); diff --git a/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts b/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts index 86eb626c76..af87e04901 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts @@ -22,6 +22,10 @@ import { InMemorySpanExporter, SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; +import { + runTestFixture, + TestCollector, +} from '@opentelemetry/contrib-test-utils'; import { getPlugin } from './plugin'; const plugin = getPlugin(); @@ -153,6 +157,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({ @@ -491,4 +541,35 @@ describe('Hapi Instrumentation - Core Tests', () => { ); }); }); + + describe('ESM', () => { + it('should work with ESM modules', async () => { + await runTestFixture({ + cwd: __dirname, + argv: ['fixtures/use-hapi.mjs'], + env: { + NODE_OPTIONS: + '--experimental-loader=@opentelemetry/instrumentation/hook.mjs', + NODE_NO_WARNINGS: '1', + }, + checkResult: (err, stdout, stderr) => { + assert.ifError(err); + }, + checkCollector: (collector: TestCollector) => { + const spans = collector.sortedSpans; + assert.strictEqual(spans.length, 2); + assert.strictEqual(spans[0].name, 'GET /route/{param}'); + assert.strictEqual( + spans[0].instrumentationScope.name, + '@opentelemetry/instrumentation-http' + ); + assert.strictEqual(spans[1].name, 'route - /route/{param}'); + assert.strictEqual( + spans[1].instrumentationScope.name, + '@opentelemetry/instrumentation-hapi' + ); + }, + }); + }); + }); }); 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/README.md b/plugins/node/opentelemetry-instrumentation-ioredis/README.md index 61444f28e7..907eba1995 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/README.md +++ b/plugins/node/opentelemetry-instrumentation-ioredis/README.md @@ -98,6 +98,20 @@ requestHook: 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.connection_string` | The connection string used to connect to the database. | +| `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. | +| `net.peer.port` | Remote port number. | + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/package.json b/plugins/node/opentelemetry-instrumentation-ioredis/package.json index 4ecc2eb1b3..a8a4e57d5e 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,13 +64,12 @@ "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/semantic-conventions": "^1.0.0" + "@opentelemetry/instrumentation": "^0.51.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.23.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..34930c354b 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts @@ -23,8 +23,12 @@ import { import { IORedisInstrumentationConfig } from './types'; import { IORedisCommand, RedisInterface } from './internal-types'; 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 { endSpan } from './utils'; @@ -35,18 +39,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 +60,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 +84,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'); } @@ -121,11 +125,8 @@ export class IORedisInstrumentation extends InstrumentationBase { const span = instrumentation.tracer.startSpan(cmd.name, { kind: SpanKind.CLIENT, attributes: { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.REDIS, - [SemanticAttributes.DB_STATEMENT]: dbStatementSerializer( - cmd.name, - cmd.args - ), + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_REDIS, + [SEMATTRS_DB_STATEMENT]: dbStatementSerializer(cmd.name, cmd.args), }, }); @@ -149,9 +150,9 @@ export class IORedisInstrumentation extends InstrumentationBase { const { host, port } = this.options; span.setAttributes({ - [SemanticAttributes.NET_PEER_NAME]: host, - [SemanticAttributes.NET_PEER_PORT]: port, - [SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`, + [SEMATTRS_NET_PEER_NAME]: host, + [SEMATTRS_NET_PEER_PORT]: port, + [SEMATTRS_DB_CONNECTION_STRING]: `redis://${host}:${port}`, }); try { @@ -201,16 +202,16 @@ export class IORedisInstrumentation extends InstrumentationBase { const span = instrumentation.tracer.startSpan('connect', { kind: SpanKind.CLIENT, attributes: { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.REDIS, - [SemanticAttributes.DB_STATEMENT]: 'connect', + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_REDIS, + [SEMATTRS_DB_STATEMENT]: 'connect', }, }); const { host, port } = this.options; span.setAttributes({ - [SemanticAttributes.NET_PEER_NAME]: host, - [SemanticAttributes.NET_PEER_PORT]: port, - [SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`, + [SEMATTRS_NET_PEER_NAME]: host, + [SEMATTRS_NET_PEER_PORT]: port, + [SEMATTRS_DB_CONNECTION_STRING]: `redis://${host}:${port}`, }); try { const client = original.apply(this, arguments); diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts b/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts index a4ba97d185..6dad19a9e4 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/test/ioredis.test.ts @@ -40,8 +40,15 @@ import { IORedisRequestHookInformation, } from '../src/types'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_REDIS, + SEMATTRS_DB_CONNECTION_STRING, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, + SEMATTRS_EXCEPTION_MESSAGE, + SEMATTRS_EXCEPTION_STACKTRACE, + SEMATTRS_EXCEPTION_TYPE, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; const memoryExporter = new InMemorySpanExporter(); @@ -54,10 +61,10 @@ const CONFIG = { const REDIS_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]: REDIS_URL, + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_REDIS, + [SEMATTRS_NET_PEER_NAME]: CONFIG.host, + [SEMATTRS_NET_PEER_PORT]: CONFIG.port, + [SEMATTRS_DB_CONNECTION_STRING]: REDIS_URL, }; const unsetStatus: SpanStatus = { @@ -69,9 +76,8 @@ const predictableStackTrace = const sanitizeEventForAssertion = (span: ReadableSpan) => { span.events.forEach(e => { // stack trace includes data such as /user/{userName}/repos/{projectName} - if (e.attributes?.[SemanticAttributes.EXCEPTION_STACKTRACE]) { - e.attributes[SemanticAttributes.EXCEPTION_STACKTRACE] = - predictableStackTrace; + if (e.attributes?.[SEMATTRS_EXCEPTION_STACKTRACE]) { + e.attributes[SEMATTRS_EXCEPTION_STACKTRACE] = predictableStackTrace; } // since time will change on each test invocation, it is being replaced to predicable value @@ -134,7 +140,7 @@ describe('ioredis', () => { let client: ioredisTypes.Redis; const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: 'connect', + [SEMATTRS_DB_STATEMENT]: 'connect', }; const readyHandler = () => { const endedSpans = memoryExporter.getFinishedSpans(); @@ -244,7 +250,7 @@ describe('ioredis', () => { it(`should create a child span for cb style ${command.description}`, done => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: `${command.name} ${command.expectedDbStatement}`, + [SEMATTRS_DB_STATEMENT]: `${command.name} ${command.expectedDbStatement}`, }; const span = provider .getTracer('ioredis-test') @@ -274,7 +280,7 @@ describe('ioredis', () => { it('should create a child span for hset promise', async () => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: `hset ${hashKeyName} random [1 other arguments]`, + [SEMATTRS_DB_STATEMENT]: `hset ${hashKeyName} random [1 other arguments]`, }; const span = provider.getTracer('ioredis-test').startSpan('test span'); await context.with(trace.setSpan(context.active(), span), async () => { @@ -316,17 +322,15 @@ describe('ioredis', () => { const exceptionEvent = ioredisSpan.events[0]; assert.strictEqual(exceptionEvent.name, 'exception'); assert.strictEqual( - exceptionEvent.attributes?.[SemanticAttributes.EXCEPTION_MESSAGE], + exceptionEvent.attributes?.[SEMATTRS_EXCEPTION_MESSAGE], ex.message ); assert.strictEqual( - exceptionEvent.attributes?.[ - SemanticAttributes.EXCEPTION_STACKTRACE - ], + exceptionEvent.attributes?.[SEMATTRS_EXCEPTION_STACKTRACE], ex.stack ); assert.strictEqual( - exceptionEvent.attributes?.[SemanticAttributes.EXCEPTION_TYPE], + exceptionEvent.attributes?.[SEMATTRS_EXCEPTION_TYPE], ex.name ); } @@ -336,7 +340,7 @@ describe('ioredis', () => { it('should create a child span for streamify scanning', done => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: 'scan 0 MATCH test-* COUNT 1000', + [SEMATTRS_DB_STATEMENT]: 'scan 0 MATCH test-* COUNT 1000', }; const span = provider.getTracer('ioredis-test').startSpan('test span'); context.with(trace.setSpan(context.active(), span), () => { @@ -412,7 +416,7 @@ describe('ioredis', () => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: 'subscribe news music', + [SEMATTRS_DB_STATEMENT]: 'subscribe news music', }; testUtils.assertSpan( endedSpans[4], @@ -431,7 +435,7 @@ describe('ioredis', () => { it('should create a child span for multi/transaction', done => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: 'multi', + [SEMATTRS_DB_STATEMENT]: 'multi', }; const span = provider.getTracer('ioredis-test').startSpan('test span'); @@ -467,7 +471,7 @@ describe('ioredis', () => { it('should create a child span for pipeline', done => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: 'set foo [1 other arguments]', + [SEMATTRS_DB_STATEMENT]: 'set foo [1 other arguments]', }; const span = provider.getTracer('ioredis-test').startSpan('test span'); @@ -501,7 +505,7 @@ describe('ioredis', () => { it('should create a child span for get promise', async () => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: `get ${testKeyName}`, + [SEMATTRS_DB_STATEMENT]: `get ${testKeyName}`, }; const span = provider.getTracer('ioredis-test').startSpan('test span'); await context.with(trace.setSpan(context.active(), span), async () => { @@ -530,7 +534,7 @@ describe('ioredis', () => { it('should create a child span for del', async () => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: `del ${testKeyName}`, + [SEMATTRS_DB_STATEMENT]: `del ${testKeyName}`, }; const span = provider.getTracer('ioredis-test').startSpan('test span'); await context.with(trace.setSpan(context.active(), span), async () => { @@ -564,7 +568,7 @@ describe('ioredis', () => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: `evalsha bfbf458525d6a0b19200bfd6db3af481156b367b 1 ${testKeyName}`, + [SEMATTRS_DB_STATEMENT]: `evalsha bfbf458525d6a0b19200bfd6db3af481156b367b 1 ${testKeyName}`, }; const span = provider.getTracer('ioredis-test').startSpan('test span'); @@ -597,11 +601,10 @@ describe('ioredis', () => { [ { attributes: { - [SemanticAttributes.EXCEPTION_MESSAGE]: + [SEMATTRS_EXCEPTION_MESSAGE]: 'NOSCRIPT No matching script. Please use EVAL.', - [SemanticAttributes.EXCEPTION_STACKTRACE]: - predictableStackTrace, - [SemanticAttributes.EXCEPTION_TYPE]: 'ReplyError', + [SEMATTRS_EXCEPTION_STACKTRACE]: predictableStackTrace, + [SEMATTRS_EXCEPTION_TYPE]: 'ReplyError', }, name: 'exception', time: [0, 0], @@ -672,7 +675,7 @@ describe('ioredis', () => { SpanKind.CLIENT, { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: `set ${testKeyName} [1 other arguments]`, + [SEMATTRS_DB_STATEMENT]: `set ${testKeyName} [1 other arguments]`, }, [], unsetStatus @@ -698,7 +701,7 @@ describe('ioredis', () => { SpanKind.CLIENT, { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: 'connect', + [SEMATTRS_DB_STATEMENT]: 'connect', }, [], unsetStatus @@ -747,7 +750,7 @@ describe('ioredis', () => { it(`should tag the span with a custom db.statement for cb style ${command.description}`, done => { const attributes = { ...DEFAULT_ATTRIBUTES, - [SemanticAttributes.DB_STATEMENT]: dbStatementSerializer( + [SEMATTRS_DB_STATEMENT]: dbStatementSerializer( command.name, command.args ), @@ -990,7 +993,7 @@ describe('ioredis', () => { 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-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/package.json b/plugins/node/opentelemetry-instrumentation-knex/package.json index 5a8b7078c6..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,7 +57,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@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-knex#readme" diff --git a/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts index bb6e6114b5..762b9d1455 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts @@ -37,14 +37,12 @@ import { 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}`, @@ -54,7 +52,7 @@ export class KnexInstrumentation extends InstrumentationBase { } init() { - const module = new InstrumentationNodeModuleDefinition( + const module = new InstrumentationNodeModuleDefinition( constants.MODULE_NAME, constants.SUPPORTED_VERSIONS ); @@ -71,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) @@ -87,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; } @@ -97,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'); @@ -175,6 +157,7 @@ export class KnexInstrumentation extends InstrumentationBase { const span = instrumentation.tracer.startSpan( utils.getName(name, operation, table), { + kind: api.SpanKind.CLIENT, attributes, }, parent @@ -216,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/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/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/README.md b/plugins/node/opentelemetry-instrumentation-memcached/README.md index 6913253d98..24e6477889 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/README.md +++ b/plugins/node/opentelemetry-instrumentation-memcached/README.md @@ -48,6 +48,20 @@ registerInstrumentations({ | ------- | ---- | ------- | ----------- | | `enhancedDatabaseReporting` | `boolean` | `false` | Include full command statement in the span - **leaks potentially sensitive information to your spans**. Defaults to `false`. | +## 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.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. | +| `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-memcached/package.json b/plugins/node/opentelemetry-instrumentation-memcached/package.json index a329872649..bf47bf5d4a 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,8 +60,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.23.0", "@types/memcached": "^2.2.6" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-memcached#readme" diff --git a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts index afa205dad9..b72ab76896 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts @@ -22,17 +22,19 @@ import { } from '@opentelemetry/instrumentation'; import type * as Memcached from 'memcached'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MEMCACHED, + SEMATTRS_DB_OPERATION, + SEMATTRS_DB_STATEMENT, + SEMATTRS_DB_SYSTEM, } from '@opentelemetry/semantic-conventions'; 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, + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_MEMCACHED, }; static readonly DEFAULT_CONFIG: InstrumentationConfig = { enhancedDatabaseReporting: false, @@ -52,25 +54,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); @@ -142,8 +137,8 @@ export class Instrumentation extends InstrumentationBase { span.setAttributes({ 'db.memcached.key': query.key, 'db.memcached.lifetime': query.lifetime, - [SemanticAttributes.DB_OPERATION]: query.type, - [SemanticAttributes.DB_STATEMENT]: ( + [SEMATTRS_DB_OPERATION]: query.type, + [SEMATTRS_DB_STATEMENT]: ( instrumentation._config as InstrumentationConfig ).enhancedDatabaseReporting ? query.command @@ -175,14 +170,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-memcached/src/utils.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/utils.ts index 4cebd4112e..f8f517071d 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/utils.ts @@ -15,7 +15,10 @@ */ import type * as Memcached from 'memcached'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, +} from '@opentelemetry/semantic-conventions'; export const getPeerAttributes = ( client: any /* Memcached, but the type definitions are lacking */, @@ -49,12 +52,12 @@ export const getPeerAttributes = ( const portNumber = parseInt(port, 10); if (!isNaN(portNumber)) { return { - [SemanticAttributes.NET_PEER_NAME]: host, - [SemanticAttributes.NET_PEER_PORT]: portNumber, + [SEMATTRS_NET_PEER_NAME]: host, + [SEMATTRS_NET_PEER_PORT]: portNumber, }; } return { - [SemanticAttributes.NET_PEER_NAME]: host, + [SEMATTRS_NET_PEER_NAME]: host, }; } } diff --git a/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts b/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts index 87b96b537e..4e32af5fa6 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/test/index.test.ts @@ -32,8 +32,11 @@ import type * as Memcached from 'memcached'; import * as assert from 'assert'; import Instrumentation from '../src'; import { - DbSystemValues, - SemanticAttributes, + DBSYSTEMVALUES_MEMCACHED, + SEMATTRS_DB_SYSTEM, + SEMATTRS_EXCEPTION_MESSAGE, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; import * as util from 'util'; @@ -48,9 +51,9 @@ const CONFIG = { }; const DEFAULT_ATTRIBUTES: Attributes = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.MEMCACHED, - [SemanticAttributes.NET_PEER_NAME]: CONFIG.host, - [SemanticAttributes.NET_PEER_PORT]: CONFIG.port, + [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_MEMCACHED, + [SEMATTRS_NET_PEER_NAME]: CONFIG.host, + [SEMATTRS_NET_PEER_PORT]: CONFIG.port, }; interface ExtendedMemcached extends Memcached { @@ -178,7 +181,7 @@ describe('memcached@2.x', () => { assertMatch( instrumentationSpans?.[0]?.events[0]?.attributes?.[ - SemanticAttributes.EXCEPTION_MESSAGE + SEMATTRS_EXCEPTION_MESSAGE ] as 'string', /not stored/ ); 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/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/package.json b/plugins/node/opentelemetry-instrumentation-mysql/package.json index 13d2c6d3af..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,7 +59,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.50.0", + "@opentelemetry/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", "@types/mysql": "2.15.22" }, diff --git a/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts index 9ff48fd684..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, @@ -51,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 = { [SEMATTRS_DB_SYSTEM]: DBSYSTEMVALUES_MYSQL, }; private _connectionsUsage!: UpDownCounter; - constructor(config?: MySQLInstrumentationConfig) { + constructor(config: MySQLInstrumentationConfig = {}) { super('@opentelemetry/instrumentation-mysql', VERSION, config); this._setMetricInstruments(); } @@ -82,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'); } @@ -98,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'); } @@ -108,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'); } @@ -120,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'); @@ -134,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 @@ -157,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); @@ -177,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; @@ -200,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); @@ -219,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']) { @@ -245,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, @@ -312,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, 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/package.json b/plugins/node/opentelemetry-instrumentation-mysql2/package.json index 5d7d885d02..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/instrumentation": "^0.51.0", "@opentelemetry/semantic-conventions": "^1.22.0", - "@opentelemetry/sql-common": "^0.40.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 2d79311bcb..ade7fd117f 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts @@ -39,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 = { [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'); } @@ -93,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, 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/README.md b/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md index 1b24dc360d..ac24133fa3 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md @@ -48,19 +48,23 @@ registerInstrumentations({ `.` | `request_context` | Traces the whole request context. | `http.*`, `nestjs.callback` `` | `handler` | Traces the work of a specific controller member function. | `nestjs.callback` -### Attributes - -| Name | Description -| ---- | ---- -| `component`* | "@nestjs/core" -| `nestjs.version`* | Version of instrumented `@nestjs/core` package -| `nestjs.type`* | See [NestType](./src/enums/NestType.ts) -| `nestjs.module` | Nest module class name -| `nestjs.controller` | Nest controller class name -| `nestjs.callback` | The function name of the member in the controller -| `http.method` | HTTP method -| `http.url` | Full request URL -| `http.route` | Route assigned to handler. Ex: `/users/:id` +## 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 | +|---------------------|----------------------------------------------------| +| `component`* | "@nestjs/core" | +| `nestjs.version`* | Version of instrumented `@nestjs/core` package | +| `nestjs.type`* | See [NestType](./src/enums/NestType.ts) | +| `nestjs.module` | Nest module class name | +| `nestjs.controller` | Nest controller class name | +| `nestjs.callback` | The function name of the member in the controller | +| `http.method` | HTTP method | +| `http.url` | Full request URL | +| `http.route` | Route assigned to handler. Ex: `/users/:id` | \* included in all of the spans. diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json index b831d12ff9..cf31974c6b 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,8 +70,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.23.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..9f90a7c1b8 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts @@ -25,36 +25,28 @@ import { import type { NestFactory } from '@nestjs/core/nest-factory.js'; import type { RouterExecutionContext } from '@nestjs/core/router/router-execution-context.js'; import type { Controller } from '@nestjs/common/interfaces'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { + SEMATTRS_HTTP_METHOD, + SEMATTRS_HTTP_ROUTE, + SEMATTRS_HTTP_URL, +} 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 +58,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 +76,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 +97,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,29 +152,29 @@ 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, [AttributeNames.VERSION]: moduleVersion, [AttributeNames.TYPE]: NestType.REQUEST_CONTEXT, - [SemanticAttributes.HTTP_METHOD]: req.method, - [SemanticAttributes.HTTP_URL]: req.originalUrl || req.url, - [SemanticAttributes.HTTP_ROUTE]: + [SEMATTRS_HTTP_METHOD]: req.method, + [SEMATTRS_HTTP_URL]: req.originalUrl || req.url, + [SEMATTRS_HTTP_ROUTE]: req.route?.path || req.routeOptions?.url || req.routerPath, [AttributeNames.CONTROLLER]: instanceName, [AttributeNames.CALLBACK]: callbackName, @@ -215,15 +201,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/README.md b/plugins/node/opentelemetry-instrumentation-net/README.md index d63211a389..60fc7ca98a 100644 --- a/plugins/node/opentelemetry-instrumentation-net/README.md +++ b/plugins/node/opentelemetry-instrumentation-net/README.md @@ -35,23 +35,26 @@ registerInstrumentations({ }); ``` -### Attributes added to `connect` spans +## Semantic Conventions -* `net.transport`: `IP.TCP`, `pipe` or `Unix` -* `net.peer.name`: host name or the IPC file path +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) -For TCP: +Attributes added to `connect` spans: -* `net.peer.ip` -* `net.peer.port` -* `net.host.ip` -* `net.host.port` +| Attribute | Short Description | +|---------------------------|--------------------------------------------------------------------------| +| `net.transport` | `IP.TCP`, `pipe` or `Unix` | +| `net.peer.name` | Host name or the IPC file path | +| `net.peer.ip` (for TCP) | Remote address of the peer (dotted decimal for IPv4 or RFC5952 for IPv6) | +| `net.peer.port` (for TCP) | Remote port number | +| `net.host.ip` (for TCP) | Like net.peer.ip but for the host IP. Useful in case of a multi-IP host | +| `net.host.port` (for TCP) | Like net.peer.port but for the host port | ## 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] +- 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 diff --git a/plugins/node/opentelemetry-instrumentation-net/package.json b/plugins/node/opentelemetry-instrumentation-net/package.json index 60f25541be..b109a1c7c9 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,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.23.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..1cac375019 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, @@ -23,28 +23,33 @@ import { safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; import { - SemanticAttributes, - NetTransportValues, + SEMATTRS_NET_HOST_IP, + SEMATTRS_NET_HOST_PORT, + SEMATTRS_NET_PEER_IP, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, + SEMATTRS_NET_TRANSPORT, + NETTRANSPORTVALUES_IP_TCP, } 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 +61,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'); } ), @@ -185,8 +189,8 @@ export class NetInstrumentation extends InstrumentationBase { private _startIpcSpan(options: NormalizedOptions, socket: Socket) { const span = this.tracer.startSpan('ipc.connect', { attributes: { - [SemanticAttributes.NET_TRANSPORT]: IPC_TRANSPORT, - [SemanticAttributes.NET_PEER_NAME]: options.path, + [SEMATTRS_NET_TRANSPORT]: IPC_TRANSPORT, + [SEMATTRS_NET_PEER_NAME]: options.path, }, }); @@ -198,9 +202,9 @@ export class NetInstrumentation extends InstrumentationBase { private _startTcpSpan(options: NormalizedOptions, socket: Socket) { const span = this.tracer.startSpan('tcp.connect', { attributes: { - [SemanticAttributes.NET_TRANSPORT]: NetTransportValues.IP_TCP, - [SemanticAttributes.NET_PEER_NAME]: options.host, - [SemanticAttributes.NET_PEER_PORT]: options.port, + [SEMATTRS_NET_TRANSPORT]: NETTRANSPORTVALUES_IP_TCP, + [SEMATTRS_NET_PEER_NAME]: options.host, + [SEMATTRS_NET_PEER_PORT]: options.port, }, }); @@ -241,9 +245,9 @@ function registerListeners( const setHostAttributes = () => { span.setAttributes({ - [SemanticAttributes.NET_PEER_IP]: socket.remoteAddress, - [SemanticAttributes.NET_HOST_IP]: socket.localAddress, - [SemanticAttributes.NET_HOST_PORT]: socket.localPort, + [SEMATTRS_NET_PEER_IP]: socket.remoteAddress, + [SEMATTRS_NET_HOST_IP]: socket.localAddress, + [SEMATTRS_NET_HOST_PORT]: socket.localPort, }); }; 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-net/src/utils.ts b/plugins/node/opentelemetry-instrumentation-net/src/utils.ts index 8b013deead..8e1b67187b 100644 --- a/plugins/node/opentelemetry-instrumentation-net/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-net/src/utils.ts @@ -15,11 +15,14 @@ */ import { NormalizedOptions } from './internal-types'; -import { NetTransportValues } from '@opentelemetry/semantic-conventions'; +import { + NETTRANSPORTVALUES_PIPE, + NETTRANSPORTVALUES_UNIX, +} from '@opentelemetry/semantic-conventions'; import { platform } from 'os'; export const IPC_TRANSPORT = - platform() === 'win32' ? NetTransportValues.PIPE : NetTransportValues.UNIX; + platform() === 'win32' ? NETTRANSPORTVALUES_PIPE : NETTRANSPORTVALUES_UNIX; function getHost(args: unknown[]) { return typeof args[1] === 'string' ? args[1] : 'localhost'; diff --git a/plugins/node/opentelemetry-instrumentation-net/test/connect.test.ts b/plugins/node/opentelemetry-instrumentation-net/test/connect.test.ts index 1aefd0e466..55849289ee 100644 --- a/plugins/node/opentelemetry-instrumentation-net/test/connect.test.ts +++ b/plugins/node/opentelemetry-instrumentation-net/test/connect.test.ts @@ -19,7 +19,7 @@ import { InMemorySpanExporter, SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; +import { SEMATTRS_NET_TRANSPORT } from '@opentelemetry/semantic-conventions'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import * as net from 'net'; import * as assert from 'assert'; @@ -186,7 +186,7 @@ describe('NetInstrumentation', () => { try { const span = getSpan(); assert.strictEqual( - span.attributes[SemanticAttributes.NET_TRANSPORT], + span.attributes[SEMATTRS_NET_TRANSPORT], undefined ); assert.strictEqual(span.status.code, SpanStatusCode.ERROR); diff --git a/plugins/node/opentelemetry-instrumentation-net/test/utils.ts b/plugins/node/opentelemetry-instrumentation-net/test/utils.ts index 23bc6db72b..7d3651d2df 100644 --- a/plugins/node/opentelemetry-instrumentation-net/test/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-net/test/utils.ts @@ -17,8 +17,12 @@ import { SpanKind } from '@opentelemetry/api'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { - NetTransportValues, - SemanticAttributes, + NETTRANSPORTVALUES_IP_TCP, + SEMATTRS_NET_HOST_IP, + SEMATTRS_NET_HOST_PORT, + SEMATTRS_NET_PEER_NAME, + SEMATTRS_NET_PEER_PORT, + SEMATTRS_NET_TRANSPORT, } from '@opentelemetry/semantic-conventions'; import * as assert from 'assert'; import * as path from 'path'; @@ -37,21 +41,17 @@ export const IPC_PATH = export function assertTcpSpan(span: ReadableSpan, socket: Socket) { assertSpanKind(span); - assertAttrib( - span, - SemanticAttributes.NET_TRANSPORT, - NetTransportValues.IP_TCP - ); - assertAttrib(span, SemanticAttributes.NET_PEER_NAME, HOST); - assertAttrib(span, SemanticAttributes.NET_PEER_PORT, PORT); - assertAttrib(span, SemanticAttributes.NET_HOST_IP, socket.localAddress); - assertAttrib(span, SemanticAttributes.NET_HOST_PORT, socket.localPort); + assertAttrib(span, SEMATTRS_NET_TRANSPORT, NETTRANSPORTVALUES_IP_TCP); + assertAttrib(span, SEMATTRS_NET_PEER_NAME, HOST); + assertAttrib(span, SEMATTRS_NET_PEER_PORT, PORT); + assertAttrib(span, SEMATTRS_NET_HOST_IP, socket.localAddress); + assertAttrib(span, SEMATTRS_NET_HOST_PORT, socket.localPort); } export function assertIpcSpan(span: ReadableSpan) { assertSpanKind(span); - assertAttrib(span, SemanticAttributes.NET_TRANSPORT, IPC_TRANSPORT); - assertAttrib(span, SemanticAttributes.NET_PEER_NAME, IPC_PATH); + assertAttrib(span, SEMATTRS_NET_TRANSPORT, IPC_TRANSPORT); + assertAttrib(span, SEMATTRS_NET_PEER_NAME, IPC_PATH); } export function assertTLSSpan( @@ -60,17 +60,13 @@ export function assertTLSSpan( ) { assertParentChild(tlsSpan, netSpan); assertSpanKind(netSpan); - assertAttrib( - netSpan, - SemanticAttributes.NET_TRANSPORT, - NetTransportValues.IP_TCP - ); - assertAttrib(netSpan, SemanticAttributes.NET_PEER_NAME, HOST); - assertAttrib(netSpan, SemanticAttributes.NET_PEER_PORT, PORT); + assertAttrib(netSpan, SEMATTRS_NET_TRANSPORT, NETTRANSPORTVALUES_IP_TCP); + assertAttrib(netSpan, SEMATTRS_NET_PEER_NAME, HOST); + assertAttrib(netSpan, SEMATTRS_NET_PEER_PORT, PORT); // Node.JS 10 sets socket.localAddress & socket.localPort to "undefined" when a connection is // ended, so one of the tests fails, so we skip them for TLS - // assertAttrib(span, SemanticAttributes.NET_HOST_IP, socket.localAddress); - //assertAttrib(netSpan, SemanticAttributes.NET_HOST_PORT, socket.localPort); + // assertAttrib(span, SEMATTRS_NET_HOST_IP, socket.localAddress); + //assertAttrib(netSpan, SEMATTRS_NET_HOST_PORT, socket.localPort); assertAttrib(tlsSpan, TLSAttributes.PROTOCOL, 'TLSv1.2'); assertAttrib(tlsSpan, TLSAttributes.AUTHORIZED, 'true'); 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/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/README.md b/plugins/node/opentelemetry-instrumentation-pino/README.md index 7d8c7393f1..a4038c5f57 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/README.md +++ b/plugins/node/opentelemetry-instrumentation-pino/README.md @@ -55,21 +55,25 @@ logger.info('foobar'); For the current active span, the following fields are injected. These field names can be optionally configured via `logKeys` in the PinoInstrumentation config: -* `trace_id` -* `span_id` -* `trace_flags` +- `trace_id` +- `span_id` +- `trace_flags` When no span context is active or the span context is invalid, injection is skipped. ### Supported versions -`>=5.14.0 <9` +`>=5.14.0 <10` + +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. ## 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] +- 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 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-pino/test/pino-enabled.test.ts b/plugins/node/opentelemetry-instrumentation-pino/test/pino-enabled.test.ts index 10bce070dc..63d42c462e 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/test/pino-enabled.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pino/test/pino-enabled.test.ts @@ -33,6 +33,10 @@ import { testInjection, testNoInjection, } from './common'; +import { + runTestFixture, + TestCollector, +} from '@opentelemetry/contrib-test-utils'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; @@ -235,4 +239,74 @@ describe('PinoInstrumentation', () => { }); }); }); + describe('ESM usage', () => { + beforeEach(() => { + testContext = setupInstrumentationAndInitTestContext(); + }); + it('should work with ESM default import', async function () { + testContext = setupInstrumentationAndInitTestContext(); + let logRecords: any[]; + await runTestFixture({ + cwd: __dirname, + argv: ['fixtures/use-pino-default-import.mjs'], + env: { + NODE_OPTIONS: + '--experimental-loader=@opentelemetry/instrumentation/hook.mjs', + NODE_NO_WARNINGS: '1', + }, + checkResult: (err, stdout, _stderr) => { + assert.ifError(err); + logRecords = stdout + .trim() + .split('\n') + .map(ln => JSON.parse(ln)); + assert.strictEqual(logRecords.length, 1); + }, + checkCollector: (collector: TestCollector) => { + // Check that both log records had the trace-context of the span injected. + const spans = collector.sortedSpans; + assert.strictEqual(spans.length, 1); + logRecords.forEach(rec => { + assert.strictEqual(rec.trace_id, spans[0].traceId); + assert.strictEqual(rec.span_id, spans[0].spanId); + }); + }, + }); + }); + + it('should work with ESM named import', async function () { + if (semver.lt(testContext.pino.version, '6.8.0')) { + // Pino 6.8.0 added named ESM exports (https://github.com/pinojs/pino/pull/936). + this.skip(); + } else { + let logRecords: any[]; + await runTestFixture({ + cwd: __dirname, + argv: ['fixtures/use-pino-named-import.mjs'], + env: { + NODE_OPTIONS: + '--experimental-loader=@opentelemetry/instrumentation/hook.mjs', + NODE_NO_WARNINGS: '1', + }, + checkResult: (err, stdout, _stderr) => { + assert.ifError(err); + logRecords = stdout + .trim() + .split('\n') + .map(ln => JSON.parse(ln)); + assert.strictEqual(logRecords.length, 1); + }, + checkCollector: (collector: TestCollector) => { + // Check that both log records had the trace-context of the span injected. + const spans = collector.sortedSpans; + assert.strictEqual(spans.length, 1); + logRecords.forEach(rec => { + assert.strictEqual(rec.trace_id, spans[0].traceId); + assert.strictEqual(rec.span_id, spans[0].spanId); + }); + }, + }); + } + }); + }); }); 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/package.json b/plugins/node/opentelemetry-instrumentation-redis-4/package.json index f6e0957832..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,8 +66,8 @@ "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.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 825defe5cf..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, @@ -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] ); } 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/README.md b/plugins/node/opentelemetry-instrumentation-redis/README.md index e93e4c7873..f345f9ac02 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/README.md +++ b/plugins/node/opentelemetry-instrumentation-redis/README.md @@ -80,13 +80,13 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i Attributes collected: -| Attribute | Short Description | Notes | -|------------------------|--------------------------------------------------------------|--------------------------------------| -| `db.connection_string` | URL to Redis server address, of the form `redis://host:port` | Key: `SEMATTRS_DB_CONNECTION_STRING` | -| `db.statement` | Executed Redis statement | Key: `SEMATTRS_DB_STATEMENT` | -| `db.system` | Database identifier; always `redis` | Key: `SEMATTRS_DB_SYSTEM` | -| `net.peer.name` | Hostname or IP of the connected Redis server | Key: `SEMATTRS_NET_PEER_NAME` | -| `net.peer.port` | Port of the connected Redis server | Key: `SEMATTRS_NET_PORT_NAME` | +| 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 diff --git a/plugins/node/opentelemetry-instrumentation-redis/package.json b/plugins/node/opentelemetry-instrumentation-redis/package.json index 7c52f2cb7b..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,8 +66,8 @@ "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.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 fed4f769f9..d863089f30 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/src/utils.ts @@ -111,10 +111,10 @@ export const getTracedInternalSendCommand = ( ); // Set attributes for not explicitly typed RedisPluginClientTypes - if (this.options) { + if (this.connection_options) { span.setAttributes({ - [SEMATTRS_NET_PEER_NAME]: this.options.host, - [SEMATTRS_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) { diff --git a/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts b/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts index 63ab337e86..13113a2f3d 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/test/redis.test.ts @@ -51,7 +51,7 @@ 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}`; 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/package.json b/plugins/node/opentelemetry-instrumentation-restify/package.json index dbe6fa86ed..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,7 +62,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-restify#readme" diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts index a29679f6ba..a00c24ba98 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts @@ -35,14 +35,12 @@ 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; 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/package.json b/plugins/node/opentelemetry-instrumentation-router/package.json index 48a8335379..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,7 +56,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@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-router#readme" diff --git a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts index 46f6a84836..fb02262e30 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts @@ -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'); 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/README.md b/plugins/node/opentelemetry-instrumentation-winston/README.md index 90d80acc66..9dfa9365b7 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/README.md +++ b/plugins/node/opentelemetry-instrumentation-winston/README.md @@ -79,14 +79,14 @@ npm install --save @opentelemetry/winston-transport ### Log correlation Winston logger calls in the context of a tracing span will have fields -indentifying the span added to the log record. This allows +identifying the span added to the log record. This allows [correlating](https://opentelemetry.io/docs/specs/otel/logs/#log-correlation) log records with tracing data. The added fields are ([spec](https://opentelemetry.io/docs/specs/otel/compatibility/logging_trace_context/)): -* `trace_id` -* `span_id` -* `trace_flags` +- `trace_id` +- `span_id` +- `trace_flags` After adding these fields, the optional `logHook` is called to allow injecting additional fields. For example: @@ -106,11 +106,15 @@ Log sending `3.x` +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## 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] +- 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 diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index 0c25fbb7cb..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,8 +64,8 @@ "winston2": "npm:winston@2.4.7" }, "dependencies": { - "@opentelemetry/api-logs": "^0.50.0", - "@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 de72ed235b..4d4b1cfcc5 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts @@ -25,8 +25,8 @@ import { } from '@opentelemetry/instrumentation'; import type { WinstonInstrumentationConfig } from './types'; import type { - Winston2LogMethod, Winston2LoggerModule, + Winston2LogMethod, Winston3ConfigureMethod, Winston3LogMethod, Winston3Logger, @@ -43,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'); } @@ -71,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'); } @@ -82,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)) { @@ -102,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'); } ), @@ -120,7 +116,7 @@ export class WinstonInstrumentation extends InstrumentationBase { return this._config; } - override setConfig(config: WinstonInstrumentationConfig) { + override setConfig(config: WinstonInstrumentationConfig = {}) { this._config = config; } 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/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/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/README.md b/plugins/web/opentelemetry-plugin-react-load/README.md index 63b1c0b976..76155f67b4 100644 --- a/plugins/web/opentelemetry-plugin-react-load/README.md +++ b/plugins/web/opentelemetry-plugin-react-load/README.md @@ -39,6 +39,10 @@ export class Component1 extends BaseOpenTelemetryComponent { ... } See [/examples/react-load](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/react-load) for a short example. +## Semantic Conventions + +This package does not currently generate any attributes from semantic conventions. + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/web/opentelemetry-plugin-react-load/package.json b/plugins/web/opentelemetry-plugin-react-load/package.json index 9e5f01403d..17da70c813 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", @@ -49,6 +49,7 @@ }, "devDependencies": { "@babel/core": "7.22.17", + "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.0.0", "@opentelemetry/propagator-b3": "^1.3.1", "@types/mocha": "7.0.2", @@ -60,7 +61,6 @@ "@types/sinon": "10.0.18", "@types/webpack-env": "1.16.2", "babel-loader": "8.2.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", @@ -89,7 +89,6 @@ "@opentelemetry/core": "^1.0.0", "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.0.0", - "@opentelemetry/semantic-conventions": "^1.0.0", "shimmer": "^1.2.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/web/opentelemetry-plugin-react-load#readme" diff --git a/propagators/README.md b/propagators/README.md index 07165b4c5f..fde754618f 100644 --- a/propagators/README.md +++ b/propagators/README.md @@ -22,8 +22,8 @@ api.propagation.setGlobalPropagator(new GrpcCensusPropagator()); ## Useful links -* For more information on OpenTelemetry, visit: -* For more about OpenTelemetry JavaScript: +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: ## License 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/README.md b/propagators/opentelemetry-propagator-instana/README.md index 15b0aa6815..13b1635335 100644 --- a/propagators/opentelemetry-propagator-instana/README.md +++ b/propagators/opentelemetry-propagator-instana/README.md @@ -40,36 +40,36 @@ There are three headers that the propagator handles: `X-INSTANA-T` (the trace ID Example header triplet: -* `X-INSTANA-T: 80f198ee56343ba864fe8b2a57d3eff7`, -* `X-INSTANA-S: e457b5a2e4d86bd1`, -* `X-INSTANA-L: 1`. +- `X-INSTANA-T: 80f198ee56343ba864fe8b2a57d3eff7`, +- `X-INSTANA-S: e457b5a2e4d86bd1`, +- `X-INSTANA-L: 1`. A short summary for each of the headers is provided below. More details are available at . ### X-INSTANA-T -- trace ID -* A string of either 16 or 32 characters from the alphabet `0-9a-f`, representing either a 64 bit or 128 bit ID. -* This header corresponds to the [OpenTelemetry TraceId](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). -* If the propagator receives an X-INSTANA-T header value that is shorter than 32 characters when _extracting_ headers into the OpenTelemetry span context, it will left-pad the string with the character "0" to length 32. -* No length transformation is applied when _injecting_ the span context into headers. +- A string of either 16 or 32 characters from the alphabet `0-9a-f`, representing either a 64 bit or 128 bit ID. +- This header corresponds to the [OpenTelemetry TraceId](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). +- If the propagator receives an X-INSTANA-T header value that is shorter than 32 characters when _extracting_ headers into the OpenTelemetry span context, it will left-pad the string with the character "0" to length 32. +- No length transformation is applied when _injecting_ the span context into headers. ### X-INSTANA-S -- parent span ID -* Format: A string of 16 characters from the alphabet `0-9a-f`, representing a 64 bit ID. -* This header corresponds to the [OpenTelemetry SpanId](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). +- Format: A string of 16 characters from the alphabet `0-9a-f`, representing a 64 bit ID. +- This header corresponds to the [OpenTelemetry SpanId](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). ### X-INSTANA-L - sampling level -* The only two valid values are `1` and `0`. -* A level of `1` means that this request is to be sampled, a level of `0` means that the request should not be sampled. -* This header corresponds to the sampling bit of the [OpenTelemetry TraceFlags](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). +- The only two valid values are `1` and `0`. +- A level of `1` means that this request is to be sampled, a level of `0` means that the request should not be sampled. +- This header corresponds to the sampling bit of the [OpenTelemetry TraceFlags](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). ## Useful links -* For more information on Instana, visit and [Instana' documentation](https://www.ibm.com/docs/en/obi/current). -* 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] +- For more information on Instana, visit and [Instana' documentation](https://www.ibm.com/docs/en/obi/current). +- 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 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/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 63294044ec..bb6cacc61c 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": {}, @@ -26,6 +27,7 @@ "plugins/node/instrumentation-cucumber": {}, "plugins/node/instrumentation-dataloader": {}, "plugins/node/instrumentation-fs": {}, + "plugins/node/instrumentation-kafkajs": {}, "plugins/node/instrumentation-lru-memoizer": {}, "plugins/node/instrumentation-mongoose": {}, "plugins/node/instrumentation-runtime-node": {}, @@ -63,8 +65,7 @@ "plugins/web/opentelemetry-instrumentation-long-task": {}, "plugins/web/opentelemetry-instrumentation-user-interaction": {}, "plugins/web/opentelemetry-plugin-react-load": {}, - "propagators/opentelemetry-propagator-grpc-census-binary": {}, "propagators/opentelemetry-propagator-instana": {}, "propagators/opentelemetry-propagator-ot-trace": {} } -} \ No newline at end of file +} diff --git a/renovate.json b/renovate.json index ada65050bf..b06f0c93d0 100644 --- a/renovate.json +++ b/renovate.json @@ -51,6 +51,10 @@ "schedule": ["before 3am every weekday"] } ], + "lockFileMaintenance": { + "enabled": true, + "schedule": ["before 3am on Monday"] + }, "ignoreDeps": ["lerna", "lerna-changelog", "@types/node"], "ignorePaths": ["archive/**", "examples/**"], "assignees": ["@blumamir", "@dyladan", "@legendecas", "@pichlermarc" ],