diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8197a4f89fb..8eb99d71405 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,7 +28,6 @@ jobs: run: | npm run lint npm run lint:examples - npm run lint:markdown - name: Lint doc files run: | diff --git a/.github/workflows/peer-api.yml b/.github/workflows/peer-api.yml index f7b84a8bf00..332395ed7f4 100644 --- a/.github/workflows/peer-api.yml +++ b/.github/workflows/peer-api.yml @@ -11,7 +11,7 @@ jobs: peer-api-check: runs-on: ubuntu-latest container: - image: node:20 + image: node:22 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml new file mode 100644 index 00000000000..e45e3d99a88 --- /dev/null +++ b/.github/workflows/publish-to-npm.yml @@ -0,0 +1,41 @@ +name: Publish packages to NPM + +on: + workflow_dispatch: + +jobs: + release-to-npm: + runs-on: ubuntu-latest + permissions: + # needed for NPM provenance + id-token: write + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + + - run: npm ci + + # NOTE: in the past, we've had situations where the compiled files were missing as the `prepublishOnly` script was + # missing in some packages. `npx lerna publish` *should* also run compile, but this is intended as a safeguard + # when that does not happen for whatever reason. + - run: npm run compile + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NPM_CONFIG_PROVENANCE: true + # NOTE: using --concurrency 1 to reduce the likelihood of a race when publishing, + # which happens when the npm registry is not fully consistent yet. This can cause the publishing of a package to be + # rejected because dependencies are not available yet. `lerna` does ensure that this is not the case locally + # (packages are in-fact published in the correct order), but the race on the registry still applies. + # If this happens, run the workflow again - there should be enough time for everything to settle until this workflow + # attempts to publish again. + run: npx lerna publish --concurrency 1 from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 7d22fcc1c6a..89bbea17c69 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -41,6 +41,8 @@ jobs: run: npm run test - name: Report Coverage uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: verbose: true node-windows-tests: @@ -95,6 +97,8 @@ jobs: run: npm run test:browser - name: Report Coverage uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: verbose: true webworker-tests: @@ -121,6 +125,8 @@ jobs: run: npm run test:webworker - name: Report Coverage uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: verbose: true api-eol-node-test: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aedcb57df4..f0884700a3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,24 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se ### :rocket: (Enhancement) +* feat(sdk-metrics, sdk-trace): add `mergeResourceWithDefaults` flag, which allows opting-out of resources getting merged with the default resource [#4617](https://github.com/open-telemetry/opentelemetry-js/pull/4617) + * default: `true` (no change in behavior) + * note: `false` will become the default behavior in the next major version in order to comply with [specification requirements](https://github.com/open-telemetry/opentelemetry-specification/blob/f3511a5ccda376dfd1de76dfa086fc9b35b54757/specification/resource/sdk.md?plain=1#L31-L36) + +* feat(sdk-trace-base): add `spanProcessors` property in `TracerConfig` interface. [#5138](https://github.com/open-telemetry/opentelemetry-js/pull/5138) @david-luna + +### :bug: (Bug Fix) + +* fix(sdk-metrics): await exports in `PeriodicExportingMetricReader` when async resource attributes have not yet settled [#5119](https://github.com/open-telemetry/opentelemetry-js/pull/5119/) @pichlermarc + +### :books: (Refine Doc) + +### :house: (Internal) + +## 1.27.0 + +### :rocket: (Enhancement) + * feat: add processors for adding session.id attribute to spans and logs [#4972](https://github.com/open-telemetry/opentelemetry-js/pull/4972) ### :bug: (Bug Fix) @@ -20,8 +38,10 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se * fix(sdk-trace-base): avoid keeping non-string `status.message` on `Span#setStatus()` [#4999](https://github.com/open-telemetry/opentelemetry-js/pull/4999) @pichlermarc * fix(sdk-metrics): Add missing catch and handle error in promise of `PeriodicExportingMetricReader` [#5006](https://github.com/open-telemetry/opentelemetry-js/pull/5006) @jj22ee * fix(opentelemetry-core): confusing log extract of composite propagator [#5017](https://github.com/open-telemetry/opentelemetry-js/pull/5017) @rv2673 - -### :books: (Refine Doc) +* fix(propagator-aws-xray-*): move propagators back to contrib repository [#4966](https://github.com/open-telemetry/opentelemetry-js/pull/4966) @pichlermarc + * The [specification](https://github.com/open-telemetry/opentelemetry-specification/blob/6672dbc97ddeb34f36c020a0f0a30323c8bc4d95/specification/context/api-propagators.md?plain=1#L354-L356) prohibits hosting these packages in the core repository + * `@opentelemetry/propagator-aws-xray` is now located in [open-telemetry/opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib) + * `@opentelemetry/propagator-aws-xray-lambda` is now located in [open-telemetry/opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib) * docs: [Browser] Define the supported browser runtimes [Issue #4168](https://github.com/open-telemetry/opentelemetry-js/issues/4168) PR:[#5059](https://github.com/open-telemetry/opentelemetry-js/pull/5059) @MSNev @@ -112,6 +132,7 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se * fix(resources): prevent circular import (resource -> detector -> resource -> ...) [#4653](https://github.com/open-telemetry/opentelemetry-js/pull/4653) @pichlermarc * fixes a circular import warning which would appear in rollup when bundling `@opentelemetry/resources` * fix(exporter-metrics-otlp-grpc): add explicit otlp-exporter-base dependency to exporter-metrics-otlp-grpc [#4678](https://github.com/open-telemetry/opentelemetry-js/pull/4678) @AkselAllas +* fix(resources) wait for async attributes for detecting resources [#4687](https://github.com/open-telemetry/opentelemetry-js/pull/4687) @ziolekjj ## 1.24.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 374f0470d08..7c4c6fc0e47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -223,6 +223,16 @@ To run the unit tests continuously in watch mode while developing, use: npm run tdd ``` +Packages that are expected to run in the browser have browser specific tests: + +```sh +# Run browser-specific test +npm run test:browser + +# Run web worker test +npm run test:webworker +``` + ### Linting This project uses `eslint` to lint source code. Just like tests and compilation, linting can be done for all packages or only a single package. @@ -247,13 +257,21 @@ cd packages/opentelemetry-module-name npm run lint:fix ``` -Similarly, Markdown files (such as README.md files) can be linted: +The default lint command will check majority of files, including Markdown files (such as README.md files), but you +also have the option to check just the Markdown files with: ```sh npm run lint:markdown npm run lint:markdown:fix # can automatically fix some Markdown rules ``` +The default command doesn't check the examples folder. To lint just the examples, use the script: + +```sh +npm run lint:examples +npm run lint:examples:fix # can automatically fix some errors +``` + ### Generating docs We use [typedoc](https://www.npmjs.com/package/typedoc) to generate the api documentation. diff --git a/api/README.md b/api/README.md index 59d4cd7a08d..40015dbf051 100644 --- a/api/README.md +++ b/api/README.md @@ -45,8 +45,9 @@ const { trace } = require("@opentelemetry/api"); const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require("@opentelemetry/sdk-trace-base"); // Create and register an SDK -const provider = new BasicTracerProvider(); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +const provider = new BasicTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); trace.setGlobalTracerProvider(provider); // Acquire a tracer from the global tracer provider which will be used to trace the application diff --git a/doc/contributing/releasing.md b/doc/contributing/releasing.md index 4a48995431c..18246c3cf88 100644 --- a/doc/contributing/releasing.md +++ b/doc/contributing/releasing.md @@ -3,9 +3,9 @@ This document is aimed at Maintainers and describes how to release a new version of the packages contained in this repository. We aim to eventually automate this process as much as possible. -## Create a release PR +## 1. Create a release PR -1. Go to the [Release PR Workflow](https://github.com/open-telemetry/opentelemetry-js/actions/workflows/create-or-update-release.yml) +1. Go to the [Release PR Workflow](https://github.com/open-telemetry/opentelemetry-js/actions/workflows/create-or-update-release-pr.yml) 2. Click "Run workflow" 3. For `Release Type`, select if you want to create a release PR for a new `minor` or `patch` version. 4. For `Release Scope`, select if you want to release @@ -18,37 +18,23 @@ We aim to eventually automate this process as much as possible. > If there was a commit to `main`, after PR creation simply run the workflow again before merging it. > Re-running it will update the PR with the contents from `main` and will update the PR body too. -## Review and merge the release PR +## 2. Review and merge the release PR 1. Review the PR generated via the workflow (it will be titled `chore: prepare next release` and opened by the @opentelemetrybot user) 2. Once approved, merge the PR -## Publish to NPM - -### Prerequisites - -1. Ensure you have access to the [`opentelemetry` npm organization](https://www.npmjs.com/org/opentelemetry) -2. Go to your npm user's `Access Tokens` page -3. Click `Generate New Token` -> `Granular Access Token` (2FA prompt will pop up) -4. Input all required fields - - recommended: set the expiry date on the token to 1 day - - recommended: set a CIDR range to only allow your IP -5. Under `Packages and Scopes` - - set `Permissions` to `Read and Write` - - Select `Only Select packages and scopes`, choose `@opentelemetry` - -### Publishing - -1. Check out the commit created by merging the release PR -2. run `git clean -fdx --exclude ` -3. run `npm ci` -4. run `npm run compile` -5. run `NODE_AUTH_TOKEN= npm run release:publish` +## 3. Publish to NPM > [!IMPORTANT] -> Delete the token once you're done publishing +> This step will publish anything that's on `main` IF AND ONLY IF the version has been bumped. If the version for a package +> has not been bumped, it will not publish a new version of the package. + +1. Go to the [NPM publish workflow](https://github.com/open-telemetry/opentelemetry-js/actions/workflows/publish-to-npm.yml) +2. Click "Run workflow" (from main) + 1. In rare cases not all packages are published due to a race when publishing, if you suspect this to + be the case, re-run the workflow: there should be enough time from 1. -## Create GitHub Releases +## 4. Create GitHub Releases 1. Check out the commit created by merging the release PR 2. Run diff --git a/examples/basic-tracer-node/index.js b/examples/basic-tracer-node/index.js index 889d4ba31e4..ff50b8e8b72 100644 --- a/examples/basic-tracer-node/index.js +++ b/examples/basic-tracer-node/index.js @@ -6,19 +6,20 @@ const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-convention const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); +// Configure span processor to send spans to the exporter +const exporter = new JaegerExporter({ + endpoint: 'http://localhost:14268/api/traces', +}); const provider = new BasicTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'basic-service', }), + spanProcessors: [ + new SimpleSpanProcessor(exporter), + new SimpleSpanProcessor(new ConsoleSpanExporter()), + ] }); -// Configure span processor to send spans to the exporter -const exporter = new JaegerExporter({ - endpoint: 'http://localhost:14268/api/traces', -}); -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); - /** * Initialize the OpenTelemetry APIs to use the BasicTracerProvider bindings. * diff --git a/examples/esm-http-ts/package.json b/examples/esm-http-ts/package.json index 3360334dcf2..bb98d3fce76 100644 --- a/examples/esm-http-ts/package.json +++ b/examples/esm-http-ts/package.json @@ -1,7 +1,7 @@ { "name": "esm-http-ts", "private": true, - "version": "0.53.0", + "version": "0.54.2", "description": "Example of HTTP integration with OpenTelemetry using ESM and TypeScript", "main": "build/index.js", "type": "module", @@ -32,12 +32,12 @@ "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/", "dependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" } } diff --git a/examples/grpc-js/tracer.js b/examples/grpc-js/tracer.js index 77d30dbd1c2..8266f407d84 100644 --- a/examples/grpc-js/tracer.js +++ b/examples/grpc-js/tracer.js @@ -13,21 +13,15 @@ const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc'); const EXPORTER = process.env.EXPORTER || ''; module.exports = (serviceName) => { + const useZipkin = EXPORTER.toLowerCase().startsWith('z'); + const exporter = useZipkin ? new ZipkinExporter() : new JaegerExporter(); const provider = new NodeTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: serviceName, }), + spanProcessors: [new SimpleSpanProcessor(exporter)] }); - let exporter; - if (EXPORTER.toLowerCase().startsWith('z')) { - exporter = new ZipkinExporter(); - } else { - exporter = new JaegerExporter(); - } - - provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); - // Initialize the OpenTelemetry APIs to use the NodeTracerProvider bindings provider.register(); diff --git a/examples/http/package.json b/examples/http/package.json index dbf4897f98b..96ec9725415 100644 --- a/examples/http/package.json +++ b/examples/http/package.json @@ -1,7 +1,7 @@ { "name": "http-example", "private": true, - "version": "0.53.0", + "version": "0.54.2", "description": "Example of HTTP integration with OpenTelemetry", "main": "index.js", "scripts": { @@ -30,13 +30,13 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-jaeger": "1.26.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-jaeger": "1.27.0", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/http", diff --git a/examples/http/tracer.js b/examples/http/tracer.js index b2351221bde..b96993446b6 100644 --- a/examples/http/tracer.js +++ b/examples/http/tracer.js @@ -13,21 +13,15 @@ const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http'); const EXPORTER = process.env.EXPORTER || ''; module.exports = (serviceName) => { + const useZipkin = EXPORTER.toLowerCase().startsWith('z'); + const exporter = useZipkin ? new ZipkinExporter() : new JaegerExporter(); const provider = new NodeTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: serviceName, }), + spanProcessors: [new SimpleSpanProcessor(exporter)] }); - - let exporter; - if (EXPORTER.toLowerCase().startsWith('z')) { - exporter = new ZipkinExporter(); - } else { - exporter = new JaegerExporter(); - } - - provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); - + // Initialize the OpenTelemetry APIs to use the NodeTracerProvider bindings provider.register(); diff --git a/examples/https/package.json b/examples/https/package.json index 18f8db2b6f7..4c099880748 100644 --- a/examples/https/package.json +++ b/examples/https/package.json @@ -1,7 +1,7 @@ { "name": "https-example", "private": true, - "version": "0.53.0", + "version": "0.54.2", "description": "Example of HTTPs integration with OpenTelemetry", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -34,13 +34,13 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-jaeger": "1.26.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-jaeger": "1.27.0", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/https", diff --git a/examples/https/tracer.js b/examples/https/tracer.js index 9d76f30355b..d59835da96f 100644 --- a/examples/https/tracer.js +++ b/examples/https/tracer.js @@ -14,21 +14,14 @@ const EXPORTER = process.env.EXPORTER || ''; process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; module.exports = (serviceName) => { - let exporter; + const useZipkin = EXPORTER.toLowerCase().startsWith('z'); + const exporter = useZipkin ? new ZipkinExporter() : new JaegerExporter(); const provider = new NodeTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: serviceName, }), + spanProcessors: [new SimpleSpanProcessor(exporter)] }); - - if (EXPORTER.toLowerCase().startsWith('z')) { - exporter = new ZipkinExporter(); - } else { - exporter = new JaegerExporter(); - } - - provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); - // Initialize the OpenTelemetry APIs to use the NodeTracerProvider bindings provider.register(); diff --git a/examples/opentelemetry-web/examples/fetch-proto/index.js b/examples/opentelemetry-web/examples/fetch-proto/index.js index 0faaa0149aa..346ff12163f 100644 --- a/examples/opentelemetry-web/examples/fetch-proto/index.js +++ b/examples/opentelemetry-web/examples/fetch-proto/index.js @@ -12,17 +12,16 @@ const { SEMRESATTRS_SERVICE_NAME } = require("@opentelemetry/semantic-convention const provider = new WebTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'fetch-proto-web-service' - }) + }), + // Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests + // to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the + // exporter without delay + spanProcessors: [ + new SimpleSpanProcessor(new ConsoleSpanExporter()), + new SimpleSpanProcessor(new OTLPTraceExporterProto()), + ] }); -// Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests -// to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the -// exporter without delay -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); -provider.addSpanProcessor( - new SimpleSpanProcessor(new OTLPTraceExporterProto()) -); - provider.register({ contextManager: new ZoneContextManager(), propagator: new B3Propagator(), diff --git a/examples/opentelemetry-web/examples/fetch/index.js b/examples/opentelemetry-web/examples/fetch/index.js index 3326beb19b6..8e0ac16e03d 100644 --- a/examples/opentelemetry-web/examples/fetch/index.js +++ b/examples/opentelemetry-web/examples/fetch/index.js @@ -12,14 +12,16 @@ const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-convention const provider = new WebTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'fetch-web-service' - }) + }), + // Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests + // to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the + // exporter without delay + spanProcessors:[ + new SimpleSpanProcessor(new ConsoleSpanExporter()), + new SimpleSpanProcessor(new OTLPTraceExporter()), + ] }); -// Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests -// to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the -// exporter without delay -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); -provider.addSpanProcessor(new SimpleSpanProcessor(new OTLPTraceExporter())); provider.register({ contextManager: new ZoneContextManager(), propagator: new B3Propagator(), diff --git a/examples/opentelemetry-web/examples/fetchXhr/index.js b/examples/opentelemetry-web/examples/fetchXhr/index.js index 1d93af4c49d..92e9b72eb3c 100644 --- a/examples/opentelemetry-web/examples/fetchXhr/index.js +++ b/examples/opentelemetry-web/examples/fetchXhr/index.js @@ -12,14 +12,16 @@ const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-convention const provider = new WebTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'fetch-xhr-web-service' - }) + }), + // Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests + // to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the + // exporter without delay + spanProcessors: [ + new SimpleSpanProcessor(new ConsoleSpanExporter()), + new SimpleSpanProcessor(new OTLPTraceExporter()), + ] }); -// Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests -// to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the -// exporter without delay -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); -provider.addSpanProcessor(new SimpleSpanProcessor(new OTLPTraceExporter())); provider.register({ contextManager: new ZoneContextManager(), }); diff --git a/examples/opentelemetry-web/examples/fetchXhrB3/index.js b/examples/opentelemetry-web/examples/fetchXhrB3/index.js index 2923cccc6b7..368ae309f44 100644 --- a/examples/opentelemetry-web/examples/fetchXhrB3/index.js +++ b/examples/opentelemetry-web/examples/fetchXhrB3/index.js @@ -13,14 +13,16 @@ const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-convention const provider = new WebTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'fetch-xhr-b3-web-service' - }) + }), + // Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests + // to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the + // exporter without delay + spanProcessors: [ + new SimpleSpanProcessor(new ConsoleSpanExporter()), + new SimpleSpanProcessor(new OTLPTraceExporter()), + ] }); -// Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests -// to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the -// exporter without delay -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); -provider.addSpanProcessor(new SimpleSpanProcessor(new OTLPTraceExporter())); provider.register({ contextManager: new ZoneContextManager(), propagator: new B3Propagator(), diff --git a/examples/opentelemetry-web/examples/xml-http-request/index.js b/examples/opentelemetry-web/examples/xml-http-request/index.js index 7530528ed87..908716f9a0a 100644 --- a/examples/opentelemetry-web/examples/xml-http-request/index.js +++ b/examples/opentelemetry-web/examples/xml-http-request/index.js @@ -12,15 +12,16 @@ const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-convention const providerWithZone = new WebTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'xml-http-web-service' - }) + }), + // Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests + // to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the + // exporter without delay + spanProcessors: [ + new SimpleSpanProcessor(new ConsoleSpanExporter()), + new SimpleSpanProcessor(new OTLPTraceExporter()), + ] }); -// Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests -// to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the -// exporter without delay -providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); -providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new OTLPTraceExporter())); - providerWithZone.register({ contextManager: new ZoneContextManager(), propagator: new B3Propagator(), diff --git a/examples/opentelemetry-web/examples/zipkin/index.js b/examples/opentelemetry-web/examples/zipkin/index.js index d76de7e563b..a6382a1bc77 100644 --- a/examples/opentelemetry-web/examples/zipkin/index.js +++ b/examples/opentelemetry-web/examples/zipkin/index.js @@ -7,19 +7,23 @@ const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-convention const provider = new WebTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'zipkin-web-service' - }) + }), + // Note: For production consider using the "BatchSpanProcessor" to reduce the number of requests + // to your exporter. Using the SimpleSpanProcessor here as it sends the spans immediately to the + // exporter without delay + spanProcessors: [ + new SimpleSpanProcessor(new ConsoleSpanExporter()), + new SimpleSpanProcessor(new ZipkinExporter({ + // testing interceptor + // getExportRequestHeaders: () => { + // return { + // foo: 'bar', + // } + // } + })), + ] }); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); -provider.addSpanProcessor(new SimpleSpanProcessor(new ZipkinExporter({ - // testing interceptor - // getExportRequestHeaders: ()=> { - // return { - // foo: 'bar', - // } - // } -}))); - provider.register(); const tracer = provider.getTracer('example-tracer-web'); diff --git a/examples/opentelemetry-web/package.json b/examples/opentelemetry-web/package.json index e0518fd6e28..bedcbab86d2 100644 --- a/examples/opentelemetry-web/package.json +++ b/examples/opentelemetry-web/package.json @@ -1,7 +1,7 @@ { "name": "web-opentelemetry-example", "private": true, - "version": "0.53.0", + "version": "0.54.2", "description": "Example of using @opentelemetry/sdk-trace-web and @opentelemetry/sdk-metrics in browser", "main": "index.js", "scripts": { @@ -45,19 +45,19 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-fetch": "0.53.0", - "@opentelemetry/instrumentation-xml-http-request": "0.53.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-fetch": "0.54.2", + "@opentelemetry/instrumentation-xml-http-request": "0.54.2", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web" diff --git a/examples/opentracing-shim/shim.js b/examples/opentracing-shim/shim.js index 0f791071ee4..caea31c178c 100644 --- a/examples/opentracing-shim/shim.js +++ b/examples/opentracing-shim/shim.js @@ -11,9 +11,9 @@ const { TracerShim } = require('@opentelemetry/shim-opentracing'); function shim(serviceName) { const provider = new NodeTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: serviceName }), + spanProcessors: [new SimpleSpanProcessor(getExporter(serviceName))], }); - provider.addSpanProcessor(new SimpleSpanProcessor(getExporter(serviceName))); // Initialize the OpenTelemetry APIs to use the NodeTracerProvider bindings provider.register(); diff --git a/examples/otlp-exporter-node/package.json b/examples/otlp-exporter-node/package.json index ac72a1ae5e3..b5d869b1246 100644 --- a/examples/otlp-exporter-node/package.json +++ b/examples/otlp-exporter-node/package.json @@ -1,7 +1,7 @@ { "name": "example-otlp-exporter-node", "private": true, - "version": "0.53.0", + "version": "0.54.2", "description": "Example of using @opentelemetry/collector-exporter in Node.js", "main": "index.js", "scripts": { @@ -30,16 +30,16 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/exporter-metrics-otlp-proto": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/otlp-exporter-node" diff --git a/examples/otlp-exporter-node/tracing.js b/examples/otlp-exporter-node/tracing.js index 475665f23cd..fb740fb2096 100644 --- a/examples/otlp-exporter-node/tracing.js +++ b/examples/otlp-exporter-node/tracing.js @@ -26,9 +26,11 @@ const provider = new BasicTracerProvider({ resource: new Resource({ [SEMRESATTRS_SERVICE_NAME]: 'basic-service', }), + spanProcessors: [ + new SimpleSpanProcessor(exporter), + new SimpleSpanProcessor(new ConsoleSpanExporter()), + ] }); -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); provider.register(); const tracer = trace.getTracer('example-otlp-exporter-node'); diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 37252e92ccc..62ec3f61c72 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -7,6 +7,93 @@ All notable changes to experimental packages in this project will be documented ### :boom: Breaking Change +* feat(instrumentation-http)!: reduce public API surface by removing exports and making protected methods private [#5124](https://github.com/open-telemetry/opentelemetry-js/pull/5124) @pichlermarc + * (user-facing) the following exports were intended for internal use only and have been removed without replacement + * extractHostnameAndPort + * getAbsoluteUrl + * getIncomingRequestAttributes + * getIncomingRequestAttributesOnResponse + * getIncomingRequestMetricAttributes + * getIncomingRequestMetricAttributesOnResponse + * getOutgoingRequestAttributes + * getOutgoingRequestAttributesOnResponse + * getOutgoingRequestMetricAttributes + * getOutgoingRequestMetricAttributesOnResponse + * getRequestInfo + * headerCapture + * isCompressed + * isValidOptionsType + * parseResponseStatus + * satisfiesPattern + * setAttributesFromHttpKind + * setRequestContentLengthAttribute + * setResponseContentLengthAttribute + * setSpanWithError + * RequestSignature + * RequestFunction + * ParsedRequestOptions + * IgnoreMatcher + * Https + * HttpRequestArgs + * HttpCallbackOptional + * HttpCallback + * Http + * GetFunction + * Func + * Err + +### :rocket: (Enhancement) + +* feat(sdk-node, sdk-logs): add `mergeResourceWithDefaults` flag, which allows opting-out of resources getting merged with the default resource [#4617](https://github.com/open-telemetry/opentelemetry-js/pull/4617) + * default: `true` + * note: `false` will become the default behavior in a future iteration in order to comply with [specification requirements](https://github.com/open-telemetry/opentelemetry-specification/blob/f3511a5ccda376dfd1de76dfa086fc9b35b54757/specification/resource/sdk.md?plain=1#L31-L36) + +### :bug: (Bug Fix) + +* fix(instrumentation-http): Fix the `OTEL_SEMCONV_STABILITY_OPT_IN` variable check. Using `of` instead of `in` [#5137](https://github.com/open-telemetry/opentelemetry-js/pull/5137) + +* fix(instrumentation-http): drop url.parse in favor of URL constructor [#5091](https://github.com/open-telemetry/opentelemetry-js/pull/5091) @pichlermarc + * fixes a bug where using cyrillic characters in a client request string URL would throw an exception, whereas an un-instrumented client would accept the same input without throwing an exception + +### :books: (Refine Doc) + +### :house: (Internal) + +## 0.54.2 + +### :bug: (Bug Fix) + +* fix(instrumentation): Fix wrapping ESM files with absolute path [#5094](https://github.com/open-telemetry/opentelemetry-js/pull/5094) @serkan-ozal + +## 0.54.1 + +### :bug: (Bug Fix) + +* fix(instrumentation-http): skip malformed forwarded headers. [#5095](https://github.com/open-telemetry/opentelemetry-js/issues/5095) @pmlanger + +## 0.54.0 + +### :boom: Breaking Change + +* feat(exporter-*-otlp-*)!: rewrite exporter config logic for testability [#4971](https://github.com/open-telemetry/opentelemetry-js/pull/4971) @pichlermarc + * (user-facing) `getDefaultUrl` was intended for internal use has been removed from all exporters + * (user-facing) `getUrlFromConfig` was intended for internal use and has been removed from all exporters + * (user-facing) `hostname` was intended for internal use and has been removed from all exporters + * (user-facing) `url` was intended for internal use and has been removed from all exporters + * (user-facing) `timeoutMillis` was intended for internal use and has been removed from all exporters + * (user-facing) `onInit` was intended for internal use and has been removed from all exporters +* feat(otlp-exporter-base)!: do not export functions that are intended for internal use [#4971](https://github.com/open-telemetry/opentelemetry-js/pull/4971) @pichlermarc + * Drops the following functions and types that were intended for internal use from the package exports: + * `parseHeaders` + * `appendResourcePathToUrl` + * `appendResourcePathToUrlIfNeeded` + * `configureExporterTimeout` + * `invalidTimeout` +* feat(instrumentation-http)!: remove long deprecated options [#5085](https://github.com/open-telemetry/opentelemetry-js/pull/5085) @pichlermarc + * `ignoreIncomingPaths` has been removed, use the more versatile `ignoreIncomingRequestHook` instead. + * `ignoreOutgoingUrls` has been removed, use the more versatile `ignoreOutgoingRequestHook` instead. + * `isIgnored` utility function was intended for internal use and has been removed without replacement. + ### :rocket: (Enhancement) * feat(api-logs): Add delegating no-op logger provider [#4861](https://github.com/open-telemetry/opentelemetry-js/pull/4861) @hectorhdzg @@ -22,13 +109,6 @@ All notable changes to experimental packages in this project will be documented * fix(sdk-events): remove devDependencies to old `@opentelemetry/api-logs@0.52.0`, `@opentelemetry/api-events@0.52.0` packages [#5013](https://github.com/open-telemetry/opentelemetry-js/pull/5013) @pichlermarc * fix(sdk-logs): remove devDependencies to old `@opentelemetry/api-logs@0.52.0` [#5013](https://github.com/open-telemetry/opentelemetry-js/pull/5013) @pichlermarc * fix(sdk-logs): align LogRecord#setAttribute type with types from `@opentelemetry/api-logs@0.53.0` [#5013](https://github.com/open-telemetry/opentelemetry-js/pull/5013) @pichlermarc -* feat(exporter-*-otlp-*)!: rewrite exporter config logic for testability [#4971](https://github.com/open-telemetry/opentelemetry-js/pull/4971) @pichlermarc - * (user-facing) `getDefaultUrl` was intended for internal use has been removed from all exporters - * (user-facing) `getUrlFromConfig` was intended for internal use and has been removed from all exporters - * (user-facing) `hostname` was intended for internal use and has been removed from all exporters - * (user-facing) `url` was intended for internal use and has been removed from all exporters - * (user-facing) `timeoutMillis` was intended for internal use and has been removed from all exporters - * (user-facing) `onInit` was intended for internal use and has been removed from all exporters * fix(exporter-*-otlp-*): fixes a bug where signal-specific environment variables would not be applied and the trace-specific one was used instead [#4971](https://github.com/open-telemetry/opentelemetry-js/pull/4971) @pichlermarc * Fixes: * `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION` @@ -39,16 +119,9 @@ All notable changes to experimental packages in this project will be documented * `OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY` * `OTEL_EXPORTER_OTLP_METRICS_INSECURE` * `OTEL_EXPORTER_OTLP_LOGS_INSECURE` -* feat(otlp-exporter-base)!: do not export functions that are intended for internal use [#4971](https://github.com/open-telemetry/opentelemetry-js/pull/4971) @pichlermarc - * Drops the following functions and types that were intended for internal use from the package exports: - * `parseHeaders` - * `appendResourcePathToUrl` - * `appendResourcePathToUrlIfNeeded` - * `configureExporterTimeout` - * `invalidTimeout` * fix(sdk-node): use warn instead of error on unknown OTEL_NODE_RESOURCE_DETECTORS values [#5034](https://github.com/open-telemetry/opentelemetry-js/pull/5034) - -### :books: (Refine Doc) +* fix(exporter-logs-otlp-proto): Use correct config type in Node constructor +* fix(instrumentation-http): Fix instrumentation of `http.get`, `http.request`, `https.get`, and `https.request` when used from ESM code and imported via the `import defaultExport from 'http'` style. [#5024](https://github.com/open-telemetry/opentelemetry-js/issues/5024) @trentm ### :house: (Internal) diff --git a/experimental/backwards-compatibility/node14/package.json b/experimental/backwards-compatibility/node14/package.json index 80f481fecc8..c5332b4674b 100644 --- a/experimental/backwards-compatibility/node14/package.json +++ b/experimental/backwards-compatibility/node14/package.json @@ -1,6 +1,6 @@ { "name": "backcompat-node14", - "version": "0.53.0", + "version": "0.54.2", "private": true, "description": "Backwards compatibility app for node 14 types and the OpenTelemetry Node.js SDK", "main": "index.js", @@ -10,8 +10,8 @@ "align-api-deps": "node ../../../scripts/align-api-deps.js" }, "dependencies": { - "@opentelemetry/sdk-node": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/sdk-node": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@types/node": "14.18.25", diff --git a/experimental/backwards-compatibility/node16/package.json b/experimental/backwards-compatibility/node16/package.json index 154ff0b9076..041a520066d 100644 --- a/experimental/backwards-compatibility/node16/package.json +++ b/experimental/backwards-compatibility/node16/package.json @@ -1,6 +1,6 @@ { "name": "backcompat-node16", - "version": "0.53.0", + "version": "0.54.2", "private": true, "description": "Backwards compatibility app for node 16 types and the OpenTelemetry Node.js SDK", "main": "index.js", @@ -10,8 +10,8 @@ "align-api-deps": "node ../../../scripts/align-api-deps.js" }, "dependencies": { - "@opentelemetry/sdk-node": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/sdk-node": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@types/node": "16.11.52", diff --git a/experimental/examples/events/package.json b/experimental/examples/events/package.json index 1476f9ce345..9754c5b849a 100644 --- a/experimental/examples/events/package.json +++ b/experimental/examples/events/package.json @@ -1,17 +1,17 @@ { "name": "events-example", - "version": "0.53.0", + "version": "0.54.2", "private": true, "scripts": { "start": "ts-node index.ts" }, "dependencies": { "@opentelemetry/api": "^1.7.0", - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/exporter-logs-otlp-http": "0.53.0", - "@opentelemetry/sdk-events": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/exporter-logs-otlp-http": "0.54.2", + "@opentelemetry/sdk-events": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "devDependencies": { "@types/node": "18.6.5", diff --git a/experimental/examples/logs/package.json b/experimental/examples/logs/package.json index eeacaea85c5..d4a36feca78 100644 --- a/experimental/examples/logs/package.json +++ b/experimental/examples/logs/package.json @@ -1,6 +1,6 @@ { "name": "logs-example", - "version": "0.53.0", + "version": "0.54.2", "private": true, "scripts": { "start": "ts-node index.ts", @@ -8,8 +8,8 @@ }, "dependencies": { "@opentelemetry/api": "^1.7.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "devDependencies": { "@types/node": "18.6.5", diff --git a/experimental/examples/opencensus-shim/package.json b/experimental/examples/opencensus-shim/package.json index bea461711a8..b4a81664b74 100644 --- a/experimental/examples/opencensus-shim/package.json +++ b/experimental/examples/opencensus-shim/package.json @@ -1,7 +1,7 @@ { "name": "opencensus-shim", "private": true, - "version": "0.53.0", + "version": "0.54.2", "description": "Example of using @opentelemetry/shim-opencensus in Node.js", "main": "index.js", "scripts": { @@ -32,13 +32,13 @@ "@opencensus/instrumentation-http": "0.1.0", "@opencensus/nodejs-base": "0.1.0", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-prometheus": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", - "@opentelemetry/shim-opencensus": "0.53.0" + "@opentelemetry/shim-opencensus": "0.54.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/examples/opencensus-shim" } diff --git a/experimental/examples/opencensus-shim/setup.js b/experimental/examples/opencensus-shim/setup.js index 1bb277eddb4..e3e189eae2d 100644 --- a/experimental/examples/opencensus-shim/setup.js +++ b/experimental/examples/opencensus-shim/setup.js @@ -48,12 +48,14 @@ module.exports = function setup(serviceName) { const resource = new Resource({ [SEMRESATTRS_SERVICE_NAME]: serviceName, }); - const tracerProvider = new NodeTracerProvider({ resource }); - tracerProvider.addSpanProcessor( - new BatchSpanProcessor(new OTLPTraceExporter(), { - scheduledDelayMillis: 5000, - }) - ); + const tracerProvider = new NodeTracerProvider({ + resource, + spanProcessors: [ + new BatchSpanProcessor(new OTLPTraceExporter(), { + scheduledDelayMillis: 5000, + }) + ] + }); tracerProvider.register(); const meterProvider = new MeterProvider({ resource }); diff --git a/experimental/examples/prometheus/package.json b/experimental/examples/prometheus/package.json index 7e82e2d2647..a87b85303fc 100644 --- a/experimental/examples/prometheus/package.json +++ b/experimental/examples/prometheus/package.json @@ -1,6 +1,6 @@ { "name": "prometheus-example", - "version": "0.53.0", + "version": "0.54.2", "private": true, "description": "Example of using @opentelemetry/sdk-metrics and @opentelemetry/exporter-prometheus", "main": "index.js", @@ -12,7 +12,7 @@ "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-prometheus": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/exporter-prometheus": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0" } } diff --git a/experimental/packages/api-events/package.json b/experimental/packages/api-events/package.json index 84ba0e55a7e..114d51af621 100644 --- a/experimental/packages/api-events/package.json +++ b/experimental/packages/api-events/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/api-events", - "version": "0.53.0", + "version": "0.54.2", "description": "Public events API for OpenTelemetry", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -61,7 +61,7 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/api-logs": "0.53.0" + "@opentelemetry/api-logs": "0.54.2" }, "devDependencies": { "@types/mocha": "10.0.8", diff --git a/experimental/packages/api-logs/package.json b/experimental/packages/api-logs/package.json index 81042f02079..673c960e87f 100644 --- a/experimental/packages/api-logs/package.json +++ b/experimental/packages/api-logs/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/api-logs", - "version": "0.53.0", + "version": "0.54.2", "description": "Public logs API for OpenTelemetry", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/experimental/packages/exporter-logs-otlp-grpc/package.json b/experimental/packages/exporter-logs-otlp-grpc/package.json index bc33f28c00b..deaf237a12b 100644 --- a/experimental/packages/exporter-logs-otlp-grpc/package.json +++ b/experimental/packages/exporter-logs-otlp-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-logs-otlp-grpc", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Collector Exporter allows user to send collected log records to the OpenTelemetry Collector", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -51,9 +51,9 @@ "devDependencies": { "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -70,10 +70,10 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/exporter-logs-otlp-http/package.json b/experimental/packages/exporter-logs-otlp-http/package.json index 4b6562b5d0a..2843d1dc15c 100644 --- a/experimental/packages/exporter-logs-otlp-http/package.json +++ b/experimental/packages/exporter-logs-otlp-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-logs-otlp-http", - "version": "0.53.0", + "version": "0.54.2", "publishConfig": { "access": "public" }, @@ -73,7 +73,7 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -101,10 +101,10 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" } } diff --git a/experimental/packages/exporter-logs-otlp-proto/package.json b/experimental/packages/exporter-logs-otlp-proto/package.json index 789bf7988ed..7879ebab5b9 100644 --- a/experimental/packages/exporter-logs-otlp-proto/package.json +++ b/experimental/packages/exporter-logs-otlp-proto/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-logs-otlp-proto", - "version": "0.53.0", + "version": "0.54.2", "description": "An OTLP exporter to send logs using protobuf over HTTP", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -91,13 +91,13 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-proto", "sideEffects": false diff --git a/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts index 828a11cbc6d..d897208389e 100644 --- a/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts @@ -15,8 +15,8 @@ */ import { - OTLPExporterConfigBase, OTLPExporterNodeBase, + OTLPExporterNodeConfigBase, } from '@opentelemetry/otlp-exporter-base'; import { IExportLogsServiceResponse, @@ -37,7 +37,7 @@ export class OTLPLogExporter extends OTLPExporterNodeBase implements LogRecordExporter { - constructor(config: OTLPExporterConfigBase = {}) { + constructor(config: OTLPExporterNodeConfigBase = {}) { super( config, ProtobufLogsSerializer, diff --git a/experimental/packages/exporter-trace-otlp-grpc/README.md b/experimental/packages/exporter-trace-otlp-grpc/README.md index 09bb155c657..a18a7a787bf 100644 --- a/experimental/packages/exporter-trace-otlp-grpc/README.md +++ b/experimental/packages/exporter-trace-otlp-grpc/README.md @@ -33,9 +33,10 @@ const collectorOptions = { url: 'http://:', }; -const provider = new BasicTracerProvider(); const exporter = new OTLPTraceExporter(collectorOptions); -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); +const provider = new BasicTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(exporter)] +}); provider.register(); ['SIGINT', 'SIGTERM'].forEach(signal => { @@ -59,9 +60,10 @@ const collectorOptions = { credentials: grpc.credentials.createSsl(), }; -const provider = new BasicTracerProvider(); const exporter = new OTLPTraceExporter(collectorOptions); -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); +const provider = new BasicTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(exporter)] +}); provider.register(); ['SIGINT', 'SIGTERM'].forEach(signal => { @@ -100,9 +102,10 @@ const collectorOptions = { metadata, // // an optional grpc.Metadata object to be sent with each request }; -const provider = new BasicTracerProvider(); const exporter = new OTLPTraceExporter(collectorOptions); -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); +const provider = new BasicTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(exporter)] +}); provider.register(); ['SIGINT', 'SIGTERM'].forEach(signal => { diff --git a/experimental/packages/exporter-trace-otlp-grpc/package.json b/experimental/packages/exporter-trace-otlp-grpc/package.json index 9c4c5622937..d4f9e67a1dc 100644 --- a/experimental/packages/exporter-trace-otlp-grpc/package.json +++ b/experimental/packages/exporter-trace-otlp-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-trace-otlp-grpc", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,7 +50,7 @@ "devDependencies": { "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -67,11 +67,11 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-http/README.md b/experimental/packages/exporter-trace-otlp-http/README.md index 770c8dc22dc..427792eff5a 100644 --- a/experimental/packages/exporter-trace-otlp-http/README.md +++ b/experimental/packages/exporter-trace-otlp-http/README.md @@ -36,18 +36,21 @@ const collectorOptions = { concurrencyLimit: 10, // an optional limit on pending requests }; -const provider = new WebTracerProvider(); const exporter = new OTLPTraceExporter(collectorOptions); -provider.addSpanProcessor(new BatchSpanProcessor(exporter, { - // The maximum queue size. After the size is reached spans are dropped. - maxQueueSize: 100, - // The maximum batch size of every export. It must be smaller or equal to maxQueueSize. - maxExportBatchSize: 10, - // The interval between two consecutive exports - scheduledDelayMillis: 500, - // How long the export can run before it is cancelled - exportTimeoutMillis: 30000, -})); +const provider = new WebTracerProvider({ + spanProcessors: [ + new BatchSpanProcessor(exporter, { + // The maximum queue size. After the size is reached spans are dropped. + maxQueueSize: 100, + // The maximum batch size of every export. It must be smaller or equal to maxQueueSize. + maxExportBatchSize: 10, + // The interval between two consecutive exports + scheduledDelayMillis: 500, + // How long the export can run before it is cancelled + exportTimeoutMillis: 30000, + }) + ] +}); provider.register(); @@ -67,14 +70,17 @@ const collectorOptions = { concurrencyLimit: 10, // an optional limit on pending requests }; -const provider = new BasicTracerProvider(); const exporter = new OTLPTraceExporter(collectorOptions); -provider.addSpanProcessor(new BatchSpanProcessor(exporter, { - // The maximum queue size. After the size is reached spans are dropped. - maxQueueSize: 1000, - // The interval between two consecutive exports - scheduledDelayMillis: 30000, -})); +const provider = new BasicTracerProvider({ + spanProcessors: [ + new BatchSpanProcessor(exporter, { + // The maximum queue size. After the size is reached spans are dropped. + maxQueueSize: 1000, + // The interval between two consecutive exports + scheduledDelayMillis: 30000, + }) + ] +}); provider.register(); diff --git a/experimental/packages/exporter-trace-otlp-http/package.json b/experimental/packages/exporter-trace-otlp-http/package.json index 375d06e5bab..3e0243f3dad 100644 --- a/experimental/packages/exporter-trace-otlp-http/package.json +++ b/experimental/packages/exporter-trace-otlp-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-trace-otlp-http", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Collector Trace Exporter allows user to send collected traces to the OpenTelemetry Collector", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -92,11 +92,11 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-proto/README.md b/experimental/packages/exporter-trace-otlp-proto/README.md index 9b6141b873f..984fbaa4603 100644 --- a/experimental/packages/exporter-trace-otlp-proto/README.md +++ b/experimental/packages/exporter-trace-otlp-proto/README.md @@ -32,9 +32,10 @@ const collectorOptions = { }, //an optional object containing custom headers to be sent with each request will only work with http }; -const provider = new BasicTracerProvider(); const exporter = new OTLPTraceExporter(collectorOptions); -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); +const provider = new BasicTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(exporter)] +}); provider.register(); diff --git a/experimental/packages/exporter-trace-otlp-proto/package.json b/experimental/packages/exporter-trace-otlp-proto/package.json index a2c4ca6c42e..ad6122cf77b 100644 --- a/experimental/packages/exporter-trace-otlp-proto/package.json +++ b/experimental/packages/exporter-trace-otlp-proto/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-trace-otlp-proto", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector using protobuf over HTTP", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -90,11 +90,11 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-proto", "sideEffects": false diff --git a/experimental/packages/opentelemetry-browser-detector/README.md b/experimental/packages/opentelemetry-browser-detector/README.md index b1cbe45e574..bc0d0ad8a54 100644 --- a/experimental/packages/opentelemetry-browser-detector/README.md +++ b/experimental/packages/opentelemetry-browser-detector/README.md @@ -24,10 +24,18 @@ async function start(){ let detectedResources= await detectResources({detectors:[browserDetector]}); resource=resource.merge(detectedResources); const provider = new WebTracerProvider({ - resource + resource, + spanProcessors: [ + new BatchSpanProcessor( + new OTLPTraceExporter({ url:CONF.url, headers: {} }), + { + exportTimeoutMillis: CONF.timeOutMillis, + scheduledDelayMillis:CONF.delayMillis + } + ) + ] }); - provider.addSpanProcessor(new BatchSpanProcessor(new OTLPTraceExporter( {url:CONF.url ,headers:{}}),{exportTimeoutMillis:CONF.timeOutMillis,scheduledDelayMillis:CONF.delayMillis})); provider.register({ // Changing default contextManager to use ZoneContextManager - supports asynchronous operations - optional contextManager: new ZoneContextManager(), diff --git a/experimental/packages/opentelemetry-browser-detector/package.json b/experimental/packages/opentelemetry-browser-detector/package.json index 8e436ded403..239078d23fb 100644 --- a/experimental/packages/opentelemetry-browser-detector/package.json +++ b/experimental/packages/opentelemetry-browser-detector/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/opentelemetry-browser-detector", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Resource Detector for Browser", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -81,7 +81,7 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/resources": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/browser-detector" } diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json index 7b0b2b075e0..f5ee8346731 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-metrics-otlp-grpc", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -66,13 +66,13 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json index 69790933d0b..cfcf4b0b9e8 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-metrics-otlp-http", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -92,11 +92,11 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json index 7df6d907f5a..2772872b631 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-metrics-otlp-proto", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector using protobuf over HTTP", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -71,12 +71,12 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-proto", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-prometheus/package.json b/experimental/packages/opentelemetry-exporter-prometheus/package.json index 1fa8fdc6511..a091d60bb68 100644 --- a/experimental/packages/opentelemetry-exporter-prometheus/package.json +++ b/experimental/packages/opentelemetry-exporter-prometheus/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-prometheus", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -59,9 +59,9 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-prometheus", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/README.md b/experimental/packages/opentelemetry-instrumentation-fetch/README.md index 2d3c2d4aeed..bf966ef1383 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/README.md +++ b/experimental/packages/opentelemetry-instrumentation-fetch/README.md @@ -26,9 +26,9 @@ import { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; -const provider = new WebTracerProvider(); - -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +const provider = new WebTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); provider.register({ contextManager: new ZoneContextManager(), @@ -40,15 +40,14 @@ registerInstrumentations({ // or plugin can be also initialised separately and then set the tracer provider or meter provider const fetchInstrumentation = new FetchInstrumentation(); -const provider = new WebTracerProvider(); +const provider = new WebTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); provider.register({ contextManager: new ZoneContextManager(), }); fetchInstrumentation.setTracerProvider(provider); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); - - // and some test fetch('http://localhost:8090/fetch.js'); diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/package.json b/experimental/packages/opentelemetry-instrumentation-fetch/package.json index 0d1cab20dc7..7e955fe0022 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/package.json +++ b/experimental/packages/opentelemetry-instrumentation-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-fetch", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry instrumentation for fetch http client in web browsers", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -57,9 +57,9 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -87,9 +87,9 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch", diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/README.md b/experimental/packages/opentelemetry-instrumentation-grpc/README.md index e887ef2e429..6d209019b8d 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/README.md +++ b/experimental/packages/opentelemetry-instrumentation-grpc/README.md @@ -31,9 +31,10 @@ const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const provider = new NodeTracerProvider(); +const provider = new NodeTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); provider.register(); registerInstrumentations({ diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/package.json b/experimental/packages/opentelemetry-instrumentation-grpc/package.json index 06a6f6f8598..aacc1abfb9c 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/package.json +++ b/experimental/packages/opentelemetry-instrumentation-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-grpc", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry instrumentation for `@grpc/grpc-js` rpc client and server for gRPC framework", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,10 +50,10 @@ "@grpc/grpc-js": "^1.7.1", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@protobuf-ts/grpc-transport": "2.9.4", "@protobuf-ts/runtime": "2.9.4", "@protobuf-ts/runtime-rpc": "2.9.4", @@ -73,7 +73,7 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/instrumentation": "0.54.2", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-grpc", diff --git a/experimental/packages/opentelemetry-instrumentation-http/README.md b/experimental/packages/opentelemetry-instrumentation-http/README.md index 030e8f327b6..8237f30d1bc 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/README.md +++ b/experimental/packages/opentelemetry-instrumentation-http/README.md @@ -35,9 +35,10 @@ const { } = require('@opentelemetry/sdk-trace-node'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); -const provider = new NodeTracerProvider(); +const provider = new NodeTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); provider.register(); registerInstrumentations({ @@ -68,12 +69,6 @@ Http instrumentation has few options available to choose from. You can set the f | [`requireParentforIncomingSpans`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L105) | Boolean | Require that is a parent span to create new span for incoming requests. | | [`headersToSpanAttributes`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L107) | `object` | List of case insensitive HTTP headers to convert to span attributes. Client (outgoing requests, incoming responses) and server (incoming requests, outgoing responses) headers will be converted to span attributes in the form of `http.{request\|response}.header.header_name`, e.g. `http.response.header.content_length` | -The following options are deprecated: - -| Options | Type | Description | -| ------- | ---- | ----------- | -| `ignoreIncomingPaths` | `IgnoreMatcher[]` | Http instrumentation will not trace all incoming requests that match paths | - ## Semantic Conventions Prior to version `0.54`, this instrumentation created spans targeting an experimental semantic convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md). diff --git a/experimental/packages/opentelemetry-instrumentation-http/package.json b/experimental/packages/opentelemetry-instrumentation-http/package.json index d8ae335056d..a7a2714a560 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/package.json +++ b/experimental/packages/opentelemetry-instrumentation-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-http", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -49,10 +49,10 @@ }, "devDependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/request-promise-native": "1.0.21", @@ -75,8 +75,8 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", "@opentelemetry/semantic-conventions": "1.27.0", "forwarded-parse": "2.1.2", "semver": "^7.5.2" diff --git a/experimental/packages/opentelemetry-instrumentation-http/src/http.ts b/experimental/packages/opentelemetry-instrumentation-http/src/http.ts index f858d7a6c23..9262bfae177 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/src/http.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/src/http.ts @@ -39,15 +39,7 @@ import type * as http from 'http'; import type * as https from 'https'; import { Socket } from 'net'; import * as url from 'url'; -import { - Err, - Func, - Http, - HttpInstrumentationConfig, - HttpRequestArgs, - Https, - SemconvStability, -} from './types'; +import { HttpInstrumentationConfig } from './types'; import { VERSION } from './version'; import { InstrumentationBase, @@ -64,7 +56,6 @@ import { errorMonitor } from 'events'; import { ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, - ATTR_HTTP_ROUTE, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, @@ -79,20 +70,28 @@ import { getIncomingRequestAttributesOnResponse, getIncomingRequestMetricAttributes, getIncomingRequestMetricAttributesOnResponse, + getIncomingStableRequestMetricAttributesOnResponse, getOutgoingRequestAttributes, getOutgoingRequestAttributesOnResponse, getOutgoingRequestMetricAttributes, getOutgoingRequestMetricAttributesOnResponse, getRequestInfo, headerCapture, - isIgnored, isValidOptionsType, parseResponseStatus, setSpanWithError, } from './utils'; +import { + Err, + Func, + Http, + HttpRequestArgs, + Https, + SemconvStability, +} from './internal-types'; /** - * Http instrumentation instrumentation for Opentelemetry + * `node:http` and `node:https` instrumentation for OpenTelemetry */ export class HttpInstrumentation extends InstrumentationBase { /** keep track on spans not ended */ @@ -109,7 +108,7 @@ export class HttpInstrumentation extends InstrumentationBase { + const isESM = (moduleExports as any)[Symbol.toStringTag] === 'Module'; if (!this.getConfig().disableOutgoingRequestInstrumentation) { const patchedRequest = this._wrap( moduleExports, 'request', this._getPatchOutgoingRequestFunction('http') ) as unknown as Func; - this._wrap( + const patchedGet = this._wrap( moduleExports, 'get', this._getPatchOutgoingGetFunction(patchedRequest) ); + if (isESM) { + // To handle `import http from 'http'`, which returns the default + // export, we need to set `module.default.*`. + (moduleExports as any).default.request = patchedRequest; + (moduleExports as any).default.get = patchedGet; + } } if (!this.getConfig().disableIncomingRequestInstrumentation) { this._wrap( @@ -274,17 +280,24 @@ export class HttpInstrumentation extends InstrumentationBase { + const isESM = (moduleExports as any)[Symbol.toStringTag] === 'Module'; if (!this.getConfig().disableOutgoingRequestInstrumentation) { const patchedRequest = this._wrap( moduleExports, 'request', this._getPatchHttpsOutgoingRequestFunction('https') ) as unknown as Func; - this._wrap( + const patchedGet = this._wrap( moduleExports, 'get', this._getPatchHttpsOutgoingGetFunction(patchedRequest) ); + if (isESM) { + // To handle `import https from 'https'`, which returns the default + // export, we need to set `module.default.*`. + (moduleExports as any).default.request = patchedRequest; + (moduleExports as any).default.get = patchedGet; + } } if (!this.getConfig().disableIncomingRequestInstrumentation) { this._wrap( @@ -312,7 +325,7 @@ export class HttpInstrumentation extends InstrumentationBase boolean ): ((this: unknown, event: string, ...args: unknown[]) => boolean) => { @@ -324,13 +337,13 @@ export class HttpInstrumentation extends InstrumentationBase): Func => { return this._outgoingRequestFunction(component, original); }; } - protected _getPatchOutgoingGetFunction( + private _getPatchOutgoingGetFunction( clientRequest: ( options: http.RequestOptions | string | url.URL, ...args: HttpRequestArgs @@ -415,7 +428,8 @@ export class HttpInstrumentation extends InstrumentationBase - instrumentation._diag.error('caught ignoreIncomingPaths error: ', e) - ) || safeExecuteInTheMiddle( () => instrumentation.getConfig().ignoreIncomingRequestHook?.(request), @@ -622,15 +627,19 @@ export class HttpInstrumentation extends InstrumentationBase - instrumentation._diag.error('caught ignoreOutgoingUrls error: ', e) - ) || safeExecuteInTheMiddle( () => instrumentation @@ -852,7 +850,16 @@ export class HttpInstrumentation extends InstrumentationBase original.apply(this, [optionsParsed, ...args]), + () => { + if (invalidUrl) { + // we know that the url is invalid, there's no point in injecting context as it will fail validation. + // Passing in what the user provided will give the user an error that matches what they'd see without + // the instrumentation. + return original.apply(this, [options, ...args]); + } else { + return original.apply(this, [optionsParsed, ...args]); + } + }, error => { if (error) { setSpanWithError(span, error, instrumentation._semconvStability); @@ -900,6 +907,10 @@ export class HttpInstrumentation extends InstrumentationBase response.getHeader(header) @@ -912,7 +923,6 @@ export class HttpInstrumentation extends InstrumentationBase boolean); +export type HttpCallback = (res: IncomingMessage) => void; +export type RequestFunction = typeof request; +export type GetFunction = typeof get; + +export type HttpCallbackOptional = HttpCallback | undefined; + +// from node 10+ +export type RequestSignature = [http.RequestOptions, HttpCallbackOptional] & + HttpCallback; + +export type HttpRequestArgs = Array; + +export type ParsedRequestOptions = + | (http.RequestOptions & Partial) + | http.RequestOptions; +export type Http = typeof http; +export type Https = typeof https; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type Func = (...args: any[]) => T; + +export interface Err extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + stack?: string; +} + +/** + * Tracks whether this instrumentation emits old experimental, + * new stable, or both semantic conventions. + * + * Enum values chosen such that the enum may be used as a bitmask. + */ +export const enum SemconvStability { + /** Emit only stable semantic conventions */ + STABLE = 0x1, + /** Emit only old semantic conventions*/ + OLD = 0x2, + /** Emit both stable and old semantic conventions*/ + DUPLICATE = 0x1 | 0x2, +} diff --git a/experimental/packages/opentelemetry-instrumentation-http/src/types.ts b/experimental/packages/opentelemetry-instrumentation-http/src/types.ts index 19647fcb49a..b1c979f4122 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/src/types.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/src/types.ts @@ -14,40 +14,14 @@ * limitations under the License. */ import { Span, Attributes } from '@opentelemetry/api'; -import type * as http from 'http'; -import type * as https from 'https'; import { ClientRequest, - get, IncomingMessage, - request, ServerResponse, RequestOptions, } from 'http'; -import * as url from 'url'; import { InstrumentationConfig } from '@opentelemetry/instrumentation'; -export type IgnoreMatcher = string | RegExp | ((url: string) => boolean); -export type HttpCallback = (res: IncomingMessage) => void; -export type RequestFunction = typeof request; -export type GetFunction = typeof get; - -export type HttpCallbackOptional = HttpCallback | undefined; - -// from node 10+ -export type RequestSignature = [http.RequestOptions, HttpCallbackOptional] & - HttpCallback; - -export type HttpRequestArgs = Array; - -export type ParsedRequestOptions = - | (http.RequestOptions & Partial) - | http.RequestOptions; -export type Http = typeof http; -export type Https = typeof https; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export type Func = (...args: any[]) => T; - export interface HttpCustomAttributeFunction { ( span: Span, @@ -84,18 +58,8 @@ export interface StartOutgoingSpanCustomAttributeFunction { * Options available for the HTTP instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http#http-instrumentation-options)) */ export interface HttpInstrumentationConfig extends InstrumentationConfig { - /** - * Not trace all incoming requests that match paths - * @deprecated use `ignoreIncomingRequestHook` instead - */ - ignoreIncomingPaths?: IgnoreMatcher[]; /** Not trace all incoming requests that matched with custom function */ ignoreIncomingRequestHook?: IgnoreIncomingRequestFunction; - /** - * Not trace all outgoing requests that match urls - * @deprecated use `ignoreOutgoingRequestHook` instead - */ - ignoreOutgoingUrls?: IgnoreMatcher[]; /** Not trace all outgoing requests that matched with custom function */ ignoreOutgoingRequestHook?: IgnoreOutgoingRequestFunction; /** If set to true, incoming requests will not be instrumented at all. */ @@ -124,26 +88,3 @@ export interface HttpInstrumentationConfig extends InstrumentationConfig { server?: { requestHeaders?: string[]; responseHeaders?: string[] }; }; } - -export interface Err extends Error { - errno?: number; - code?: string; - path?: string; - syscall?: string; - stack?: string; -} - -/** - * Tracks whether this instrumentation emits old experimental, - * new stable, or both semantic conventions. - * - * Enum values chosen such that the enum may be used as a bitmask. - */ -export const enum SemconvStability { - /** Emit only stable semantic conventions */ - STABLE = 0x1, - /** Emit only old semantic convetions */ - OLD = 0x2, - /** Emit both stable and old semantic convetions */ - DUPLICATE = 0x1 | 0x2, -} diff --git a/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts b/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts index 8a3106d0f90..e7a60aa054f 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/src/utils.ts @@ -19,6 +19,7 @@ import { Span, context, SpanKind, + DiagLogger, } from '@opentelemetry/api'; import { ATTR_CLIENT_ADDRESS, @@ -26,6 +27,7 @@ import { ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_REQUEST_METHOD_ORIGINAL, ATTR_HTTP_RESPONSE_STATUS_CODE, + ATTR_HTTP_ROUTE, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_VERSION, @@ -75,7 +77,7 @@ import { IgnoreMatcher, ParsedRequestOptions, SemconvStability, -} from './types'; +} from './internal-types'; import forwardedParse = require('forwarded-parse'); /** @@ -145,39 +147,6 @@ export const satisfiesPattern = ( } }; -/** - * Check whether the given request is ignored by configuration - * It will not re-throw exceptions from `list` provided by the client - * @param constant e.g URL of request - * @param [list] List of ignore patterns - * @param [onException] callback for doing something when an exception has - * occurred - */ -export const isIgnored = ( - constant: string, - list?: IgnoreMatcher[], - onException?: (error: unknown) => void -): boolean => { - if (!list) { - // No ignored urls - trace everything - return false; - } - // Try/catch outside the loop for failing fast - try { - for (const pattern of list) { - if (satisfiesPattern(constant, pattern)) { - return true; - } - } - } catch (e) { - if (onException) { - onException(e); - } - } - - return false; -}; - /** * Sets the span with the error passed in params * @param {Span} span the span that need to be set @@ -267,27 +236,104 @@ export const isCompressed = ( return !!encoding && encoding !== 'identity'; }; +/** + * Mimics Node.js conversion of URL strings to RequestOptions expected by + * `http.request` and `https.request` APIs. + * + * See https://github.com/nodejs/node/blob/2505e217bba05fc581b572c685c5cf280a16c5a3/lib/internal/url.js#L1415-L1437 + * + * @param stringUrl + * @throws TypeError if the URL is not valid. + */ +function stringUrlToHttpOptions( + stringUrl: string +): RequestOptions & { pathname: string } { + // This is heavily inspired by Node.js handling of the same situation, trying + // to follow it as closely as possible while keeping in mind that we only + // deal with string URLs, not URL objects. + const { + hostname, + pathname, + port, + username, + password, + search, + protocol, + hash, + href, + origin, + host, + } = new URL(stringUrl); + + const options: RequestOptions & { + pathname: string; + hash: string; + search: string; + href: string; + origin: string; + } = { + protocol: protocol, + hostname: + hostname && hostname[0] === '[' ? hostname.slice(1, -1) : hostname, + hash: hash, + search: search, + pathname: pathname, + path: `${pathname || ''}${search || ''}`, + href: href, + origin: origin, + host: host, + }; + if (port !== '') { + options.port = Number(port); + } + if (username || password) { + options.auth = `${decodeURIComponent(username)}:${decodeURIComponent( + password + )}`; + } + return options; +} + /** * Makes sure options is an url object * return an object with default value and parsed options + * @param logger component logger * @param options original options for the request * @param [extraOptions] additional options for the request */ export const getRequestInfo = ( + logger: DiagLogger, options: url.URL | RequestOptions | string, extraOptions?: RequestOptions ): { origin: string; pathname: string; method: string; + invalidUrl: boolean; optionsParsed: RequestOptions; } => { - let pathname = '/'; - let origin = ''; + let pathname: string; + let origin: string; let optionsParsed: RequestOptions; + let invalidUrl = false; if (typeof options === 'string') { - optionsParsed = url.parse(options); - pathname = (optionsParsed as url.UrlWithStringQuery).pathname || '/'; + try { + const convertedOptions = stringUrlToHttpOptions(options); + optionsParsed = convertedOptions; + pathname = convertedOptions.pathname || '/'; + } catch (e) { + invalidUrl = true; + logger.verbose( + 'Unable to parse URL provided to HTTP request, using fallback to determine path. Original error:', + e + ); + // for backward compatibility with how url.parse() behaved. + optionsParsed = { + path: options, + }; + pathname = optionsParsed.path || '/'; + } + origin = `${optionsParsed.protocol || 'http:'}//${optionsParsed.host}`; if (extraOptions !== undefined) { Object.assign(optionsParsed, extraOptions); @@ -317,16 +363,23 @@ export const getRequestInfo = ( { protocol: options.host ? 'http:' : undefined }, options ); - pathname = (options as url.URL).pathname; - if (!pathname && optionsParsed.path) { - pathname = url.parse(optionsParsed.path).pathname || '/'; - } + const hostname = optionsParsed.host || (optionsParsed.port != null ? `${optionsParsed.hostname}${optionsParsed.port}` : optionsParsed.hostname); origin = `${optionsParsed.protocol || 'http:'}//${hostname}`; + + pathname = (options as url.URL).pathname; + if (!pathname && optionsParsed.path) { + try { + const parsedUrl = new URL(optionsParsed.path, origin); + pathname = parsedUrl.pathname || '/'; + } catch (e) { + pathname = '/'; + } + } } // some packages return method in lowercase.. @@ -335,7 +388,7 @@ export const getRequestInfo = ( ? optionsParsed.method.toUpperCase() : 'GET'; - return { origin, pathname, method, optionsParsed }; + return { origin, pathname, method, optionsParsed, invalidUrl }; }; /** @@ -604,7 +657,7 @@ function getServerAddress( ): { host: string; port?: string } | null { const forwardedHeader = request.headers['forwarded']; if (forwardedHeader) { - for (const entry of forwardedParse(forwardedHeader)) { + for (const entry of parseForwardedHeader(forwardedHeader)) { if (entry.host) { return parseHostHeader(entry.host, entry.proto); } @@ -667,7 +720,7 @@ export function getRemoteClientAddress( ): string | null { const forwardedHeader = request.headers['forwarded']; if (forwardedHeader) { - for (const entry of forwardedParse(forwardedHeader)) { + for (const entry of parseForwardedHeader(forwardedHeader)) { if (entry.for) { return entry.for; } @@ -689,6 +742,42 @@ export function getRemoteClientAddress( return null; } +function getInfoFromIncomingMessage( + component: 'http' | 'https', + request: IncomingMessage, + logger: DiagLogger +): { pathname?: string; search?: string; toString: () => string } { + try { + if (request.headers.host) { + return new URL( + request.url ?? '/', + `${component}://${request.headers.host}` + ); + } else { + const unsafeParsedUrl = new URL( + request.url ?? '/', + // using localhost as a workaround to still use the URL constructor for parsing + `${component}://localhost` + ); + // since we use localhost as a workaround, ensure we hide the rest of the properties to avoid + // our workaround leaking though. + return { + pathname: unsafeParsedUrl.pathname, + search: unsafeParsedUrl.search, + toString: function () { + // we cannot use the result of unsafeParsedUrl.toString as it's potentially wrong. + return unsafeParsedUrl.pathname + unsafeParsedUrl.search; + }, + }; + } + } catch (e) { + // something is wrong, use undefined - this *should* never happen, logging + // for troubleshooting in case it does happen. + logger.verbose('Unable to get URL from request', e); + return {}; + } +} + /** * Returns incoming request attributes scoped to the request data * @param {IncomingMessage} request the request object @@ -702,18 +791,15 @@ export const getIncomingRequestAttributes = ( serverName?: string; hookAttributes?: Attributes; semconvStability: SemconvStability; - } + }, + logger: DiagLogger ): Attributes => { const headers = request.headers; const userAgent = headers['user-agent']; const ips = headers['x-forwarded-for']; const httpVersion = request.httpVersion; - const requestUrl = request.url ? url.parse(request.url) : null; - const host = requestUrl?.host || headers.host; - const hostname = - requestUrl?.hostname || - host?.replace(/^(.*)(:[0-9]{1,5})/, '$1') || - 'localhost'; + const host = headers.host; + const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, '$1') || 'localhost'; const method = request.method; const normalizedMethod = normalizeMethod(method); @@ -733,8 +819,14 @@ export const getIncomingRequestAttributes = ( [ATTR_USER_AGENT_ORIGINAL]: userAgent, }; - if (requestUrl?.pathname != null) { - newAttributes[ATTR_URL_PATH] = requestUrl.pathname; + const parsedUrl = getInfoFromIncomingMessage( + options.component, + request, + logger + ); + + if (parsedUrl?.pathname != null) { + newAttributes[ATTR_URL_PATH] = parsedUrl.pathname; } if (remoteClientAddress != null) { @@ -751,11 +843,7 @@ export const getIncomingRequestAttributes = ( } const oldAttributes: Attributes = { - [SEMATTRS_HTTP_URL]: getAbsoluteUrl( - requestUrl, - headers, - `${options.component}:` - ), + [SEMATTRS_HTTP_URL]: parsedUrl.toString(), [SEMATTRS_HTTP_HOST]: host, [SEMATTRS_NET_HOST_NAME]: hostname, [SEMATTRS_HTTP_METHOD]: method, @@ -770,8 +858,9 @@ export const getIncomingRequestAttributes = ( oldAttributes[SEMATTRS_HTTP_SERVER_NAME] = serverName; } - if (requestUrl) { - oldAttributes[SEMATTRS_HTTP_TARGET] = requestUrl.path || '/'; + if (parsedUrl?.pathname) { + oldAttributes[SEMATTRS_HTTP_TARGET] = + parsedUrl?.pathname + parsedUrl?.search || '/'; } if (userAgent !== undefined) { @@ -822,7 +911,7 @@ export const getIncomingRequestAttributesOnResponse = ( const { socket } = request; const { statusCode, statusMessage } = response; - const newAttributes = { + const newAttributes: Attributes = { [ATTR_HTTP_RESPONSE_STATUS_CODE]: statusCode, }; @@ -842,6 +931,7 @@ export const getIncomingRequestAttributesOnResponse = ( if (rpcMetadata?.type === RPCType.HTTP && rpcMetadata.route !== undefined) { oldAttributes[SEMATTRS_HTTP_ROUTE] = rpcMetadata.route; + newAttributes[ATTR_HTTP_ROUTE] = rpcMetadata.route; } switch (semconvStability) { @@ -872,6 +962,22 @@ export const getIncomingRequestMetricAttributesOnResponse = ( return metricAttributes; }; +export const getIncomingStableRequestMetricAttributesOnResponse = ( + spanAttributes: Attributes +): Attributes => { + const metricAttributes: Attributes = {}; + if (spanAttributes[ATTR_HTTP_ROUTE] !== undefined) { + metricAttributes[ATTR_HTTP_ROUTE] = spanAttributes[SEMATTRS_HTTP_ROUTE]; + } + + // required if and only if one was sent, same as span requirement + if (spanAttributes[ATTR_HTTP_RESPONSE_STATUS_CODE]) { + metricAttributes[ATTR_HTTP_RESPONSE_STATUS_CODE] = + spanAttributes[ATTR_HTTP_RESPONSE_STATUS_CODE]; + } + return metricAttributes; +}; + export function headerCapture(type: 'request' | 'response', headers: string[]) { const normalizedHeaders = new Map(); for (let i = 0, len = headers.length; i < len; i++) { @@ -931,3 +1037,11 @@ function normalizeMethod(method?: string | null) { return '_OTHER'; } + +function parseForwardedHeader(header: string): Record[] { + try { + return forwardedParse(header); + } catch { + return []; + } +} diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts index b6470e1f3e6..0d515baf46d 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts @@ -33,6 +33,7 @@ import { ATTR_CLIENT_ADDRESS, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, + ATTR_HTTP_ROUTE, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_PEER_PORT, ATTR_NETWORK_PROTOCOL_VERSION, @@ -65,7 +66,7 @@ import * as assert from 'assert'; import * as nock from 'nock'; import * as path from 'path'; import { HttpInstrumentation } from '../../src/http'; -import { HttpInstrumentationConfig, SemconvStability } from '../../src/types'; +import { HttpInstrumentationConfig } from '../../src/types'; import { assertSpan } from '../utils/assertSpan'; import { DummyPropagation } from '../utils/DummyPropagation'; import { httpRequest } from '../utils/httpRequest'; @@ -87,6 +88,7 @@ instrumentation.disable(); import * as http from 'http'; import { AttributeNames } from '../../src/enums/AttributeNames'; import { getRemoteClientAddress } from '../../src/utils'; +import { SemconvStability } from '../../src/internal-types'; const applyCustomAttributesOnSpanErrorMessage = 'bad applyCustomAttributesOnSpan function'; @@ -182,19 +184,9 @@ describe('HttpInstrumentation', () => { before(async () => { const config: HttpInstrumentationConfig = { - ignoreIncomingPaths: [ - (url: string) => { - throw new Error('bad ignoreIncomingPaths function'); - }, - ], ignoreIncomingRequestHook: _request => { throw new Error('bad ignoreIncomingRequestHook function'); }, - ignoreOutgoingUrls: [ - (url: string) => { - throw new Error('bad ignoreOutgoingUrls function'); - }, - ], ignoreOutgoingRequestHook: _request => { throw new Error('bad ignoreOutgoingRequestHook function'); }, @@ -307,21 +299,11 @@ describe('HttpInstrumentation', () => { before(async () => { instrumentation.setConfig({ - ignoreIncomingPaths: [ - '/ignored/string', - /\/ignored\/regexp$/i, - (url: string) => url.endsWith('/ignored/function'), - ], ignoreIncomingRequestHook: request => { return ( request.headers['user-agent']?.match('ignored-string') != null ); }, - ignoreOutgoingUrls: [ - `${protocol}://${hostname}:${serverPort}/ignored/string`, - /\/ignored\/regexp$/i, - (url: string) => url.endsWith('/ignored/function'), - ], ignoreOutgoingRequestHook: request => { if (request.headers?.['user-agent'] != null) { return ( @@ -368,6 +350,15 @@ describe('HttpInstrumentation', () => { assert.strictEqual(rpcData.route, undefined); rpcData.route = 'TheRoute'; } + if (request.url?.includes('/login')) { + assert.strictEqual( + request.headers.authorization, + 'Basic ' + Buffer.from('username:password').toString('base64') + ); + } + if (request.url?.includes('/withQuery')) { + assert.match(request.url, /withQuery\?foo=bar$/); + } response.end('Test Server Response'); }); @@ -591,19 +582,7 @@ describe('HttpInstrumentation', () => { }); }); - for (const ignored of ['string', 'function', 'regexp']) { - it(`should not trace ignored requests with paths (client and server side) with type ${ignored}`, async () => { - const testPath = `/ignored/${ignored}`; - - await httpRequest.get( - `${protocol}://${hostname}:${serverPort}${testPath}` - ); - const spans = memoryExporter.getFinishedSpans(); - assert.strictEqual(spans.length, 0); - }); - } - - it('should not trace ignored requests with headers (client and server side)', async () => { + it('should not trace ignored requests when ignore hook returns true', async () => { const testValue = 'ignored-string'; await Promise.all([ @@ -617,7 +596,7 @@ describe('HttpInstrumentation', () => { assert.strictEqual(spans.length, 0); }); - it('should trace not ignored requests with headers (client and server side)', async () => { + it('should trace requests when ignore hook returns false', async () => { await httpRequest.get(`${protocol}://${hostname}:${serverPort}`, { headers: { 'user-agent': 'test-bot', @@ -627,7 +606,7 @@ describe('HttpInstrumentation', () => { assert.strictEqual(spans.length, 2); }); - for (const arg of ['string', {}, new Date()]) { + for (const arg of [{}, new Date()]) { it(`should be traceable and not throw exception in ${protocol} instrumentation when passing the following argument ${JSON.stringify( arg )}`, async () => { @@ -1035,6 +1014,34 @@ describe('HttpInstrumentation', () => { assert.deepStrictEqual(warnMessages, []); }); + + it('should not throw with cyrillic characters in the request path', async () => { + // see https://github.com/open-telemetry/opentelemetry-js/issues/5060 + await httpRequest.get(`${protocol}://${hostname}:${serverPort}/привет`); + }); + + it('should keep username and password in the request', async () => { + await httpRequest.get( + `${protocol}://username:password@${hostname}:${serverPort}/login` + ); + }); + + it('should keep query in the request', async () => { + await httpRequest.get( + `${protocol}://${hostname}:${serverPort}/withQuery?foo=bar` + ); + }); + + it('using an invalid url does throw from client but still creates a span', async () => { + try { + await httpRequest.get(`http://instrumentation.test:string-as-port/`); + } catch (e) { + assert.match(e.message, /Invalid URL/); + } + + const spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 1); + }); }); describe('with semconv stability set to http', () => { @@ -1134,6 +1141,32 @@ describe('HttpInstrumentation', () => { [ATTR_URL_SCHEME]: protocol, }); }); + + it('should generate semconv 1.27 server spans with route when RPC metadata is available', async () => { + const response = await httpRequest.get( + `${protocol}://${hostname}:${serverPort}${pathname}/setroute` + ); + const spans = memoryExporter.getFinishedSpans(); + const [incomingSpan, _] = spans; + assert.strictEqual(spans.length, 2); + + const body = JSON.parse(response.data); + + // should have only required and recommended attributes for semconv 1.27 + assert.deepStrictEqual(incomingSpan.attributes, { + [ATTR_CLIENT_ADDRESS]: body.address, + [ATTR_HTTP_REQUEST_METHOD]: HTTP_REQUEST_METHOD_VALUE_GET, + [ATTR_SERVER_ADDRESS]: hostname, + [ATTR_HTTP_ROUTE]: 'TheRoute', + [ATTR_SERVER_PORT]: serverPort, + [ATTR_HTTP_RESPONSE_STATUS_CODE]: 200, + [ATTR_NETWORK_PEER_ADDRESS]: body.address, + [ATTR_NETWORK_PEER_PORT]: response.clientRemotePort, + [ATTR_NETWORK_PROTOCOL_VERSION]: '1.1', + [ATTR_URL_PATH]: `${pathname}/setroute`, + [ATTR_URL_SCHEME]: protocol, + }); + }); }); describe('with semconv stability set to http/dup', () => { @@ -1146,6 +1179,13 @@ describe('HttpInstrumentation', () => { instrumentation['_semconvStability'] = SemconvStability.DUPLICATE; instrumentation.enable(); server = http.createServer((request, response) => { + if (request.url?.includes('/setroute')) { + const rpcData = getRPCMetadata(context.active()); + assert.ok(rpcData != null); + assert.strictEqual(rpcData.type, RPCType.HTTP); + assert.strictEqual(rpcData.route, undefined); + rpcData.route = 'TheRoute'; + } response.setHeader('Content-Type', 'application/json'); response.end( JSON.stringify({ address: getRemoteClientAddress(request) }) @@ -1241,6 +1281,50 @@ describe('HttpInstrumentation', () => { [AttributeNames.HTTP_STATUS_TEXT]: 'OK', }); }); + + it('should create server spans with semconv 1.27 and old 1.7 including http.route if RPC metadata is available', async () => { + const response = await httpRequest.get( + `${protocol}://${hostname}:${serverPort}${pathname}/setroute` + ); + const spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2); + const incomingSpan = spans[0]; + const body = JSON.parse(response.data); + + // should have only required and recommended attributes for semconv 1.27 + assert.deepStrictEqual(incomingSpan.attributes, { + // 1.27 attributes + [ATTR_CLIENT_ADDRESS]: body.address, + [ATTR_HTTP_REQUEST_METHOD]: HTTP_REQUEST_METHOD_VALUE_GET, + [ATTR_SERVER_ADDRESS]: hostname, + [ATTR_SERVER_PORT]: serverPort, + [ATTR_HTTP_RESPONSE_STATUS_CODE]: 200, + [ATTR_NETWORK_PEER_ADDRESS]: body.address, + [ATTR_NETWORK_PEER_PORT]: response.clientRemotePort, + [ATTR_NETWORK_PROTOCOL_VERSION]: '1.1', + [ATTR_URL_PATH]: `${pathname}/setroute`, + [ATTR_URL_SCHEME]: protocol, + [ATTR_HTTP_ROUTE]: 'TheRoute', + + // 1.7 attributes + [SEMATTRS_HTTP_FLAVOR]: '1.1', + [SEMATTRS_HTTP_HOST]: `${hostname}:${serverPort}`, + [SEMATTRS_HTTP_METHOD]: 'GET', + [SEMATTRS_HTTP_SCHEME]: protocol, + [SEMATTRS_HTTP_STATUS_CODE]: 200, + [SEMATTRS_HTTP_TARGET]: `${pathname}/setroute`, + [SEMATTRS_HTTP_URL]: `http://${hostname}:${serverPort}${pathname}/setroute`, + [SEMATTRS_NET_TRANSPORT]: 'ip_tcp', + [SEMATTRS_NET_HOST_IP]: body.address, + [SEMATTRS_NET_HOST_NAME]: hostname, + [SEMATTRS_NET_HOST_PORT]: serverPort, + [SEMATTRS_NET_PEER_IP]: body.address, + [SEMATTRS_NET_PEER_PORT]: response.clientRemotePort, + + // unspecified old names + [AttributeNames.HTTP_STATUS_TEXT]: 'OK', + }); + }); }); describe('with require parent span', () => { diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-metrics.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-metrics.test.ts index de43ae8c521..907a67b10b0 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-metrics.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-metrics.test.ts @@ -22,6 +22,7 @@ import { import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { ATTR_HTTP_REQUEST_METHOD, + ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_HTTP_ROUTE, ATTR_NETWORK_PROTOCOL_VERSION, ATTR_SERVER_ADDRESS, @@ -47,7 +48,7 @@ instrumentation.enable(); instrumentation.disable(); import * as http from 'http'; -import { SemconvStability } from '../../src/types'; +import { SemconvStability } from '../../src/internal-types'; import { getRPCMetadata, RPCType } from '@opentelemetry/core'; import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks'; @@ -181,7 +182,7 @@ describe('metrics', () => { }); }); - describe('with no semconv stability set to stable', () => { + describe('with semconv stability set to stable', () => { before(() => { instrumentation['_semconvStability'] = SemconvStability.STABLE; }); @@ -217,7 +218,9 @@ describe('metrics', () => { assert.deepStrictEqual(metrics[0].dataPoints[0].attributes, { [ATTR_HTTP_REQUEST_METHOD]: 'GET', [ATTR_URL_SCHEME]: 'http', + [ATTR_HTTP_RESPONSE_STATUS_CODE]: 200, [ATTR_NETWORK_PROTOCOL_VERSION]: '1.1', + [ATTR_HTTP_ROUTE]: 'TheRoute', }); assert.strictEqual(metrics[1].dataPointType, DataPointType.HISTOGRAM); @@ -244,7 +247,7 @@ describe('metrics', () => { }); }); - describe('with no semconv stability set to duplicate', () => { + describe('with semconv stability set to duplicate', () => { before(() => { instrumentation['_semconvStability'] = SemconvStability.DUPLICATE; }); @@ -353,6 +356,7 @@ describe('metrics', () => { assert.deepStrictEqual(metrics[2].dataPoints[0].attributes, { [ATTR_HTTP_REQUEST_METHOD]: 'GET', [ATTR_URL_SCHEME]: 'http', + [ATTR_HTTP_RESPONSE_STATUS_CODE]: 200, [ATTR_NETWORK_PROTOCOL_VERSION]: '1.1', [ATTR_HTTP_ROUTE]: 'TheRoute', }); diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts index 0f48a30ae72..a9f3b506a60 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-enable.test.ts @@ -111,19 +111,9 @@ describe('HttpsInstrumentation', () => { before(() => { instrumentation.setConfig({ - ignoreIncomingPaths: [ - (url: string) => { - throw new Error('bad ignoreIncomingPaths function'); - }, - ], ignoreIncomingRequestHook: _request => { throw new Error('bad ignoreIncomingRequestHook function'); }, - ignoreOutgoingUrls: [ - (url: string) => { - throw new Error('bad ignoreOutgoingUrls function'); - }, - ], ignoreOutgoingRequestHook: _request => { throw new Error('bad ignoreOutgoingRequestHook function'); }, @@ -192,21 +182,11 @@ describe('HttpsInstrumentation', () => { before(() => { instrumentation.setConfig({ - ignoreIncomingPaths: [ - '/ignored/string', - /\/ignored\/regexp$/i, - (url: string) => url.endsWith('/ignored/function'), - ], ignoreIncomingRequestHook: request => { return ( request.headers['user-agent']?.match('ignored-string') != null ); }, - ignoreOutgoingUrls: [ - `${protocol}://${hostname}:${serverPort}/ignored/string`, - /\/ignored\/regexp$/i, - (url: string) => url.endsWith('/ignored/function'), - ], ignoreOutgoingRequestHook: request => { if (request.headers?.['user-agent'] != null) { return ( @@ -441,19 +421,7 @@ describe('HttpsInstrumentation', () => { }); }); - for (const ignored of ['string', 'function', 'regexp']) { - it(`should not trace ignored requests with paths (client and server side) with type ${ignored}`, async () => { - const testPath = `/ignored/${ignored}`; - - await httpsRequest.get( - `${protocol}://${hostname}:${serverPort}${testPath}` - ); - const spans = memoryExporter.getFinishedSpans(); - assert.strictEqual(spans.length, 0); - }); - } - - it('should not trace ignored requests with headers (client and server side)', async () => { + it('should trace requests when ignore hook returns false', async () => { const testValue = 'ignored-string'; await Promise.all([ @@ -467,7 +435,7 @@ describe('HttpsInstrumentation', () => { assert.strictEqual(spans.length, 0); }); - for (const arg of ['string', {}, new Date()]) { + for (const arg of [{}, new Date()]) { it(`should be traceable and not throw exception in ${protocol} instrumentation when passing the following argument ${JSON.stringify( arg )}`, async () => { @@ -704,6 +672,31 @@ describe('HttpsInstrumentation', () => { }); req.end(); }); + + it('should keep username and password in the request', async () => { + await httpsRequest.get( + `${protocol}://username:password@${hostname}:${serverPort}/login` + ); + }); + + it('should keep query in the request', async () => { + await httpsRequest.get( + `${protocol}://${hostname}:${serverPort}/withQuery?foo=bar` + ); + }); + + it('using an invalid url does throw from client but still creates a span', async () => { + try { + await httpsRequest.get( + `${protocol}://instrumentation.test:string-as-port/` + ); + } catch (e) { + assert.match(e.message, /Invalid URL/); + } + + const spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 1); + }); }); describe('partially disable instrumentation', () => { diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts index c091529c9fc..4f41548c897 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts @@ -19,6 +19,7 @@ import { SpanKind, context, Span, + diag, } from '@opentelemetry/api'; import { SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH, @@ -37,7 +38,7 @@ import { IgnoreMatcher, ParsedRequestOptions, SemconvStability, -} from '../../src/types'; +} from '../../src/internal-types'; import * as utils from '../../src/utils'; import { AttributeNames } from '../../src/enums/AttributeNames'; import { RPCType, setRPCMetadata } from '@opentelemetry/core'; @@ -101,7 +102,7 @@ describe('Utility', () => { urlParsedWithUndefinedHostAndNullPort, whatWgUrl, ]) { - const result = utils.getRequestInfo(param); + const result = utils.getRequestInfo(diag, param); assert.strictEqual(result.optionsParsed.hostname, 'google.fr'); assert.strictEqual(result.optionsParsed.protocol, 'http:'); assert.strictEqual(result.optionsParsed.path, '/aPath?qu=ry'); @@ -149,85 +150,6 @@ describe('Utility', () => { }); }); - describe('isIgnored()', () => { - beforeEach(() => { - sinon.spy(utils, 'satisfiesPattern'); - }); - - afterEach(() => { - sinon.restore(); - }); - - it('should call isSatisfyPattern, n match', () => { - const answer1 = utils.isIgnored('/test/1', ['/test/11']); - assert.strictEqual(answer1, false); - assert.strictEqual( - (utils.satisfiesPattern as sinon.SinonSpy).callCount, - 1 - ); - }); - - it('should call isSatisfyPattern, match for function', () => { - const answer1 = utils.isIgnored('/test/1', [ - url => url.endsWith('/test/1'), - ]); - assert.strictEqual(answer1, true); - }); - - it('should not re-throw when function throws an exception', () => { - const onException = (e: unknown) => { - // Do nothing - }; - for (const callback of [undefined, onException]) { - assert.doesNotThrow(() => - utils.isIgnored( - '/test/1', - [ - () => { - throw new Error('test'); - }, - ], - callback - ) - ); - } - }); - - it('should call onException when function throws an exception', () => { - const onException = sinon.spy(); - assert.doesNotThrow(() => - utils.isIgnored( - '/test/1', - [ - () => { - throw new Error('test'); - }, - ], - onException - ) - ); - assert.strictEqual((onException as sinon.SinonSpy).callCount, 1); - }); - - it('should not call isSatisfyPattern', () => { - utils.isIgnored('/test/1', []); - assert.strictEqual( - (utils.satisfiesPattern as sinon.SinonSpy).callCount, - 0 - ); - }); - - it('should return false on empty list', () => { - const answer1 = utils.isIgnored('/test/1', []); - assert.strictEqual(answer1, false); - }); - - it('should not throw and return false when list is undefined', () => { - const answer2 = utils.isIgnored('/test/1', undefined); - assert.strictEqual(answer2, false); - }); - }); - describe('getAbsoluteUrl()', () => { it('should return absolute url with localhost', () => { const path = '/test/1'; @@ -511,10 +433,14 @@ describe('Utility', () => { 'user-agent': 'chrome', 'x-forwarded-for': ', , ', }; - const attributes = utils.getIncomingRequestAttributes(request, { - component: 'http', - semconvStability: SemconvStability.OLD, - }); + const attributes = utils.getIncomingRequestAttributes( + request, + { + component: 'http', + semconvStability: SemconvStability.OLD, + }, + diag + ); assert.strictEqual(attributes[SEMATTRS_HTTP_ROUTE], undefined); }); @@ -527,10 +453,14 @@ describe('Utility', () => { request.headers = { 'user-agent': 'chrome', }; - const attributes = utils.getIncomingRequestAttributes(request, { - component: 'http', - semconvStability: SemconvStability.OLD, - }); + const attributes = utils.getIncomingRequestAttributes( + request, + { + component: 'http', + semconvStability: SemconvStability.OLD, + }, + diag + ); assert.strictEqual(attributes[SEMATTRS_HTTP_TARGET], '/user/?q=val'); }); }); diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/integrations/esm.test.mjs b/experimental/packages/opentelemetry-instrumentation-http/test/integrations/esm.test.mjs index db35b4ee455..da19460c4eb 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/integrations/esm.test.mjs +++ b/experimental/packages/opentelemetry-instrumentation-http/test/integrations/esm.test.mjs @@ -18,8 +18,22 @@ import * as assert from 'assert'; import * as fs from 'fs'; -import * as http from 'http'; -import * as https from 'https'; + +import httpA from 'http'; // ESM import style A +import * as httpB from 'http'; // ESM import style B +import { + createServer as httpCreateServerC, + request as httpRequestC, + get as httpGetC, +} from 'http'; // ESM import style C + +import httpsA from 'https'; // ESM import style A +import * as httpsB from 'https'; // ESM import style B +import { + createServer as httpsCreateServerC, + request as httpsRequestC, + get as httpsGetC, +} from 'https'; // ESM import style C import { SpanKind } from '@opentelemetry/api'; import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; @@ -37,183 +51,229 @@ provider.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); const instrumentation = new HttpInstrumentation(); instrumentation.setTracerProvider(provider); -describe('HttpInstrumentation ESM Integration tests', () => { - let port; - let server; +const httpImports = [ + { + style: 'import http from "http"', + createServer: httpA.createServer, + request: httpA.request, + get: httpA.get, + }, + { + style: 'import * as http from "http"', + createServer: httpB.createServer, + request: httpB.request, + get: httpB.get, + }, + { + style: 'import {...} from "http"', + createServer: httpCreateServerC, + request: httpRequestC, + get: httpGetC, + }, +]; - before(done => { - server = http.createServer((req, res) => { - req.resume(); - req.on('end', () => { - res.writeHead(200); - res.end('pong'); +for (let httpImport of httpImports) { + describe(`HttpInstrumentation ESM Integration tests (${httpImport.style})`, () => { + let port; + let server; + + before(done => { + server = httpImport.createServer((req, res) => { + req.resume(); + req.on('end', () => { + res.writeHead(200); + res.end('pong'); + }); }); - }); - server.listen(0, '127.0.0.1', () => { - port = server.address().port; - assert.ok(Number.isInteger(port)); - done(); + server.listen(0, '127.0.0.1', () => { + port = server.address().port; + assert.ok(Number.isInteger(port)); + done(); + }); }); - }); - - after(done => { - server.close(done); - }); - beforeEach(() => { - memoryExporter.reset(); - }); + after(done => { + server.close(done); + }); - it('should instrument http requests using http.request', async () => { - const spanValidations = { - httpStatusCode: 200, - httpMethod: 'GET', - hostname: '127.0.0.1', - pathname: '/http.request', - component: 'http', - }; - - await new Promise(resolve => { - const clientReq = http.request( - `http://127.0.0.1:${port}/http.request`, - clientRes => { - spanValidations.resHeaders = clientRes.headers; - clientRes.resume(); - clientRes.on('end', resolve); - } - ); - clientReq.end(); + beforeEach(() => { + memoryExporter.reset(); }); - let spans = memoryExporter.getFinishedSpans(); - assert.strictEqual(spans.length, 2); - const span = spans.find(s => s.kind === SpanKind.CLIENT); - assert.strictEqual(span.name, 'GET'); - assertSpan(span, SpanKind.CLIENT, spanValidations); - }); + it('should instrument http requests using http.request', async () => { + const spanValidations = { + httpStatusCode: 200, + httpMethod: 'GET', + hostname: '127.0.0.1', + pathname: '/http.request', + component: 'http', + }; - it('should instrument http requests using http.get', async () => { - const spanValidations = { - httpStatusCode: 200, - httpMethod: 'GET', - hostname: '127.0.0.1', - pathname: '/http.get', - component: 'http', - }; - - await new Promise(resolve => { - http.get(`http://127.0.0.1:${port}/http.get`, clientRes => { - spanValidations.resHeaders = clientRes.headers; - clientRes.resume(); - clientRes.on('end', resolve); + await new Promise(resolve => { + const clientReq = httpImport.request( + `http://127.0.0.1:${port}/http.request`, + clientRes => { + spanValidations.resHeaders = clientRes.headers; + clientRes.resume(); + clientRes.on('end', resolve); + } + ); + clientReq.end(); }); + + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2); + const span = spans.find(s => s.kind === SpanKind.CLIENT); + assert.strictEqual(span.name, 'GET'); + assertSpan(span, SpanKind.CLIENT, spanValidations); }); - let spans = memoryExporter.getFinishedSpans(); - assert.strictEqual(spans.length, 2); - const span = spans.find(s => s.kind === SpanKind.CLIENT); - assert.strictEqual(span.name, 'GET'); - assertSpan(span, SpanKind.CLIENT, spanValidations); - }); -}); - -describe('HttpsInstrumentation ESM Integration tests', () => { - let port; - let server; - - before(done => { - server = https.createServer( - { - key: fs.readFileSync( - new URL('../fixtures/server-key.pem', import.meta.url) - ), - cert: fs.readFileSync( - new URL('../fixtures/server-cert.pem', import.meta.url) - ), - }, - (req, res) => { - req.resume(); - req.on('end', () => { - res.writeHead(200); - res.end('pong'); + it('should instrument http requests using http.get', async () => { + const spanValidations = { + httpStatusCode: 200, + httpMethod: 'GET', + hostname: '127.0.0.1', + pathname: '/http.get', + component: 'http', + }; + + await new Promise(resolve => { + httpImport.get(`http://127.0.0.1:${port}/http.get`, clientRes => { + spanValidations.resHeaders = clientRes.headers; + clientRes.resume(); + clientRes.on('end', resolve); }); - } - ); + }); - server.listen(0, '127.0.0.1', () => { - port = server.address().port; - assert.ok(Number.isInteger(port)); - done(); + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2); + const span = spans.find(s => s.kind === SpanKind.CLIENT); + assert.strictEqual(span.name, 'GET'); + assertSpan(span, SpanKind.CLIENT, spanValidations); }); }); +} - after(done => { - server.close(done); - }); +const httpsImports = [ + { + style: 'import https from "https"', + createServer: httpsA.createServer, + request: httpsA.request, + get: httpsA.get, + }, + { + style: 'import * as https from "https"', + createServer: httpsB.createServer, + request: httpsB.request, + get: httpsB.get, + }, + { + style: 'import {...} from "https"', + createServer: httpsCreateServerC, + request: httpsRequestC, + get: httpsGetC, + }, +]; - beforeEach(() => { - memoryExporter.reset(); - }); +for (let httpsImport of httpsImports) { + describe(`HttpsInstrumentation ESM Integration tests (${httpsImport.style})`, () => { + let port; + let server; - it('should instrument https requests using https.request', async () => { - const spanValidations = { - httpStatusCode: 200, - httpMethod: 'GET', - hostname: '127.0.0.1', - pathname: '/https.request', - component: 'https', - }; - - await new Promise(resolve => { - const clientReq = https.request( - `https://127.0.0.1:${port}/https.request`, + before(done => { + server = httpsImport.createServer( { - rejectUnauthorized: false, + key: fs.readFileSync( + new URL('../fixtures/server-key.pem', import.meta.url) + ), + cert: fs.readFileSync( + new URL('../fixtures/server-cert.pem', import.meta.url) + ), }, - clientRes => { - spanValidations.resHeaders = clientRes.headers; - clientRes.resume(); - clientRes.on('end', resolve); + (req, res) => { + req.resume(); + req.on('end', () => { + res.writeHead(200); + res.end('pong'); + }); } ); - clientReq.end(); + + server.listen(0, '127.0.0.1', () => { + port = server.address().port; + assert.ok(Number.isInteger(port)); + done(); + }); }); - let spans = memoryExporter.getFinishedSpans(); - assert.strictEqual(spans.length, 2); - const span = spans.find(s => s.kind === SpanKind.CLIENT); - assert.strictEqual(span.name, 'GET'); - assertSpan(span, SpanKind.CLIENT, spanValidations); - }); + after(done => { + server.close(done); + }); - it('should instrument http requests using https.get', async () => { - const spanValidations = { - httpStatusCode: 200, - httpMethod: 'GET', - hostname: '127.0.0.1', - pathname: '/https.get', - component: 'https', - }; - - await new Promise(resolve => { - https.get( - `https://127.0.0.1:${port}/https.get`, - { - rejectUnauthorized: false, - }, - clientRes => { - spanValidations.resHeaders = clientRes.headers; - clientRes.resume(); - clientRes.on('end', resolve); - } - ); + beforeEach(() => { + memoryExporter.reset(); + }); + + it('should instrument https requests using https.request', async () => { + const spanValidations = { + httpStatusCode: 200, + httpMethod: 'GET', + hostname: '127.0.0.1', + pathname: '/https.request', + component: 'https', + }; + + await new Promise(resolve => { + const clientReq = httpsImport.request( + `https://127.0.0.1:${port}/https.request`, + { + rejectUnauthorized: false, + }, + clientRes => { + spanValidations.resHeaders = clientRes.headers; + clientRes.resume(); + clientRes.on('end', resolve); + } + ); + clientReq.end(); + }); + + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2); + const span = spans.find(s => s.kind === SpanKind.CLIENT); + assert.strictEqual(span.name, 'GET'); + assertSpan(span, SpanKind.CLIENT, spanValidations); }); - let spans = memoryExporter.getFinishedSpans(); - assert.strictEqual(spans.length, 2); - const span = spans.find(s => s.kind === SpanKind.CLIENT); - assert.strictEqual(span.name, 'GET'); - assertSpan(span, SpanKind.CLIENT, spanValidations); + it('should instrument http requests using https.get', async () => { + const spanValidations = { + httpStatusCode: 200, + httpMethod: 'GET', + hostname: '127.0.0.1', + pathname: '/https.get', + component: 'https', + }; + + await new Promise(resolve => { + httpsImport.get( + `https://127.0.0.1:${port}/https.get`, + { + rejectUnauthorized: false, + }, + clientRes => { + spanValidations.resHeaders = clientRes.headers; + clientRes.resume(); + clientRes.on('end', resolve); + } + ); + }); + + let spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 2); + const span = spans.find(s => s.kind === SpanKind.CLIENT); + assert.strictEqual(span.name, 'GET'); + assertSpan(span, SpanKind.CLIENT, spanValidations); + }); }); -}); +} diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts index 1f7829c4d22..558bbcb8ff4 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts @@ -45,7 +45,6 @@ import { Socket } from 'net'; import { sendRequestTwice } from '../utils/rawRequest'; const protocol = 'http'; -const serverPort = 32345; const hostname = 'localhost'; const memoryExporter = new InMemorySpanExporter(); @@ -138,14 +137,7 @@ describe('HttpInstrumentation Integration tests', () => { }); before(() => { - const ignoreConfig = [ - `${protocol}://${hostname}:${serverPort}/ignored/string`, - /\/ignored\/regexp$/i, - (url: string) => url.endsWith('/ignored/function'), - ]; instrumentation.setConfig({ - ignoreIncomingPaths: ignoreConfig, - ignoreOutgoingUrls: ignoreConfig, applyCustomAttributesOnSpan: customAttributeFunction, }); instrumentation.enable(); @@ -285,6 +277,20 @@ describe('HttpInstrumentation Integration tests', () => { assert.ok(result.reqHeaders[DummyPropagation.SPAN_CONTEXT_KEY]); }); + it('should succeed even with malformed Forwarded header', async () => { + const spans = memoryExporter.getFinishedSpans(); + assert.strictEqual(spans.length, 0); + + const headers = { 'x-foo': 'foo', forwarded: 'malformed' }; + const result = await httpRequest.get( + new url.URL(`${protocol}://localhost:${mockServerPort}/?query=test`), + { headers } + ); + + assert.ok(result.reqHeaders[DummyPropagation.TRACE_CONTEXT_KEY]); + assert.ok(result.reqHeaders[DummyPropagation.SPAN_CONTEXT_KEY]); + }); + it('should create a span for GET requests and add propagation headers with Expect headers', async () => { let spans = memoryExporter.getFinishedSpans(); assert.strictEqual(spans.length, 0); diff --git a/experimental/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts b/experimental/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts index aa19a8629f9..ec0c35f6303 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts +++ b/experimental/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts @@ -46,8 +46,6 @@ import { httpsRequest } from '../utils/httpsRequest'; import { DummyPropagation } from '../utils/DummyPropagation'; const protocol = 'https'; -const serverPort = 42345; -const hostname = 'localhost'; const memoryExporter = new InMemorySpanExporter(); export const customAttributeFunction = (span: Span): void => { @@ -139,15 +137,8 @@ describe('HttpsInstrumentation Integration tests', () => { }); before(() => { - const ignoreConfig = [ - `${protocol}://${hostname}:${serverPort}/ignored/string`, - /\/ignored\/regexp$/i, - (url: string) => url.endsWith('/ignored/function'), - ]; propagation.setGlobalPropagator(new DummyPropagation()); instrumentation.setConfig({ - ignoreIncomingPaths: ignoreConfig, - ignoreOutgoingUrls: ignoreConfig, applyCustomAttributesOnSpan: customAttributeFunction, }); instrumentation.enable(); diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md b/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md index 8c706ffa61f..e3f0b136064 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/README.md @@ -25,8 +25,9 @@ import { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xm import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; -const providerWithZone = new WebTracerProvider(); -providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +const providerWithZone = new WebTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); providerWithZone.register({ contextManager: new ZoneContextManager(), diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json index 6a528180a34..62c9597e8ff 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-xml-http-request", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry instrumentation for XMLHttpRequest http client in web browsers", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -57,9 +57,9 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -87,9 +87,9 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-xml-http-request", diff --git a/experimental/packages/opentelemetry-instrumentation/package.json b/experimental/packages/opentelemetry-instrumentation/package.json index 0cff7c44add..b55cb2796d5 100644 --- a/experimental/packages/opentelemetry-instrumentation/package.json +++ b/experimental/packages/opentelemetry-instrumentation/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation", - "version": "0.53.0", + "version": "0.54.2", "description": "Base class for node which OpenTelemetry instrumentation modules extend", "author": "OpenTelemetry Authors", "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation", @@ -70,7 +70,7 @@ "url": "https://github.com/open-telemetry/opentelemetry-js/issues" }, "dependencies": { - "@opentelemetry/api-logs": "0.53.0", + "@opentelemetry/api-logs": "0.54.2", "@types/shimmer": "^1.2.0", "import-in-the-middle": "^1.8.1", "require-in-the-middle": "^7.1.1", @@ -84,7 +84,7 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/sdk-metrics": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/semver": "7.5.8", @@ -93,7 +93,6 @@ "babel-loader": "8.4.1", "babel-plugin-istanbul": "7.0.0", "codecov": "3.8.3", - "cpx2": "2.0.0", "cross-var": "1.1.0", "karma": "6.4.4", "karma-chrome-launcher": "3.1.0", diff --git a/experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts b/experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts index b69e91dfebf..c99d52ea2c7 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts @@ -287,6 +287,11 @@ export abstract class InstrumentationBase< this._warnOnPreloadedModules(); for (const module of this._modules) { const hookFn: HookFn = (exports, name, baseDir) => { + if (!baseDir && path.isAbsolute(name)) { + const parsedPath = path.parse(name); + name = parsedPath.name; + baseDir = parsedPath.dir; + } return this._onRequire(module, exports, name, baseDir); }; const onRequire: OnRequireFn = (exports, name, baseDir) => { diff --git a/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs b/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs index a46fdc0fd3e..3cea21cc698 100644 --- a/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs +++ b/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs @@ -18,8 +18,15 @@ import * as assert from 'assert'; import { InstrumentationBase, InstrumentationNodeModuleDefinition, + InstrumentationNodeModuleFile, } from '../../build/src/index.js'; import * as exported from 'test-esm-module'; +import * as exportedAbsolute from './esm/test.mjs'; + +import path from 'path'; +import url from 'url'; + +const TEST_DIR_NAME = path.dirname(url.fileURLToPath(import.meta.url)); class TestInstrumentationWrapFn extends InstrumentationBase { constructor(config) { @@ -95,6 +102,45 @@ class TestInstrumentationSimple extends InstrumentationBase { ); } } + +class TestAbsoluteFileInstrumentationPatchFn extends InstrumentationBase { + constructor(config) { + super('test-esm-instrumentation', '0.0.1', config); + } + init() { + return new InstrumentationNodeModuleDefinition( + path.join(TEST_DIR_NAME, '/esm/test.mjs'), + ['*'], + undefined, + undefined, + [ + new InstrumentationNodeModuleFile( + 'test', + ['*'], + moduleExports => { + const wrapRetval = this._wrap(moduleExports, 'testFunction', () => { + return function wrappedTestFunction() { + return 'patched'; + }; + }); + assert.strictEqual(typeof wrapRetval, 'function'); + assert.strictEqual( + wrapRetval.name, + 'wrappedTestFunction', + '_wrap(..., "testFunction", ...) return value is the wrapped function' + ); + return moduleExports; + }, + moduleExports => { + this._unwrap(moduleExports, 'testFunction'); + return moduleExports; + } + ) + ] + ) + } +} + describe('when loading esm module', () => { const instrumentationWrap = new TestInstrumentationWrapFn({ enabled: false, @@ -140,4 +186,23 @@ describe('when loading esm module', () => { assert.deepEqual(exported.testFunction(), 'original'); assert.deepEqual(exported.secondTestFunction(), 'original'); }); + + it('should patch function from a file with absolute path', async () => { + const instrumentation = new TestAbsoluteFileInstrumentationPatchFn({ + enabled: false, + }); + instrumentation.enable(); + assert.deepEqual(exportedAbsolute.testFunction(), 'patched'); + }); + + it('should unwrap a patched function from a file with absolute path', async () => { + const instrumentation = new TestAbsoluteFileInstrumentationPatchFn({ + enabled: false, + }); + + instrumentation.enable(); + // disable to trigger unwrap + instrumentation.disable(); + assert.deepEqual(exported.testFunction(), 'original'); + }); }); diff --git a/experimental/packages/opentelemetry-instrumentation/test/node/RequireInTheMiddleSingleton.test.ts b/experimental/packages/opentelemetry-instrumentation/test/node/RequireInTheMiddleSingleton.test.ts index 75cd0ad6282..8c1be214460 100644 --- a/experimental/packages/opentelemetry-instrumentation/test/node/RequireInTheMiddleSingleton.test.ts +++ b/experimental/packages/opentelemetry-instrumentation/test/node/RequireInTheMiddleSingleton.test.ts @@ -39,8 +39,8 @@ describe('RequireInTheMiddleSingleton', () => { const onRequireFsPromisesStub = makeOnRequiresStub('fs-promises'); const onRequireCodecovStub = makeOnRequiresStub('codecov'); const onRequireCodecovLibStub = makeOnRequiresStub('codecov-lib'); - const onRequireCpxStub = makeOnRequiresStub('cpx2'); - const onRequireCpxLibStub = makeOnRequiresStub('cpx2-lib'); + const onRequireCpxStub = makeOnRequiresStub('test-non-core-module'); + const onRequireCpxLibStub = makeOnRequiresStub('test-non-core-module-lib'); before(() => { requireInTheMiddleSingleton.register('fs', onRequireFsStub); @@ -53,9 +53,12 @@ describe('RequireInTheMiddleSingleton', () => { 'codecov/lib/codecov.js', onRequireCodecovLibStub ); - requireInTheMiddleSingleton.register('cpx2', onRequireCpxStub); requireInTheMiddleSingleton.register( - 'cpx2/lib/copy-sync.js', + 'test-non-core-module', + onRequireCpxStub + ); + requireInTheMiddleSingleton.register( + 'test-non-core-module/lib/copy-sync.js', onRequireCpxLibStub ); }); @@ -120,8 +123,12 @@ describe('RequireInTheMiddleSingleton', () => { describe('non-core module', () => { describe('AND module name matches', () => { - const baseDir = path.dirname(require.resolve('codecov')); - const modulePath = path.join('codecov', 'lib', 'codecov.js'); + const baseDir = path.normalize( + path.dirname(require.resolve('codecov')) + ); + const modulePath = path.normalize( + path.join('codecov', 'lib', 'codecov.js') + ); it('should call `onRequire`', () => { const exports = require('codecov'); assert.deepStrictEqual(exports.__ritmOnRequires, ['codecov']); @@ -149,20 +156,29 @@ describe('RequireInTheMiddleSingleton', () => { describe('non-core module with sub-path', () => { describe('AND module name matches', () => { - const baseDir = path.resolve( - path.dirname(require.resolve('cpx2')), - '..' + const baseDir = path.normalize( + path.resolve( + path.dirname(require.resolve('test-non-core-module')), + '..' + ) + ); + const modulePath = path.normalize( + path.join('test-non-core-module', 'lib', 'copy-sync.js') ); - const modulePath = path.join('cpx2', 'lib', 'copy-sync.js'); it('should call `onRequire`', () => { - const exports = require('cpx2/lib/copy-sync'); + const exports = require('test-non-core-module/lib/copy-sync'); assert.deepStrictEqual(exports.__ritmOnRequires, [ - 'cpx2', - 'cpx2-lib', + 'test-non-core-module', + 'test-non-core-module-lib', ]); sinon.assert.calledWithMatch( onRequireCpxStub, - { __ritmOnRequires: ['cpx2', 'cpx2-lib'] }, + { + __ritmOnRequires: [ + 'test-non-core-module', + 'test-non-core-module-lib', + ], + }, modulePath, baseDir ); diff --git a/experimental/packages/opentelemetry-instrumentation/test/node/esm/test.mjs b/experimental/packages/opentelemetry-instrumentation/test/node/esm/test.mjs new file mode 100644 index 00000000000..56e1af29552 --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation/test/node/esm/test.mjs @@ -0,0 +1,3 @@ +export const testFunction = () => { + return 'original'; +}; diff --git a/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/lib/copy-sync.js b/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/lib/copy-sync.js new file mode 100644 index 00000000000..97da7acc8cd --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/lib/copy-sync.js @@ -0,0 +1,3 @@ +module.exports = function copySync() { + console.log('Mock copySync called'); +}; diff --git a/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/lib/index.js b/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/lib/index.js new file mode 100644 index 00000000000..55b19e028b2 --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/lib/index.js @@ -0,0 +1,4 @@ +module.exports = { + copy: require('./lib/copy-sync') // matches the original API + }; + \ No newline at end of file diff --git a/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/package.json b/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/package.json new file mode 100644 index 00000000000..f09115be964 --- /dev/null +++ b/experimental/packages/opentelemetry-instrumentation/test/node/node_modules/test-non-core-module/package.json @@ -0,0 +1,6 @@ +{ + "name": "test-non-core-module", + "version": "0.0.1", + "description": "Local test module for require-in-the-middle singleton", + "main": "lib/index.js" + } \ No newline at end of file diff --git a/experimental/packages/opentelemetry-sdk-node/README.md b/experimental/packages/opentelemetry-sdk-node/README.md index 4d0ffd0b508..bbb5002e9a2 100644 --- a/experimental/packages/opentelemetry-sdk-node/README.md +++ b/experimental/packages/opentelemetry-sdk-node/README.md @@ -102,6 +102,11 @@ Deprecated, please use [logRecordProcessors](#logrecordprocessors) instead. An array of log record processors to register to the logger provider. +### mergeResourceWithDefaults + +Merge user-provided resources with the default resource. Default `true`. +The default will change to `false` in a future iteration of this package. + ### metricReader Add a [MetricReader](../opentelemetry-sdk-metrics/src/export/MetricReader.ts) diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json index 09645ad636f..aafb33e07a7 100644 --- a/experimental/packages/opentelemetry-sdk-node/package.json +++ b/experimental/packages/opentelemetry-sdk-node/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-node", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry SDK for Node.js", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -44,21 +44,21 @@ "access": "public" }, "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-logs-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-logs-otlp-http": "0.53.0", - "@opentelemetry/exporter-logs-otlp-proto": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-logs-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-logs-otlp-http": "0.54.2", + "@opentelemetry/exporter-logs-otlp-proto": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "peerDependencies": { @@ -66,8 +66,8 @@ }, "devDependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/exporter-jaeger": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/exporter-jaeger": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/semver": "7.5.8", diff --git a/experimental/packages/opentelemetry-sdk-node/src/TracerProviderWithEnvExporter.ts b/experimental/packages/opentelemetry-sdk-node/src/TracerProviderWithEnvExporter.ts deleted file mode 100644 index 4db49699391..00000000000 --- a/experimental/packages/opentelemetry-sdk-node/src/TracerProviderWithEnvExporter.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { diag } from '@opentelemetry/api'; -import { getEnv, getEnvWithoutDefaults } from '@opentelemetry/core'; -import { - ConsoleSpanExporter, - SpanExporter, - BatchSpanProcessor, - SimpleSpanProcessor, - SDKRegistrationConfig, - SpanProcessor, -} from '@opentelemetry/sdk-trace-base'; -import { - NodeTracerConfig, - NodeTracerProvider, -} from '@opentelemetry/sdk-trace-node'; -import { OTLPTraceExporter as OTLPProtoTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'; -import { OTLPTraceExporter as OTLPHttpTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; -import { OTLPTraceExporter as OTLPGrpcTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; -import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; -import { filterBlanksAndNulls } from './utils'; - -export class TracerProviderWithEnvExporters extends NodeTracerProvider { - private _configuredExporters: SpanExporter[] = []; - private _spanProcessors: SpanProcessor[] | undefined; - private _hasSpanProcessors: boolean = false; - - static configureOtlp(): SpanExporter { - const protocol = this.getOtlpProtocol(); - - switch (protocol) { - case 'grpc': - return new OTLPGrpcTraceExporter(); - case 'http/json': - return new OTLPHttpTraceExporter(); - case 'http/protobuf': - return new OTLPProtoTraceExporter(); - default: - diag.warn( - `Unsupported OTLP traces protocol: ${protocol}. Using http/protobuf.` - ); - return new OTLPProtoTraceExporter(); - } - } - - static getOtlpProtocol(): string { - const parsedEnvValues = getEnvWithoutDefaults(); - - return ( - parsedEnvValues.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ?? - parsedEnvValues.OTEL_EXPORTER_OTLP_PROTOCOL ?? - getEnv().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ?? - getEnv().OTEL_EXPORTER_OTLP_PROTOCOL - ); - } - - private static configureJaeger() { - // The JaegerExporter does not support being required in bundled - // environments. By delaying the require statement to here, we only crash when - // the exporter is actually used in such an environment. - try { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); - return new JaegerExporter(); - } catch (e) { - throw new Error( - `Could not instantiate JaegerExporter. This could be due to the JaegerExporter's lack of support for bundling. If possible, use @opentelemetry/exporter-trace-otlp-proto instead. Original Error: ${e}` - ); - } - } - - protected static override _registeredExporters = new Map< - string, - () => SpanExporter - >([ - ['otlp', () => this.configureOtlp()], - ['zipkin', () => new ZipkinExporter()], - ['jaeger', () => this.configureJaeger()], - ['console', () => new ConsoleSpanExporter()], - ]); - - public constructor(config: NodeTracerConfig = {}) { - super(config); - let traceExportersList = filterBlanksAndNulls( - Array.from(new Set(getEnv().OTEL_TRACES_EXPORTER.split(','))) - ); - - if (traceExportersList[0] === 'none') { - diag.warn( - 'OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.' - ); - } else if (traceExportersList.length === 0) { - diag.warn('OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.'); - - traceExportersList = ['otlp']; - this.createExportersFromList(traceExportersList); - - this._spanProcessors = this.configureSpanProcessors( - this._configuredExporters - ); - this._spanProcessors.forEach(processor => { - this.addSpanProcessor(processor); - }); - } else { - if ( - traceExportersList.length > 1 && - traceExportersList.includes('none') - ) { - diag.warn( - 'OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.' - ); - traceExportersList = ['otlp']; - } - - this.createExportersFromList(traceExportersList); - - if (this._configuredExporters.length > 0) { - this._spanProcessors = this.configureSpanProcessors( - this._configuredExporters - ); - this._spanProcessors.forEach(processor => { - this.addSpanProcessor(processor); - }); - } else { - diag.warn( - 'Unable to set up trace exporter(s) due to invalid exporter and/or protocol values.' - ); - } - } - } - - override addSpanProcessor(spanProcessor: SpanProcessor) { - super.addSpanProcessor(spanProcessor); - this._hasSpanProcessors = true; - } - - override register(config?: SDKRegistrationConfig) { - if (this._hasSpanProcessors) { - super.register(config); - } - } - - private createExportersFromList(exporterList: string[]) { - exporterList.forEach(exporterName => { - const exporter = this._getSpanExporter(exporterName); - if (exporter) { - this._configuredExporters.push(exporter); - } else { - diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${exporterName}.`); - } - }); - } - - private configureSpanProcessors( - exporters: SpanExporter[] - ): (BatchSpanProcessor | SimpleSpanProcessor)[] { - return exporters.map(exporter => { - if (exporter instanceof ConsoleSpanExporter) { - return new SimpleSpanProcessor(exporter); - } else { - return new BatchSpanProcessor(exporter); - } - }); - } -} diff --git a/experimental/packages/opentelemetry-sdk-node/src/sdk.ts b/experimental/packages/opentelemetry-sdk-node/src/sdk.ts index 74bdfb2165b..bc4bf5e586c 100644 --- a/experimental/packages/opentelemetry-sdk-node/src/sdk.ts +++ b/experimental/packages/opentelemetry-sdk-node/src/sdk.ts @@ -63,9 +63,12 @@ import { } from '@opentelemetry/sdk-trace-node'; import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; import { NodeSDKConfiguration } from './types'; -import { TracerProviderWithEnvExporters } from './TracerProviderWithEnvExporter'; import { getEnv, getEnvWithoutDefaults } from '@opentelemetry/core'; -import { getResourceDetectorsFromEnv, filterBlanksAndNulls } from './utils'; +import { + getResourceDetectorsFromEnv, + getSpanProcessorsFromEnv, + filterBlanksAndNulls, +} from './utils'; /** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */ @@ -100,10 +103,11 @@ export class NodeSDK { private _resource: IResource; private _resourceDetectors: Array; + private _mergeResourceWithDefaults: boolean; private _autoDetectResources: boolean; - private _tracerProvider?: NodeTracerProvider | TracerProviderWithEnvExporters; + private _tracerProvider?: NodeTracerProvider; private _loggerProvider?: LoggerProvider; private _meterProvider?: MeterProvider; private _serviceName?: string; @@ -135,6 +139,8 @@ export class NodeSDK { this._configuration = configuration; this._resource = configuration.resource ?? new Resource({}); + this._mergeResourceWithDefaults = + configuration.mergeResourceWithDefaults ?? true; this._autoDetectResources = configuration.autoDetectResources ?? true; if (!this._autoDetectResources) { this._resourceDetectors = []; @@ -249,36 +255,33 @@ export class NodeSDK { }) ); - // if there is a tracerProviderConfig (traceExporter/spanProcessor was set manually) or the traceExporter is set manually, use NodeTracerProvider - const Provider = this._tracerProviderConfig - ? NodeTracerProvider - : TracerProviderWithEnvExporters; + const spanProcessors = this._tracerProviderConfig + ? this._tracerProviderConfig.spanProcessors + : getSpanProcessorsFromEnv(); // If the Provider is configured with Env Exporters, we need to check if the SDK had any manual configurations and set them here - const tracerProvider = new Provider({ + this._tracerProvider = new NodeTracerProvider({ ...this._configuration, resource: this._resource, + mergeResourceWithDefaults: this._mergeResourceWithDefaults, + spanProcessors, }); - this._tracerProvider = tracerProvider; - - if (this._tracerProviderConfig) { - for (const spanProcessor of this._tracerProviderConfig.spanProcessors) { - tracerProvider.addSpanProcessor(spanProcessor); - } + // Only register if there is a span processor + if (spanProcessors.length > 0) { + this._tracerProvider.register({ + contextManager: + this._tracerProviderConfig?.contextManager ?? + // _tracerProviderConfig may be undefined if trace-specific settings are not provided - fall back to raw config + this._configuration?.contextManager, + propagator: this._tracerProviderConfig?.textMapPropagator, + }); } - tracerProvider.register({ - contextManager: - this._tracerProviderConfig?.contextManager ?? - // _tracerProviderConfig may be undefined if trace-specific settings are not provided - fall back to raw config - this._configuration?.contextManager, - propagator: this._tracerProviderConfig?.textMapPropagator, - }); - if (this._loggerProviderConfig) { const loggerProvider = new LoggerProvider({ resource: this._resource, + mergeResourceWithDefaults: this._mergeResourceWithDefaults, }); for (const logRecordProcessor of this._loggerProviderConfig @@ -300,6 +303,7 @@ export class NodeSDK { resource: this._resource, views: this._meterProviderConfig?.views ?? [], readers: readers, + mergeResourceWithDefaults: this._mergeResourceWithDefaults, }); this._meterProvider = meterProvider; diff --git a/experimental/packages/opentelemetry-sdk-node/src/types.ts b/experimental/packages/opentelemetry-sdk-node/src/types.ts index 0683a3d886f..4a143692149 100644 --- a/experimental/packages/opentelemetry-sdk-node/src/types.ts +++ b/experimental/packages/opentelemetry-sdk-node/src/types.ts @@ -40,6 +40,7 @@ export interface NodeSDKConfiguration { instrumentations: (Instrumentation | Instrumentation[])[]; resource: IResource; resourceDetectors: Array; + mergeResourceWithDefaults?: boolean; sampler: Sampler; serviceName?: string; /** @deprecated use spanProcessors instead*/ diff --git a/experimental/packages/opentelemetry-sdk-node/src/utils.ts b/experimental/packages/opentelemetry-sdk-node/src/utils.ts index 293a3e34858..1b654e64e6e 100644 --- a/experimental/packages/opentelemetry-sdk-node/src/utils.ts +++ b/experimental/packages/opentelemetry-sdk-node/src/utils.ts @@ -15,6 +15,11 @@ */ import { diag } from '@opentelemetry/api'; +import { getEnv, getEnvWithoutDefaults } from '@opentelemetry/core'; +import { OTLPTraceExporter as OTLPProtoTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'; +import { OTLPTraceExporter as OTLPHttpTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; +import { OTLPTraceExporter as OTLPGrpcTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; +import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; import { DetectorSync, envDetectorSync, @@ -23,6 +28,13 @@ import { processDetectorSync, serviceInstanceIdDetectorSync, } from '@opentelemetry/resources'; +import { + BatchSpanProcessor, + ConsoleSpanExporter, + SimpleSpanProcessor, + SpanExporter, + SpanProcessor, +} from '@opentelemetry/sdk-trace-base'; const RESOURCE_DETECTOR_ENVIRONMENT = 'env'; const RESOURCE_DETECTOR_HOST = 'host'; @@ -65,3 +77,106 @@ export function getResourceDetectorsFromEnv(): Array { export function filterBlanksAndNulls(list: string[]): string[] { return list.map(item => item.trim()).filter(s => s !== 'null' && s !== ''); } + +export function getOtlpProtocolFomEnv(): string { + const parsedEnvValues = getEnvWithoutDefaults(); + + return ( + parsedEnvValues.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ?? + parsedEnvValues.OTEL_EXPORTER_OTLP_PROTOCOL ?? + getEnv().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ?? + getEnv().OTEL_EXPORTER_OTLP_PROTOCOL + ); +} + +function getOtlpExporterFomEnv(): SpanExporter { + const protocol = getOtlpProtocolFomEnv(); + + switch (protocol) { + case 'grpc': + return new OTLPGrpcTraceExporter(); + case 'http/json': + return new OTLPHttpTraceExporter(); + case 'http/protobuf': + return new OTLPProtoTraceExporter(); + default: + diag.warn( + `Unsupported OTLP traces protocol: ${protocol}. Using http/protobuf.` + ); + return new OTLPProtoTraceExporter(); + } +} + +function getJaegerExporter() { + // The JaegerExporter does not support being required in bundled + // environments. By delaying the require statement to here, we only crash when + // the exporter is actually used in such an environment. + try { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); + return new JaegerExporter(); + } catch (e) { + throw new Error( + `Could not instantiate JaegerExporter. This could be due to the JaegerExporter's lack of support for bundling. If possible, use @opentelemetry/exporter-trace-otlp-proto instead. Original Error: ${e}` + ); + } +} + +export function getSpanProcessorsFromEnv(): SpanProcessor[] { + const exportersMap = new Map SpanExporter>([ + ['otlp', () => getOtlpExporterFomEnv()], + ['zipkin', () => new ZipkinExporter()], + ['console', () => new ConsoleSpanExporter()], + ['jaeger', () => getJaegerExporter()], + ]); + const exporters: SpanExporter[] = []; + const processors: SpanProcessor[] = []; + let traceExportersList = filterBlanksAndNulls( + Array.from(new Set(getEnv().OTEL_TRACES_EXPORTER.split(','))) + ); + + if (traceExportersList[0] === 'none') { + diag.warn( + 'OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.' + ); + return []; + } + + if (traceExportersList.length === 0) { + diag.warn('OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.'); + traceExportersList = ['otlp']; + } else if ( + traceExportersList.length > 1 && + traceExportersList.includes('none') + ) { + diag.warn( + 'OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.' + ); + traceExportersList = ['otlp']; + } + + for (const name of traceExportersList) { + const exporter = exportersMap.get(name)?.(); + if (exporter) { + exporters.push(exporter); + } else { + diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${name}.`); + } + } + + for (const exp of exporters) { + if (exp instanceof ConsoleSpanExporter) { + processors.push(new SimpleSpanProcessor(exp)); + } else { + processors.push(new BatchSpanProcessor(exp)); + } + } + + if (exporters.length === 0) { + diag.warn( + 'Unable to set up trace exporter(s) due to invalid exporter and/or protocol values.' + ); + } + + return processors; +} diff --git a/experimental/packages/opentelemetry-sdk-node/test/TracerProviderWithEnvExporter.test.ts b/experimental/packages/opentelemetry-sdk-node/test/TracerProviderWithEnvExporter.test.ts deleted file mode 100644 index 21a1fa93d79..00000000000 --- a/experimental/packages/opentelemetry-sdk-node/test/TracerProviderWithEnvExporter.test.ts +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { diag } from '@opentelemetry/api'; -import { - ConsoleSpanExporter, - SimpleSpanProcessor, - BatchSpanProcessor, -} from '@opentelemetry/sdk-trace-base'; -import * as assert from 'assert'; -import * as Sinon from 'sinon'; -import { env } from 'process'; -import { - OTLPTraceExporter as OTLPProtoTraceExporter, - OTLPTraceExporter, -} from '@opentelemetry/exporter-trace-otlp-proto'; -import { OTLPTraceExporter as OTLPHttpTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; -import { OTLPTraceExporter as OTLPGrpcTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; -import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; -import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; -import { TracerProviderWithEnvExporters } from '../src/TracerProviderWithEnvExporter'; - -describe('set up trace exporter with env exporters', () => { - let spyGetOtlpProtocol: Sinon.SinonSpy; - let stubLoggerError: Sinon.SinonStub; - - beforeEach(() => { - spyGetOtlpProtocol = Sinon.spy( - TracerProviderWithEnvExporters, - 'getOtlpProtocol' - ); - stubLoggerError = Sinon.stub(diag, 'warn'); - }); - afterEach(() => { - spyGetOtlpProtocol.restore(); - stubLoggerError.restore(); - }); - describe('setup otlp exporter from env', () => { - it('set up default exporter when user does not define otel trace exporter', async () => { - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.returned('http/protobuf')); - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof OTLPProtoTraceExporter); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - }); - it('use otlp exporter and grpc exporter protocol env value', async () => { - env.OTEL_TRACES_EXPORTER = 'otlp'; - env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; - - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.returned('grpc')); - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof OTLPGrpcTraceExporter); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - - delete env.OTEL_TRACES_EXPORTER; - delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; - }); - it('sdk will ignore protocol defined with no-signal env and use signal specific protocol instead', async () => { - env.OTEL_TRACES_EXPORTER = 'otlp'; - env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'http/protobuf'; - env.OTEL_EXPORTER_OTLP_PROTOCOL = 'grpc'; - - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.returned('http/protobuf')); - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof OTLPTraceExporter); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - - delete env.OTEL_TRACES_EXPORTER; - delete env.OTEL_EXPORTER_OTLP_PROTOCOL; - delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; - }); - it('use default otlp exporter when user does not set exporter via env or config', async () => { - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(listOfExporters[0] instanceof OTLPProtoTraceExporter); - assert(listOfExporters.length === 1); - - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - }); - it('use default otlp exporter when empty value is provided for exporter via env', async () => { - env.OTEL_TRACES_EXPORTER = ''; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(listOfExporters[0] instanceof OTLPProtoTraceExporter); - assert(listOfExporters.length === 1); - - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - - env.OTEL_TRACES_EXPORTER = ''; - }); - it('do not use any exporters when none value is only provided', async () => { - env.OTEL_TRACES_EXPORTER = 'none'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.notCalled); - assert(listOfExporters.length === 0); - assert(listOfProcessors === undefined); - delete env.OTEL_TRACES_EXPORTER; - }); - it('log warning that sdk will not be initialized when exporter is set to none', async () => { - env.OTEL_TRACES_EXPORTER = 'none'; - new TracerProviderWithEnvExporters(); - - assert.strictEqual( - stubLoggerError.args[0][0], - 'OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.' - ); - delete env.OTEL_TRACES_EXPORTER; - }); - it('use default exporter when none value is provided with other exports', async () => { - env.OTEL_TRACES_EXPORTER = 'otlp,zipkin,none'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(listOfExporters[0] instanceof OTLPProtoTraceExporter); - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof OTLPHttpTraceExporter === false); - assert(listOfExporters[0] instanceof ZipkinExporter === false); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - delete env.OTEL_TRACES_EXPORTER; - }); - it('log warning that default exporter will be used since exporter list contains none with other exports ', async () => { - env.OTEL_TRACES_EXPORTER = 'otlp,zipkin,none'; - new TracerProviderWithEnvExporters(); - - assert.strictEqual( - stubLoggerError.args[0][0], - 'OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.' - ); - delete env.OTEL_TRACES_EXPORTER; - }); - it('should warn that exporter is unrecognized and not able to be set up', async () => { - env.OTEL_TRACES_EXPORTER = 'invalid'; - new TracerProviderWithEnvExporters(); - - assert.strictEqual( - stubLoggerError.args[0][0], - 'Unrecognized OTEL_TRACES_EXPORTER value: invalid.' - ); - - assert.strictEqual( - stubLoggerError.args[1][0], - 'Unable to set up trace exporter(s) due to invalid exporter and/or protocol values.' - ); - - delete env.OTEL_TRACES_EXPORTER; - }); - it('should log warning when provided protocol name is not valid', async () => { - env.OTEL_EXPORTER_OTLP_PROTOCOL = 'invalid'; - new TracerProviderWithEnvExporters(); - - assert.strictEqual( - stubLoggerError.args[0][0], - 'OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.' - ); - - assert.strictEqual( - stubLoggerError.args[1][0], - 'Unsupported OTLP traces protocol: invalid. Using http/protobuf.' - ); - delete env.OTEL_EXPORTER_OTLP_PROTOCOL; - }); - }); - describe('setup zipkin exporter from env', () => { - it('use the zipkin exporter', async () => { - env.OTEL_TRACES_EXPORTER = 'zipkin'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof ZipkinExporter); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - delete env.OTEL_TRACES_EXPORTER; - }); - it('setup zipkin exporter and otlp exporter', async () => { - env.OTEL_TRACES_EXPORTER = 'zipkin, otlp'; - env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; - - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.returned('grpc')); - assert(listOfExporters.length === 2); - assert(listOfExporters[0] instanceof ZipkinExporter); - assert(listOfExporters[1] instanceof OTLPGrpcTraceExporter); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - assert(listOfProcessors[1] instanceof BatchSpanProcessor); - - delete env.OTEL_TRACES_EXPORTER; - delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; - }); - }); - describe('setup jaeger exporter from env', () => { - it('use the jaeger exporter', async () => { - env.OTEL_TRACES_EXPORTER = 'jaeger'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof JaegerExporter); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - delete env.OTEL_TRACES_EXPORTER; - }); - it('setup jaeger exporter and otlp exporter', async () => { - env.OTEL_TRACES_EXPORTER = 'jaeger, otlp'; - env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'http/json'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.returned('http/json')); - assert(listOfExporters.length === 2); - assert(listOfExporters[0] instanceof JaegerExporter); - assert(listOfExporters[1] instanceof OTLPHttpTraceExporter); - assert(listOfProcessors.length === 2); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); - assert(listOfProcessors[1] instanceof BatchSpanProcessor); - - delete env.OTEL_TRACES_EXPORTER; - delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; - }); - }); - describe('setup console exporter from env', () => { - it('use the console exporter', async () => { - env.OTEL_TRACES_EXPORTER = 'console'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof ConsoleSpanExporter); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof SimpleSpanProcessor); - delete env.OTEL_TRACES_EXPORTER; - }); - it('ignores the protocol', async () => { - env.OTEL_TRACES_EXPORTER = 'console'; - env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.notCalled); - assert(listOfExporters.length === 1); - assert(listOfExporters[0] instanceof ConsoleSpanExporter); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof SimpleSpanProcessor); - - delete env.OTEL_TRACES_EXPORTER; - delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; - }); - it('setup console exporter and otlp exporter', async () => { - env.OTEL_TRACES_EXPORTER = 'console, otlp'; - env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; - const sdk = new TracerProviderWithEnvExporters(); - const listOfProcessors = sdk['_spanProcessors']!; - const listOfExporters = sdk['_configuredExporters']; - - assert(spyGetOtlpProtocol.returned('grpc')); - assert(listOfExporters.length === 2); - assert(listOfExporters[0] instanceof ConsoleSpanExporter); - assert(listOfExporters[1] instanceof OTLPGrpcTraceExporter); - assert(listOfProcessors.length === 2); - assert(listOfProcessors[0] instanceof SimpleSpanProcessor); - assert(listOfProcessors[1] instanceof BatchSpanProcessor); - - delete env.OTEL_TRACES_EXPORTER; - delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; - }); - }); -}); diff --git a/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts b/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts index 7b6e80f1888..efda2a509fb 100644 --- a/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts +++ b/experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts @@ -29,6 +29,7 @@ import { AsyncLocalStorageContextManager, } from '@opentelemetry/context-async-hooks'; import { CompositePropagator } from '@opentelemetry/core'; +import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; import { AggregationTemporality, ConsoleMetricExporter, @@ -55,7 +56,6 @@ import * as semver from 'semver'; import * as Sinon from 'sinon'; import { NodeSDK } from '../src'; import { env } from 'process'; -import { TracerProviderWithEnvExporters } from '../src/TracerProviderWithEnvExporter'; import { envDetector, envDetectorSync, @@ -76,10 +76,13 @@ import { import { OTLPLogExporter as OTLPProtoLogExporter } from '@opentelemetry/exporter-logs-otlp-proto'; import { OTLPLogExporter as OTLPHttpLogExporter } from '@opentelemetry/exporter-logs-otlp-http'; import { OTLPLogExporter as OTLPGrpcLogExporter } from '@opentelemetry/exporter-logs-otlp-grpc'; +import { OTLPTraceExporter as OTLPProtoTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'; +import { OTLPTraceExporter as OTLPGrpcTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; import { SEMRESATTRS_HOST_NAME, SEMRESATTRS_PROCESS_PID, } from '@opentelemetry/semantic-conventions'; +import { ZipkinExporter } from '@opentelemetry/exporter-zipkin'; const DefaultContextManager = semver.gte(process.version, '14.8.0') ? AsyncLocalStorageContextManager @@ -1094,32 +1097,28 @@ describe('Node SDK', () => { }); describe('setup exporter from env', () => { - let spyGetOtlpProtocol: Sinon.SinonSpy; let stubLoggerError: Sinon.SinonStub; beforeEach(() => { - spyGetOtlpProtocol = Sinon.spy( - TracerProviderWithEnvExporters, - 'getOtlpProtocol' - ); stubLoggerError = Sinon.stub(diag, 'warn'); }); afterEach(() => { - spyGetOtlpProtocol.restore(); stubLoggerError.restore(); }); - it('use default exporter TracerProviderWithEnvExporters when user does not provide span processor or trace exporter to sdk config', async () => { + + it('should use default exporter when nor env neither SDK config is given', async () => { const sdk = new NodeSDK(); sdk.start(); const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert(sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters); assert(listOfProcessors.length === 1); assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof OTLPProtoTraceExporter); await sdk.shutdown(); }); - it('ignore env exporter when user provides exporter to sdk config', async () => { + + it('should ignore default env exporter when user provides exporter in sdk config', async () => { const traceExporter = new ConsoleSpanExporter(); const sdk = new NodeSDK({ traceExporter, @@ -1128,15 +1127,13 @@ describe('setup exporter from env', () => { const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert( - sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters === false - ); assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof SimpleSpanProcessor === false); assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ConsoleSpanExporter); await sdk.shutdown(); }); - it('ignores default env exporter when user provides span processor to sdk config', async () => { + + it('should ignore default env exporter when user provides span processor in sdk config', async () => { const traceExporter = new ConsoleSpanExporter(); const spanProcessor = new SimpleSpanProcessor(traceExporter); const sdk = new NodeSDK({ @@ -1146,15 +1143,13 @@ describe('setup exporter from env', () => { const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert( - sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters === false - ); assert(listOfProcessors.length === 1); assert(listOfProcessors[0] instanceof SimpleSpanProcessor); - assert(listOfProcessors[0] instanceof BatchSpanProcessor === false); + assert(listOfProcessors[0]['_exporter'] instanceof ConsoleSpanExporter); await sdk.shutdown(); }); - it('ignores env exporter when user provides tracer exporter to sdk config and sets exporter via env', async () => { + + it('should ignore exporter form env if another is provided in sdk config', async () => { env.OTEL_TRACES_EXPORTER = 'console'; const traceExporter = new OTLPTraceExporter(); const sdk = new NodeSDK({ @@ -1164,15 +1159,13 @@ describe('setup exporter from env', () => { const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert( - sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters === false - ); assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof SimpleSpanProcessor === false); assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof OTLPTraceExporter); delete env.OTEL_TRACES_EXPORTER; await sdk.shutdown(); }); + it('should only create one span processor when configured using env vars and config', async () => { env.OTEL_TRACES_EXPORTER = 'console'; const sdk = new NodeSDK({ @@ -1181,15 +1174,18 @@ describe('setup exporter from env', () => { sdk.start(); const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert.ok(sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters); + assert.ok( sdk['_tracerProvider']!['_config']?.sampler instanceof AlwaysOffSampler ); assert.strictEqual(listOfProcessors.length, 1); + assert(listOfProcessors[0] instanceof SimpleSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ConsoleSpanExporter); delete env.OTEL_TRACES_EXPORTER; await sdk.shutdown(); }); - it('use otlp exporter and defined exporter protocol env value', async () => { + + it('should use otlp exporter and defined exporter protocol env value', async () => { env.OTEL_TRACES_EXPORTER = 'otlp'; env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; const sdk = new NodeSDK(); @@ -1197,90 +1193,91 @@ describe('setup exporter from env', () => { const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert(sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters); + assert(listOfProcessors.length === 1); assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof OTLPGrpcTraceExporter); delete env.OTEL_TRACES_EXPORTER; delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; await sdk.shutdown(); }); - it('use noop span processor when user sets env exporter to none', async () => { - env.OTEL_TRACES_EXPORTER = 'none'; + + it('sohuld use exporter and processor from env, signal specific env for protocol takes precedence', async () => { + env.OTEL_TRACES_EXPORTER = 'otlp'; + env.OTEL_EXPORTER_OTLP_PROTOCOL = 'http/protobuf'; + env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; const sdk = new NodeSDK(); sdk.start(); const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - const activeProcessor = sdk['_tracerProvider']?.getActiveSpanProcessor(); - assert(listOfProcessors.length === 0); - assert(activeProcessor instanceof NoopSpanProcessor); + assert(listOfProcessors.length === 1); + assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof OTLPGrpcTraceExporter); delete env.OTEL_TRACES_EXPORTER; + delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; await sdk.shutdown(); }); - it('log warning that sdk will not be initialized when exporter is set to none', async () => { + + it('should use noop span processor when user sets env exporter to none', async () => { env.OTEL_TRACES_EXPORTER = 'none'; const sdk = new NodeSDK(); sdk.start(); + // should warn assert.strictEqual( stubLoggerError.args[0][0], 'OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.' ); - delete env.OTEL_TRACES_EXPORTER; - await sdk.shutdown(); - }); - it('use default otlp exporter when user does not set exporter via env or config', async () => { - const sdk = new NodeSDK(); - sdk.start(); const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert(sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters); - assert(listOfProcessors.length === 1); - assert(listOfProcessors[0] instanceof BatchSpanProcessor); + const activeProcessor = sdk['_tracerProvider']?.getActiveSpanProcessor(); + + assert(listOfProcessors.length === 0); + assert(activeProcessor instanceof NoopSpanProcessor); + delete env.OTEL_TRACES_EXPORTER; await sdk.shutdown(); }); - it('use default otlp exporter when empty value is provided for exporter via env', async () => { + + it('should use default otlp exporter when empty value is provided for exporter via env', async () => { env.OTEL_TRACES_EXPORTER = ''; const sdk = new NodeSDK(); sdk.start(); const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert(sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters); + assert(listOfProcessors.length === 1); assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof OTLPProtoTraceExporter); env.OTEL_TRACES_EXPORTER = ''; await sdk.shutdown(); }); - it('use only default exporter when none value is provided with other exporters', async () => { + it('should use only default exporter when none value is provided with other exporters', async () => { env.OTEL_TRACES_EXPORTER = 'otlp,zipkin,none'; const sdk = new NodeSDK(); sdk.start(); + // also it should warn + assert.strictEqual( + stubLoggerError.args[0][0], + 'OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.' + ); + const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert(sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters); + assert(listOfProcessors.length === 1); assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof OTLPProtoTraceExporter); delete env.OTEL_TRACES_EXPORTER; await sdk.shutdown(); }); - it('log warning that only default exporter will be used since exporter list contains none with other exports ', async () => { - env.OTEL_TRACES_EXPORTER = 'otlp,zipkin,none'; - const sdk = new NodeSDK(); - sdk.start(); - assert.strictEqual( - stubLoggerError.args[0][0], - 'OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.' - ); - delete env.OTEL_TRACES_EXPORTER; - await sdk.shutdown(); - }); it('should warn that provided exporter value is unrecognized and not able to be set up', async () => { env.OTEL_TRACES_EXPORTER = 'invalid'; const sdk = new NodeSDK(); @@ -1299,7 +1296,84 @@ describe('setup exporter from env', () => { delete env.OTEL_TRACES_EXPORTER; await sdk.shutdown(); }); - it('setup zipkin, jaeger and otlp exporters', async () => { + + it('should be able to setup zipkin exporter', async () => { + env.OTEL_TRACES_EXPORTER = 'zipkin'; + env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; + const sdk = new NodeSDK(); + sdk.start(); + + const listOfProcessors = + sdk['_tracerProvider']!['_registeredSpanProcessors']!; + + assert(listOfProcessors.length === 1); + assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ZipkinExporter); + + delete env.OTEL_TRACES_EXPORTER; + delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; + await sdk.shutdown(); + }); + + it('should be able to setup zipkin and otlp exporters', async () => { + env.OTEL_TRACES_EXPORTER = 'zipkin, otlp'; + env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; + const sdk = new NodeSDK(); + sdk.start(); + + const listOfProcessors = + sdk['_tracerProvider']!['_registeredSpanProcessors']!; + + assert(listOfProcessors.length === 2); + assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ZipkinExporter); + assert(listOfProcessors[1] instanceof BatchSpanProcessor); + assert(listOfProcessors[1]['_exporter'] instanceof OTLPGrpcTraceExporter); + + delete env.OTEL_TRACES_EXPORTER; + delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; + await sdk.shutdown(); + }); + + it('should be able to setup jaeger exporter', async () => { + env.OTEL_TRACES_EXPORTER = 'jaeger'; + env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; + const sdk = new NodeSDK(); + sdk.start(); + + const listOfProcessors = + sdk['_tracerProvider']!['_registeredSpanProcessors']!; + + assert(listOfProcessors.length === 1); + assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof JaegerExporter); + + delete env.OTEL_TRACES_EXPORTER; + delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; + await sdk.shutdown(); + }); + + it('should be able to setup jaeger and otlp exporters', async () => { + env.OTEL_TRACES_EXPORTER = 'otlp, jaeger'; + env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; + const sdk = new NodeSDK(); + sdk.start(); + + const listOfProcessors = + sdk['_tracerProvider']!['_registeredSpanProcessors']!; + + assert(listOfProcessors.length === 2); + assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof OTLPGrpcTraceExporter); + assert(listOfProcessors[1] instanceof BatchSpanProcessor); + assert(listOfProcessors[1]['_exporter'] instanceof JaegerExporter); + + delete env.OTEL_TRACES_EXPORTER; + delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; + await sdk.shutdown(); + }); + + it('should be able to setup zipkin, jaeger and otlp exporters', async () => { env.OTEL_TRACES_EXPORTER = 'zipkin, otlp, jaeger'; env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; const sdk = new NodeSDK(); @@ -1307,27 +1381,66 @@ describe('setup exporter from env', () => { const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; - assert(sdk['_tracerProvider'] instanceof TracerProviderWithEnvExporters); + assert(listOfProcessors.length === 3); assert(listOfProcessors[0] instanceof BatchSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ZipkinExporter); assert(listOfProcessors[1] instanceof BatchSpanProcessor); + assert(listOfProcessors[1]['_exporter'] instanceof OTLPGrpcTraceExporter); assert(listOfProcessors[2] instanceof BatchSpanProcessor); + assert(listOfProcessors[2]['_exporter'] instanceof JaegerExporter); delete env.OTEL_TRACES_EXPORTER; delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; await sdk.shutdown(); }); - it('use the console exporter', async () => { + + it('should be able to use console and otlp exporters', async () => { env.OTEL_TRACES_EXPORTER = 'console, otlp'; const sdk = new NodeSDK(); sdk.start(); const listOfProcessors = sdk['_tracerProvider']!['_registeredSpanProcessors']!; + assert(listOfProcessors.length === 2); assert(listOfProcessors[0] instanceof SimpleSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ConsoleSpanExporter); assert(listOfProcessors[1] instanceof BatchSpanProcessor); + assert(listOfProcessors[1]['_exporter'] instanceof OTLPProtoTraceExporter); + delete env.OTEL_TRACES_EXPORTER; + await sdk.shutdown(); + }); + + it('should be able to use console exporter but not http/json exporter', async () => { + env.OTEL_TRACES_EXPORTER = 'console, http/json'; + const sdk = new NodeSDK(); + sdk.start(); + + const listOfProcessors = + sdk['_tracerProvider']!['_registeredSpanProcessors']!; + + assert(listOfProcessors.length === 1); + assert(listOfProcessors[0] instanceof SimpleSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ConsoleSpanExporter); + delete env.OTEL_TRACES_EXPORTER; + await sdk.shutdown(); + }); + + it('should ignore the protocol from env when use the console exporter', async () => { + env.OTEL_TRACES_EXPORTER = 'console'; + env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'grpc'; + const sdk = new NodeSDK(); + sdk.start(); + + const listOfProcessors = + sdk['_tracerProvider']!['_registeredSpanProcessors']!; + + assert(listOfProcessors.length === 1); + assert(listOfProcessors[0] instanceof SimpleSpanProcessor); + assert(listOfProcessors[0]['_exporter'] instanceof ConsoleSpanExporter); delete env.OTEL_TRACES_EXPORTER; + delete env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL; await sdk.shutdown(); }); }); diff --git a/experimental/packages/otlp-exporter-base/package.json b/experimental/packages/otlp-exporter-base/package.json index 1ae07f3c1fa..620d43746ae 100644 --- a/experimental/packages/otlp-exporter-base/package.json +++ b/experimental/packages/otlp-exporter-base/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/otlp-exporter-base", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry OTLP Exporter base (for internal use only)", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -60,8 +60,8 @@ "access": "public" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-transformer": "0.53.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-transformer": "0.54.2" }, "devDependencies": { "@babel/core": "7.25.2", diff --git a/experimental/packages/otlp-grpc-exporter-base/package.json b/experimental/packages/otlp-grpc-exporter-base/package.json index fe67c49b82c..a853b0c01b2 100644 --- a/experimental/packages/otlp-grpc-exporter-base/package.json +++ b/experimental/packages/otlp-grpc-exporter-base/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/otlp-grpc-exporter-base", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenTelemetry OTLP-gRPC Exporter base (for internal use only)", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -47,8 +47,8 @@ }, "devDependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -65,9 +65,9 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-grpc-exporter-base", "sideEffects": false diff --git a/experimental/packages/otlp-grpc-exporter-base/test/configuration/otlp-grpc-configuration.test.ts b/experimental/packages/otlp-grpc-exporter-base/test/configuration/otlp-grpc-configuration.test.ts index 097612a18d2..4653e8be568 100644 --- a/experimental/packages/otlp-grpc-exporter-base/test/configuration/otlp-grpc-configuration.test.ts +++ b/experimental/packages/otlp-grpc-exporter-base/test/configuration/otlp-grpc-configuration.test.ts @@ -26,6 +26,7 @@ import { createSslCredentials, } from '../../src/grpc-exporter-transport'; import * as fs from 'fs'; +import { VERSION } from '../../src/version'; describe('mergeOtlpGrpcConfigurationWithDefaults', function () { describe('metadata', function () { @@ -56,7 +57,7 @@ describe('mergeOtlpGrpcConfigurationWithDefaults', function () { foo: 'foo-user', // does not use fallback if the user has set something bar: 'bar-fallback', // uses fallback if there is no value set baz: 'baz-user', // does not drop user-set metadata if there is no fallback for it - 'user-agent': 'OTel-OTLP-Exporter-JavaScript/0.53.0', + 'user-agent': 'OTel-OTLP-Exporter-JavaScript/' + VERSION, }); }); @@ -81,7 +82,7 @@ describe('mergeOtlpGrpcConfigurationWithDefaults', function () { ); assert.deepStrictEqual(config.metadata().getMap(), { - 'user-agent': 'OTel-OTLP-Exporter-JavaScript/0.53.0', + 'user-agent': 'OTel-OTLP-Exporter-JavaScript/' + VERSION, }); }); @@ -94,7 +95,7 @@ describe('mergeOtlpGrpcConfigurationWithDefaults', function () { ); assert.deepStrictEqual(config.metadata().getMap(), { - 'user-agent': 'OTel-OTLP-Exporter-JavaScript/0.53.0', + 'user-agent': 'OTel-OTLP-Exporter-JavaScript/' + VERSION, }); }); }); diff --git a/experimental/packages/otlp-transformer/package.json b/experimental/packages/otlp-transformer/package.json index 158c6fba130..101395e94cc 100644 --- a/experimental/packages/otlp-transformer/package.json +++ b/experimental/packages/otlp-transformer/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "0.53.0", + "version": "0.54.2", "description": "Transform OpenTelemetry SDK data into OTLP", "module": "build/esm/index.js", "esnext": "build/esnext/index.js", @@ -81,12 +81,12 @@ "webpack": "5.94.0" }, "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "protobufjs": "^7.3.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-transformer", diff --git a/experimental/packages/propagator-aws-xray-lambda/.eslintignore b/experimental/packages/propagator-aws-xray-lambda/.eslintignore deleted file mode 100644 index 378eac25d31..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -build diff --git a/experimental/packages/propagator-aws-xray-lambda/.eslintrc.js b/experimental/packages/propagator-aws-xray-lambda/.eslintrc.js deleted file mode 100644 index 9baf1b49565..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../../eslint.base.js') -} diff --git a/experimental/packages/propagator-aws-xray-lambda/.npmignore b/experimental/packages/propagator-aws-xray-lambda/.npmignore deleted file mode 100644 index 9505ba9450f..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/bin -/coverage -/doc -/test diff --git a/experimental/packages/propagator-aws-xray-lambda/LICENSE b/experimental/packages/propagator-aws-xray-lambda/LICENSE deleted file mode 100644 index 261eeb9e9f8..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/experimental/packages/propagator-aws-xray-lambda/README.md b/experimental/packages/propagator-aws-xray-lambda/README.md deleted file mode 100644 index 33c1885ed98..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenTelemetry Propagator AWS X-Ray-Lambda - -[![NPM Published Version][npm-img]][npm-url] -[![Apache License][license-image]][license-image] - -**Note: This is an experimental package under active development. New releases may include breaking changes.** - -The OpenTelemetry Propagator for AWS X-Ray Lambda provides propagation based on the X-Ray `_X_AMZN_TRACE_ID` environment -variable in addition to the AWS X-Ray HTTP headers. This propagator should be used only for an AWS Lambda instrumentation. - -## Usage - -The preferred method for using this propagator is by using the `OTEL_PROPAGATORS` environment variable. For more details, -see the [semantic conventions specification for AWS Lambda](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/aws-lambda.md). - -## Propagator Details - -The propagator extracts context from the `_X_AMZN_TRACE_ID` environment variable, except when there is already another -context active. It also automatically uses the [AWS X-Ray propagator](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/propagators/opentelemetry-propagator-aws-xray). - -## 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/blob/main/LICENSE -[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[npm-url]: https://www.npmjs.com/package/@opentelemetry/propagator-aws-xray -[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fpropagator-aws-xray.svg diff --git a/experimental/packages/propagator-aws-xray-lambda/package.json b/experimental/packages/propagator-aws-xray-lambda/package.json deleted file mode 100644 index fe49aa4ce72..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "@opentelemetry/propagator-aws-xray-lambda", - "version": "0.53.0", - "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", - "main": "build/src/index.js", - "module": "build/esm/index.js", - "types": "build/src/index.d.ts", - "repository": "open-telemetry/opentelemetry-js", - "scripts": { - "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/propagator-aws-xray-lambda --include-dependencies", - "prewatch": "npm run precompile", - "compile": "tsc --build tsconfig.json tsconfig.esm.json", - "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", - "test": "nyc mocha test/**/*.test.ts", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", - "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", - "prepublishOnly": "npm run compile", - "peer-api-check": "node ../../../scripts/peer-api-check.js", - "align-api-deps": "node ../../../scripts/align-api-deps.js" - }, - "keywords": [ - "opentelemetry", - "nodejs", - "tracing", - "awsxray" - ], - "author": "OpenTelemetry Authors", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - }, - "files": [ - "build/esm/**/*.js", - "build/esm/**/*.js.map", - "build/esm/**/*.d.ts", - "build/src/**/*.js", - "build/src/**/*.js.map", - "build/src/**/*.d.ts" - ], - "publishConfig": { - "access": "public" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - }, - "devDependencies": { - "@babel/core": "7.25.2", - "@babel/preset-env": "7.25.4", - "@opentelemetry/api": "1.9.0", - "@types/mocha": "10.0.8", - "@types/node": "18.6.5", - "@types/sinon": "17.0.3", - "babel-loader": "8.4.1", - "babel-plugin-istanbul": "7.0.0", - "cross-var": "1.1.0", - "lerna": "6.6.2", - "mocha": "10.7.3", - "nyc": "15.1.0", - "sinon": "15.1.2", - "ts-loader": "9.5.1", - "typescript": "4.4.4" - }, - "dependencies": { - "@opentelemetry/propagator-aws-xray": "1.26.0" - }, - "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/propagator-aws-xray-lambda#readme" -} diff --git a/experimental/packages/propagator-aws-xray-lambda/src/AWSXRayLambdaPropagator.ts b/experimental/packages/propagator-aws-xray-lambda/src/AWSXRayLambdaPropagator.ts deleted file mode 100644 index 51d7ca48891..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/src/AWSXRayLambdaPropagator.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - Context, - TextMapPropagator, - TextMapSetter, - TextMapGetter, - isSpanContextValid, - defaultTextMapGetter, - trace, -} from '@opentelemetry/api'; -import { - AWSXRayPropagator, - AWSXRAY_TRACE_ID_HEADER, -} from '@opentelemetry/propagator-aws-xray'; - -export const AWSXRAY_TRACE_ID_ENV_VAR = '_X_AMZN_TRACE_ID'; - -/** - * Implementation of the AWS X-Ray Trace Header propagation protocol with special - * logic for handling Lambda X-ray environment variable. - * - * An example AWS Xray Tracing Header is shown below: - * X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1 - */ -export class AWSXRayLambdaPropagator implements TextMapPropagator { - private _awsXrayPropagator = new AWSXRayPropagator(); - - inject(context: Context, carrier: unknown, setter: TextMapSetter) { - this._awsXrayPropagator.inject(context, carrier, setter); - } - - extract(context: Context, carrier: unknown, getter: TextMapGetter): Context { - const xrayContext = this._awsXrayPropagator.extract( - context, - carrier, - getter - ); - - const spanContext = trace.getSpanContext(context); - if (spanContext && isSpanContextValid(spanContext)) { - return xrayContext; - } - - const xrayEnvVar = process.env[AWSXRAY_TRACE_ID_ENV_VAR]; - if (!xrayEnvVar) { - return xrayContext; - } - - return this._awsXrayPropagator.extract( - xrayContext, - { [AWSXRAY_TRACE_ID_HEADER]: xrayEnvVar }, - defaultTextMapGetter - ); - } - - fields(): string[] { - return this._awsXrayPropagator.fields(); - } -} diff --git a/experimental/packages/propagator-aws-xray-lambda/src/index.ts b/experimental/packages/propagator-aws-xray-lambda/src/index.ts deleted file mode 100644 index 0841580d074..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/src/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export { AWSXRayLambdaPropagator } from './AWSXRayLambdaPropagator'; diff --git a/experimental/packages/propagator-aws-xray-lambda/test/AWSXRayLambdaPropagator.test.ts b/experimental/packages/propagator-aws-xray-lambda/test/AWSXRayLambdaPropagator.test.ts deleted file mode 100644 index 23f01482c70..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/test/AWSXRayLambdaPropagator.test.ts +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import * as assert from 'assert'; - -import { - defaultTextMapGetter, - defaultTextMapSetter, - ROOT_CONTEXT, - SpanContext, - TraceFlags, - trace, - context, -} from '@opentelemetry/api'; -import * as sinon from 'sinon'; - -import { AWSXRayLambdaPropagator } from '../src'; -import { AWSXRAY_TRACE_ID_ENV_VAR } from '../src/AWSXRayLambdaPropagator'; -import { - AWSXRAY_TRACE_ID_HEADER, - AWSXRayPropagator, -} from '@opentelemetry/propagator-aws-xray'; - -describe('AWSXRayPropagator', () => { - const xrayLambdaPropagator = new AWSXRayLambdaPropagator(); - - let carrier: { [key: string]: unknown }; - - beforeEach(() => { - carrier = {}; - }); - - describe('.inject()', () => { - it('should use AWSXRayPropagator inject()', () => { - const spy = sinon.spy(AWSXRayPropagator.prototype, 'inject'); - assert.equal(spy.callCount, 0); - xrayLambdaPropagator.inject( - context.active(), - carrier, - defaultTextMapSetter - ); - sinon.assert.calledOnceWithExactly( - spy, - context.active(), - carrier, - defaultTextMapSetter - ); - }); - }); - - describe('.extract()', () => { - it('should extract context from the _X_AMZN_TRACE_ID env variable', () => { - const xrayEnvSpanId = '53995c3f42cd8ad8'; - const xrayEnvTraceId = '8a3c60f7d188f8fa79d48a391a778fa6'; - process.env[AWSXRAY_TRACE_ID_ENV_VAR] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = trace - .getSpan( - xrayLambdaPropagator.extract( - ROOT_CONTEXT, - carrier, - defaultTextMapGetter - ) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: xrayEnvTraceId, - spanId: xrayEnvSpanId, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should return current context if one exists', () => { - const traceId = 'fd14414f1e61351035c43863714b4aa8'; - const spanId = '81e77faacf9f61f3'; - const existingContext: SpanContext = { - traceId: traceId, - spanId: spanId, - traceFlags: TraceFlags.SAMPLED, - isRemote: true, - }; - const ctx = trace.setSpanContext(context.active(), existingContext); - - process.env[AWSXRAY_TRACE_ID_ENV_VAR] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - - const extractedSpanContext = trace - .getSpan( - xrayLambdaPropagator.extract(ctx, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: traceId, - spanId: spanId, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should return X-ray context from carrier when there is an existing context', () => { - const traceId = 'fd14414f1e61351035c43863714b4aa8'; - const spanId = '81e77faacf9f61f3'; - const existingContext: SpanContext = { - traceId: traceId, - spanId: spanId, - traceFlags: TraceFlags.SAMPLED, - isRemote: true, - }; - const ctx = trace.setSpanContext(context.active(), existingContext); - - process.env[AWSXRAY_TRACE_ID_ENV_VAR] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - - const xrayHeaderSpanId = '4635c8688f46eb5d'; - const xrayHeaderTraceId = '48165d1ad6255f4cb1ddf9999ef6d536'; - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-48165d1a-d6255f4cb1ddf9999ef6d536;Parent=4635c8688f46eb5d;Sampled=1'; - - const extractedSpanContext = trace - .getSpan( - xrayLambdaPropagator.extract(ctx, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: xrayHeaderTraceId, - spanId: xrayHeaderSpanId, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should return env variable context if there is no active context but carrier also has xray headers', () => { - const xrayEnvSpanId = '53995c3f42cd8ad8'; - const xrayEnvTraceId = '8a3c60f7d188f8fa79d48a391a778fa6'; - process.env[AWSXRAY_TRACE_ID_ENV_VAR] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-48165d1a-d6255f4cb1ddf9999ef6d536;Parent=4635c8688f46eb5d;Sampled=1'; - - const extractedSpanContext = trace - .getSpan( - xrayLambdaPropagator.extract( - context.active(), - carrier, - defaultTextMapGetter - ) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: xrayEnvTraceId, - spanId: xrayEnvSpanId, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should return current context if one exists', () => { - delete process.env[AWSXRAY_TRACE_ID_ENV_VAR]; - - const xrayHeaderSpanId = '53995c3f42cd8ad8'; - const xrayHeaderTraceId = '8a3c60f7d188f8fa79d48a391a778fa6'; - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = trace - .getSpan( - xrayLambdaPropagator.extract( - ROOT_CONTEXT, - carrier, - defaultTextMapGetter - ) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: xrayHeaderTraceId, - spanId: xrayHeaderSpanId, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - }); - - describe('.fields()', () => { - it('should return a field with AWS X-Ray Trace ID header', () => { - const actualFields = xrayLambdaPropagator.fields(); - assert.deepStrictEqual([AWSXRAY_TRACE_ID_HEADER], actualFields); - }); - }); -}); diff --git a/experimental/packages/propagator-aws-xray-lambda/test/index-webpack.ts b/experimental/packages/propagator-aws-xray-lambda/test/index-webpack.ts deleted file mode 100644 index 061a48ccfa7..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/test/index-webpack.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const testsContext = require.context('.', true, /test$/); -testsContext.keys().forEach(testsContext); - -const srcContext = require.context('.', true, /src$/); -srcContext.keys().forEach(srcContext); diff --git a/experimental/packages/propagator-aws-xray-lambda/tsconfig.esm.json b/experimental/packages/propagator-aws-xray-lambda/tsconfig.esm.json deleted file mode 100644 index ed538d42992..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/tsconfig.esm.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../../tsconfig.base.esm.json", - "compilerOptions": { - "outDir": "build/esm", - "rootDir": "src", - "tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo" - }, - "include": [ - "src/**/*.ts" - ], - "references": [ - { - "path": "../../../api" - }, - { - "path": "../../../packages/propagator-aws-xray" - } - ] -} diff --git a/experimental/packages/propagator-aws-xray-lambda/tsconfig.esnext.json b/experimental/packages/propagator-aws-xray-lambda/tsconfig.esnext.json deleted file mode 100644 index 2eb63c9fd9d..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/tsconfig.esnext.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../../tsconfig.base.esnext.json", - "compilerOptions": { - "outDir": "build/esnext", - "rootDir": "src", - "tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo" - }, - "include": [ - "src/**/*.ts" - ], - "references": [ - { - "path": "../../../api" - }, - { - "path": "../../../packages/propagator-aws-xray" - } - ] -} diff --git a/experimental/packages/propagator-aws-xray-lambda/tsconfig.json b/experimental/packages/propagator-aws-xray-lambda/tsconfig.json deleted file mode 100644 index 48c9ac9c8ab..00000000000 --- a/experimental/packages/propagator-aws-xray-lambda/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "build", - "rootDir": "." - }, - "include": [ - "src/**/*.ts", - "test/**/*.ts" - ], - "references": [ - { - "path": "../../../api" - }, - { - "path": "../../../packages/propagator-aws-xray" - } - ] -} diff --git a/experimental/packages/sampler-jaeger-remote/package.json b/experimental/packages/sampler-jaeger-remote/package.json index c2c2572881b..f809be28a75 100644 --- a/experimental/packages/sampler-jaeger-remote/package.json +++ b/experimental/packages/sampler-jaeger-remote/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sampler-jaeger-remote", - "version": "0.53.0", + "version": "0.54.2", "description": "Jaeger Remote Sampler", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -42,7 +42,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/sdk-trace-base": "1.27.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" diff --git a/experimental/packages/sdk-events/package.json b/experimental/packages/sdk-events/package.json index 03c72bb8ada..abe58502d39 100644 --- a/experimental/packages/sdk-events/package.json +++ b/experimental/packages/sdk-events/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-events", - "version": "0.53.0", + "version": "0.54.2", "publishConfig": { "access": "public" }, @@ -92,8 +92,8 @@ "webpack-merge": "5.10.0" }, "dependencies": { - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" } } diff --git a/experimental/packages/sdk-logs/package.json b/experimental/packages/sdk-logs/package.json index 254b192af30..f7c15dc21e8 100644 --- a/experimental/packages/sdk-logs/package.json +++ b/experimental/packages/sdk-logs/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-logs", - "version": "0.53.0", + "version": "0.54.2", "publishConfig": { "access": "public" }, @@ -97,8 +97,8 @@ "webpack-merge": "5.10.0" }, "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0" } } diff --git a/experimental/packages/sdk-logs/src/LoggerProvider.ts b/experimental/packages/sdk-logs/src/LoggerProvider.ts index 8681ab364d7..bdb402db933 100644 --- a/experimental/packages/sdk-logs/src/LoggerProvider.ts +++ b/experimental/packages/sdk-logs/src/LoggerProvider.ts @@ -28,14 +28,27 @@ import { LoggerProviderSharedState } from './internal/LoggerProviderSharedState' export const DEFAULT_LOGGER_NAME = 'unknown'; +function prepareResource( + mergeWithDefaults: boolean, + providedResource: Resource | undefined +) { + const resource = providedResource ?? Resource.empty(); + + if (mergeWithDefaults) { + return Resource.default().merge(resource); + } + return resource; +} + export class LoggerProvider implements logsAPI.LoggerProvider { private _shutdownOnce: BindOnceFuture; private readonly _sharedState: LoggerProviderSharedState; constructor(config: LoggerProviderConfig = {}) { const mergedConfig = merge({}, loadDefaultConfig(), config); - const resource = Resource.default().merge( - mergedConfig.resource ?? Resource.empty() + const resource = prepareResource( + mergedConfig.mergeResourceWithDefaults, + config.resource ); this._sharedState = new LoggerProviderSharedState( resource, diff --git a/experimental/packages/sdk-logs/src/config.ts b/experimental/packages/sdk-logs/src/config.ts index 91b2c3e4884..b61163b2fa8 100644 --- a/experimental/packages/sdk-logs/src/config.ts +++ b/experimental/packages/sdk-logs/src/config.ts @@ -31,6 +31,7 @@ export function loadDefaultConfig() { attributeCountLimit: getEnv().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT, }, includeTraceContext: true, + mergeResourceWithDefaults: true, }; } diff --git a/experimental/packages/sdk-logs/src/types.ts b/experimental/packages/sdk-logs/src/types.ts index 27aefa540fe..de316a0e34a 100644 --- a/experimental/packages/sdk-logs/src/types.ts +++ b/experimental/packages/sdk-logs/src/types.ts @@ -28,6 +28,12 @@ export interface LoggerProviderConfig { /** Log Record Limits*/ logRecordLimits?: LogRecordLimits; + + /** + * Merge resource with {@link Resource.default()}? + * Default: {@code true} + */ + mergeResourceWithDefaults?: boolean; } export interface LogRecordLimits { diff --git a/experimental/packages/sdk-logs/test/common/LoggerProvider.test.ts b/experimental/packages/sdk-logs/test/common/LoggerProvider.test.ts index 1c5a8aa2312..b2499fce7e9 100644 --- a/experimental/packages/sdk-logs/test/common/LoggerProvider.test.ts +++ b/experimental/packages/sdk-logs/test/common/LoggerProvider.test.ts @@ -73,6 +73,29 @@ describe('LoggerProvider', () => { ); }); + it('should not merge with default resource attrs when flag is set to false', function () { + const passedInResource = new Resource({ foo: 'bar' }); + const provider = new LoggerProvider({ + resource: passedInResource, + mergeResourceWithDefaults: false, + }); + const { resource } = provider['_sharedState']; + assert.deepStrictEqual(resource, passedInResource); + }); + + it('should merge with default resource attrs when flag is set to true', function () { + const passedInResource = new Resource({ foo: 'bar' }); + const provider = new LoggerProvider({ + resource: passedInResource, + mergeResourceWithDefaults: true, + }); + const { resource } = provider['_sharedState']; + assert.deepStrictEqual( + resource, + Resource.default().merge(passedInResource) + ); + }); + it('should have default forceFlushTimeoutMillis if not pass', () => { const provider = new LoggerProvider(); const sharedState = provider['_sharedState']; diff --git a/experimental/packages/shim-opencensus/package.json b/experimental/packages/shim-opencensus/package.json index 72f72031fde..0fa7a5278ff 100644 --- a/experimental/packages/shim-opencensus/package.json +++ b/experimental/packages/shim-opencensus/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/shim-opencensus", - "version": "0.53.0", + "version": "0.54.2", "description": "OpenCensus to OpenTelemetry shim", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,8 +50,8 @@ "devDependencies": { "@opencensus/core": "0.1.0", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -67,9 +67,9 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", "require-in-the-middle": "^7.1.1", "semver": "^7.5.2" }, diff --git a/experimental/packages/web-common/package.json b/experimental/packages/web-common/package.json index c0ba90589cd..2e23f02aa1f 100644 --- a/experimental/packages/web-common/package.json +++ b/experimental/packages/web-common/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/web-common", - "version": "0.53.0", + "version": "0.54.2", "publishConfig": { "access": "public" }, @@ -66,15 +66,15 @@ "@opentelemetry/api": ">=1.4.0 <1.10.0" }, "dependencies": { - "@opentelemetry/sdk-logs": "^0.53.0", - "@opentelemetry/sdk-trace-base": "^1.26.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "10.0.20", diff --git a/integration-tests/api/package.json b/integration-tests/api/package.json index 1edf1de0c28..fbf526a576c 100644 --- a/integration-tests/api/package.json +++ b/integration-tests/api/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/integration-tests-api", - "version": "1.26.0", + "version": "1.27.2", "private": true, "publishConfig": { "access": "restricted" @@ -28,7 +28,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "cross-var": "1.1.0", diff --git a/integration-tests/propagation-validation-server/package.json b/integration-tests/propagation-validation-server/package.json index 59a24cecacb..d88dc750343 100644 --- a/integration-tests/propagation-validation-server/package.json +++ b/integration-tests/propagation-validation-server/package.json @@ -1,6 +1,6 @@ { "name": "propagation-validation-server", - "version": "1.27.0", + "version": "1.28.2", "description": "server for w3c tests", "main": "validation_server.js", "private": true, @@ -12,9 +12,9 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "axios": "1.7.4", "body-parser": "1.20.3", "express": "4.20.0" diff --git a/integration-tests/tracecontext-integration-test.sh b/integration-tests/tracecontext-integration-test.sh index 6096b9198f3..cf3d94c056a 100755 --- a/integration-tests/tracecontext-integration-test.sh +++ b/integration-tests/tracecontext-integration-test.sh @@ -8,6 +8,8 @@ mkdir -p target rm -rf ./target/trace-context git clone https://github.com/w3c/trace-context ./target/trace-context cd ./target/trace-context && git checkout $TRACECONTEXT_GIT_TAG && cd - +python3 -m venv ./.venv +source ./.venv/bin/activate pip3 install setuptools; pip3 install aiohttp; node ./integration-tests/propagation-validation-server/validation-server.js 1>&2 & diff --git a/package-lock.json b/package-lock.json index dac1eb95624..6443e897113 100644 --- a/package-lock.json +++ b/package-lock.json @@ -91,16 +91,16 @@ } }, "examples/esm-http-ts": { - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "engines": { @@ -109,17 +109,17 @@ }, "examples/http": { "name": "http-example", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-jaeger": "1.26.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-jaeger": "1.27.0", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { @@ -131,17 +131,17 @@ }, "examples/https": { "name": "https-example", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-jaeger": "1.26.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-jaeger": "1.27.0", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { @@ -153,23 +153,23 @@ }, "examples/opentelemetry-web": { "name": "web-opentelemetry-example", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-fetch": "0.53.0", - "@opentelemetry/instrumentation-xml-http-request": "0.53.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-fetch": "0.54.2", + "@opentelemetry/instrumentation-xml-http-request": "0.54.2", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { @@ -202,20 +202,20 @@ }, "examples/otlp-exporter-node": { "name": "example-otlp-exporter-node", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/exporter-metrics-otlp-proto": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "engines": { @@ -224,11 +224,11 @@ }, "experimental/backwards-compatibility/node14": { "name": "backcompat-node14", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/sdk-node": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/sdk-node": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@types/node": "14.18.25", @@ -246,11 +246,11 @@ }, "experimental/backwards-compatibility/node16": { "name": "backcompat-node16", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/sdk-node": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/sdk-node": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@types/node": "16.11.52", @@ -268,14 +268,14 @@ }, "experimental/examples/events": { "name": "events-example", - "version": "0.53.0", + "version": "0.54.2", "dependencies": { "@opentelemetry/api": "^1.7.0", - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/exporter-logs-otlp-http": "0.53.0", - "@opentelemetry/sdk-events": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/exporter-logs-otlp-http": "0.54.2", + "@opentelemetry/sdk-events": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "devDependencies": { "@types/node": "18.6.5", @@ -284,11 +284,11 @@ }, "experimental/examples/logs": { "name": "logs-example", - "version": "0.53.0", + "version": "0.54.2", "dependencies": { "@opentelemetry/api": "^1.7.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "devDependencies": { "@types/node": "18.6.5", @@ -296,20 +296,20 @@ } }, "experimental/examples/opencensus-shim": { - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opencensus/core": "0.1.0", "@opencensus/instrumentation-http": "0.1.0", "@opencensus/nodejs-base": "0.1.0", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-prometheus": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", - "@opentelemetry/shim-opencensus": "0.53.0" + "@opentelemetry/shim-opencensus": "0.54.2" }, "engines": { "node": ">=18" @@ -317,21 +317,21 @@ }, "experimental/examples/prometheus": { "name": "prometheus-example", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-prometheus": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/exporter-prometheus": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0" } }, "experimental/packages/api-events": { "name": "@opentelemetry/api-events", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/api-logs": "0.53.0" + "@opentelemetry/api-logs": "0.54.2" }, "devDependencies": { "@types/mocha": "10.0.8", @@ -358,7 +358,7 @@ }, "experimental/packages/api-logs": { "name": "@opentelemetry/api-logs", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0" @@ -388,21 +388,21 @@ }, "experimental/packages/exporter-logs-otlp-grpc": { "name": "@opentelemetry/exporter-logs-otlp-grpc", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "devDependencies": { "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -423,20 +423,20 @@ }, "experimental/packages/exporter-logs-otlp-http": { "name": "@opentelemetry/exporter-logs-otlp-http", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "devDependencies": { "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -469,16 +469,16 @@ }, "experimental/packages/exporter-logs-otlp-proto": { "name": "@opentelemetry/exporter-logs-otlp-proto", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", @@ -514,20 +514,20 @@ }, "experimental/packages/exporter-trace-otlp-grpc": { "name": "@opentelemetry/exporter-trace-otlp-grpc", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -548,14 +548,14 @@ }, "experimental/packages/exporter-trace-otlp-http": { "name": "@opentelemetry/exporter-trace-otlp-http", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", @@ -593,14 +593,14 @@ }, "experimental/packages/exporter-trace-otlp-proto": { "name": "@opentelemetry/exporter-trace-otlp-proto", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", @@ -636,10 +636,10 @@ }, "experimental/packages/opentelemetry-browser-detector": { "name": "@opentelemetry/opentelemetry-browser-detector", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/resources": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", @@ -675,17 +675,17 @@ }, "experimental/packages/opentelemetry-exporter-metrics-otlp-grpc": { "name": "@opentelemetry/exporter-metrics-otlp-grpc", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "devDependencies": { "@grpc/proto-loader": "^0.7.10", @@ -710,14 +710,14 @@ }, "experimental/packages/opentelemetry-exporter-metrics-otlp-http": { "name": "@opentelemetry/exporter-metrics-otlp-http", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", @@ -755,15 +755,15 @@ }, "experimental/packages/opentelemetry-exporter-metrics-otlp-proto": { "name": "@opentelemetry/exporter-metrics-otlp-proto", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "devDependencies": { "@opentelemetry/api": "1.9.0", @@ -787,12 +787,12 @@ }, "experimental/packages/opentelemetry-exporter-prometheus": { "name": "@opentelemetry/exporter-prometheus", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0" }, "devDependencies": { "@opentelemetry/api": "1.9.0", @@ -816,10 +816,10 @@ }, "experimental/packages/opentelemetry-instrumentation": { "name": "@opentelemetry/instrumentation", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", + "@opentelemetry/api-logs": "0.54.2", "@types/shimmer": "^1.2.0", "import-in-the-middle": "^1.8.1", "require-in-the-middle": "^7.1.1", @@ -830,7 +830,7 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/sdk-metrics": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/semver": "7.5.8", @@ -839,7 +839,6 @@ "babel-loader": "8.4.1", "babel-plugin-istanbul": "7.0.0", "codecov": "3.8.3", - "cpx2": "2.0.0", "cross-var": "1.1.0", "karma": "6.4.4", "karma-chrome-launcher": "3.1.0", @@ -866,21 +865,21 @@ }, "experimental/packages/opentelemetry-instrumentation-fetch": { "name": "@opentelemetry/instrumentation-fetch", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -913,10 +912,10 @@ }, "experimental/packages/opentelemetry-instrumentation-grpc": { "name": "@opentelemetry/instrumentation-grpc", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/instrumentation": "0.54.2", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { @@ -924,10 +923,10 @@ "@grpc/grpc-js": "^1.7.1", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@protobuf-ts/grpc-transport": "2.9.4", "@protobuf-ts/runtime": "2.9.4", "@protobuf-ts/runtime-rpc": "2.9.4", @@ -952,21 +951,21 @@ }, "experimental/packages/opentelemetry-instrumentation-http": { "name": "@opentelemetry/instrumentation-http", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", "@opentelemetry/semantic-conventions": "1.27.0", "forwarded-parse": "2.1.2", "semver": "^7.5.2" }, "devDependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/request-promise-native": "1.0.21", @@ -1005,21 +1004,21 @@ }, "experimental/packages/opentelemetry-instrumentation-xml-http-request": { "name": "@opentelemetry/instrumentation-xml-http-request", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -1052,30 +1051,30 @@ }, "experimental/packages/opentelemetry-sdk-node": { "name": "@opentelemetry/sdk-node", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-logs-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-logs-otlp-http": "0.53.0", - "@opentelemetry/exporter-logs-otlp-proto": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-logs-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-logs-otlp-http": "0.54.2", + "@opentelemetry/exporter-logs-otlp-proto": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/exporter-jaeger": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/exporter-jaeger": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/semver": "7.5.8", @@ -1098,11 +1097,11 @@ }, "experimental/packages/otlp-exporter-base": { "name": "@opentelemetry/otlp-exporter-base", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-transformer": "0.53.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-transformer": "0.54.2" }, "devDependencies": { "@babel/core": "7.25.2", @@ -1138,18 +1137,18 @@ }, "experimental/packages/otlp-grpc-exporter-base": { "name": "@opentelemetry/otlp-grpc-exporter-base", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2" }, "devDependencies": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -1170,15 +1169,15 @@ }, "experimental/packages/otlp-transformer": { "name": "@opentelemetry/otlp-transformer", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "protobufjs": "^7.3.0" }, "devDependencies": { @@ -1208,43 +1207,12 @@ "@opentelemetry/api": "^1.3.0" } }, - "experimental/packages/propagator-aws-xray-lambda": { - "name": "@opentelemetry/propagator-aws-xray-lambda", - "version": "0.53.0", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/propagator-aws-xray": "1.26.0" - }, - "devDependencies": { - "@babel/core": "7.25.2", - "@babel/preset-env": "7.25.4", - "@opentelemetry/api": "1.9.0", - "@types/mocha": "10.0.8", - "@types/node": "18.6.5", - "@types/sinon": "17.0.3", - "babel-loader": "8.4.1", - "babel-plugin-istanbul": "7.0.0", - "cross-var": "1.1.0", - "lerna": "6.6.2", - "mocha": "10.7.3", - "nyc": "15.1.0", - "sinon": "15.1.2", - "ts-loader": "9.5.1", - "typescript": "4.4.4" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, "experimental/packages/sampler-jaeger-remote": { "name": "@opentelemetry/sampler-jaeger-remote", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/sdk-trace-base": "1.27.0" }, "devDependencies": { "@types/mocha": "10.0.8", @@ -1403,12 +1371,12 @@ }, "experimental/packages/sdk-events": { "name": "@opentelemetry/sdk-events", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0" + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2" }, "devDependencies": { "@babel/core": "7.25.2", @@ -1454,12 +1422,12 @@ }, "experimental/packages/sdk-logs": { "name": "@opentelemetry/sdk-logs", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", @@ -1546,20 +1514,20 @@ }, "experimental/packages/shim-opencensus": { "name": "@opentelemetry/shim-opencensus", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", "require-in-the-middle": "^7.1.1", "semver": "^7.5.2" }, "devDependencies": { "@opencensus/core": "0.1.0", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -1580,18 +1548,18 @@ }, "experimental/packages/web-common": { "name": "@opentelemetry/web-common", - "version": "0.53.0", + "version": "0.54.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/sdk-logs": "^0.53.0", - "@opentelemetry/sdk-trace-base": "^1.26.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "10.0.20", @@ -1633,11 +1601,11 @@ }, "integration-tests/api": { "name": "@opentelemetry/integration-tests-api", - "version": "1.26.0", + "version": "1.27.2", "license": "Apache-2.0", "devDependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "cross-var": "1.1.0", @@ -1650,13 +1618,13 @@ } }, "integration-tests/propagation-validation-server": { - "version": "1.27.0", + "version": "1.28.2", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "axios": "1.7.4", "body-parser": "1.20.3", "express": "4.20.0" @@ -6013,14 +5981,6 @@ "resolved": "experimental/packages/otlp-transformer", "link": true }, - "node_modules/@opentelemetry/propagator-aws-xray": { - "resolved": "packages/propagator-aws-xray", - "link": true - }, - "node_modules/@opentelemetry/propagator-aws-xray-lambda": { - "resolved": "experimental/packages/propagator-aws-xray-lambda", - "link": true - }, "node_modules/@opentelemetry/propagator-b3": { "resolved": "packages/opentelemetry-propagator-b3", "link": true @@ -10435,9 +10395,9 @@ } }, "node_modules/chromedriver": { - "version": "129.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.0.tgz", - "integrity": "sha512-B1ccqD6hDjNrw94FeqdynIotn1ZV/TnFrkRz2Rync2kzSnq6D6IrSkN1w5Pnuvnc98QhN2xujxDXxkqEqy/PWg==", + "version": "130.0.0", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-130.0.0.tgz", + "integrity": "sha512-1g1eMoKF22Uh6l8DTFOPvWLovINPrkAMw7yDHlF6Rx+4W4JI9aGdCZ2Cx7c181hUgALU1oSKGH3uKNryYM5DaQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -10677,16 +10637,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, "node_modules/codecov": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz", @@ -11394,107 +11344,6 @@ "node": ">=10" } }, - "node_modules/cpx2": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cpx2/-/cpx2-2.0.0.tgz", - "integrity": "sha512-hSkh9xHmUnHMxVS99SpACbAw6jOCaji0KyepBQ4/ULZQ+RB+3uP2PB/zylOCjSxZv9/cvoeG1XuQbZPyNuYftA==", - "dev": true, - "dependencies": { - "co": "^4.6.0", - "debounce": "^1.2.0", - "debug": "^4.1.1", - "duplexer": "^0.1.1", - "fs-extra": "^8.1.0", - "glob": "^7.1.4", - "glob2base": "0.0.12", - "minimatch": "^3.0.4", - "resolve": "^1.12.0", - "safe-buffer": "^5.2.0", - "shell-quote": "^1.7.1", - "subarg": "^1.0.0" - }, - "bin": { - "cpx": "bin/index.js" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/cpx2/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/cpx2/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/cpx2/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "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/cpx2/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/cpx2/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/cpx2/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/crc-32": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", @@ -11775,12 +11624,6 @@ "node": "*" } }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "dev": true - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -13985,12 +13828,6 @@ "node": ">=18.0.0" } }, - "node_modules/find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha512-uJ5vWrfBKMcE6y2Z8834dwEZj9mNGxYa3t3I53OwFeuZ8D9oc2E5zcsrkuhX6h4iYrjhiv0T3szQmxlAV9uxDg==", - "dev": true - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -14890,18 +14727,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha512-ZyqlgowMbfj2NPjxaZZ/EtsXlOch28FRXgMd64vqZWk1bT9+wvSRLYD1om9M7QfQru51zJPAT17qXm4/zd+9QA==", - "dev": true, - "dependencies": { - "find-index": "^0.1.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -25510,15 +25335,6 @@ "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", "dev": true }, - "node_modules/subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", - "dev": true, - "dependencies": { - "minimist": "^1.1.0" - } - }, "node_modules/superagent": { "version": "10.0.2", "resolved": "https://registry.npmjs.org/superagent/-/superagent-10.0.2.tgz", @@ -28692,7 +28508,7 @@ }, "packages/opentelemetry-context-async-hooks": { "name": "@opentelemetry/context-async-hooks", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0", @@ -28713,10 +28529,10 @@ }, "packages/opentelemetry-context-zone": { "name": "@opentelemetry/context-zone", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.26.0", + "@opentelemetry/context-zone-peer-dep": "1.27.0", "zone.js": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0" }, "devDependencies": { @@ -28730,7 +28546,7 @@ }, "packages/opentelemetry-context-zone-peer-dep": { "name": "@opentelemetry/context-zone-peer-dep", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "devDependencies": { "@babel/core": "7.25.2", @@ -28779,7 +28595,7 @@ }, "packages/opentelemetry-core": { "name": "@opentelemetry/core", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { "@opentelemetry/semantic-conventions": "1.27.0" @@ -28815,17 +28631,17 @@ }, "packages/opentelemetry-exporter-jaeger": { "name": "@opentelemetry/exporter-jaeger", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "jaeger-client": "^3.15.0" }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -28846,12 +28662,12 @@ }, "packages/opentelemetry-exporter-zipkin": { "name": "@opentelemetry/exporter-zipkin", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { @@ -28891,10 +28707,10 @@ }, "packages/opentelemetry-propagator-b3": { "name": "@opentelemetry/propagator-b3", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0" + "@opentelemetry/core": "1.27.0" }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0", @@ -28916,10 +28732,10 @@ }, "packages/opentelemetry-propagator-jaeger": { "name": "@opentelemetry/propagator-jaeger", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0" + "@opentelemetry/core": "1.27.0" }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0", @@ -28952,10 +28768,10 @@ }, "packages/opentelemetry-resources": { "name": "@opentelemetry/resources", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { @@ -29042,11 +28858,11 @@ }, "packages/opentelemetry-sdk-trace-base": { "name": "@opentelemetry/sdk-trace-base", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { @@ -29081,19 +28897,19 @@ }, "packages/opentelemetry-sdk-trace-node": { "name": "@opentelemetry/sdk-trace-node", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/propagator-jaeger": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "semver": "^7.5.2" }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -29115,20 +28931,20 @@ }, "packages/opentelemetry-sdk-trace-web": { "name": "@opentelemetry/sdk-trace-web", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/resources": "1.27.0", "@types/jquery": "3.5.31", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -29164,18 +28980,18 @@ }, "packages/opentelemetry-shim-opentracing": { "name": "@opentelemetry/shim-opentracing", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "opentracing": "^0.14.4" }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/propagator-jaeger": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "cross-var": "1.1.0", @@ -29191,47 +29007,13 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "packages/propagator-aws-xray": { - "name": "@opentelemetry/propagator-aws-xray", - "version": "1.26.0", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.26.0" - }, - "devDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@types/mocha": "10.0.8", - "@types/node": "18.6.5", - "@types/webpack-env": "1.16.3", - "babel-plugin-istanbul": "7.0.0", - "cross-var": "1.1.0", - "karma": "6.4.4", - "karma-chrome-launcher": "3.1.0", - "karma-coverage": "2.2.1", - "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.36", - "karma-webpack": "5.0.1", - "lerna": "6.6.2", - "mocha": "10.7.3", - "nyc": "15.1.0", - "ts-loader": "9.5.1", - "typescript": "4.4.4", - "webpack": "5.94.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, "packages/sdk-metrics": { "name": "@opentelemetry/sdk-metrics", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0" }, "devDependencies": { "@babel/core": "7.25.2", @@ -29267,7 +29049,7 @@ }, "packages/template": { "name": "@opentelemetry/template", - "version": "1.26.0", + "version": "1.27.0", "license": "Apache-2.0", "devDependencies": { "@types/node": "18.6.5", @@ -29281,19 +29063,19 @@ }, "selenium-tests": { "name": "@opentelemetry/selenium-tests", - "version": "1.27.0", + "version": "1.28.2", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-fetch": "0.53.0", - "@opentelemetry/instrumentation-xml-http-request": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone-peer-dep": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-fetch": "0.54.2", + "@opentelemetry/instrumentation-xml-http-request": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "zone.js": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0" }, "devDependencies": { @@ -29306,7 +29088,7 @@ "babel-loader": "8.4.1", "babel-polyfill": "6.26.0", "browserstack-local": "1.4.8", - "chromedriver": "129.0.0", + "chromedriver": "130.0.0", "dotenv": "16.0.0", "fast-safe-stringify": "2.1.1", "geckodriver": "3.0.1", @@ -32580,7 +32362,7 @@ "version": "file:experimental/packages/api-events", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/api-logs": "0.53.0", + "@opentelemetry/api-logs": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/webpack-env": "1.16.3", @@ -32639,7 +32421,7 @@ "@opentelemetry/context-zone": { "version": "file:packages/opentelemetry-context-zone", "requires": { - "@opentelemetry/context-zone-peer-dep": "1.26.0", + "@opentelemetry/context-zone-peer-dep": "1.27.0", "cross-var": "1.1.0", "lerna": "6.6.2", "typescript": "4.4.4", @@ -32718,9 +32500,9 @@ "version": "file:packages/opentelemetry-exporter-jaeger", "requires": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -32741,13 +32523,13 @@ "@grpc/grpc-js": "^1.7.1", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32766,12 +32548,12 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32802,13 +32584,13 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32837,13 +32619,13 @@ "@grpc/grpc-js": "^1.7.1", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32862,11 +32644,11 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32895,12 +32677,12 @@ "version": "file:experimental/packages/opentelemetry-exporter-metrics-otlp-proto", "requires": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32917,9 +32699,9 @@ "version": "file:experimental/packages/opentelemetry-exporter-prometheus", "requires": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -32938,12 +32720,12 @@ "@grpc/grpc-js": "^1.7.1", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-grpc-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32962,11 +32744,11 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -32997,11 +32779,11 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -33030,9 +32812,9 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "^1.0.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33065,8 +32847,8 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/semver": "7.5.8", @@ -33076,7 +32858,6 @@ "babel-loader": "8.4.1", "babel-plugin-istanbul": "7.0.0", "codecov": "3.8.3", - "cpx2": "2.0.0", "cross-var": "1.1.0", "import-in-the-middle": "^1.8.1", "karma": "6.4.4", @@ -33105,12 +32886,12 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33143,11 +32924,11 @@ "@grpc/grpc-js": "^1.7.1", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@protobuf-ts/grpc-transport": "2.9.4", "@protobuf-ts/runtime": "2.9.4", @@ -33169,12 +32950,12 @@ "version": "file:experimental/packages/opentelemetry-instrumentation-http", "requires": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33216,12 +32997,12 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33251,7 +33032,7 @@ "version": "file:integration-tests/api", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "cross-var": "1.1.0", @@ -33266,7 +33047,7 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -33295,8 +33076,8 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-transformer": "0.53.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-transformer": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -33324,11 +33105,11 @@ "requires": { "@grpc/grpc-js": "^1.7.1", "@opentelemetry/api": "1.9.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/otlp-exporter-base": "0.54.2", + "@opentelemetry/otlp-transformer": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -33345,12 +33126,12 @@ "version": "file:experimental/packages/otlp-transformer", "requires": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "7.0.0", @@ -33371,56 +33152,11 @@ "webpack": "5.94.0" } }, - "@opentelemetry/propagator-aws-xray": { - "version": "file:packages/propagator-aws-xray", - "requires": { - "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/core": "1.26.0", - "@types/mocha": "10.0.8", - "@types/node": "18.6.5", - "@types/webpack-env": "1.16.3", - "babel-plugin-istanbul": "7.0.0", - "cross-var": "1.1.0", - "karma": "6.4.4", - "karma-chrome-launcher": "3.1.0", - "karma-coverage": "2.2.1", - "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.36", - "karma-webpack": "5.0.1", - "lerna": "6.6.2", - "mocha": "10.7.3", - "nyc": "15.1.0", - "ts-loader": "9.5.1", - "typescript": "4.4.4", - "webpack": "5.94.0" - } - }, - "@opentelemetry/propagator-aws-xray-lambda": { - "version": "file:experimental/packages/propagator-aws-xray-lambda", - "requires": { - "@babel/core": "7.25.2", - "@babel/preset-env": "7.25.4", - "@opentelemetry/api": "1.9.0", - "@opentelemetry/propagator-aws-xray": "1.26.0", - "@types/mocha": "10.0.8", - "@types/node": "18.6.5", - "@types/sinon": "17.0.3", - "babel-loader": "8.4.1", - "babel-plugin-istanbul": "7.0.0", - "cross-var": "1.1.0", - "lerna": "6.6.2", - "mocha": "10.7.3", - "nyc": "15.1.0", - "sinon": "15.1.2", - "ts-loader": "9.5.1", - "typescript": "4.4.4" - } - }, "@opentelemetry/propagator-b3": { "version": "file:packages/opentelemetry-propagator-b3", "requires": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "cross-var": "1.1.0", @@ -33435,7 +33171,7 @@ "version": "file:packages/opentelemetry-propagator-jaeger", "requires": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -33461,7 +33197,7 @@ "version": "file:packages/opentelemetry-resources", "requires": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", @@ -33525,7 +33261,7 @@ "@opentelemetry/sampler-jaeger-remote": { "version": "file:experimental/packages/sampler-jaeger-remote", "requires": { - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -33635,9 +33371,9 @@ "requires": { "@babel/core": "7.25.2", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0", + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "10.0.20", @@ -33679,9 +33415,9 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.4.0 <1.10.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33746,8 +33482,8 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.3.0 <1.10.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -33774,23 +33510,23 @@ "version": "file:experimental/packages/opentelemetry-sdk-node", "requires": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-jaeger": "1.26.0", - "@opentelemetry/exporter-logs-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-logs-otlp-http": "0.53.0", - "@opentelemetry/exporter-logs-otlp-proto": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-jaeger": "1.27.0", + "@opentelemetry/exporter-logs-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-logs-otlp-http": "0.54.2", + "@opentelemetry/exporter-logs-otlp-proto": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33810,8 +33546,8 @@ "version": "file:packages/opentelemetry-sdk-trace-base", "requires": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33839,12 +33575,12 @@ "version": "file:packages/opentelemetry-sdk-trace-node", "requires": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/propagator-jaeger": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -33865,11 +33601,11 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/jquery": "3.5.31", "@types/mocha": "10.0.8", @@ -33907,20 +33643,20 @@ "@babel/plugin-transform-runtime": "7.24.7", "@babel/preset-env": "7.25.4", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-zone-peer-dep": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-fetch": "0.53.0", - "@opentelemetry/instrumentation-xml-http-request": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone-peer-dep": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-fetch": "0.54.2", + "@opentelemetry/instrumentation-xml-http-request": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "babel-loader": "8.4.1", "babel-polyfill": "6.26.0", "browserstack-local": "1.4.8", - "chromedriver": "129.0.0", + "chromedriver": "130.0.0", "dotenv": "16.0.0", "fast-safe-stringify": "2.1.1", "geckodriver": "3.0.1", @@ -34047,11 +33783,11 @@ "requires": { "@opencensus/core": "0.1.0", "@opentelemetry/api": "1.9.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -34069,10 +33805,10 @@ "version": "file:packages/opentelemetry-shim-opentracing", "requires": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/propagator-jaeger": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -34098,10 +33834,10 @@ "requires": { "@babel/core": "7.25.2", "@opentelemetry/api": "1.9.0", - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-logs": "^0.53.0", - "@opentelemetry/sdk-trace-base": "^1.26.0", + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -37066,8 +36802,8 @@ "backcompat-node14": { "version": "file:experimental/backwards-compatibility/node14", "requires": { - "@opentelemetry/sdk-node": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/sdk-node": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/node": "14.18.25", "typescript": "4.4.4" }, @@ -37083,8 +36819,8 @@ "backcompat-node16": { "version": "file:experimental/backwards-compatibility/node16", "requires": { - "@opentelemetry/sdk-node": "0.53.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/sdk-node": "0.54.2", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/node": "16.11.52", "typescript": "4.4.4" }, @@ -37816,9 +37552,9 @@ "dev": true }, "chromedriver": { - "version": "129.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.0.tgz", - "integrity": "sha512-B1ccqD6hDjNrw94FeqdynIotn1ZV/TnFrkRz2Rync2kzSnq6D6IrSkN1w5Pnuvnc98QhN2xujxDXxkqEqy/PWg==", + "version": "130.0.0", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-130.0.0.tgz", + "integrity": "sha512-1g1eMoKF22Uh6l8DTFOPvWLovINPrkAMw7yDHlF6Rx+4W4JI9aGdCZ2Cx7c181hUgALU1oSKGH3uKNryYM5DaQ==", "dev": true, "requires": { "@testim/chrome-version": "^1.1.4", @@ -38001,12 +37737,6 @@ "mkdirp-infer-owner": "^2.0.0" } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true - }, "codecov": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz", @@ -38594,87 +38324,6 @@ "yaml": "^1.10.0" } }, - "cpx2": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cpx2/-/cpx2-2.0.0.tgz", - "integrity": "sha512-hSkh9xHmUnHMxVS99SpACbAw6jOCaji0KyepBQ4/ULZQ+RB+3uP2PB/zylOCjSxZv9/cvoeG1XuQbZPyNuYftA==", - "dev": true, - "requires": { - "co": "^4.6.0", - "debounce": "^1.2.0", - "debug": "^4.1.1", - "duplexer": "^0.1.1", - "fs-extra": "^8.1.0", - "glob": "^7.1.4", - "glob2base": "0.0.12", - "minimatch": "^3.0.4", - "resolve": "^1.12.0", - "safe-buffer": "^5.2.0", - "shell-quote": "^1.7.1", - "subarg": "^1.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.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" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "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" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - } - } - }, "crc-32": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", @@ -38895,12 +38544,6 @@ "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true }, - "debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "dev": true - }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -39984,12 +39627,12 @@ "version": "file:examples/esm-http-ts", "requires": { "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" } }, @@ -40136,11 +39779,11 @@ "version": "file:experimental/examples/events", "requires": { "@opentelemetry/api": "^1.7.0", - "@opentelemetry/api-events": "0.53.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/exporter-logs-otlp-http": "0.53.0", - "@opentelemetry/sdk-events": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0", + "@opentelemetry/api-events": "0.54.2", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/exporter-logs-otlp-http": "0.54.2", + "@opentelemetry/sdk-events": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2", "@types/node": "18.6.5", "ts-node": "^10.9.1" } @@ -40149,16 +39792,16 @@ "version": "file:examples/otlp-exporter-node", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/exporter-metrics-otlp-proto": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" } }, @@ -40598,12 +40241,6 @@ "@puppeteer/browsers": "^2.1.0" } }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha512-uJ5vWrfBKMcE6y2Z8834dwEZj9mNGxYa3t3I53OwFeuZ8D9oc2E5zcsrkuhX6h4iYrjhiv0T3szQmxlAV9uxDg==", - "dev": true - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -41268,15 +40905,6 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha512-ZyqlgowMbfj2NPjxaZZ/EtsXlOch28FRXgMd64vqZWk1bT9+wvSRLYD1om9M7QfQru51zJPAT17qXm4/zd+9QA==", - "dev": true, - "requires": { - "find-index": "^0.1.1" - } - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -41634,13 +41262,13 @@ "version": "file:examples/http", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-jaeger": "1.26.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-jaeger": "1.27.0", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "cross-env": "^6.0.0" } @@ -41730,13 +41358,13 @@ "version": "file:examples/https", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-jaeger": "1.26.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-jaeger": "1.27.0", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-http": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "cross-env": "^6.0.0" } @@ -43889,8 +43517,8 @@ "version": "file:experimental/examples/logs", "requires": { "@opentelemetry/api": "^1.7.0", - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/sdk-logs": "0.53.0", + "@opentelemetry/api-logs": "0.54.2", + "@opentelemetry/sdk-logs": "0.54.2", "@types/node": "18.6.5", "ts-node": "^10.9.1" } @@ -46325,13 +45953,13 @@ "@opencensus/instrumentation-http": "0.1.0", "@opencensus/nodejs-base": "0.1.0", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.53.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/exporter-prometheus": "0.54.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.54.2", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-node": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", - "@opentelemetry/shim-opencensus": "0.53.0" + "@opentelemetry/shim-opencensus": "0.54.2" } }, "opentracing": { @@ -47161,8 +46789,8 @@ "version": "file:experimental/examples/prometheus", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-prometheus": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0" + "@opentelemetry/exporter-prometheus": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0" } }, "promise-all-reject-late": { @@ -47212,9 +46840,9 @@ "version": "file:integration-tests/propagation-validation-server", "requires": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "axios": "1.7.4", "body-parser": "1.20.3", "express": "4.20.0", @@ -49534,15 +49162,6 @@ "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", "dev": true }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, "superagent": { "version": "10.0.2", "resolved": "https://registry.npmjs.org/superagent/-/superagent-10.0.2.tgz", @@ -51029,19 +50648,19 @@ "@babel/core": "^7.23.6", "@babel/preset-env": "^7.22.20", "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-fetch": "0.53.0", - "@opentelemetry/instrumentation-xml-http-request": "0.53.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-proto": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-fetch": "0.54.2", + "@opentelemetry/instrumentation-xml-http-request": "0.54.2", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "babel-loader": "^8.0.6", "ts-loader": "^9.2.6", diff --git a/package.json b/package.json index 5341baed1c6..dc11f3e0d25 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "docs": "typedoc --readme none && touch docs/.nojekyll", "docs-deploy": "gh-pages --dotfiles --dist docs", "docs:test": "linkinator docs --silent --retry && linkinator doc/*.md --skip http://localhost:3000 --skip http://localhost:9464 --silent --retry", - "lint": "lerna run lint", + "lint": "lerna run lint && npm run lint:markdown", "lint:changed": "lerna run --concurrency 1 --stream lint --since HEAD --exclude-dependents", - "lint:fix": "lerna run lint:fix", + "lint:fix": "lerna run lint:fix && npm run lint:markdown:fix", "lint:fix:changed": "lerna run --concurrency 1 --stream lint:fix --since HEAD --exclude-dependents", "lint:examples": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js", "lint:examples:fix": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js --fix", diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index 6ce671eb3e7..7edbf727e32 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/context-async-hooks", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry AsyncHooks-based Context Manager", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/packages/opentelemetry-context-zone-peer-dep/README.md b/packages/opentelemetry-context-zone-peer-dep/README.md index a505b9fbdda..da50eeb5fea 100644 --- a/packages/opentelemetry-context-zone-peer-dep/README.md +++ b/packages/opentelemetry-context-zone-peer-dep/README.md @@ -27,8 +27,9 @@ import { } from '@opentelemetry/sdk-trace-web'; import { ZoneContextManager } from '@opentelemetry/context-zone-peer-dep'; -const providerWithZone = new WebTracerProvider(); -providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +const providerWithZone = new WebTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); providerWithZone.register({ contextManager: new ZoneContextManager() }); diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index ca2aa5955ee..4b6c3a5ac43 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/context-zone-peer-dep", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Context Zone with peer dependency for zone.js", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/packages/opentelemetry-context-zone/README.md b/packages/opentelemetry-context-zone/README.md index 0162f9645d1..7b6d094e59b 100644 --- a/packages/opentelemetry-context-zone/README.md +++ b/packages/opentelemetry-context-zone/README.md @@ -24,8 +24,9 @@ import { } from '@opentelemetry/sdk-trace-web'; import { ZoneContextManager } from '@opentelemetry/context-zone'; -const providerWithZone = new WebTracerProvider(); -providerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +const providerWithZone = new WebTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); providerWithZone.register({ contextManager: new ZoneContextManager() }); diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index 6c1a521b578..d85f73bafef 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/context-zone", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Context Zone", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -56,7 +56,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.26.0", + "@opentelemetry/context-zone-peer-dep": "1.27.0", "zone.js": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0" }, "sideEffects": true, diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index d67dff48fe5..190cf415c61 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/core", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/packages/opentelemetry-exporter-jaeger/README.md b/packages/opentelemetry-exporter-jaeger/README.md index 7e662a345e8..c686af7b29e 100644 --- a/packages/opentelemetry-exporter-jaeger/README.md +++ b/packages/opentelemetry-exporter-jaeger/README.md @@ -84,7 +84,11 @@ const exporter = new JaegerExporter(options); Now, register the exporter. ```js -tracer.addSpanProcessor(new BatchSpanProcessor(exporter)); +const tracerProvider = new NodeTracerProvider({ + spanProcessors: [new BatchSpanProcessor(exporter)] +}) + +const tracer = traceProvider.getTracer('my-tracer') ``` You can use built-in `SimpleSpanProcessor` or `BatchSpanProcessor` or write your own. diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index 8c1fb4f73fe..a6ede958d6f 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-jaeger", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Exporter Jaeger allows user to send collected traces to Jaeger", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -45,7 +45,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "@types/sinon": "17.0.3", @@ -61,8 +61,8 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "jaeger-client": "^3.15.0" }, diff --git a/packages/opentelemetry-exporter-zipkin/README.md b/packages/opentelemetry-exporter-zipkin/README.md index dc9d57ad75c..2d4244ac823 100644 --- a/packages/opentelemetry-exporter-zipkin/README.md +++ b/packages/opentelemetry-exporter-zipkin/README.md @@ -41,7 +41,11 @@ const exporter = new ZipkinExporter(options); Now, register the exporter and start tracing. ```js -tracer.addSpanProcessor(new BatchSpanProcessor(exporter)); +const tracerProvider = new NodeTracerProvider({ + spanProcessors: [new BatchSpanProcessor(exporter)] +}) + +const tracer = traceProvider.getTracer('my-tracer') ``` You can use built-in `SimpleSpanProcessor` or `BatchSpanProcessor` or write your own. diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index aa7d2c9b177..645a0119cf6 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-zipkin", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Zipkin Exporter allows the user to send collected traces to Zipkin.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -90,9 +90,9 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-exporter-zipkin", diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index 9c20065ca82..3b26ffdf9cd 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-b3", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry B3 propagator provides context propagation for systems that are using the B3 header format", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -51,7 +51,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/core": "1.26.0" + "@opentelemetry/core": "1.27.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json index 6a961049d1e..eabe3610982 100644 --- a/packages/opentelemetry-propagator-jaeger/package.json +++ b/packages/opentelemetry-propagator-jaeger/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-jaeger", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Jaeger propagator provides HTTP header propagation for systems that are using Jaeger HTTP header format.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -79,7 +79,7 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0" + "@opentelemetry/core": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-propagator-jaeger", "sideEffects": false diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index 9576561bc4a..a9a84565531 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resources", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry SDK resources", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -91,7 +91,7 @@ "@opentelemetry/api": ">=1.3.0 <1.10.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources", diff --git a/packages/opentelemetry-resources/src/detect-resources.ts b/packages/opentelemetry-resources/src/detect-resources.ts index 4fa477a4f81..0bfa13cac8b 100644 --- a/packages/opentelemetry-resources/src/detect-resources.ts +++ b/packages/opentelemetry-resources/src/detect-resources.ts @@ -70,6 +70,7 @@ export const detectResourcesSync = ( if (isPromiseLike(resourceOrPromise)) { const createPromise = async () => { const resolvedResource = await resourceOrPromise; + await resolvedResource.waitForAsyncAttributes?.(); return resolvedResource.attributes; }; resource = new Resource({}, createPromise()); diff --git a/packages/opentelemetry-resources/test/detect-resources.test.ts b/packages/opentelemetry-resources/test/detect-resources.test.ts index 0db97057db9..7c3b1a212c9 100644 --- a/packages/opentelemetry-resources/test/detect-resources.test.ts +++ b/packages/opentelemetry-resources/test/detect-resources.test.ts @@ -28,7 +28,10 @@ describe('detectResourcesSync', () => { it('handles resource detectors which return Promise', async () => { const detector: Detector = { async detect() { - return new Resource({ sync: 'fromsync' }); + return new Resource( + { sync: 'fromsync' }, + Promise.resolve().then(() => ({ async: 'fromasync' })) + ); }, }; const resource = detectResourcesSync({ @@ -38,6 +41,7 @@ describe('detectResourcesSync', () => { await resource.waitForAsyncAttributes?.(); assert.deepStrictEqual(resource.attributes, { sync: 'fromsync', + async: 'fromasync', }); }); diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index 3cd89774604..9df447e313b 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-trace-base", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Tracing", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -90,8 +90,8 @@ "@opentelemetry/api": ">=1.3.0 <1.10.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base", diff --git a/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts b/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts index 51866a4538e..a567bcebe0e 100644 --- a/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts +++ b/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts @@ -80,17 +80,28 @@ export class BasicTracerProvider implements TracerProvider { reconfigureLimits(config) ); this.resource = mergedConfig.resource ?? Resource.empty(); - this.resource = Resource.default().merge(this.resource); + + if (mergedConfig.mergeResourceWithDefaults) { + this.resource = Resource.default().merge(this.resource); + } + this._config = Object.assign({}, mergedConfig, { resource: this.resource, }); - const defaultExporter = this._buildExporterFromEnv(); - if (defaultExporter !== undefined) { - const batchProcessor = new BatchSpanProcessor(defaultExporter); - this.activeSpanProcessor = batchProcessor; + if (config.spanProcessors?.length) { + this._registeredSpanProcessors = [...config.spanProcessors]; + this.activeSpanProcessor = new MultiSpanProcessor( + this._registeredSpanProcessors + ); } else { - this.activeSpanProcessor = new NoopSpanProcessor(); + const defaultExporter = this._buildExporterFromEnv(); + if (defaultExporter !== undefined) { + const batchProcessor = new BatchSpanProcessor(defaultExporter); + this.activeSpanProcessor = batchProcessor; + } else { + this.activeSpanProcessor = new NoopSpanProcessor(); + } } } @@ -116,6 +127,7 @@ export class BasicTracerProvider implements TracerProvider { } /** + * @deprecated please use {@link TracerConfig} spanProcessors property * Adds a new {@link SpanProcessor} to this tracer. * @param spanProcessor the new SpanProcessor to be added. */ diff --git a/packages/opentelemetry-sdk-trace-base/src/config.ts b/packages/opentelemetry-sdk-trace-base/src/config.ts index f97a383599f..f2b97ff8119 100644 --- a/packages/opentelemetry-sdk-trace-base/src/config.ts +++ b/packages/opentelemetry-sdk-trace-base/src/config.ts @@ -54,6 +54,7 @@ export function loadDefaultConfig() { _env.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, attributePerLinkCountLimit: _env.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT, }, + mergeResourceWithDefaults: true, }; } diff --git a/packages/opentelemetry-sdk-trace-base/src/types.ts b/packages/opentelemetry-sdk-trace-base/src/types.ts index 99eeedbe817..f351c0ce072 100644 --- a/packages/opentelemetry-sdk-trace-base/src/types.ts +++ b/packages/opentelemetry-sdk-trace-base/src/types.ts @@ -18,6 +18,7 @@ import { ContextManager, TextMapPropagator } from '@opentelemetry/api'; import { IResource } from '@opentelemetry/resources'; import { IdGenerator } from './IdGenerator'; import { Sampler } from './Sampler'; +import { SpanProcessor } from './SpanProcessor'; /** * TracerConfig provides an interface for configuring a Basic Tracer. @@ -34,6 +35,12 @@ export interface TracerConfig { /** Span Limits */ spanLimits?: SpanLimits; + /** + * Merge resource with {@link Resource.default()}? + * Default: {@code true} + **/ + mergeResourceWithDefaults?: boolean; + /** Resource associated with trace telemetry */ resource?: IResource; @@ -48,6 +55,11 @@ export interface TracerConfig { * The default value is 30000ms */ forceFlushTimeoutMillis?: number; + + /** + * List of SpanProcessor for the tracer + */ + spanProcessors?: SpanProcessor[]; } /** diff --git a/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts index 92fe52605b6..6488970ccb1 100644 --- a/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts +++ b/packages/opentelemetry-sdk-trace-base/test/common/BasicTracerProvider.test.ts @@ -41,6 +41,8 @@ import { BatchSpanProcessor, AlwaysOnSampler, AlwaysOffSampler, + ConsoleSpanExporter, + SimpleSpanProcessor, } from '../../src'; import { SpanImpl } from '../../src/Span'; @@ -116,6 +118,24 @@ describe('BasicTracerProvider', () => { }); }); + describe('when user sets span processors', () => { + it('should use the span processors defined in the config', () => { + const traceExporter = new ConsoleSpanExporter(); + const spanProcessor = new SimpleSpanProcessor(traceExporter); + + const tracer = new BasicTracerProvider({ + spanProcessors: [spanProcessor], + }); + assert.ok( + tracer['_registeredSpanProcessors'][0] instanceof SimpleSpanProcessor + ); + assert.ok( + tracer['_registeredSpanProcessors'][0]['_exporter'] instanceof + ConsoleSpanExporter + ); + }); + }); + describe('when "sampler" option defined', () => { it('should have an instance with sampler', () => { const tracer = new BasicTracerProvider({ @@ -830,9 +850,30 @@ describe('BasicTracerProvider', () => { }); describe('.resource', () => { - it('should return a Resource', () => { + it('should use the default resource when no resource is provided', function () { const tracerProvider = new BasicTracerProvider(); - assert.ok(tracerProvider.resource instanceof Resource); + assert.deepStrictEqual(tracerProvider.resource, Resource.default()); + }); + + it('should not merge with defaults when flag is set to false', function () { + const expectedResource = new Resource({ foo: 'bar' }); + const tracerProvider = new BasicTracerProvider({ + mergeResourceWithDefaults: false, + resource: expectedResource, + }); + assert.deepStrictEqual(tracerProvider.resource, expectedResource); + }); + + it('should merge with defaults when flag is set to true', function () { + const providedResource = new Resource({ foo: 'bar' }); + const tracerProvider = new BasicTracerProvider({ + mergeResourceWithDefaults: true, + resource: providedResource, + }); + assert.deepStrictEqual( + tracerProvider.resource, + Resource.default().merge(providedResource) + ); }); }); diff --git a/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts b/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts index 5bf4ddb8ff8..91c4bffaf63 100644 --- a/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts +++ b/packages/opentelemetry-sdk-trace-base/test/common/export/InMemorySpanExporter.test.ts @@ -93,6 +93,21 @@ describe('InMemorySpanExporter', () => { }); }); + it('should reset spans when reset is called', () => { + const root = provider.getTracer('default').startSpan('root'); + + provider + .getTracer('default') + .startSpan('child', {}, trace.setSpan(context.active(), root)) + .end(); + root.end(); + assert.strictEqual(memoryExporter.getFinishedSpans().length, 2); + + memoryExporter.reset(); + + assert.strictEqual(memoryExporter.getFinishedSpans().length, 0); + }); + it('should return the success result', () => { const exporter = new InMemorySpanExporter(); exporter.export([], (result: ExportResult) => { diff --git a/packages/opentelemetry-sdk-trace-base/test/performance/benchmark/BatchSpanProcessor.js b/packages/opentelemetry-sdk-trace-base/test/performance/benchmark/BatchSpanProcessor.js index ccdb82d481c..fc69043ee87 100644 --- a/packages/opentelemetry-sdk-trace-base/test/performance/benchmark/BatchSpanProcessor.js +++ b/packages/opentelemetry-sdk-trace-base/test/performance/benchmark/BatchSpanProcessor.js @@ -47,8 +47,9 @@ function createSpan() { span.end(); } -const tracerProvider = new BasicTracerProvider(); -tracerProvider.addSpanProcessor(new BatchSpanProcessor(new NoopExporter())); +const tracerProvider = new BasicTracerProvider({ + spanProcessors: [new BatchSpanProcessor(new NoopExporter())] +}); const tracer = tracerProvider.getTracer('test') const suite = new Benchmark.Suite('BatchSpanProcessor'); diff --git a/packages/opentelemetry-sdk-trace-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json index 5250af06ddc..e2866366ce0 100644 --- a/packages/opentelemetry-sdk-trace-node/package.json +++ b/packages/opentelemetry-sdk-trace-node/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-trace-node", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Node SDK provides automatic telemetry (tracing, metrics, etc) for Node.js applications", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,7 +46,7 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -63,11 +63,11 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" }, "dependencies": { - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/context-async-hooks": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/propagator-jaeger": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "semver": "^7.5.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node", diff --git a/packages/opentelemetry-sdk-trace-web/README.md b/packages/opentelemetry-sdk-trace-web/README.md index 44ed1ffbe0a..92d4e93e020 100644 --- a/packages/opentelemetry-sdk-trace-web/README.md +++ b/packages/opentelemetry-sdk-trace-web/README.md @@ -40,8 +40,9 @@ import { DocumentLoad } from '@opentelemetry/plugin-document-load'; import { ZoneContextManager } from '@opentelemetry/context-zone'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; -const provider = new WebTracerProvider(); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +const provider = new WebTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())] +}); provider.register({ // Changing default contextManager to use ZoneContextManager - supports asynchronous operations - optional diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json index ff5c31d2dd1..8b33d5a5cf1 100644 --- a/packages/opentelemetry-sdk-trace-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-trace-web", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry Web Tracer", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -57,9 +57,9 @@ "@babel/core": "7.25.2", "@babel/preset-env": "7.25.4", "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/context-zone": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/context-zone": "1.27.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/resources": "1.27.0", "@types/jquery": "3.5.31", "@types/mocha": "10.0.8", "@types/node": "18.6.5", @@ -90,8 +90,8 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web", diff --git a/packages/opentelemetry-shim-opentracing/README.md b/packages/opentelemetry-shim-opentracing/README.md index 8de3a79da9a..c5cc2c32742 100644 --- a/packages/opentelemetry-shim-opentracing/README.md +++ b/packages/opentelemetry-shim-opentracing/README.md @@ -48,6 +48,12 @@ See [examples/opentracing-shim](https://github.com/open-telemetry/opentelemetry- Apache 2.0 - See [LICENSE][license-url] for more information. +## Limitation + +The OpenTracing shim does not currently include a scope manager. +This feature was never implemented in OpenTracing JS therefore the +shim does not provide that feature. + ## Useful links - For more information on OpenTelemetry, visit: diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index 52c52d79ed1..13afd5723c3 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/shim-opentracing", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTracing to OpenTelemetry shim", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -43,9 +43,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/propagator-b3": "1.27.0", + "@opentelemetry/propagator-jaeger": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@types/mocha": "10.0.8", "@types/node": "18.6.5", "cross-var": "1.1.0", @@ -58,7 +58,7 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", + "@opentelemetry/core": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "opentracing": "^0.14.4" }, diff --git a/packages/propagator-aws-xray/.eslintignore b/packages/propagator-aws-xray/.eslintignore deleted file mode 100644 index 378eac25d31..00000000000 --- a/packages/propagator-aws-xray/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -build diff --git a/packages/propagator-aws-xray/.eslintrc.js b/packages/propagator-aws-xray/.eslintrc.js deleted file mode 100644 index 36847df9fb1..00000000000 --- a/packages/propagator-aws-xray/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "node": true, - "browser": true - }, - ...require('../../eslint.base.js') -} diff --git a/packages/propagator-aws-xray/LICENSE b/packages/propagator-aws-xray/LICENSE deleted file mode 100644 index 261eeb9e9f8..00000000000 --- a/packages/propagator-aws-xray/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/propagator-aws-xray/README.md b/packages/propagator-aws-xray/README.md deleted file mode 100644 index cf9c0528ff5..00000000000 --- a/packages/propagator-aws-xray/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# OpenTelemetry Propagator AWS X-Ray - -[![NPM Published Version][npm-img]][npm-url] -[![Apache License][license-image]][license-image] - -The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for systems that are using AWS `X-Amzn-Trace-Id` format. -This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. -`TraceState` is currently not propagated. - -This package was originally located in [opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/propagators/opentelemetry-propagator-aws-xray). It has been moved in order to make it a direct dependency of the Node SDK. As a result, versions from 1.4.0 to 1.22.0 have been skipped. - -## Installation - -```sh -npm install --save @opentelemetry/propagator-aws-xray -``` - -## Usage - -In the [global tracer configuration file](https://opentelemetry.io/docs/instrumentation/js/getting-started/nodejs/#setup), configure the following: - -```js -const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); -const { AWSXRayPropagator } = require('@opentelemetry/propagator-aws-xray'); -// ... - -const provider = new NodeTracerProvider(); - -// Set the global trace context propagator to use X-Ray formatted trace header -provider.register({ - propagator: new AWSXRayPropagator() -}); -``` - -## Propagator Details - -Example header:`X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1` - -The header consists of three parts: the root trace ID, the parent ID and the sampling decision. - -### Root - The AWS X-Ray format trace ID - -- Format: (spec-version)-(timestamp)-(UUID) - - spec_version - The version of the AWS X-Ray header format. Currently, only "1" is valid. - - timestamp - 32-bit number in base16 format, corresponds to the first 8 characters of the OpenTelemetry trace ID. Note, while X-Ray calls this timestamp, for the purpose of propagation it is opaque and any value will work. - - UUID - 96-bit random number in base16 format, corresponds to the last 10 characters of the OpenTelemetry trace ID. - -Root is analogous to the [OpenTelemetry Trace ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext), with some small format changes. -For additional reading, see the [AWS X-Ray Trace ID](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-sendingdata.html#xray-api-traceids) public documentation. - -### Parent - The ID of the AWS X-Ray Segment - -- 64-bit random number in base16 format. Populated from the [OpenTelemetry Span ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). - -### Sampled - The sampling decision - -- Defined in the AWS X-Ray specification as a tri-state field, with "0", "1" and "?" as valid values. Only "0" and "1" are used in this propagator. If "?", a new trace will be started. -- Populated from the [OpenTelemetry trace flags](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). - -## Useful links - -- For more information on OpenTelemetry, visit: -- For more about OpenTelemetry JavaScript: -- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] - -## License - -Apache 2.0 - See [LICENSE][license-url] for more information. - -[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions -[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE -[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[npm-url]: https://www.npmjs.com/package/@opentelemetry/propagator-aws-xray -[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fpropagator-aws-xray.svg diff --git a/packages/propagator-aws-xray/karma.conf.js b/packages/propagator-aws-xray/karma.conf.js deleted file mode 100644 index edcd9f055fd..00000000000 --- a/packages/propagator-aws-xray/karma.conf.js +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * Copyright 2020, OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const karmaWebpackConfig = require('../../karma.webpack'); -const karmaBaseConfig = require('../../karma.base'); - -module.exports = (config) => { - config.set(Object.assign({}, karmaBaseConfig, { - webpack: karmaWebpackConfig - })) -}; diff --git a/packages/propagator-aws-xray/package.json b/packages/propagator-aws-xray/package.json deleted file mode 100644 index 6d457caa994..00000000000 --- a/packages/propagator-aws-xray/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "@opentelemetry/propagator-aws-xray", - "version": "1.26.0", - "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", - "main": "build/src/index.js", - "module": "build/esm/index.js", - "types": "build/src/index.d.ts", - "repository": "open-telemetry/opentelemetry-js", - "scripts": { - "prepublishOnly": "npm run compile", - "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", - "test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/index-webpack.ts'", - "test:browser": "karma start --single-run", - "tdd": "npm run tdd:node", - "tdd:node": "npm run test -- --watch-extensions ts --watch", - "tdd:browser": "karma start", - "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", - "version": "node ../../scripts/version-update.js", - "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json", - "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies", - "prewatch": "npm run precompile", - "peer-api-check": "node ../../scripts/peer-api-check.js", - "align-api-deps": "node ../../scripts/align-api-deps.js" - }, - "keywords": [ - "opentelemetry", - "nodejs", - "tracing", - "profiling", - "awsxray" - ], - "author": "OpenTelemetry Authors", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - }, - "files": [ - "build/esm/**/*.js", - "build/esm/**/*.js.map", - "build/esm/**/*.d.ts", - "build/esnext/**/*.js", - "build/esnext/**/*.js.map", - "build/esnext/**/*.d.ts", - "build/src/**/*.js", - "build/src/**/*.js.map", - "build/src/**/*.d.ts", - "LICENSE", - "README.md" - ], - "publishConfig": { - "access": "public" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - }, - "devDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0", - "@types/mocha": "10.0.8", - "@types/node": "18.6.5", - "@types/webpack-env": "1.16.3", - "babel-plugin-istanbul": "7.0.0", - "cross-var": "1.1.0", - "karma": "6.4.4", - "karma-chrome-launcher": "3.1.0", - "karma-coverage": "2.2.1", - "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.36", - "karma-webpack": "5.0.1", - "lerna": "6.6.2", - "mocha": "10.7.3", - "nyc": "15.1.0", - "ts-loader": "9.5.1", - "typescript": "4.4.4", - "webpack": "5.94.0" - }, - "dependencies": { - "@opentelemetry/core": "1.26.0" - }, - "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/propagator-aws-xray#readme" -} diff --git a/packages/propagator-aws-xray/src/AWSXRayPropagator.ts b/packages/propagator-aws-xray/src/AWSXRayPropagator.ts deleted file mode 100644 index e06568d9ee0..00000000000 --- a/packages/propagator-aws-xray/src/AWSXRayPropagator.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - trace, - Context, - TextMapPropagator, - SpanContext, - TraceFlags, - TextMapSetter, - TextMapGetter, - isSpanContextValid, - isValidSpanId, - isValidTraceId, - INVALID_TRACEID, - INVALID_SPANID, - INVALID_SPAN_CONTEXT, -} from '@opentelemetry/api'; - -export const AWSXRAY_TRACE_ID_HEADER = 'x-amzn-trace-id'; - -const TRACE_HEADER_DELIMITER = ';'; -const KV_DELIMITER = '='; - -const TRACE_ID_KEY = 'Root'; -const TRACE_ID_LENGTH = 35; -const TRACE_ID_VERSION = '1'; -const TRACE_ID_DELIMITER = '-'; -const TRACE_ID_DELIMITER_INDEX_1 = 1; -const TRACE_ID_DELIMITER_INDEX_2 = 10; -const TRACE_ID_FIRST_PART_LENGTH = 8; - -const PARENT_ID_KEY = 'Parent'; - -const SAMPLED_FLAG_KEY = 'Sampled'; -const IS_SAMPLED = '1'; -const NOT_SAMPLED = '0'; - -/** - * Implementation of the AWS X-Ray Trace Header propagation protocol. See AWS - * Tracing header spec - * - * An example AWS Xray Tracing Header is shown below: - * X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1 - */ -export class AWSXRayPropagator implements TextMapPropagator { - inject(context: Context, carrier: unknown, setter: TextMapSetter) { - const spanContext = trace.getSpan(context)?.spanContext(); - if (!spanContext || !isSpanContextValid(spanContext)) return; - - const otTraceId = spanContext.traceId; - const timestamp = otTraceId.substring(0, TRACE_ID_FIRST_PART_LENGTH); - const randomNumber = otTraceId.substring(TRACE_ID_FIRST_PART_LENGTH); - - const parentId = spanContext.spanId; - const samplingFlag = - (TraceFlags.SAMPLED & spanContext.traceFlags) === TraceFlags.SAMPLED - ? IS_SAMPLED - : NOT_SAMPLED; - // TODO: Add OT trace state to the X-Ray trace header - - const traceHeader = `Root=1-${timestamp}-${randomNumber};Parent=${parentId};Sampled=${samplingFlag}`; - setter.set(carrier, AWSXRAY_TRACE_ID_HEADER, traceHeader); - } - - extract(context: Context, carrier: unknown, getter: TextMapGetter): Context { - const spanContext = this.getSpanContextFromHeader(carrier, getter); - if (!isSpanContextValid(spanContext)) return context; - - return trace.setSpan(context, trace.wrapSpanContext(spanContext)); - } - - fields(): string[] { - return [AWSXRAY_TRACE_ID_HEADER]; - } - - private getSpanContextFromHeader( - carrier: unknown, - getter: TextMapGetter - ): SpanContext { - const headerKeys = getter.keys(carrier); - const relevantHeaderKey = headerKeys.find(e => { - return e.toLowerCase() === AWSXRAY_TRACE_ID_HEADER; - }); - if (!relevantHeaderKey) { - return INVALID_SPAN_CONTEXT; - } - const traceHeader = getter.get(carrier, relevantHeaderKey); - - if (!traceHeader || typeof traceHeader !== 'string') { - return INVALID_SPAN_CONTEXT; - } - - let pos = 0; - let trimmedPart: string; - let parsedTraceId = INVALID_TRACEID; - let parsedSpanId = INVALID_SPANID; - let parsedTraceFlags = null; - while (pos < traceHeader.length) { - const delimiterIndex = traceHeader.indexOf(TRACE_HEADER_DELIMITER, pos); - if (delimiterIndex >= 0) { - trimmedPart = traceHeader.substring(pos, delimiterIndex).trim(); - pos = delimiterIndex + 1; - } else { - //last part - trimmedPart = traceHeader.substring(pos).trim(); - pos = traceHeader.length; - } - const equalsIndex = trimmedPart.indexOf(KV_DELIMITER); - - const value = trimmedPart.substring(equalsIndex + 1); - - if (trimmedPart.startsWith(TRACE_ID_KEY)) { - parsedTraceId = AWSXRayPropagator._parseTraceId(value); - } else if (trimmedPart.startsWith(PARENT_ID_KEY)) { - parsedSpanId = AWSXRayPropagator._parseSpanId(value); - } else if (trimmedPart.startsWith(SAMPLED_FLAG_KEY)) { - parsedTraceFlags = AWSXRayPropagator._parseTraceFlag(value); - } - } - if (parsedTraceFlags === null) { - return INVALID_SPAN_CONTEXT; - } - const resultSpanContext: SpanContext = { - traceId: parsedTraceId, - spanId: parsedSpanId, - traceFlags: parsedTraceFlags, - isRemote: true, - }; - if (!isSpanContextValid(resultSpanContext)) { - return INVALID_SPAN_CONTEXT; - } - return resultSpanContext; - } - - private static _parseTraceId(xrayTraceId: string): string { - // Check length of trace id - if (xrayTraceId.length !== TRACE_ID_LENGTH) { - return INVALID_TRACEID; - } - - // Check version trace id version - if (!xrayTraceId.startsWith(TRACE_ID_VERSION)) { - return INVALID_TRACEID; - } - - // Check delimiters - if ( - xrayTraceId.charAt(TRACE_ID_DELIMITER_INDEX_1) !== TRACE_ID_DELIMITER || - xrayTraceId.charAt(TRACE_ID_DELIMITER_INDEX_2) !== TRACE_ID_DELIMITER - ) { - return INVALID_TRACEID; - } - - const epochPart = xrayTraceId.substring( - TRACE_ID_DELIMITER_INDEX_1 + 1, - TRACE_ID_DELIMITER_INDEX_2 - ); - const uniquePart = xrayTraceId.substring( - TRACE_ID_DELIMITER_INDEX_2 + 1, - TRACE_ID_LENGTH - ); - const resTraceId = epochPart + uniquePart; - - // Check the content of trace id - if (!isValidTraceId(resTraceId)) { - return INVALID_TRACEID; - } - - return resTraceId; - } - - private static _parseSpanId(xrayParentId: string): string { - return isValidSpanId(xrayParentId) ? xrayParentId : INVALID_SPANID; - } - - private static _parseTraceFlag(xraySampledFlag: string): TraceFlags | null { - if (xraySampledFlag === NOT_SAMPLED) { - return TraceFlags.NONE; - } - if (xraySampledFlag === IS_SAMPLED) { - return TraceFlags.SAMPLED; - } - return null; - } -} diff --git a/packages/propagator-aws-xray/src/index.ts b/packages/propagator-aws-xray/src/index.ts deleted file mode 100644 index ff6d1ed17e4..00000000000 --- a/packages/propagator-aws-xray/src/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export { - AWSXRAY_TRACE_ID_HEADER, - AWSXRayPropagator, -} from './AWSXRayPropagator'; diff --git a/packages/propagator-aws-xray/test/AWSXRayPropagator.test.ts b/packages/propagator-aws-xray/test/AWSXRayPropagator.test.ts deleted file mode 100644 index 5cf47916d58..00000000000 --- a/packages/propagator-aws-xray/test/AWSXRayPropagator.test.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import * as assert from 'assert'; - -import { - defaultTextMapGetter, - defaultTextMapSetter, - INVALID_SPAN_CONTEXT, - ROOT_CONTEXT, - SpanContext, - TraceFlags, - trace, -} from '@opentelemetry/api'; -import { TraceState } from '@opentelemetry/core'; - -import { AWSXRAY_TRACE_ID_HEADER, AWSXRayPropagator } from '../src'; - -describe('AWSXRayPropagator', () => { - const xrayPropagator = new AWSXRayPropagator(); - const TRACE_ID = '8a3c60f7d188f8fa79d48a391a778fa6'; - const SPAN_ID = '53995c3f42cd8ad8'; - const SAMPLED_TRACE_FLAG = TraceFlags.SAMPLED; - const NOT_SAMPLED_TRACE_FLAG = TraceFlags.NONE; - - let carrier: { [key: string]: unknown }; - - beforeEach(() => { - carrier = {}; - }); - - describe('.inject()', () => { - it('should inject sampled context', () => { - const spanContext: SpanContext = { - traceId: TRACE_ID, - spanId: SPAN_ID, - traceFlags: SAMPLED_TRACE_FLAG, - }; - xrayPropagator.inject( - trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), - carrier, - defaultTextMapSetter - ); - - assert.deepStrictEqual( - carrier[AWSXRAY_TRACE_ID_HEADER], - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1' - ); - }); - - it('should inject not sampled context', () => { - const spanContext: SpanContext = { - traceId: TRACE_ID, - spanId: SPAN_ID, - traceFlags: NOT_SAMPLED_TRACE_FLAG, - }; - xrayPropagator.inject( - trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), - carrier, - defaultTextMapSetter - ); - - assert.deepStrictEqual( - carrier[AWSXRAY_TRACE_ID_HEADER], - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=0' - ); - }); - - it('should inject with TraceState', () => { - const traceState = new TraceState(); - traceState.set('foo', 'bar'); - const spanContext: SpanContext = { - traceId: TRACE_ID, - spanId: SPAN_ID, - traceFlags: SAMPLED_TRACE_FLAG, - traceState: traceState, - }; - xrayPropagator.inject( - trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), - carrier, - defaultTextMapSetter - ); - - // TODO: assert trace state when the propagator supports it - assert.deepStrictEqual( - carrier[AWSXRAY_TRACE_ID_HEADER], - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1' - ); - }); - - it('inject without spanContext - should inject nothing', () => { - xrayPropagator.inject(ROOT_CONTEXT, carrier, defaultTextMapSetter); - - assert.deepStrictEqual(carrier, {}); - }); - - it('inject default invalid spanContext - should inject nothing', () => { - xrayPropagator.inject( - trace.setSpan( - ROOT_CONTEXT, - trace.wrapSpanContext(INVALID_SPAN_CONTEXT) - ), - carrier, - defaultTextMapSetter - ); - - assert.deepStrictEqual(carrier, {}); - }); - }); - - describe('.extract()', () => { - it('extract nothing from context', () => { - // context remains untouched - assert.strictEqual( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter), - ROOT_CONTEXT - ); - }); - - it('should extract sampled context', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should extract sampled context with arbitrary order', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Parent=53995c3f42cd8ad8;Sampled=1;Root=1-8a3c60f7-d188f8fa79d48a391a778fa6'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('should extract context with additional fields', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - // TODO: assert additional fields when the propagator supports it - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - it('extract empty header value - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = ''; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceId - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-abcdefgh-ijklmnopabcdefghijklmnop;Parent=53995c3f42cd8ad8;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceId size - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa600;Parent=53995c3f42cd8ad8;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceId delimiter - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1*8a3c60f7+d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid spanId - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=abcdefghijklmnop;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid spanId size - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad800;Sampled=0'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceFlags - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled='; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid traceFlags length - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=10220'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract nonnumeric invalid traceFlags - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=a'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extract invalid aws xray version - should return undefined', () => { - carrier[AWSXRAY_TRACE_ID_HEADER] = - 'Root=2-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, undefined); - }); - - it('extracts context in a case-insensitive fashion', () => { - carrier[AWSXRAY_TRACE_ID_HEADER.toUpperCase()] = - 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = trace - .getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - ) - ?.spanContext(); - - assert.deepStrictEqual(extractedSpanContext, { - traceId: TRACE_ID, - spanId: SPAN_ID, - isRemote: true, - traceFlags: TraceFlags.SAMPLED, - }); - }); - - describe('.fields()', () => { - it('should return a field with AWS X-Ray Trace ID header', () => { - const expectedField = xrayPropagator.fields(); - - assert.deepStrictEqual([AWSXRAY_TRACE_ID_HEADER], expectedField); - }); - }); - }); -}); diff --git a/packages/propagator-aws-xray/test/index-webpack.ts b/packages/propagator-aws-xray/test/index-webpack.ts deleted file mode 100644 index 061a48ccfa7..00000000000 --- a/packages/propagator-aws-xray/test/index-webpack.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const testsContext = require.context('.', true, /test$/); -testsContext.keys().forEach(testsContext); - -const srcContext = require.context('.', true, /src$/); -srcContext.keys().forEach(srcContext); diff --git a/packages/propagator-aws-xray/tsconfig.esm.json b/packages/propagator-aws-xray/tsconfig.esm.json deleted file mode 100644 index 76f5aed507c..00000000000 --- a/packages/propagator-aws-xray/tsconfig.esm.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base.esm.json", - "compilerOptions": { - "outDir": "build/esm", - "rootDir": "src", - "tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo" - }, - "include": [ - "src/**/*.ts" - ], - "references": [ - { - "path": "../../api" - }, - { - "path": "../opentelemetry-core" - } - ] -} diff --git a/packages/propagator-aws-xray/tsconfig.esnext.json b/packages/propagator-aws-xray/tsconfig.esnext.json deleted file mode 100644 index 4b926c1c870..00000000000 --- a/packages/propagator-aws-xray/tsconfig.esnext.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base.esnext.json", - "compilerOptions": { - "outDir": "build/esnext", - "rootDir": "src", - "tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo" - }, - "include": [ - "src/**/*.ts" - ], - "references": [ - { - "path": "../../api" - }, - { - "path": "../opentelemetry-core" - } - ] -} diff --git a/packages/propagator-aws-xray/tsconfig.json b/packages/propagator-aws-xray/tsconfig.json deleted file mode 100644 index b9bcaf0434c..00000000000 --- a/packages/propagator-aws-xray/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "build", - "rootDir": "." - }, - "include": [ - "src/**/*.ts", - "test/**/*.ts" - ], - "references": [ - { - "path": "../../api" - }, - { - "path": "../opentelemetry-core" - } - ] -} diff --git a/packages/sdk-metrics/package.json b/packages/sdk-metrics/package.json index fc3d42a9314..1ce1b14726f 100644 --- a/packages/sdk-metrics/package.json +++ b/packages/sdk-metrics/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-metrics", - "version": "1.26.0", + "version": "1.27.0", "description": "OpenTelemetry metrics SDK", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -82,8 +82,8 @@ "@opentelemetry/api": ">=1.3.0 <1.10.0" }, "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/core": "1.27.0", + "@opentelemetry/resources": "1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics", "sideEffects": false diff --git a/packages/sdk-metrics/src/MeterProvider.ts b/packages/sdk-metrics/src/MeterProvider.ts index 3471f414d5d..e852519f698 100644 --- a/packages/sdk-metrics/src/MeterProvider.ts +++ b/packages/sdk-metrics/src/MeterProvider.ts @@ -36,6 +36,27 @@ export interface MeterProviderOptions { resource?: IResource; views?: ViewOptions[]; readers?: MetricReader[]; + /** + * Merge resource with {@link Resource.default()}? + * Default: {@code true} + */ + mergeResourceWithDefaults?: boolean; +} + +/** + * @param mergeWithDefaults + * @param providedResource + */ +function prepareResource( + mergeWithDefaults: boolean, + providedResource: Resource | undefined +) { + const resource = providedResource ?? Resource.empty(); + + if (mergeWithDefaults) { + return Resource.default().merge(resource); + } + return resource; } /** @@ -46,10 +67,12 @@ export class MeterProvider implements IMeterProvider { private _shutdown = false; constructor(options?: MeterProviderOptions) { - const resource = Resource.default().merge( - options?.resource ?? Resource.empty() + this._sharedState = new MeterProviderSharedState( + prepareResource( + options?.mergeResourceWithDefaults ?? true, + options?.resource + ) ); - this._sharedState = new MeterProviderSharedState(resource); if (options?.views != null && options.views.length > 0) { for (const viewOption of options.views) { this._sharedState.viewRegistry.addView(new View(viewOption)); diff --git a/packages/sdk-metrics/src/export/PeriodicExportingMetricReader.ts b/packages/sdk-metrics/src/export/PeriodicExportingMetricReader.ts index b6730033e03..646c832aa41 100644 --- a/packages/sdk-metrics/src/export/PeriodicExportingMetricReader.ts +++ b/packages/sdk-metrics/src/export/PeriodicExportingMetricReader.ts @@ -24,7 +24,6 @@ import { import { MetricReader } from './MetricReader'; import { PushMetricExporter } from './MetricExporter'; import { callWithTimeout, TimeoutError } from '../utils'; -import { diag } from '@opentelemetry/api'; import { MetricProducer } from './MetricProducer'; export type PeriodicExportingMetricReaderOptions = { @@ -127,25 +126,20 @@ export class PeriodicExportingMetricReader extends MetricReader { ); } - const doExport = async () => { - const result = await internal._export(this._exporter, resourceMetrics); - if (result.code !== ExportResultCode.SUCCESS) { - throw new Error( - `PeriodicExportingMetricReader: metrics export failed (error ${result.error})` - ); + if (resourceMetrics.resource.asyncAttributesPending) { + try { + await resourceMetrics.resource.waitForAsyncAttributes?.(); + } catch (e) { + api.diag.debug('Error while resolving async portion of resource: ', e); + globalErrorHandler(e); } - }; + } - // Avoid scheduling a promise to make the behavior more predictable and easier to test - if (resourceMetrics.resource.asyncAttributesPending) { - resourceMetrics.resource - .waitForAsyncAttributes?.() - .then(doExport, err => - diag.debug('Error while resolving async portion of resource: ', err) - ) - .catch(globalErrorHandler); - } else { - await doExport(); + const result = await internal._export(this._exporter, resourceMetrics); + if (result.code !== ExportResultCode.SUCCESS) { + throw new Error( + `PeriodicExportingMetricReader: metrics export failed (error ${result.error})` + ); } } diff --git a/packages/sdk-metrics/test/MeterProvider.test.ts b/packages/sdk-metrics/test/MeterProvider.test.ts index 8a8d0f1993a..d7ab799fa96 100644 --- a/packages/sdk-metrics/test/MeterProvider.test.ts +++ b/packages/sdk-metrics/test/MeterProvider.test.ts @@ -32,6 +32,7 @@ import * as sinon from 'sinon'; import { Meter } from '../src/Meter'; import { createAllowListAttributesProcessor } from '../src/view/AttributesProcessor'; import { AggregationType } from '../src/view/AggregationOption'; +import { Resource } from '@opentelemetry/resources'; describe('MeterProvider', () => { afterEach(() => { @@ -48,6 +49,66 @@ describe('MeterProvider', () => { const meterProvider = new MeterProvider({ resource: defaultResource }); assert(meterProvider instanceof MeterProvider); }); + + it('should use default resource when no resource is passed', async function () { + const reader = new TestMetricReader(); + + const meterProvider = new MeterProvider({ + readers: [reader], + }); + + // Create meter and instrument, otherwise nothing will export + const myMeter = meterProvider.getMeter('meter1', 'v1.0.0'); + const counter = myMeter.createCounter('non-renamed-instrument'); + counter.add(1, { attrib1: 'attrib_value1', attrib2: 'attrib_value2' }); + + // Perform collection. + const { resourceMetrics } = await reader.collect(); + assert.deepStrictEqual(resourceMetrics.resource, Resource.default()); + }); + + it('should not merge with defaults when flag is set to false', async function () { + const reader = new TestMetricReader(); + const expectedResource = new Resource({ foo: 'bar' }); + + const meterProvider = new MeterProvider({ + readers: [reader], + resource: expectedResource, + mergeResourceWithDefaults: false, + }); + + // Create meter and instrument, otherwise nothing will export + const myMeter = meterProvider.getMeter('meter1', 'v1.0.0'); + const counter = myMeter.createCounter('non-renamed-instrument'); + counter.add(1, { attrib1: 'attrib_value1', attrib2: 'attrib_value2' }); + + // Perform collection. + const { resourceMetrics } = await reader.collect(); + assert.deepStrictEqual(resourceMetrics.resource, expectedResource); + }); + + it('should merge with defaults when flag is set to true', async function () { + const reader = new TestMetricReader(); + const providedResource = new Resource({ foo: 'bar' }); + + const meterProvider = new MeterProvider({ + readers: [reader], + resource: providedResource, + mergeResourceWithDefaults: true, + }); + + // Create meter and instrument, otherwise nothing will export + const myMeter = meterProvider.getMeter('meter1', 'v1.0.0'); + const counter = myMeter.createCounter('non-renamed-instrument'); + counter.add(1, { attrib1: 'attrib_value1', attrib2: 'attrib_value2' }); + + // Perform collection. + const { resourceMetrics } = await reader.collect(); + assert.deepStrictEqual( + resourceMetrics.resource, + Resource.default().merge(providedResource) + ); + }); }); describe('getMeter', () => { diff --git a/packages/sdk-metrics/test/export/PeriodicExportingMetricReader.test.ts b/packages/sdk-metrics/test/export/PeriodicExportingMetricReader.test.ts index fcfc86511f2..d4bc6e7d05f 100644 --- a/packages/sdk-metrics/test/export/PeriodicExportingMetricReader.test.ts +++ b/packages/sdk-metrics/test/export/PeriodicExportingMetricReader.test.ts @@ -19,14 +19,20 @@ import { AggregationTemporality } from '../../src/export/AggregationTemporality' import { AggregationOption, AggregationType, + CollectionResult, InstrumentType, + MetricProducer, PushMetricExporter, } from '../../src'; import { ResourceMetrics } from '../../src/export/MetricData'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { TimeoutError } from '../../src/utils'; -import { ExportResult, ExportResultCode } from '@opentelemetry/core'; +import { + ExportResult, + ExportResultCode, + setGlobalErrorHandler, +} from '@opentelemetry/core'; import { assertRejects } from '../test-utils'; import { emptyResourceMetrics, TestMetricProducer } from './TestMetricProducer'; import { @@ -301,6 +307,98 @@ describe('PeriodicExportingMetricReader', () => { await reader.shutdown(); }); + it('should complete actions before promise resolves when async resource attributes are pending', async () => { + // arrange + const waitForAsyncAttributesStub = sinon.stub().returns( + new Promise(resolve => + setTimeout(() => { + resolve(); + }, 10) + ) + ); + const resourceMetrics: ResourceMetrics = { + resource: { + attributes: {}, + merge: sinon.stub(), + asyncAttributesPending: true, // ensure we try to await async attributes + waitForAsyncAttributes: waitForAsyncAttributesStub, // resolve when awaited + }, + scopeMetrics: [], + }; + + const mockCollectionResult: CollectionResult = { + errors: [], + resourceMetrics, + }; + const producerStubs: MetricProducer = { + collect: sinon.stub().resolves(mockCollectionResult), + }; + + const exporter = new TestMetricExporter(); + + const reader = new PeriodicExportingMetricReader({ + exporter: exporter, + exportIntervalMillis: MAX_32_BIT_INT, + exportTimeoutMillis: 80, + }); + + reader.setMetricProducer(producerStubs); + + // act + await reader.forceFlush(); + + // assert + sinon.assert.calledOnce(waitForAsyncAttributesStub); + assert.strictEqual( + exporter.getExports().length, + 1, + 'Expected exactly 1 export to happen when awaiting forceFlush' + ); + }); + + it('should call global error handler when resolving async attributes fails', async () => { + // arrange + const expectedError = new Error('resolving async attributes failed'); + const waitForAsyncAttributesStub = sinon.stub().rejects(expectedError); + + const resourceMetrics: ResourceMetrics = { + resource: { + attributes: {}, + merge: sinon.stub(), + asyncAttributesPending: true, // ensure we try to await async attributes + waitForAsyncAttributes: waitForAsyncAttributesStub, // reject when awaited + }, + scopeMetrics: [], + }; + + const mockCollectionResult: CollectionResult = { + errors: [], + resourceMetrics, + }; + const producerStubs: MetricProducer = { + collect: sinon.stub().resolves(mockCollectionResult), + }; + + const exporter = new TestMetricExporter(); + + const reader = new PeriodicExportingMetricReader({ + exporter: exporter, + exportIntervalMillis: MAX_32_BIT_INT, + exportTimeoutMillis: 80, + }); + + reader.setMetricProducer(producerStubs); + const errorHandlerStub = sinon.stub(); + setGlobalErrorHandler(errorHandlerStub); + + // act + await reader.forceFlush(); + + // assert + sinon.assert.calledOnce(waitForAsyncAttributesStub); + sinon.assert.calledOnceWithExactly(errorHandlerStub, expectedError); + }); + it('should throw TimeoutError when forceFlush takes too long', async () => { const exporter = new TestMetricExporter(); exporter.forceFlushTime = 60; diff --git a/packages/template/package.json b/packages/template/package.json index ce7da9da835..fd47f6b8b1a 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/template", - "version": "1.26.0", + "version": "1.27.0", "private": true, "publishConfig": { "access": "restricted" diff --git a/scripts/semconv/generate.sh b/scripts/semconv/generate.sh index 90bcb339355..af19d433b8a 100755 --- a/scripts/semconv/generate.sh +++ b/scripts/semconv/generate.sh @@ -7,7 +7,7 @@ ROOT_DIR="${SCRIPT_DIR}/../../" # freeze the spec version to make SpanAttributess generation reproducible SPEC_VERSION=v1.27.0 -GENERATOR_VERSION=0.8.0 +GENERATOR_VERSION=v0.10.0 # When running on windows and your are getting references to ";C" (like Telemetry;C) # then this is an issue with the bash shell, so first run the following in your shell: diff --git a/scripts/semconv/templates/registry/stable/docstring.ts.j2 b/scripts/semconv/templates/registry/stable/docstring.ts.j2 index b0a2b710373..8f99e54b9b3 100644 --- a/scripts/semconv/templates/registry/stable/docstring.ts.j2 +++ b/scripts/semconv/templates/registry/stable/docstring.ts.j2 @@ -1,21 +1,34 @@ -{% macro strong_reqs(string) -%}{{ string | replace(" MUST ", " **MUST** ") | replace(" MUST NOT ", " **MUST NOT** ") | replace(" SHOULD ", " **SHOULD** ") | replace(" SHOULD NOT ", " **SHOULD NOT** ") | replace(" MAY ", " **MAY** ") | replace(" NOT ", " **NOT** ") }}{% endmacro -%} +{% macro strong_rfc2119(string) -%}{{ string | regex_replace("\\b(MUST NOT|MUST|REQUIRED|SHALL NOT|SHALL|SHOULD NOT|SHOULD|RECOMMENDED|MAY|OPTIONAL)\\b", "**$1**") }}{% endmacro -%} -{% macro docstring(obj, type="value") -%}/** -{{ strong_reqs(obj.brief | comment_with_prefix(" * ")) }} -{% if obj.examples is sequence %}{% for example in obj.examples %} - * - * @example {{ example }} -{% endfor %}{%elif obj.examples%} - * - * @example {{ obj.examples | print_member_value }} -{% endif %}{% if obj.note %} - * -{{ ("@note " ~ strong_reqs(obj.note)) | comment_with_prefix(" * ") }} -{% endif %}{% if (obj.stability) != "stable" %} - * - * @experimental This {{type}} is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. -{% endif %}{% if obj.deprecated %} - * - * @deprecated {{ strong_reqs(obj.deprecated) | comment_with_prefix(" * ") }} -{% endif %} - */{% endmacro -%} +{% macro docstring(obj, type="value") -%} +{%- set examples_jsdoc %} + {% if obj.examples is sequence %} + {% for example in obj.examples %} +@example {{ example }} + {% endfor %} + {% elif obj.examples %} +@example {{ obj.examples | print_member_value }} + {% endif %} +{% endset -%} + +{%- if obj.note %} + {% set note_jsdoc = "@note " ~ strong_rfc2119(obj.note) %} +{% endif -%} + +{%- if obj.stability != "stable" %} + {% set stability_jsdoc = "@experimental This " ~ type ~ " is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`." %} +{% endif -%} + +{%- if obj is deprecated %} + {%- set deprecated_jsdoc = "\n@deprecated " ~ strong_rfc2119(obj.deprecated) -%} +{%- endif -%} + +{{ [ + strong_rfc2119(obj.brief) | trim, + "\n", + examples_jsdoc, + note_jsdoc, + stability_jsdoc, + deprecated_jsdoc, +] | comment }} +{%- endmacro -%} diff --git a/scripts/semconv/templates/registry/stable/weaver.yaml b/scripts/semconv/templates/registry/stable/weaver.yaml index 928fdd9b915..4dbf1eda89b 100644 --- a/scripts/semconv/templates/registry/stable/weaver.yaml +++ b/scripts/semconv/templates/registry/stable/weaver.yaml @@ -1,6 +1,21 @@ + params: excluded_attributes: ["messaging.client_id"] +# https://github.com/open-telemetry/weaver/blob/main/crates/weaver_forge/README.md#comment-filter +comment_formats: + jsdoc: + format: markdown + header: '/**' + # Note: This results in trailing whitespace on empty lines. IMHO the + # 'comment' filter should handle those. + prefix: ' * ' + footer: ' */' + trim: true + indent_first_level_list_items: true + escape_backslashes: true +default_comment_format: jsdoc + templates: - pattern: attributes.ts.j2 # Remove file name prefix when per-pattern params are available https://github.com/open-telemetry/weaver/issues/288 diff --git a/selenium-tests/package.json b/selenium-tests/package.json index 48cb3b7bfba..326e4fc7b21 100644 --- a/selenium-tests/package.json +++ b/selenium-tests/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/selenium-tests", - "version": "1.27.0", + "version": "1.28.2", "private": true, "description": "OpenTelemetry Selenium Tests", "main": "index.js", @@ -41,7 +41,7 @@ "babel-loader": "8.4.1", "babel-polyfill": "6.26.0", "browserstack-local": "1.4.8", - "chromedriver": "129.0.0", + "chromedriver": "130.0.0", "dotenv": "16.0.0", "fast-safe-stringify": "2.1.1", "geckodriver": "3.0.1", @@ -57,16 +57,16 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/exporter-zipkin": "1.26.0", - "@opentelemetry/instrumentation": "0.53.0", - "@opentelemetry/instrumentation-fetch": "0.53.0", - "@opentelemetry/instrumentation-xml-http-request": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "@opentelemetry/sdk-trace-web": "1.26.0", + "@opentelemetry/context-zone-peer-dep": "1.27.0", + "@opentelemetry/core": "1.27.0", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-zipkin": "1.27.0", + "@opentelemetry/instrumentation": "0.54.2", + "@opentelemetry/instrumentation-fetch": "0.54.2", + "@opentelemetry/instrumentation-xml-http-request": "0.54.2", + "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-web": "1.27.0", "zone.js": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0" } } diff --git a/selenium-tests/pages/tracing.js b/selenium-tests/pages/tracing.js index 6dd6e5f26f2..f88ce17618a 100644 --- a/selenium-tests/pages/tracing.js +++ b/selenium-tests/pages/tracing.js @@ -11,10 +11,13 @@ import { registerInstrumentations } from '@opentelemetry/instrumentation'; * @return {WebTracerProvider} */ export function loadOtel(instrumentations) { - const provider = new WebTracerProvider(); const memoryExporter = new InMemorySpanExporter(); - provider.addSpanProcessor(new SimpleSpanProcessor(memoryExporter)); - provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); + const provider = new WebTracerProvider({ + spanProcessors: [ + new SimpleSpanProcessor(memoryExporter), + new SimpleSpanProcessor(new ConsoleSpanExporter()), + ] + }); provider.register({ contextManager: new ZoneContextManager(), }); diff --git a/semantic-conventions/CHANGELOG.md b/semantic-conventions/CHANGELOG.md index cdbc2ceb7a1..622b0c7b1e9 100644 --- a/semantic-conventions/CHANGELOG.md +++ b/semantic-conventions/CHANGELOG.md @@ -15,6 +15,8 @@ All notable changes to the semantic-conventions package will be documented in th ### :house: (Internal) +* chore: Minor improvements to formatting of comments. [#5100](https://github.com/open-telemetry/opentelemetry-js/pull/5100) @trentm + ## 1.27.0 * Version bump only diff --git a/semantic-conventions/src/experimental_attributes.ts b/semantic-conventions/src/experimental_attributes.ts index 17b7865e823..fdb2613b240 100644 --- a/semantic-conventions/src/experimental_attributes.ts +++ b/semantic-conventions/src/experimental_attributes.ts @@ -20,31 +20,29 @@ /** * The ID of a running ECS task. The ID **MUST** be extracted from `task.arn`. - * + * * @example 10838bed-421f-43ef-870a-f43feacbbb5b - * * @example 23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_ECS_TASK_ID = 'aws.ecs.task.id' as const; /** * Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). - * + * * @example 33 - * * @example 32 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ANDROID_OS_API_LEVEL = 'android.os.api_level' as const; /** * Deprecated use the `device.app.lifecycle` event definition including `android.state` as a payload field instead. - * + * * @note The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ANDROID_STATE = 'android.state' as const; @@ -66,62 +64,56 @@ export const ANDROID_STATE_VALUE_FOREGROUND = "foreground" as const; /** * The provenance filename of the built attestation which directly relates to the build artifact filename. This filename **SHOULD** accompany the artifact at publish time. See the [SLSA Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) specification for more information. - * + * * @example golang-binary-amd64-v0.1.0.attestation - * * @example docker-image-amd64-v0.1.0.intoto.json1 - * * @example release-1.tar.gz.attestation - * * @example file-name-package.tar.gz.intoto.json1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ARTIFACT_ATTESTATION_FILENAME = 'artifact.attestation.filename' as const; /** * The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the software attestation space also refer to this as the [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). - * + * * @example 1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ARTIFACT_ATTESTATION_HASH = 'artifact.attestation.hash' as const; /** * The id of the build [software attestation](https://slsa.dev/attestation-model). - * + * * @example 123 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ARTIFACT_ATTESTATION_ID = 'artifact.attestation.id' as const; /** * The human readable file name of the artifact, typically generated during build and release processes. Often includes the package name and version in the file name. - * + * * @example golang-binary-amd64-v0.1.0 - * * @example docker-image-amd64-v0.1.0 - * * @example release-1.tar.gz - * * @example file-name-package.tar.gz - * + * * @note This file name can also act as the [Package Name](https://slsa.dev/spec/v1.0/terminology#package-model) * in cases where the package ecosystem maps accordingly. * Additionally, the artifact [can be published](https://slsa.dev/spec/v1.0/terminology#software-supply-chain) * for others, but that is not a guarantee. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ARTIFACT_FILENAME = 'artifact.filename' as const; /** * The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), often found in checksum.txt on a release of the artifact and used to verify package integrity. - * + * * @example 9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9 - * + * * @note The specific algorithm used to create the cryptographic hash value is * not defined. In situations where an artifact has multiple * cryptographic hashes, it is up to the implementer to choose which @@ -130,266 +122,255 @@ export const ATTR_ARTIFACT_FILENAME = 'artifact.filename' as const; * corresponding attestation. The implementer can then provide the other * hash values through an additional set of attribute extensions as they * deem necessary. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ARTIFACT_HASH = 'artifact.hash' as const; /** * The [Package URL](https://github.com/package-url/purl-spec) of the [package artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a standard way to identify and locate the packaged artifact. - * + * * @example pkg:github/package-url/purl-spec@1209109710924 - * * @example pkg:npm/foo@12.12.3 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ARTIFACT_PURL = 'artifact.purl' as const; /** * The version of the artifact. - * + * * @example v0.1.0 - * * @example 1.2.1 - * * @example 122691-build - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_ARTIFACT_VERSION = 'artifact.version' as const; /** * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - * + * * @example { "AttributeName": "string", "AttributeType": "string" } - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions' as const; /** * The value of the `AttributesToGet` request parameter. - * + * * @example lives - * * @example id - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get' as const; /** * The value of the `ConsistentRead` request parameter. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read' as const; /** * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - * + * * @example { "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": "string", "WriteCapacityUnits": number } - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity' as const; /** * The value of the `Count` response parameter. - * + * * @example 10 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_COUNT = 'aws.dynamodb.count' as const; /** * The value of the `ExclusiveStartTableName` request parameter. - * + * * @example Users - * * @example CatsTable - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table' as const; /** * The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. - * + * * @example { "Create": { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } } - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates' as const; /** * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field - * + * * @example { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } } - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes' as const; /** * The value of the `IndexName` request parameter. - * + * * @example name_to_group - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name' as const; /** * The JSON-serialized value of the `ItemCollectionMetrics` response field. - * + * * @example { "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] } - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics' as const; /** * The value of the `Limit` request parameter. - * + * * @example 10 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit' as const; /** * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - * + * * @example { "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } } - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes' as const; /** * The value of the `ProjectionExpression` request parameter. - * + * * @example Title - * * @example Title, Price, Color - * * @example Title, Description, RelatedItems, ProductReviews - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection' as const; /** * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - * + * * @example 1.0 - * * @example 2.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity' as const; /** * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - * + * * @example 1.0 - * * @example 2.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity' as const; /** * The value of the `ScanIndexForward` request parameter. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward' as const; /** * The value of the `ScannedCount` response parameter. - * + * * @example 50 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count' as const; /** * The value of the `Segment` request parameter. - * + * * @example 10 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment' as const; /** * The value of the `Select` request parameter. - * + * * @example ALL_ATTRIBUTES - * * @example COUNT - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_SELECT = 'aws.dynamodb.select' as const; /** * The number of items in the `TableNames` response parameter. - * + * * @example 20 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count' as const; /** * The keys in the `RequestItems` object field. - * + * * @example Users - * * @example Cats - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names' as const; /** * The value of the `TotalSegments` request parameter. - * + * * @example 100 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments' as const; /** * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - * + * * @example arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn' as const; /** * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - * + * * @example arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn' as const; /** * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype' as const; @@ -406,342 +387,322 @@ export const AWS_ECS_LAUNCHTYPE_VALUE_FARGATE = "fargate" as const; /** * The ARN of a running [ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). - * + * * @example arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b - * * @example arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn' as const; /** * The family name of the [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) used to create the ECS task. - * + * * @example opentelemetry-family - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family' as const; /** * The revision for the task definition used to create the ECS task. - * + * * @example 8 - * * @example 26 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision' as const; /** * The ARN of an EKS cluster. - * + * * @example arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn' as const; /** * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * + * * @example arn:aws:lambda:us-east-1:123456:function:myfunction:myalias - * + * * @note This may be different from `cloud.resource_id` if an alias is involved. - * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn' as const; /** * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * + * * @example arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:* - * + * * @note See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns' as const; /** * The name(s) of the AWS log group(s) an application is writing to. - * + * * @example /aws/lambda/my-function - * * @example opentelemetry-service - * + * * @note Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_LOG_GROUP_NAMES = 'aws.log.group.names' as const; /** * The ARN(s) of the AWS log stream(s). - * + * * @example arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b - * + * * @note See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns' as const; /** * The name(s) of the AWS log stream(s) an application is writing to. - * + * * @example logs/main/10838bed-421f-43ef-870a-f43feacbbb5b - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names' as const; /** * The AWS request ID as returned in the response headers `x-amz-request-id` or `x-amz-requestid`. - * + * * @example 79b9da39-b7ae-508a-a6bc-864b2829c622 - * * @example C9ER4AJX75574TDJ - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_REQUEST_ID = 'aws.request_id' as const; /** * The S3 bucket name the request refers to. Corresponds to the `--bucket` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. - * + * * @example some-bucket-name - * + * * @note The `bucket` attribute is applicable to all S3 operations that reference a bucket, i.e. that require the bucket name as a mandatory parameter. * This applies to almost all S3 operations except `list-buckets`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_S3_BUCKET = 'aws.s3.bucket' as const; /** * The source object (in the form `bucket`/`key`) for the copy operation. - * + * * @example someFile.yml - * + * * @note The `copy_source` attribute applies to S3 copy operations and corresponds to the `--copy-source` parameter * of the [copy-object operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). * This applies in particular to the following operations: * - * - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - * - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - * + * - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + * - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_S3_COPY_SOURCE = 'aws.s3.copy_source' as const; /** * The delete request container that specifies the objects to be deleted. - * + * * @example Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean - * + * * @note The `delete` attribute is only applicable to the [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) operation. * The `delete` attribute corresponds to the `--delete` parameter of the * [delete-objects operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_S3_DELETE = 'aws.s3.delete' as const; /** * The S3 object key the request refers to. Corresponds to the `--key` parameter of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) operations. - * + * * @example someFile.yml - * + * * @note The `key` attribute is applicable to all object-related S3 operations, i.e. that require the object key as a mandatory parameter. * This applies in particular to the following operations: * - * - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - * - [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) - * - [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) - * - [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) - * - [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) - * - [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) - * - [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) - * - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) - * - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) - * - [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) - * - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - * - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - * - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - * + * - [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + * - [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + * - [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) + * - [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) + * - [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) + * - [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) + * - [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) + * - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + * - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + * - [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) + * - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + * - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + * - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_S3_KEY = 'aws.s3.key' as const; /** * The part number of the part being uploaded in a multipart-upload operation. This is a positive integer between 1 and 10,000. - * + * * @example 3456 - * + * * @note The `part_number` attribute is only applicable to the [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) * and [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) operations. * The `part_number` attribute corresponds to the `--part-number` parameter of the * [upload-part operation within the S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_S3_PART_NUMBER = 'aws.s3.part_number' as const; /** * Upload ID that identifies the multipart upload. - * + * * @example dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ - * + * * @note The `upload_id` attribute applies to S3 multipart-upload operations and corresponds to the `--upload-id` parameter * of the [S3 API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) multipart operations. * This applies in particular to the following operations: * - * - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) - * - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) - * - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - * - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - * - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - * + * - [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + * - [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + * - [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + * - [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + * - [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AWS_S3_UPLOAD_ID = 'aws.s3.upload_id' as const; /** * The unique identifier of the service request. It's generated by the Azure service and returned with the response. - * + * * @example 00000000-0000-0000-0000-000000000000 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_AZ_SERVICE_REQUEST_ID = 'az.service_request_id' as const; /** * Array of brand name and version separated by a space - * + * * @example Not A;Brand 99 - * * @example Chromium 99 - * * @example Chrome 99 - * + * * @note This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_BROWSER_BRANDS = 'browser.brands' as const; /** * Preferred language of the user using the browser - * + * * @example en - * * @example en-US - * * @example fr - * * @example fr-FR - * + * * @note This value is intended to be taken from the Navigator API `navigator.language`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_BROWSER_LANGUAGE = 'browser.language' as const; /** * A boolean that is true if the browser is running on a mobile device - * + * * @note This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute **SHOULD** be left unset. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_BROWSER_MOBILE = 'browser.mobile' as const; /** * The platform on which the browser is running - * + * * @example Windows - * * @example macOS - * * @example Android - * - * @note This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API **SHOULD** **NOT** be used instead and this attribute **SHOULD** be left unset in order for the values to be consistent. + * + * @note This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API **SHOULD NOT** be used instead and this attribute **SHOULD** be left unset in order for the values to be consistent. * The list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_BROWSER_PLATFORM = 'browser.platform' as const; /** * The human readable name of the pipeline within a CI/CD system. - * + * * @example Build and Test - * * @example Lint - * * @example Deploy Go Project - * * @example deploy_to_environment - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CICD_PIPELINE_NAME = 'cicd.pipeline.name' as const; /** * The unique identifier of a pipeline run within a CI/CD system. - * + * * @example 120912 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CICD_PIPELINE_RUN_ID = 'cicd.pipeline.run.id' as const; /** * The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. - * + * * @example Run GoLang Linter - * * @example Go Build - * * @example go-test - * * @example deploy_binary - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CICD_PIPELINE_TASK_NAME = 'cicd.pipeline.task.name' as const; /** * The unique identifier of a task run within a pipeline. - * + * * @example 12097 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CICD_PIPELINE_TASK_RUN_ID = 'cicd.pipeline.task.run.id' as const; /** * The [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing the complete address in order to locate and identify the pipeline run. - * + * * @example https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CICD_PIPELINE_TASK_RUN_URL_FULL = 'cicd.pipeline.task.run.url.full' as const; /** * The type of the task within a pipeline. - * + * * @example build - * * @example test - * * @example deploy - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CICD_PIPELINE_TASK_TYPE = 'cicd.pipeline.task.type' as const; @@ -763,31 +724,30 @@ export const CICD_PIPELINE_TASK_TYPE_VALUE_TEST = "test" as const; /** * The cloud account ID the resource is assigned to. - * + * * @example 111111111111 - * * @example opentelemetry - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUD_ACCOUNT_ID = 'cloud.account.id' as const; /** * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * + * * @example us-east-1c - * + * * @note Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone' as const; /** * The cloud platform in use. - * + * * @note The prefix of the service **SHOULD** match the one specified in `cloud.provider`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUD_PLATFORM = 'cloud.platform' as const; @@ -934,7 +894,7 @@ export const CLOUD_PLATFORM_VALUE_TENCENT_CLOUD_SCF = "tencent_cloud_scf" as con /** * Name of the cloud provider. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUD_PROVIDER = 'cloud.provider' as const; @@ -976,194 +936,186 @@ export const CLOUD_PROVIDER_VALUE_TENCENT_CLOUD = "tencent_cloud" as const; /** * The geographical region the resource is running. - * + * * @example us-central1 - * * @example us-east-1 - * + * * @note Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUD_REGION = 'cloud.region' as const; /** * Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP) - * + * * @example arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function - * * @example //run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID - * * @example /subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/ - * + * * @note On some cloud providers, it may not be possible to determine the full ID at startup, * so it may be necessary to set `cloud.resource_id` as a span attribute instead. * * The exact value to use for `cloud.resource_id` depends on the cloud provider. * The following well-known definitions **MUST** be used if you set this attribute and they apply: * - * * **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - * Take care not to use the "invoked ARN" directly but replace any - * [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) - * with the resolved function version, as the same runtime instance may be invocable with - * multiple different aliases. - * * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) - * * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function, - * *not* the function app, having the form - * `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. - * This means that a span attribute **MUST** be used, as an Azure function app can host multiple functions that would usually share - * a TracerProvider. - * + * - **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + * Take care not to use the "invoked ARN" directly but replace any + * [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) + * with the resolved function version, as the same runtime instance may be invocable with + * multiple different aliases. + * - **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) + * - **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function, + * *not* the function app, having the form + * `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. + * This means that a span attribute **MUST** be used, as an Azure function app can host multiple functions that would usually share + * a TracerProvider. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUD_RESOURCE_ID = 'cloud.resource_id' as const; /** * The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event. - * + * * @example 123e4567-e89b-12d3-a456-426614174000 - * * @example 0001 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUDEVENTS_EVENT_ID = 'cloudevents.event_id' as const; /** * The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened. - * + * * @example https://github.com/cloudevents - * * @example /cloudevents/spec/pull/123 - * * @example my-service - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUDEVENTS_EVENT_SOURCE = 'cloudevents.event_source' as const; /** * The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. - * + * * @example "1.0" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUDEVENTS_EVENT_SPEC_VERSION = 'cloudevents.event_spec_version' as const; /** * The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source). - * + * * @example "mynewfile.jpg" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUDEVENTS_EVENT_SUBJECT = 'cloudevents.event_subject' as const; /** * The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence. - * + * * @example com.github.pull_request.opened - * * @example com.example.object.deleted.v2 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CLOUDEVENTS_EVENT_TYPE = 'cloudevents.event_type' as const; /** * The column number in `code.filepath` best representing the operation. It **SHOULD** point within the code unit named in `code.function`. - * + * * @example 16 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CODE_COLUMN = 'code.column' as const; /** * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - * + * * @example "/usr/local/MyApplication/content_root/app/index.php" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CODE_FILEPATH = 'code.filepath' as const; /** * The method or function name, or equivalent (usually rightmost part of the code unit's name). - * + * * @example "serveRequest" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CODE_FUNCTION = 'code.function' as const; /** * The line number in `code.filepath` best representing the operation. It **SHOULD** point within the code unit named in `code.function`. - * + * * @example 42 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CODE_LINENO = 'code.lineno' as const; /** * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - * + * * @example "com.example.MyHttpService" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CODE_NAMESPACE = 'code.namespace' as const; /** * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - * + * * @example "at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CODE_STACKTRACE = 'code.stacktrace' as const; /** * The command used to run the container (i.e. the command name). - * + * * @example otelcontribcol - * + * * @note If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_COMMAND = 'container.command' as const; /** * All the command arguments (including the command/executable itself) run by the container. [2] - * + * * @example otelcontribcol, --config, config.yaml - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_COMMAND_ARGS = 'container.command_args' as const; /** * The full command run by the container as a single string representing the full command. [2] - * + * * @example otelcontribcol --config config.yaml - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_COMMAND_LINE = 'container.command_line' as const; /** * Deprecated, use `cpu.mode` instead. - * + * * @example user - * * @example kernel - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `cpu.mode` + * + * @deprecated Replaced by `cpu.mode` */ export const ATTR_CONTAINER_CPU_STATE = 'container.cpu.state' as const; @@ -1184,108 +1136,103 @@ export const CONTAINER_CPU_STATE_VALUE_USER = "user" as const; /** * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - * + * * @example a3bf90e006b2 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_ID = 'container.id' as const; /** * Runtime specific image identifier. Usually a hash algorithm followed by a UUID. - * + * * @example sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f - * + * * @note Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint. * K8s defines a link to the container registry repository with digest `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. * The ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_IMAGE_ID = 'container.image.id' as const; /** * Name of the image the container was built on. - * + * * @example gcr.io/opentelemetry/operator - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_IMAGE_NAME = 'container.image.name' as const; /** * Repo digests of the container image as provided by the container runtime. - * + * * @example example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb - * * @example internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578 - * + * * @note [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_IMAGE_REPO_DIGESTS = 'container.image.repo_digests' as const; /** * Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `` section of the full name for example from `registry.example.com/my-org/my-image:`. - * + * * @example v1.27.1 - * * @example 3.5.7-0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_IMAGE_TAGS = 'container.image.tags' as const; /** * Container labels, `` being the label name, the value being the label value. - * + * * @example container.label.app=nginx - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_LABEL = (key: string) => `container.label.${key}`; /** * Deprecated, use `container.label` instead. - * + * * @example container.label.app=nginx - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `container.label`. + * + * @deprecated Replaced by `container.label`. */ export const ATTR_CONTAINER_LABELS = (key: string) => `container.labels.${key}`; /** * Container name used by container runtime. - * + * * @example opentelemetry-autoconf - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_NAME = 'container.name' as const; /** * The container runtime managing this container. - * + * * @example docker - * * @example containerd - * * @example rkt - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CONTAINER_RUNTIME = 'container.runtime' as const; /** * The mode of the CPU - * + * * @example user - * * @example system - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_CPU_MODE = 'cpu.mode' as const; @@ -1332,7 +1279,7 @@ export const CPU_MODE_VALUE_USER = "user" as const; /** * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level' as const; @@ -1394,74 +1341,73 @@ export const DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_TWO = "two" as const; /** * The data center of the coordinating node for a query. - * + * * @example "us-west-2" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc' as const; /** * The ID of the coordinating node for a query. - * + * * @example "be13faa2-8574-4d71-926d-27f16cf8a7af" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id' as const; /** * Whether or not the query is idempotent. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence' as const; /** * The fetch size used for paging, i.e. how many rows will be returned at once. - * + * * @example 5000 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size' as const; /** * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - * + * * @example 0 - * * @example 2 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count' as const; /** * Deprecated, use `db.collection.name` instead. - * + * * @example "mytable" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.collection.name`. + * + * @deprecated Replaced by `db.collection.name`. */ export const ATTR_DB_CASSANDRA_TABLE = 'db.cassandra.table' as const; /** * The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation **SHOULD** use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns **SHOULD** document it. - * + * * @example myDataSource - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CLIENT_CONNECTION_POOL_NAME = 'db.client.connection.pool.name' as const; /** * The state of a connection in the pool - * + * * @example idle - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_CLIENT_CONNECTION_STATE = 'db.client.connection.state' as const; @@ -1478,23 +1424,23 @@ export const DB_CLIENT_CONNECTION_STATE_VALUE_USED = "used" as const; /** * Deprecated, use `db.client.connection.pool.name` instead. - * + * * @example myDataSource - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.pool.name`. + * + * @deprecated Replaced by `db.client.connection.pool.name`. */ export const ATTR_DB_CLIENT_CONNECTIONS_POOL_NAME = 'db.client.connections.pool.name' as const; /** * Deprecated, use `db.client.connection.state` instead. - * + * * @example idle - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.state`. + * + * @deprecated Replaced by `db.client.connection.state`. */ export const ATTR_DB_CLIENT_CONNECTIONS_STATE = 'db.client.connections.state' as const; @@ -1510,42 +1456,41 @@ export const DB_CLIENT_CONNECTIONS_STATE_VALUE_USED = "used" as const; /** * The name of a collection (table, container) within the database. - * + * * @example public.users - * * @example customers - * - * @note It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. + * + * @note It is **RECOMMENDED** to capture the value as provided by the application without attempting to do any case normalization. * If the collection name is parsed from the query text, it **SHOULD** be the first collection name found in the query and it **SHOULD** match the value provided in the query text including any schema and database name prefix. - * For batch operations, if the individual operations are known to have the same collection name then that collection name **SHOULD** be used, otherwise `db.collection.name` **SHOULD** **NOT** be captured. - * + * For batch operations, if the individual operations are known to have the same collection name then that collection name **SHOULD** be used, otherwise `db.collection.name` **SHOULD NOT** be captured. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COLLECTION_NAME = 'db.collection.name' as const; /** * Deprecated, use `server.address`, `server.port` attributes instead. - * + * * @example "Server=(localdb)\\v11.0;Integrated Security=true;" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * "Replaced by `server.address` and `server.port`." + * + * @deprecated "Replaced by `server.address` and `server.port`." */ export const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const; /** * Unique Cosmos client instance id. - * + * * @example "3ba4827d-4422-483f-b59f-85b74211c11d" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COSMOSDB_CLIENT_ID = 'db.cosmosdb.client_id' as const; /** * Cosmos client connection mode. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COSMOSDB_CONNECTION_MODE = 'db.cosmosdb.connection_mode' as const; @@ -1562,18 +1507,18 @@ export const DB_COSMOSDB_CONNECTION_MODE_VALUE_GATEWAY = "gateway" as const; /** * Deprecated, use `db.collection.name` instead. - * + * * @example "mytable" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.collection.name`. + * + * @deprecated Replaced by `db.collection.name`. */ export const ATTR_DB_COSMOSDB_CONTAINER = 'db.cosmosdb.container' as const; /** * CosmosDB Operation Type. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COSMOSDB_OPERATION_TYPE = 'db.cosmosdb.operation_type' as const; @@ -1655,271 +1600,253 @@ export const DB_COSMOSDB_OPERATION_TYPE_VALUE_UPSERT = "Upsert" as const; /** * RU consumed for that operation - * + * * @example 46.18 - * * @example 1.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COSMOSDB_REQUEST_CHARGE = 'db.cosmosdb.request_charge' as const; /** * Request payload size in bytes - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COSMOSDB_REQUEST_CONTENT_LENGTH = 'db.cosmosdb.request_content_length' as const; /** * Cosmos DB status code. - * + * * @example 200 - * * @example 201 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COSMOSDB_STATUS_CODE = 'db.cosmosdb.status_code' as const; /** * Cosmos DB sub status code. - * + * * @example 1000 - * * @example 1002 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_COSMOSDB_SUB_STATUS_CODE = 'db.cosmosdb.sub_status_code' as const; /** * Deprecated, use `db.namespace` instead. - * + * * @example e9106fc68e3044f0b1475b04bf4ffd5f - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.namespace`. + * + * @deprecated Replaced by `db.namespace`. */ export const ATTR_DB_ELASTICSEARCH_CLUSTER_NAME = 'db.elasticsearch.cluster.name' as const; /** * Represents the human-readable identifier of the node/instance to which a request was routed. - * + * * @example instance-0000000001 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_ELASTICSEARCH_NODE_NAME = 'db.elasticsearch.node.name' as const; /** * A dynamic value in the url path. - * + * * @example db.elasticsearch.path_parts.index=test-index - * * @example db.elasticsearch.path_parts.doc_id=123 - * + * * @note Many Elasticsearch url paths allow dynamic values. These **SHOULD** be recorded in span attributes in the format `db.elasticsearch.path_parts.`, where `` is the url path part name. The implementation **SHOULD** reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_ELASTICSEARCH_PATH_PARTS = (key: string) => `db.elasticsearch.path_parts.${key}`; /** * Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. - * + * * @example "mysql-e26b99z.example.com" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. + * + * @deprecated Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. */ export const ATTR_DB_INSTANCE_ID = 'db.instance.id' as const; /** * Removed, no replacement at this time. - * + * * @example org.postgresql.Driver - * * @example com.microsoft.sqlserver.jdbc.SQLServerDriver - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Removed as not used. + * + * @deprecated Removed as not used. */ export const ATTR_DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname' as const; /** * Deprecated, use `db.collection.name` instead. - * + * * @example "mytable" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.collection.name`. + * + * @deprecated Replaced by `db.collection.name`. */ export const ATTR_DB_MONGODB_COLLECTION = 'db.mongodb.collection' as const; /** * Deprecated, SQL Server instance is now populated as a part of `db.namespace` attribute. - * + * * @example "MSSQLSERVER" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Deprecated, no replacement at this time. + * + * @deprecated Deprecated, no replacement at this time. */ export const ATTR_DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name' as const; /** * Deprecated, use `db.namespace` instead. - * + * * @example customers - * * @example main - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.namespace`. + * + * @deprecated Replaced by `db.namespace`. */ export const ATTR_DB_NAME = 'db.name' as const; /** * The name of the database, fully qualified within the server address and port. - * + * * @example customers - * * @example test.users - * - * @note If a database system has multiple namespace components, they **SHOULD** be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces **SHOULD** **NOT** be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid. + * + * @note If a database system has multiple namespace components, they **SHOULD** be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces **SHOULD NOT** be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid. * Semantic conventions for individual database systems **SHOULD** document what `db.namespace` means in the context of that system. - * It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. - * + * It is **RECOMMENDED** to capture the value as provided by the application without attempting to do any case normalization. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_NAMESPACE = 'db.namespace' as const; /** * Deprecated, use `db.operation.name` instead. - * + * * @example findAndModify - * * @example HMSET - * * @example SELECT - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.operation.name`. + * + * @deprecated Replaced by `db.operation.name`. */ export const ATTR_DB_OPERATION = 'db.operation' as const; /** * The number of queries included in a [batch operation](/docs/database/database-spans.md#batch-operations). - * + * * @example 2 - * * @example 3 - * * @example 4 - * + * * @note Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` **SHOULD** never be `1`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_OPERATION_BATCH_SIZE = 'db.operation.batch.size' as const; /** * The name of the operation or command being executed. - * + * * @example findAndModify - * * @example HMSET - * * @example SELECT - * - * @note It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization. + * + * @note It is **RECOMMENDED** to capture the value as provided by the application without attempting to do any case normalization. * If the operation name is parsed from the query text, it **SHOULD** be the first operation name found in the query. * For batch operations, if the individual operations are known to have the same operation name then that operation name **SHOULD** be used prepended by `BATCH `, otherwise `db.operation.name` **SHOULD** be `BATCH` or some other database system specific term if more applicable. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_OPERATION_NAME = 'db.operation.name' as const; /** * A query parameter used in `db.query.text`, with `` being the parameter name, and the attribute value being a string representation of the parameter value. - * + * * @example someval - * * @example 55 - * + * * @note Query parameters should only be captured when `db.query.text` is parameterized with placeholders. * If a parameter has no name and instead is referenced only by index, then `` **SHOULD** be the 0-based index. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_QUERY_PARAMETER = (key: string) => `db.query.parameter.${key}`; /** * The database query being executed. - * + * * @example SELECT * FROM wuser_table where username = ? - * * @example SET mykey "WuValue" - * + * * @note For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). * For batch operations, if the individual operations are known to have the same query text then that query text **SHOULD** be used, otherwise all of the individual query texts **SHOULD** be concatenated with separator `; ` or some other database system specific separator if more applicable. * Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_QUERY_TEXT = 'db.query.text' as const; /** * Deprecated, use `db.namespace` instead. - * + * * @example 0 - * * @example 1 - * * @example 15 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.namespace`. + * + * @deprecated Replaced by `db.namespace`. */ export const ATTR_DB_REDIS_DATABASE_INDEX = 'db.redis.database_index' as const; /** * Deprecated, use `db.collection.name` instead. - * + * * @example "mytable" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.collection.name`. + * + * @deprecated Replaced by `db.collection.name`. */ export const ATTR_DB_SQL_TABLE = 'db.sql.table' as const; /** * The database statement being executed. - * + * * @example SELECT * FROM wuser_table - * * @example SET mykey "WuValue" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.query.text`. + * + * @deprecated Replaced by `db.query.text`. */ export const ATTR_DB_STATEMENT = 'db.statement' as const; /** * The database management system (DBMS) product as identified by the client instrumentation. - * + * * @note The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system` is set to `postgresql` based on the instrumentation's best knowledge. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DB_SYSTEM = 'db.system' as const; @@ -2196,72 +2123,68 @@ export const DB_SYSTEM_VALUE_VERTICA = "vertica" as const; /** * Deprecated, no replacement at this time. - * + * * @example readonly_user - * * @example reporting_user - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * No replacement at this time. + * + * @deprecated No replacement at this time. */ export const ATTR_DB_USER = 'db.user' as const; /** * 'Deprecated, use `deployment.environment.name` instead.' - * + * * @example staging - * * @example production - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Deprecated, use `deployment.environment.name` instead. + * + * @deprecated Deprecated, use `deployment.environment.name` instead. */ export const ATTR_DEPLOYMENT_ENVIRONMENT = 'deployment.environment' as const; /** * Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - * + * * @example staging - * * @example production - * + * * @note `deployment.environment.name` does not affect the uniqueness constraints defined through * the `service.namespace`, `service.name` and `service.instance.id` resource attributes. * This implies that resources carrying the following attribute combinations **MUST** be * considered to be identifying the same service: * - * * `service.name=frontend`, `deployment.environment.name=production` - * * `service.name=frontend`, `deployment.environment.name=staging`. - * + * - `service.name=frontend`, `deployment.environment.name=production` + * - `service.name=frontend`, `deployment.environment.name=staging`. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEPLOYMENT_ENVIRONMENT_NAME = 'deployment.environment.name' as const; /** * The id of the deployment. - * + * * @example 1208 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEPLOYMENT_ID = 'deployment.id' as const; /** * The name of the deployment. - * + * * @example deploy my app - * * @example deploy-frontend - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEPLOYMENT_NAME = 'deployment.name' as const; /** * The status of the deployment. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEPLOYMENT_STATUS = 'deployment.status' as const; @@ -2278,85 +2201,79 @@ export const DEPLOYMENT_STATUS_VALUE_SUCCEEDED = "succeeded" as const; /** * Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - * + * * @example destination.example.com - * * @example 10.1.2.80 - * * @example /tmp/my.sock - * + * * @note When observed from the source side, and when communicating through an intermediary, `destination.address` **SHOULD** represent the destination address behind any intermediaries, for example proxies, if it's available. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DESTINATION_ADDRESS = 'destination.address' as const; /** * Destination port number - * + * * @example 3389 - * * @example 2888 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DESTINATION_PORT = 'destination.port' as const; /** * A unique identifier representing the device - * + * * @example 2ab2916d-a51f-4ac8-80ee-45ac31a28092 - * - * @note The device identifier **MUST** only be defined using the values outlined below. This value is not an advertising identifier and **MUST** **NOT** be used as such. On iOS (Swift or Objective-C), this value **MUST** be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value **MUST** be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - * + * + * @note The device identifier **MUST** only be defined using the values outlined below. This value is not an advertising identifier and **MUST NOT** be used as such. On iOS (Swift or Objective-C), this value **MUST** be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value **MUST** be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEVICE_ID = 'device.id' as const; /** * The name of the device manufacturer - * + * * @example Apple - * * @example Samsung - * + * * @note The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps **SHOULD** hardcode the value `Apple`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEVICE_MANUFACTURER = 'device.manufacturer' as const; /** * The model identifier for the device - * + * * @example iPhone3,4 - * * @example SM-G920F - * + * * @note It's recommended this value represents a machine-readable version of the model identifier rather than the market or consumer-friendly name of the device. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier' as const; /** * The marketing name for the device model - * + * * @example iPhone 6s Plus - * * @example Samsung Galaxy S6 - * + * * @note It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DEVICE_MODEL_NAME = 'device.model.name' as const; /** * The disk IO operation direction. - * + * * @example read - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DISK_IO_DIRECTION = 'disk.io.direction' as const; @@ -2373,104 +2290,100 @@ export const DISK_IO_DIRECTION_VALUE_WRITE = "write" as const; /** * The name being queried. - * + * * @example www.example.com - * * @example opentelemetry.io - * - * @note If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively. - * + * + * @note If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \\t, \\r, and \\n respectively. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_DNS_QUESTION_NAME = 'dns.question.name' as const; /** * Deprecated, use `user.id` instead. - * + * * @example "username" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `user.id` attribute. + * + * @deprecated Replaced by `user.id` attribute. */ export const ATTR_ENDUSER_ID = 'enduser.id' as const; /** * Deprecated, use `user.roles` instead. - * + * * @example "admin" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `user.roles` attribute. + * + * @deprecated Replaced by `user.roles` attribute. */ export const ATTR_ENDUSER_ROLE = 'enduser.role' as const; /** * Deprecated, no replacement at this time. - * + * * @example "read:message, write:files" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Removed. + * + * @deprecated Removed. */ export const ATTR_ENDUSER_SCOPE = 'enduser.scope' as const; /** * Identifies the class / type of event. - * + * * @example browser.mouse.click - * * @example device.app.lifecycle - * + * * @note Event names are subject to the same rules as [attribute names](/docs/general/attribute-naming.md). Notably, event names are namespaced to avoid collisions and provide a clean separation of semantics for events in separate domains like browser, mobile, and kubernetes. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_EVENT_NAME = 'event.name' as const; /** * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_COLDSTART = 'faas.coldstart' as const; /** * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - * + * * @example "0/5 * * * ? *" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_CRON = 'faas.cron' as const; /** * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - * + * * @example myBucketName - * * @example myDbName - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_DOCUMENT_COLLECTION = 'faas.document.collection' as const; /** * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - * + * * @example myFile.txt - * * @example myTableName - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_DOCUMENT_NAME = 'faas.document.name' as const; /** * Describes the type of the operation that was performed on the data. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_DOCUMENT_OPERATION = 'faas.document.operation' as const; @@ -2492,49 +2405,49 @@ export const FAAS_DOCUMENT_OPERATION_VALUE_INSERT = "insert" as const; /** * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - * + * * @example "2020-01-23T13:47:06Z" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_DOCUMENT_TIME = 'faas.document.time' as const; /** * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * + * * @example 2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de - * + * * @note * **AWS Lambda:** Use the (full) log stream name. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_INSTANCE = 'faas.instance' as const; /** * The invocation ID of the current function invocation. - * + * * @example "af9d5aa4-a685-4c5f-a22b-444f80b3cc28" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_INVOCATION_ID = 'faas.invocation_id' as const; /** * The name of the invoked function. - * + * * @example "my-function" - * - * @note SHOULD be equal to the `faas.name` resource attribute of the invoked function. - * + * + * @note **SHOULD** be equal to the `faas.name` resource attribute of the invoked function. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_INVOKED_NAME = 'faas.invoked_name' as const; /** * The cloud provider of the invoked function. - * - * @note SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - * + * + * @note **SHOULD** be equal to the `cloud.provider` resource attribute of the invoked function. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_INVOKED_PROVIDER = 'faas.invoked_provider' as const; @@ -2566,33 +2479,32 @@ export const FAAS_INVOKED_PROVIDER_VALUE_TENCENT_CLOUD = "tencent_cloud" as cons /** * The cloud region of the invoked function. - * + * * @example "eu-central-1" - * - * @note SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - * + * + * @note **SHOULD** be equal to the `cloud.region` resource attribute of the invoked function. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_INVOKED_REGION = 'faas.invoked_region' as const; /** * The amount of memory available to the serverless function converted to Bytes. - * + * * @example 134217728 - * + * * @note It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_MAX_MEMORY = 'faas.max_memory' as const; /** * The name of the single function that this runtime instance executes. - * + * * @example my-function - * * @example myazurefunctionapp/some-function-name - * + * * @note This is the name of the function as configured/deployed on the FaaS * platform and is usually different from the name of the callback * function (which may be stored in the @@ -2603,29 +2515,29 @@ export const ATTR_FAAS_MAX_MEMORY = 'faas.max_memory' as const; * definition of function name **MUST** be used for this attribute * (and consequently the span name) for the listed cloud providers/products: * - * * **Azure:** The full name `/`, i.e., function app name - * followed by a forward slash followed by the function name (this form - * can also be seen in the resource JSON for the function). - * This means that a span attribute **MUST** be used, as an Azure function - * app can host multiple functions that would usually share - * a TracerProvider (see also the `cloud.resource_id` attribute). - * + * - **Azure:** The full name `/`, i.e., function app name + * followed by a forward slash followed by the function name (this form + * can also be seen in the resource JSON for the function). + * This means that a span attribute **MUST** be used, as an Azure function + * app can host multiple functions that would usually share + * a TracerProvider (see also the `cloud.resource_id` attribute). + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_NAME = 'faas.name' as const; /** * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - * + * * @example "2020-01-23T13:47:06Z" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_TIME = 'faas.time' as const; /** * Type of the trigger which caused this function invocation. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_TRIGGER = 'faas.trigger' as const; @@ -2657,52 +2569,49 @@ export const FAAS_TRIGGER_VALUE_TIMER = "timer" as const; /** * The immutable version of the function being executed. - * + * * @example 26 - * * @example pinkfroid-00002 - * + * * @note Depending on the cloud provider and platform, use: * - * * **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - * (an integer represented as a decimal string). - * * **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions) - * (i.e., the function name plus the revision suffix). - * * **Google Cloud Functions:** The value of the - * [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - * * **Azure Functions:** Not applicable. Do not set this attribute. - * + * - **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + * (an integer represented as a decimal string). + * - **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions) + * (i.e., the function name plus the revision suffix). + * - **Google Cloud Functions:** The value of the + * [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). + * - **Azure Functions:** Not applicable. Do not set this attribute. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FAAS_VERSION = 'faas.version' as const; /** * The unique identifier of the feature flag. - * + * * @example logo-color - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FEATURE_FLAG_KEY = 'feature_flag.key' as const; /** * The name of the service provider that performs the flag evaluation. - * + * * @example Flag Manager - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FEATURE_FLAG_PROVIDER_NAME = 'feature_flag.provider_name' as const; /** * **SHOULD** be a semantic identifier for a value. If one is unavailable, a stringified version of the value can be used. - * + * * @example red - * * @example true - * * @example on - * + * * @note A semantic identifier, commonly referred to as a variant, provides a means * for referring to a value without including the value itself. This can * provide additional context for understanding the meaning behind a value. @@ -2711,141 +2620,128 @@ export const ATTR_FEATURE_FLAG_PROVIDER_NAME = 'feature_flag.provider_name' as c * A stringified version of the value can be used in situations where a * semantic identifier is unavailable. String representation of the value * should be determined by the implementer. - * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FEATURE_FLAG_VARIANT = 'feature_flag.variant' as const; /** * Directory where the file is located. It should include the drive letter, when appropriate. - * + * * @example /home/user - * - * @example C:\Program Files\MyApp - * + * @example C:\\Program Files\\MyApp + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FILE_DIRECTORY = 'file.directory' as const; /** * File extension, excluding the leading dot. - * + * * @example png - * * @example gz - * + * * @note When the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz"). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FILE_EXTENSION = 'file.extension' as const; /** * Name of the file including the extension, without the directory. - * + * * @example example.png - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FILE_NAME = 'file.name' as const; /** * Full path to the file, including the file name. It should include the drive letter, when appropriate. - * + * * @example /home/alice/example.png - * - * @example C:\Program Files\MyApp\myapp.exe - * + * @example C:\\Program Files\\MyApp\\myapp.exe + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FILE_PATH = 'file.path' as const; /** * File size in bytes. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_FILE_SIZE = 'file.size' as const; /** * Identifies the Google Cloud service for which the official client library is intended. - * + * * @example appengine - * * @example run - * * @example firestore - * * @example alloydb - * * @example spanner - * + * * @note Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GCP_CLIENT_SERVICE = 'gcp.client.service' as const; /** * The name of the Cloud Run [execution](https://cloud.google.com/run/docs/managing/job-executions) being run for the Job, as set by the [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. - * + * * @example job-name-xxxx - * * @example sample-job-mdw84 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GCP_CLOUD_RUN_JOB_EXECUTION = 'gcp.cloud_run.job.execution' as const; /** * The index for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) environment variable. - * + * * @example 0 - * * @example 1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GCP_CLOUD_RUN_JOB_TASK_INDEX = 'gcp.cloud_run.job.task_index' as const; /** * The hostname of a GCE instance. This is the full value of the default or [custom hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). - * + * * @example my-host1234.example.com - * * @example sample-vm.us-west1-b.c.my-project.internal - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GCP_GCE_INSTANCE_HOSTNAME = 'gcp.gce.instance.hostname' as const; /** * The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). - * + * * @example instance-1 - * * @example my-vm-name - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GCP_GCE_INSTANCE_NAME = 'gcp.gce.instance.name' as const; /** * The full response received from the GenAI model. - * + * * @example [{'role': 'assistant', 'content': 'The capital of France is Paris.'}] - * - * @note It's RECOMMENDED to format completions as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) - * + * + * @note It's **RECOMMENDED** to format completions as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_COMPLETION = 'gen_ai.completion' as const; /** * The name of the operation being performed. - * - * @note If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries **SHOULD** use applicable predefined value. - * + * + * @note If one of the predefined values applies, but specific system uses a different name it's **RECOMMENDED** to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries **SHOULD** use applicable predefined value. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_OPERATION_NAME = 'gen_ai.operation.name' as const; @@ -2862,121 +2758,119 @@ export const GEN_AI_OPERATION_NAME_VALUE_TEXT_COMPLETION = "text_completion" as /** * The full prompt sent to the GenAI model. - * + * * @example [{'role': 'user', 'content': 'What is the capital of France?'}] - * - * @note It's RECOMMENDED to format prompts as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) - * + * + * @note It's **RECOMMENDED** to format prompts as JSON string matching [OpenAI messages format](https://platform.openai.com/docs/guides/text-generation) * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_PROMPT = 'gen_ai.prompt' as const; /** * The frequency penalty setting for the GenAI request. - * + * * @example 0.1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_FREQUENCY_PENALTY = 'gen_ai.request.frequency_penalty' as const; /** * The maximum number of tokens the model generates for a request. - * + * * @example 100 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_MAX_TOKENS = 'gen_ai.request.max_tokens' as const; /** * The name of the GenAI model a request is being made to. - * + * * @example "gpt-4" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_MODEL = 'gen_ai.request.model' as const; /** * The presence penalty setting for the GenAI request. - * + * * @example 0.1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_PRESENCE_PENALTY = 'gen_ai.request.presence_penalty' as const; /** * List of sequences that the model will use to stop generating further tokens. - * + * * @example forest - * * @example lived - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_STOP_SEQUENCES = 'gen_ai.request.stop_sequences' as const; /** * The temperature setting for the GenAI request. - * + * * @example 0.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_TEMPERATURE = 'gen_ai.request.temperature' as const; /** * The top_k sampling setting for the GenAI request. - * + * * @example 1.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_TOP_K = 'gen_ai.request.top_k' as const; /** * The top_p sampling setting for the GenAI request. - * + * * @example 1.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_REQUEST_TOP_P = 'gen_ai.request.top_p' as const; /** * Array of reasons the model stopped generating tokens, corresponding to each generation received. - * + * * @example stop - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_RESPONSE_FINISH_REASONS = 'gen_ai.response.finish_reasons' as const; /** * The unique identifier for the completion. - * + * * @example chatcmpl-123 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_RESPONSE_ID = 'gen_ai.response.id' as const; /** * The name of the model that generated the response. - * + * * @example gpt-4-0613 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_RESPONSE_MODEL = 'gen_ai.response.model' as const; /** * The Generative AI product as identified by the client or server instrumentation. - * + * * @example "openai" - * + * * @note The `gen_ai.system` describes a family of GenAI models with specific model identified * by `gen_ai.request.model` and `gen_ai.response.model` attributes. * @@ -2986,7 +2880,7 @@ export const ATTR_GEN_AI_RESPONSE_MODEL = 'gen_ai.response.model' as const; * * For custom model, a custom friendly name **SHOULD** be used. * If none of these options apply, the `gen_ai.system` **SHOULD** be set to `_OTHER`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_SYSTEM = 'gen_ai.system' as const; @@ -3013,11 +2907,10 @@ export const GEN_AI_SYSTEM_VALUE_VERTEX_AI = "vertex_ai" as const; /** * The type of token being counted. - * + * * @example input - * * @example output - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_TOKEN_TYPE = 'gen_ai.token.type' as const; @@ -3034,51 +2927,50 @@ export const GEN_AI_TOKEN_TYPE_VALUE_COMPLETION = "output" as const; /** * Deprecated, use `gen_ai.usage.output_tokens` instead. - * + * * @example 42 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `gen_ai.usage.output_tokens` attribute. + * + * @deprecated Replaced by `gen_ai.usage.output_tokens` attribute. */ export const ATTR_GEN_AI_USAGE_COMPLETION_TOKENS = 'gen_ai.usage.completion_tokens' as const; /** * The number of tokens used in the GenAI input (prompt). - * + * * @example 100 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_USAGE_INPUT_TOKENS = 'gen_ai.usage.input_tokens' as const; /** * The number of tokens used in the GenAI response (completion). - * + * * @example 180 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GEN_AI_USAGE_OUTPUT_TOKENS = 'gen_ai.usage.output_tokens' as const; /** * Deprecated, use `gen_ai.usage.input_tokens` instead. - * + * * @example 42 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `gen_ai.usage.input_tokens` attribute. + * + * @deprecated Replaced by `gen_ai.usage.input_tokens` attribute. */ export const ATTR_GEN_AI_USAGE_PROMPT_TOKENS = 'gen_ai.usage.prompt_tokens' as const; /** * The type of memory. - * + * * @example other - * * @example stack - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GO_MEMORY_TYPE = 'go.memory.type' as const; @@ -3095,33 +2987,30 @@ export const GO_MEMORY_TYPE_VALUE_STACK = "stack" as const; /** * The GraphQL document being executed. - * + * * @example "query findBookById { bookById(id: ?) { name } }" - * + * * @note The value may be sanitized to exclude sensitive information. - * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GRAPHQL_DOCUMENT = 'graphql.document' as const; /** * The name of the operation being executed. - * + * * @example "findBookById" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GRAPHQL_OPERATION_NAME = 'graphql.operation.name' as const; /** * The type of the operation being executed. - * + * * @example query - * * @example mutation - * * @example subscription - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_GRAPHQL_OPERATION_TYPE = 'graphql.operation.type' as const; @@ -3143,34 +3032,34 @@ export const GRAPHQL_OPERATION_TYPE_VALUE_SUBSCRIPTION = "subscription" as const /** * Unique identifier for the application - * + * * @example 2daa2797-e42b-4624-9322-ec3f968df4da - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HEROKU_APP_ID = 'heroku.app.id' as const; /** * Commit hash for the current release - * + * * @example e6134959463efd8966b20e75b913cafe3f5ec - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HEROKU_RELEASE_COMMIT = 'heroku.release.commit' as const; /** * Time and date the release was created - * + * * @example 2022-10-23T18:00:42Z - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HEROKU_RELEASE_CREATION_TIMESTAMP = 'heroku.release.creation_timestamp' as const; /** * The CPU architecture the host system is running on. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_ARCH = 'host.arch' as const; @@ -3217,166 +3106,159 @@ export const HOST_ARCH_VALUE_X86 = "x86" as const; /** * The amount of level 2 memory cache available to the processor (in Bytes). - * + * * @example 12288000 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_CPU_CACHE_L2_SIZE = 'host.cpu.cache.l2.size' as const; /** * Family or generation of the CPU. - * + * * @example 6 - * * @example PA-RISC 1.1e - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_CPU_FAMILY = 'host.cpu.family' as const; /** * Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family. - * + * * @example 6 - * * @example 9000/778/B180L - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_CPU_MODEL_ID = 'host.cpu.model.id' as const; /** * Model designation of the processor. - * + * * @example 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_CPU_MODEL_NAME = 'host.cpu.model.name' as const; /** * Stepping or core revisions. - * + * * @example 1 - * * @example r1p1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_CPU_STEPPING = 'host.cpu.stepping' as const; /** * Processor manufacturer identifier. A maximum 12-character string. - * + * * @example GenuineIntel - * + * * @note [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_CPU_VENDOR_ID = 'host.cpu.vendor.id' as const; /** * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system. - * + * * @example fdbf79e8af94cb7f9e8df36789187052 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_ID = 'host.id' as const; /** * VM image ID or host OS image ID. For Cloud, this value is from the provider. - * + * * @example ami-07b06b442921831e5 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_IMAGE_ID = 'host.image.id' as const; /** * Name of the VM image or OS install the host was instantiated from. - * + * * @example infra-ami-eks-worker-node-7d4ec78312 - * * @example CentOS-8-x86_64-1905 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_IMAGE_NAME = 'host.image.name' as const; /** * The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes). - * + * * @example 0.1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_IMAGE_VERSION = 'host.image.version' as const; /** * Available IP addresses of the host, excluding loopback interfaces. - * + * * @example 192.168.1.140 - * * @example fe80::abc2:4a28:737a:609e - * + * * @note IPv4 Addresses **MUST** be specified in dotted-quad notation. IPv6 addresses **MUST** be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_IP = 'host.ip' as const; /** * Available MAC addresses of the host, excluding loopback interfaces. - * + * * @example AC-DE-48-23-45-67 - * * @example AC-DE-48-23-45-67-01-9F - * + * * @note MAC Addresses **MUST** be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_MAC = 'host.mac' as const; /** * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - * + * * @example opentelemetry-test - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_NAME = 'host.name' as const; /** * Type of host. For Cloud, this must be the machine type. - * + * * @example n1-standard-1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HOST_TYPE = 'host.type' as const; /** * Deprecated, use `client.address` instead. - * + * * @example "83.164.160.102" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `client.address`. + * + * @deprecated Replaced by `client.address`. */ export const ATTR_HTTP_CLIENT_IP = 'http.client_ip' as const; /** * State of the HTTP connection in the HTTP connection pool. - * + * * @example active - * * @example idle - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HTTP_CONNECTION_STATE = 'http.connection.state' as const; @@ -3393,10 +3275,10 @@ export const HTTP_CONNECTION_STATE_VALUE_IDLE = "idle" as const; /** * Deprecated, use `network.protocol.name` instead. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.protocol.name`. + * + * @deprecated Replaced by `network.protocol.name`. */ export const ATTR_HTTP_FLAVOR = 'http.flavor' as const; @@ -3432,188 +3314,184 @@ export const HTTP_FLAVOR_VALUE_SPDY = "SPDY" as const; /** * Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage. - * + * * @example www.example.org - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage. + * + * @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage. */ export const ATTR_HTTP_HOST = 'http.host' as const; /** * Deprecated, use `http.request.method` instead. - * + * * @example GET - * * @example POST - * * @example HEAD - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `http.request.method`. + * + * @deprecated Replaced by `http.request.method`. */ export const ATTR_HTTP_METHOD = 'http.method' as const; /** * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - * + * * @example 3495 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HTTP_REQUEST_BODY_SIZE = 'http.request.body.size' as const; /** * The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any. - * + * * @example 1437 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HTTP_REQUEST_SIZE = 'http.request.size' as const; /** * Deprecated, use `http.request.header.content-length` instead. - * + * * @example 3495 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `http.request.header.content-length`. + * + * @deprecated Replaced by `http.request.header.content-length`. */ export const ATTR_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length' as const; /** * Deprecated, use `http.request.body.size` instead. - * + * * @example 5493 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `http.request.body.size`. + * + * @deprecated Replaced by `http.request.body.size`. */ export const ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed' as const; /** * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - * + * * @example 3495 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HTTP_RESPONSE_BODY_SIZE = 'http.response.body.size' as const; /** * The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any. - * + * * @example 1437 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_HTTP_RESPONSE_SIZE = 'http.response.size' as const; /** * Deprecated, use `http.response.header.content-length` instead. - * + * * @example 3495 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `http.response.header.content-length`. + * + * @deprecated Replaced by `http.response.header.content-length`. */ export const ATTR_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length' as const; /** * Deprecated, use `http.response.body.size` instead. - * + * * @example 5493 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replace by `http.response.body.size`. + * + * @deprecated Replace by `http.response.body.size`. */ export const ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed' as const; /** * Deprecated, use `url.scheme` instead. - * + * * @example http - * * @example https - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `url.scheme` instead. + * + * @deprecated Replaced by `url.scheme` instead. */ export const ATTR_HTTP_SCHEME = 'http.scheme' as const; /** * Deprecated, use `server.address` instead. - * + * * @example example.com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `server.address`. + * + * @deprecated Replaced by `server.address`. */ export const ATTR_HTTP_SERVER_NAME = 'http.server_name' as const; /** * Deprecated, use `http.response.status_code` instead. - * + * * @example 200 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `http.response.status_code`. + * + * @deprecated Replaced by `http.response.status_code`. */ export const ATTR_HTTP_STATUS_CODE = 'http.status_code' as const; /** * Deprecated, use `url.path` and `url.query` instead. - * + * * @example /search?q=OpenTelemetry#SemConv - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Split to `url.path` and `url.query. + * + * @deprecated Split to `url.path` and `url.query. */ export const ATTR_HTTP_TARGET = 'http.target' as const; /** * Deprecated, use `url.full` instead. - * + * * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `url.full`. + * + * @deprecated Replaced by `url.full`. */ export const ATTR_HTTP_URL = 'http.url' as const; /** * Deprecated, use `user_agent.original` instead. - * + * * @example CERN-LineMode/2.15 libwww/2.17b3 - * * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `user_agent.original`. + * + * @deprecated Replaced by `user_agent.original`. */ export const ATTR_HTTP_USER_AGENT = 'http.user_agent' as const; /** * Deprecated use the `device.app.lifecycle` event definition including `ios.state` as a payload field instead. - * + * * @note The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Moved to a payload field of `device.app.lifecycle`. + * + * @deprecated Moved to a payload field of `device.app.lifecycle`. */ export const ATTR_IOS_STATE = 'ios.state' as const; @@ -3644,31 +3522,30 @@ export const IOS_STATE_VALUE_TERMINATE = "terminate" as const; /** * Name of the buffer pool. - * + * * @example mapped - * * @example direct - * + * * @note Pool names are generally obtained via [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_JVM_BUFFER_POOL_NAME = 'jvm.buffer.pool.name' as const; /** * The name of the cluster. - * + * * @example opentelemetry-cluster - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_CLUSTER_NAME = 'k8s.cluster.name' as const; /** * A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace. - * + * * @example 218fc5a9-a5f1-4b54-aa05-46717d0ab26d - * + * * @note K8s doesn't have support for obtaining a cluster ID. If this is ever * added, we will recommend collecting the `k8s.cluster.uid` through the * official APIs. In the meantime, we are able to use the `uid` of the @@ -3685,241 +3562,235 @@ export const ATTR_K8S_CLUSTER_NAME = 'k8s.cluster.name' as const; * Which states: * * > If generated according to one of the mechanisms defined in Rec. - * ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be - * different from all other UUIDs generated before 3603 A.D., or is - * extremely likely to be different (depending on the mechanism chosen). + * > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + * > different from all other UUIDs generated before 3603 A.D., or is + * > extremely likely to be different (depending on the mechanism chosen). * * Therefore, UIDs between clusters should be extremely unlikely to * conflict. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_CLUSTER_UID = 'k8s.cluster.uid' as const; /** * The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`). - * + * * @example redis - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_CONTAINER_NAME = 'k8s.container.name' as const; /** * Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_CONTAINER_RESTART_COUNT = 'k8s.container.restart_count' as const; /** * Last terminated reason of the Container. - * + * * @example Evicted - * * @example Error - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON = 'k8s.container.status.last_terminated_reason' as const; /** * The name of the CronJob. - * + * * @example opentelemetry - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_CRONJOB_NAME = 'k8s.cronjob.name' as const; /** * The UID of the CronJob. - * + * * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_CRONJOB_UID = 'k8s.cronjob.uid' as const; /** * The name of the DaemonSet. - * + * * @example opentelemetry - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_DAEMONSET_NAME = 'k8s.daemonset.name' as const; /** * The UID of the DaemonSet. - * + * * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_DAEMONSET_UID = 'k8s.daemonset.uid' as const; /** * The name of the Deployment. - * + * * @example opentelemetry - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name' as const; /** * The UID of the Deployment. - * + * * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid' as const; /** * The name of the Job. - * + * * @example opentelemetry - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_JOB_NAME = 'k8s.job.name' as const; /** * The UID of the Job. - * + * * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_JOB_UID = 'k8s.job.uid' as const; /** * The name of the namespace that the pod is running in. - * + * * @example default - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_NAMESPACE_NAME = 'k8s.namespace.name' as const; /** * The name of the Node. - * + * * @example node-1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_NODE_NAME = 'k8s.node.name' as const; /** * The UID of the Node. - * + * * @example 1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_NODE_UID = 'k8s.node.uid' as const; /** * The annotation key-value pairs placed on the Pod, the `` being the annotation name, the value being the annotation value. - * + * * @example k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets=true - * * @example k8s.pod.annotation.mycompany.io/arch=x64 - * * @example k8s.pod.annotation.data= - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_POD_ANNOTATION = (key: string) => `k8s.pod.annotation.${key}`; /** * The label key-value pairs placed on the Pod, the `` being the label name, the value being the label value. - * + * * @example k8s.pod.label.app=my-app - * * @example k8s.pod.label.mycompany.io/arch=x64 - * * @example k8s.pod.label.data= - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_POD_LABEL = (key: string) => `k8s.pod.label.${key}`; /** * Deprecated, use `k8s.pod.label` instead. - * + * * @example k8s.pod.label.app=my-app - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `k8s.pod.label`. + * + * @deprecated Replaced by `k8s.pod.label`. */ export const ATTR_K8S_POD_LABELS = (key: string) => `k8s.pod.labels.${key}`; /** * The name of the Pod. - * + * * @example opentelemetry-pod-autoconf - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_POD_NAME = 'k8s.pod.name' as const; /** * The UID of the Pod. - * + * * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_POD_UID = 'k8s.pod.uid' as const; /** * The name of the ReplicaSet. - * + * * @example opentelemetry - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_REPLICASET_NAME = 'k8s.replicaset.name' as const; /** * The UID of the ReplicaSet. - * + * * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_REPLICASET_UID = 'k8s.replicaset.uid' as const; /** * The name of the StatefulSet. - * + * * @example opentelemetry - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_STATEFULSET_NAME = 'k8s.statefulset.name' as const; /** * The UID of the StatefulSet. - * + * * @example 275ecb36-5aa8-4c2a-9c47-d8bb681b9aff - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_K8S_STATEFULSET_UID = 'k8s.statefulset.uid' as const; /** * The Linux Slab memory state - * + * * @example reclaimable - * * @example unreclaimable - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LINUX_MEMORY_SLAB_STATE = 'linux.memory.slab.state' as const; @@ -3936,43 +3807,43 @@ export const LINUX_MEMORY_SLAB_STATE_VALUE_UNRECLAIMABLE = "unreclaimable" as co /** * The basename of the file. - * + * * @example audit.log - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LOG_FILE_NAME = 'log.file.name' as const; /** * The basename of the file, with symlinks resolved. - * + * * @example uuid.log - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LOG_FILE_NAME_RESOLVED = 'log.file.name_resolved' as const; /** * The full path to the file. - * + * * @example /var/log/mysql/audit.log - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LOG_FILE_PATH = 'log.file.path' as const; /** * The full path to the file, with symlinks resolved. - * + * * @example /var/lib/docker/uuid.log - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LOG_FILE_PATH_RESOLVED = 'log.file.path_resolved' as const; /** * The stream associated with the log. See below for a list of well-known values. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LOG_IOSTREAM = 'log.iostream' as const; @@ -3989,53 +3860,52 @@ export const LOG_IOSTREAM_VALUE_STDOUT = "stdout" as const; /** * The complete orignal Log Record. - * + * * @example 77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - Something happened - * * @example [INFO] 8/3/24 12:34:56 Something happened - * + * * @note This value **MAY** be added when processing a Log Record which was originally transmitted as a string or equivalent data type AND the Body field of the Log Record does not contain the same value. (e.g. a syslog or a log record read from a file.) - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LOG_RECORD_ORIGINAL = 'log.record.original' as const; /** * A unique identifier for the Log Record. - * + * * @example 01ARZ3NDEKTSV4RRFFQ69G5FAV - * + * * @note If an id is provided, other log records with the same id will be considered duplicates and can be removed safely. This means, that two distinguishable log records **MUST** have different values. * The id **MAY** be an [Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec), but other identifiers (e.g. UUID) may be used as needed. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_LOG_RECORD_UID = 'log.record.uid' as const; /** * Deprecated, use `rpc.message.compressed_size` instead. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `rpc.message.compressed_size`. + * + * @deprecated Replaced by `rpc.message.compressed_size`. */ export const ATTR_MESSAGE_COMPRESSED_SIZE = 'message.compressed_size' as const; /** * Deprecated, use `rpc.message.id` instead. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `rpc.message.id`. + * + * @deprecated Replaced by `rpc.message.id`. */ export const ATTR_MESSAGE_ID = 'message.id' as const; /** * Deprecated, use `rpc.message.type` instead. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `rpc.message.type`. + * + * @deprecated Replaced by `rpc.message.type`. */ export const ATTR_MESSAGE_TYPE = 'message.type' as const; @@ -4051,324 +3921,313 @@ export const MESSAGE_TYPE_VALUE_SENT = "SENT" as const; /** * Deprecated, use `rpc.message.uncompressed_size` instead. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `rpc.message.uncompressed_size`. + * + * @deprecated Replaced by `rpc.message.uncompressed_size`. */ export const ATTR_MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size' as const; /** * The number of messages sent, received, or processed in the scope of the batching operation. - * + * * @example 0 - * * @example 1 - * * @example 2 - * - * @note Instrumentations **SHOULD** **NOT** set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations **SHOULD** use `messaging.batch.message_count` for batching APIs and **SHOULD** **NOT** use it for single-message APIs. - * + * + * @note Instrumentations **SHOULD NOT** set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations **SHOULD** use `messaging.batch.message_count` for batching APIs and **SHOULD NOT** use it for single-message APIs. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_BATCH_MESSAGE_COUNT = 'messaging.batch.message_count' as const; /** * A unique identifier for the client that consumes or produces a message. - * + * * @example client-5 - * * @example myhost@8742@s8083jm - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_CLIENT_ID = 'messaging.client.id' as const; /** * The name of the consumer group with which a consumer is associated. - * + * * @example my-group - * * @example indexer - * + * * @note Semantic conventions for individual messaging systems **SHOULD** document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_CONSUMER_GROUP_NAME = 'messaging.consumer.group.name' as const; /** * A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_DESTINATION_ANONYMOUS = 'messaging.destination.anonymous' as const; /** * The message destination name - * + * * @example MyQueue - * * @example MyTopic - * + * * @note Destination name **SHOULD** uniquely identify a specific queue, topic or other entity within the broker. If * the broker doesn't have such notion, the destination name **SHOULD** uniquely identify the broker. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_DESTINATION_NAME = 'messaging.destination.name' as const; /** * The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. - * + * * @example "1" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_DESTINATION_PARTITION_ID = 'messaging.destination.partition.id' as const; /** * The name of the destination subscription from which a message is consumed. - * + * * @example subscription-a - * + * * @note Semantic conventions for individual messaging systems **SHOULD** document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_DESTINATION_SUBSCRIPTION_NAME = 'messaging.destination.subscription.name' as const; /** * Low cardinality representation of the messaging destination name - * + * * @example /customers/{customerId} - * + * * @note Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_DESTINATION_TEMPLATE = 'messaging.destination.template' as const; /** * A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_DESTINATION_TEMPORARY = 'messaging.destination.temporary' as const; /** * Deprecated, no replacement at this time. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * No replacement at this time. + * + * @deprecated No replacement at this time. */ export const ATTR_MESSAGING_DESTINATION_PUBLISH_ANONYMOUS = 'messaging.destination_publish.anonymous' as const; /** * Deprecated, no replacement at this time. - * + * * @example MyQueue - * * @example MyTopic - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * No replacement at this time. + * + * @deprecated No replacement at this time. */ export const ATTR_MESSAGING_DESTINATION_PUBLISH_NAME = 'messaging.destination_publish.name' as const; /** * Deprecated, use `messaging.consumer.group.name` instead. - * + * * @example "$Default" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.consumer.group.name`. + * + * @deprecated Replaced by `messaging.consumer.group.name`. */ export const ATTR_MESSAGING_EVENTHUBS_CONSUMER_GROUP = 'messaging.eventhubs.consumer.group' as const; /** * The UTC epoch seconds at which the message has been accepted and stored in the entity. - * + * * @example 1701393730 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_EVENTHUBS_MESSAGE_ENQUEUED_TIME = 'messaging.eventhubs.message.enqueued_time' as const; /** * The ack deadline in seconds set for the modify ack deadline request. - * + * * @example 10 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_GCP_PUBSUB_MESSAGE_ACK_DEADLINE = 'messaging.gcp_pubsub.message.ack_deadline' as const; /** * The ack id for a given message. - * + * * @example "ack_id" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_GCP_PUBSUB_MESSAGE_ACK_ID = 'messaging.gcp_pubsub.message.ack_id' as const; /** * The delivery attempt for a given message. - * + * * @example 2 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT = 'messaging.gcp_pubsub.message.delivery_attempt' as const; /** * The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. - * + * * @example "ordering_key" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY = 'messaging.gcp_pubsub.message.ordering_key' as const; /** * Deprecated, use `messaging.consumer.group.name` instead. - * + * * @example "my-group" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.consumer.group.name`. + * + * @deprecated Replaced by `messaging.consumer.group.name`. */ export const ATTR_MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer.group' as const; /** * Deprecated, use `messaging.destination.partition.id` instead. - * + * * @example 2 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.destination.partition.id`. + * + * @deprecated Replaced by `messaging.destination.partition.id`. */ export const ATTR_MESSAGING_KAFKA_DESTINATION_PARTITION = 'messaging.kafka.destination.partition' as const; /** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute **MUST** **NOT** be set. - * + * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute **MUST NOT** be set. + * * @example "myKey" - * + * * @note If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message.key' as const; /** * Deprecated, use `messaging.kafka.offset` instead. - * + * * @example 42 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.kafka.offset`. + * + * @deprecated Replaced by `messaging.kafka.offset`. */ export const ATTR_MESSAGING_KAFKA_MESSAGE_OFFSET = 'messaging.kafka.message.offset' as const; /** * A boolean that is true if the message is a tombstone. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE = 'messaging.kafka.message.tombstone' as const; /** * The offset of a record in the corresponding Kafka partition. - * + * * @example 42 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_KAFKA_OFFSET = 'messaging.kafka.offset' as const; /** * The size of the message body in bytes. - * + * * @example 1439 - * + * * @note This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed * body size should be used. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_MESSAGE_BODY_SIZE = 'messaging.message.body.size' as const; /** * The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - * + * * @example "MyConversationId" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_MESSAGE_CONVERSATION_ID = 'messaging.message.conversation_id' as const; /** * The size of the message body and metadata in bytes. - * + * * @example 2738 - * + * * @note This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed * size should be used. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_MESSAGE_ENVELOPE_SIZE = 'messaging.message.envelope.size' as const; /** * A value used by the messaging system as an identifier for the message, represented as a string. - * + * * @example "452a7c7c7c7048c2f887f61572b18fc2" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_MESSAGE_ID = 'messaging.message.id' as const; /** * Deprecated, use `messaging.operation.type` instead. - * + * * @example publish - * * @example create - * * @example process - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.operation.type`. + * + * @deprecated Replaced by `messaging.operation.type`. */ export const ATTR_MESSAGING_OPERATION = 'messaging.operation' as const; /** * The system-specific name of the messaging operation. - * + * * @example ack - * * @example nack - * * @example send - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_OPERATION_NAME = 'messaging.operation.name' as const; /** * A string identifying the type of the messaging operation. - * + * * @note If a custom value is used, it **MUST** be of low cardinality. - * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_OPERATION_TYPE = 'messaging.operation.type' as const; @@ -4405,36 +4264,36 @@ export const MESSAGING_OPERATION_TYPE_VALUE_SETTLE = "settle" as const; /** * RabbitMQ message routing key. - * + * * @example "myKey" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = 'messaging.rabbitmq.destination.routing_key' as const; /** * RabbitMQ message delivery tag - * + * * @example 123 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG = 'messaging.rabbitmq.message.delivery_tag' as const; /** * Deprecated, use `messaging.consumer.group.name` instead. - * + * * @example "myConsumerGroup" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. + * + * @deprecated Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. */ export const ATTR_MESSAGING_ROCKETMQ_CLIENT_GROUP = 'messaging.rocketmq.client_group' as const; /** * Model of message consumption. This only applies to consumer spans. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = 'messaging.rocketmq.consumption_model' as const; @@ -4451,54 +4310,53 @@ export const MESSAGING_ROCKETMQ_CONSUMPTION_MODEL_VALUE_CLUSTERING = "clustering /** * The delay time level for delay message, which determines the message delay time. - * + * * @example 3 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = 'messaging.rocketmq.message.delay_time_level' as const; /** * The timestamp in milliseconds that the delay message is expected to be delivered to consumer. - * + * * @example 1665987217045 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = 'messaging.rocketmq.message.delivery_timestamp' as const; /** * It is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group. - * + * * @example "myMessageGroup" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_MESSAGE_GROUP = 'messaging.rocketmq.message.group' as const; /** * Key(s) of message, another way to mark message besides message id. - * + * * @example keyA - * * @example keyB - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_MESSAGE_KEYS = 'messaging.rocketmq.message.keys' as const; /** * The secondary classifier of message besides topic. - * + * * @example "tagA" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_MESSAGE_TAG = 'messaging.rocketmq.message.tag' as const; /** * Type of message. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_MESSAGE_TYPE = 'messaging.rocketmq.message.type' as const; @@ -4525,27 +4383,27 @@ export const MESSAGING_ROCKETMQ_MESSAGE_TYPE_VALUE_TRANSACTION = "transaction" a /** * Namespace of RocketMQ resources, resources in different namespaces are individual. - * + * * @example "myNamespace" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_ROCKETMQ_NAMESPACE = 'messaging.rocketmq.namespace' as const; /** * Deprecated, use `messaging.servicebus.destination.subscription_name` instead. - * + * * @example "subscription-a" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.servicebus.destination.subscription_name`. + * + * @deprecated Replaced by `messaging.servicebus.destination.subscription_name`. */ export const ATTR_MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME = 'messaging.servicebus.destination.subscription_name' as const; /** * Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_SERVICEBUS_DISPOSITION_STATUS = 'messaging.servicebus.disposition_status' as const; @@ -4572,27 +4430,27 @@ export const MESSAGING_SERVICEBUS_DISPOSITION_STATUS_VALUE_DEFER = "defer" as co /** * Number of deliveries that have been attempted for this message. - * + * * @example 2 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_SERVICEBUS_MESSAGE_DELIVERY_COUNT = 'messaging.servicebus.message.delivery_count' as const; /** * The UTC epoch seconds at which the message has been accepted and stored in the entity. - * + * * @example 1701393730 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_SERVICEBUS_MESSAGE_ENQUEUED_TIME = 'messaging.servicebus.message.enqueued_time' as const; /** * The messaging system as identified by the client instrumentation. - * + * * @note The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_MESSAGING_SYSTEM = 'messaging.system' as const; @@ -4654,102 +4512,100 @@ export const MESSAGING_SYSTEM_VALUE_SERVICEBUS = "servicebus" as const; /** * Deprecated, use `network.local.address`. - * + * * @example "192.168.0.1" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.local.address`. + * + * @deprecated Replaced by `network.local.address`. */ export const ATTR_NET_HOST_IP = 'net.host.ip' as const; /** * Deprecated, use `server.address`. - * + * * @example example.com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `server.address`. + * + * @deprecated Replaced by `server.address`. */ export const ATTR_NET_HOST_NAME = 'net.host.name' as const; /** * Deprecated, use `server.port`. - * + * * @example 8080 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `server.port`. + * + * @deprecated Replaced by `server.port`. */ export const ATTR_NET_HOST_PORT = 'net.host.port' as const; /** * Deprecated, use `network.peer.address`. - * + * * @example "127.0.0.1" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.peer.address`. + * + * @deprecated Replaced by `network.peer.address`. */ export const ATTR_NET_PEER_IP = 'net.peer.ip' as const; /** * Deprecated, use `server.address` on client spans and `client.address` on server spans. - * + * * @example example.com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `server.address` on client spans and `client.address` on server spans. + * + * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans. */ export const ATTR_NET_PEER_NAME = 'net.peer.name' as const; /** * Deprecated, use `server.port` on client spans and `client.port` on server spans. - * + * * @example 8080 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `server.port` on client spans and `client.port` on server spans. + * + * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans. */ export const ATTR_NET_PEER_PORT = 'net.peer.port' as const; /** * Deprecated, use `network.protocol.name`. - * + * * @example amqp - * * @example http - * * @example mqtt - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.protocol.name`. + * + * @deprecated Replaced by `network.protocol.name`. */ export const ATTR_NET_PROTOCOL_NAME = 'net.protocol.name' as const; /** * Deprecated, use `network.protocol.version`. - * + * * @example "3.1.1" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.protocol.version`. + * + * @deprecated Replaced by `network.protocol.version`. */ export const ATTR_NET_PROTOCOL_VERSION = 'net.protocol.version' as const; /** * Deprecated, use `network.transport` and `network.type`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Split to `network.transport` and `network.type`. + * + * @deprecated Split to `network.transport` and `network.type`. */ export const ATTR_NET_SOCK_FAMILY = 'net.sock.family' as const; @@ -4770,65 +4626,65 @@ export const NET_SOCK_FAMILY_VALUE_UNIX = "unix" as const; /** * Deprecated, use `network.local.address`. - * + * * @example /var/my.sock - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.local.address`. + * + * @deprecated Replaced by `network.local.address`. */ export const ATTR_NET_SOCK_HOST_ADDR = 'net.sock.host.addr' as const; /** * Deprecated, use `network.local.port`. - * + * * @example 8080 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.local.port`. + * + * @deprecated Replaced by `network.local.port`. */ export const ATTR_NET_SOCK_HOST_PORT = 'net.sock.host.port' as const; /** * Deprecated, use `network.peer.address`. - * + * * @example 192.168.0.1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.peer.address`. + * + * @deprecated Replaced by `network.peer.address`. */ export const ATTR_NET_SOCK_PEER_ADDR = 'net.sock.peer.addr' as const; /** * Deprecated, no replacement at this time. - * + * * @example /var/my.sock - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Removed. + * + * @deprecated Removed. */ export const ATTR_NET_SOCK_PEER_NAME = 'net.sock.peer.name' as const; /** * Deprecated, use `network.peer.port`. - * + * * @example 65531 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.peer.port`. + * + * @deprecated Replaced by `network.peer.port`. */ export const ATTR_NET_SOCK_PEER_PORT = 'net.sock.peer.port' as const; /** * Deprecated, use `network.transport`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `network.transport`. + * + * @deprecated Replaced by `network.transport`. */ export const ATTR_NET_TRANSPORT = 'net.transport' as const; @@ -4859,45 +4715,45 @@ export const NET_TRANSPORT_VALUE_PIPE = "pipe" as const; /** * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - * + * * @example "DE" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_NETWORK_CARRIER_ICC = 'network.carrier.icc' as const; /** * The mobile carrier country code. - * + * * @example "310" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_NETWORK_CARRIER_MCC = 'network.carrier.mcc' as const; /** * The mobile carrier network code. - * + * * @example "001" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_NETWORK_CARRIER_MNC = 'network.carrier.mnc' as const; /** * The name of the mobile carrier. - * + * * @example "sprint" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_NETWORK_CARRIER_NAME = 'network.carrier.name' as const; /** * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * + * * @example "LTE" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_NETWORK_CONNECTION_SUBTYPE = 'network.connection.subtype' as const; @@ -5009,9 +4865,9 @@ export const NETWORK_CONNECTION_SUBTYPE_VALUE_UMTS = "umts" as const; /** * The internet connection type. - * + * * @example "wifi" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_NETWORK_CONNECTION_TYPE = 'network.connection.type' as const; @@ -5043,9 +4899,9 @@ export const NETWORK_CONNECTION_TYPE_VALUE_WIRED = "wired" as const; /** * The network IO operation direction. - * + * * @example transmit - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_NETWORK_IO_DIRECTION = 'network.io.direction' as const; @@ -5062,21 +4918,21 @@ export const NETWORK_IO_DIRECTION_VALUE_TRANSMIT = "transmit" as const; /** * The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known. - * + * * @example sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4 - * + * * @note Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). * An example can be found in [Example Image Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_OCI_MANIFEST_DIGEST = 'oci.manifest.digest' as const; /** * Parent-child Reference type - * + * * @note The causal relationship between a child Span and a parent Span. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_OPENTRACING_REF_TYPE = 'opentracing.ref_type' as const; @@ -5093,44 +4949,39 @@ export const OPENTRACING_REF_TYPE_VALUE_FOLLOWS_FROM = "follows_from" as const; /** * Unique identifier for a particular build or compilation of the operating system. - * + * * @example TQ3C.230805.001.B2 - * * @example 20E247 - * * @example 22621 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_OS_BUILD_ID = 'os.build_id' as const; /** * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - * + * * @example Microsoft Windows [Version 10.0.18363.778] - * * @example Ubuntu 18.04.1 LTS - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_OS_DESCRIPTION = 'os.description' as const; /** * Human readable operating system name. - * + * * @example iOS - * * @example Android - * * @example Ubuntu - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_OS_NAME = 'os.name' as const; /** * The operating system type. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_OS_TYPE = 'os.type' as const; @@ -5192,89 +5043,83 @@ export const OS_TYPE_VALUE_Z_OS = "z_os" as const; /** * The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes). - * + * * @example 14.2.1 - * * @example 18.04.1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_OS_VERSION = 'os.version' as const; /** - - * * @example io.opentelemetry.contrib.mongodb - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * use the `otel.scope.name` attribute. + * + * @deprecated use the `otel.scope.name` attribute. */ export const ATTR_OTEL_LIBRARY_NAME = 'otel.library.name' as const; /** - - * * @example 1.0.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * use the `otel.scope.version` attribute. + * + * @deprecated use the `otel.scope.version` attribute. */ export const ATTR_OTEL_LIBRARY_VERSION = 'otel.library.version' as const; /** * The [`service.name`](/docs/resource/README.md#service) of the remote service. **SHOULD** be equal to the actual `service.name` resource attribute of the remote service if any. - * + * * @example "AuthTokenCache" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PEER_SERVICE = 'peer.service' as const; /** * Deprecated, use `db.client.connection.pool.name` instead. - * + * * @example myDataSource - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.pool.name`. + * + * @deprecated Replaced by `db.client.connection.pool.name`. */ export const ATTR_POOL_NAME = 'pool.name' as const; /** * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - * + * * @example cmd/otelcol - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_COMMAND = 'process.command' as const; /** * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - * + * * @example cmd/otecol - * * @example --config=config.yaml - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_COMMAND_ARGS = 'process.command_args' as const; /** * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - * - * @example C:\cmd\otecol --config="my directory\config.yaml" - * + * + * @example C:\\cmd\\otecol --config="my directory\\config.yaml" + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_COMMAND_LINE = 'process.command_line' as const; /** * Specifies whether the context switches for this data point were voluntary or involuntary. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_CONTEXT_SWITCH_TYPE = 'process.context_switch_type' as const; @@ -5291,10 +5136,10 @@ export const PROCESS_CONTEXT_SWITCH_TYPE_VALUE_VOLUNTARY = "voluntary" as const; /** * Deprecated, use `cpu.mode` instead. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `cpu.mode` + * + * @deprecated Replaced by `cpu.mode` */ export const ATTR_PROCESS_CPU_STATE = 'process.cpu.state' as const; @@ -5315,77 +5160,77 @@ export const PROCESS_CPU_STATE_VALUE_WAIT = "wait" as const; /** * The date and time the process was created, in ISO 8601 format. - * + * * @example 2023-11-21T09:25:34.853Z - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_CREATION_TIME = 'process.creation.time' as const; /** * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - * + * * @example otelcol - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_EXECUTABLE_NAME = 'process.executable.name' as const; /** * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - * + * * @example /usr/bin/cmd/otelcol - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_EXECUTABLE_PATH = 'process.executable.path' as const; /** * The exit code of the process. - * + * * @example 127 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_EXIT_CODE = 'process.exit.code' as const; /** * The date and time the process exited, in ISO 8601 format. - * + * * @example 2023-11-21T09:26:12.315Z - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_EXIT_TIME = 'process.exit.time' as const; /** * The PID of the process's group leader. This is also the process group ID (PGID) of the process. - * + * * @example 23 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_GROUP_LEADER_PID = 'process.group_leader.pid' as const; /** * Whether the process is connected to an interactive shell. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_INTERACTIVE = 'process.interactive' as const; /** * The username of the user that owns the process. - * + * * @example root - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_OWNER = 'process.owner' as const; /** * The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_PAGING_FAULT_TYPE = 'process.paging.fault_type' as const; @@ -5402,126 +5247,126 @@ export const PROCESS_PAGING_FAULT_TYPE_VALUE_MINOR = "minor" as const; /** * Parent Process identifier (PPID). - * + * * @example 111 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_PARENT_PID = 'process.parent_pid' as const; /** * Process identifier (PID). - * + * * @example 1234 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_PID = 'process.pid' as const; /** * The real user ID (RUID) of the process. - * + * * @example 1000 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_REAL_USER_ID = 'process.real_user.id' as const; /** * The username of the real user of the process. - * + * * @example operator - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_REAL_USER_NAME = 'process.real_user.name' as const; /** * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - * + * * @example "Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description' as const; /** * The name of the runtime of this process. - * + * * @example OpenJDK Runtime Environment - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_RUNTIME_NAME = 'process.runtime.name' as const; /** * The version of the runtime of this process, as returned by the runtime without modification. - * + * * @example "14.0.2" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_RUNTIME_VERSION = 'process.runtime.version' as const; /** * The saved user ID (SUID) of the process. - * + * * @example 1002 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_SAVED_USER_ID = 'process.saved_user.id' as const; /** * The username of the saved user. - * + * * @example operator - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_SAVED_USER_NAME = 'process.saved_user.name' as const; /** * The PID of the process's session leader. This is also the session ID (SID) of the process. - * + * * @example 14 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_SESSION_LEADER_PID = 'process.session_leader.pid' as const; /** * The effective user ID (EUID) of the process. - * + * * @example 1001 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_USER_ID = 'process.user.id' as const; /** * The username of the effective user of the process. - * + * * @example root - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_USER_NAME = 'process.user.name' as const; /** * Virtual process identifier. - * + * * @example 12 - * + * * @note The process ID within a PID namespace. This is not necessarily unique across all processes on the host but it is unique within the process namespace that the process exists within. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_PROCESS_VPID = 'process.vpid' as const; /** * The [error codes](https://connect.build/docs/protocol/#error-codes) of the Connect request. Error codes are always string values. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_CONNECT_RPC_ERROR_CODE = 'rpc.connect_rpc.error_code' as const; @@ -5608,51 +5453,51 @@ export const RPC_CONNECT_RPC_ERROR_CODE_VALUE_UNKNOWN = "unknown" as const; /** * Connect request metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - * + * * @example rpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"] - * + * * @note Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_CONNECT_RPC_REQUEST_METADATA = (key: string) => `rpc.connect_rpc.request.metadata.${key}`; /** * Connect response metadata, `` being the normalized Connect Metadata key (lowercase), the value being the metadata values. - * + * * @example rpc.response.metadata.my-custom-metadata-attribute=["attribute_value"] - * + * * @note Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_CONNECT_RPC_RESPONSE_METADATA = (key: string) => `rpc.connect_rpc.response.metadata.${key}`; /** * gRPC request metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - * + * * @example rpc.grpc.request.metadata.my-custom-metadata-attribute=["1.2.3.4", "1.2.3.5"] - * + * * @note Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_GRPC_REQUEST_METADATA = (key: string) => `rpc.grpc.request.metadata.${key}`; /** * gRPC response metadata, `` being the normalized gRPC Metadata key (lowercase), the value being the metadata values. - * + * * @example rpc.grpc.response.metadata.my-custom-metadata-attribute=["attribute_value"] - * + * * @note Instrumentations **SHOULD** require an explicit configuration of which metadata values are to be captured. Including all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_GRPC_RESPONSE_METADATA = (key: string) => `rpc.grpc.response.metadata.${key}`; /** * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code' as const; @@ -5744,69 +5589,63 @@ export const RPC_GRPC_STATUS_CODE_VALUE_UNAUTHENTICATED = 16 as const; /** * `error.code` property of response if it is an error response. - * + * * @example -32700 - * * @example 100 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code' as const; /** * `error.message` property of response if it is an error response. - * + * * @example Parse error - * * @example User already exists - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message' as const; /** * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - * + * * @example 10 - * * @example request-7 - * - * @example - * + * @example + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id' as const; /** * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted. - * + * * @example 2.0 - * * @example 1.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version' as const; /** * Compressed size of the message in bytes. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_MESSAGE_COMPRESSED_SIZE = 'rpc.message.compressed_size' as const; /** * **MUST** be calculated as two different counters starting from `1` one for sent messages and one for received message. - * + * * @note This way we guarantee that the values will be consistent between different implementations. - * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_MESSAGE_ID = 'rpc.message.id' as const; /** * Whether this is a received or sent message. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_MESSAGE_TYPE = 'rpc.message.type' as const; @@ -5823,36 +5662,36 @@ export const RPC_MESSAGE_TYPE_VALUE_SENT = "SENT" as const; /** * Uncompressed size of the message in bytes. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_MESSAGE_UNCOMPRESSED_SIZE = 'rpc.message.uncompressed_size' as const; /** * The name of the (logical) method being called, must be equal to the $method part in the span name. - * + * * @example "exampleMethod" - * + * * @note This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_METHOD = 'rpc.method' as const; /** * The full (logical) name of the service being called, including its package name, if applicable. - * + * * @example "myservice.EchoService" - * + * * @note This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_SERVICE = 'rpc.service' as const; /** * A string identifying the remoting system. See below for a list of well-known identifiers. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_RPC_SYSTEM = 'rpc.system' as const; @@ -5884,10 +5723,10 @@ export const RPC_SYSTEM_VALUE_JAVA_RMI = "java_rmi" as const; /** * The string ID of the service instance. - * + * * @example 627cc493-f310-47de-96bd-71410b7dec09 - * - * @note MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words + * + * @note **MUST** be unique for each instance of the same `service.namespace,service.name` pair (in other words * `service.namespace,service.name,service.instance.id` triplet **MUST** be globally unique). The ID helps to * distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled * service). @@ -5895,7 +5734,7 @@ export const RPC_SYSTEM_VALUE_JAVA_RMI = "java_rmi" as const; * Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC * 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of * this value if stability is desirable. In that case, the ID **SHOULD** be used as source of a UUID Version 5 and - * SHOULD use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. + * **SHOULD** use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. * * UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is * needed. Similar to what can be seen in the man page for the @@ -5913,74 +5752,71 @@ export const RPC_SYSTEM_VALUE_JAVA_RMI = "java_rmi" as const; * However, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance * for that telemetry. This is typically the case for scraping receivers, as they know the target address and * port. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SERVICE_INSTANCE_ID = 'service.instance.id' as const; /** * A namespace for `service.name`. - * + * * @example Shop - * + * * @note A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SERVICE_NAMESPACE = 'service.namespace' as const; /** * A unique id to identify a session. - * + * * @example "00112233-4455-6677-8899-aabbccddeeff" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SESSION_ID = 'session.id' as const; /** * The previous `session.id` for this user, when known. - * + * * @example "00112233-4455-6677-8899-aabbccddeeff" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SESSION_PREVIOUS_ID = 'session.previous_id' as const; /** * Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - * + * * @example source.example.com - * * @example 10.1.2.80 - * * @example /tmp/my.sock - * + * * @note When observed from the destination side, and when communicating through an intermediary, `source.address` **SHOULD** represent the source address behind any intermediaries, for example proxies, if it's available. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SOURCE_ADDRESS = 'source.address' as const; /** * Source port number - * + * * @example 3389 - * * @example 2888 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SOURCE_PORT = 'source.port' as const; /** * Deprecated, use `db.client.connection.state` instead. - * + * * @example idle - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.state`. + * + * @deprecated Replaced by `db.client.connection.state`. */ export const ATTR_STATE = 'state' as const; @@ -5996,23 +5832,22 @@ export const STATE_VALUE_USED = "used" as const; /** * The logical CPU number [0..n-1] - * + * * @example 1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_CPU_LOGICAL_NUMBER = 'system.cpu.logical_number' as const; /** * Deprecated, use `cpu.mode` instead. - * + * * @example idle - * * @example interrupt - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `cpu.mode` + * + * @deprecated Replaced by `cpu.mode` */ export const ATTR_SYSTEM_CPU_STATE = 'system.cpu.state' as const; @@ -6053,36 +5888,36 @@ export const SYSTEM_CPU_STATE_VALUE_USER = "user" as const; /** * The device identifier - * + * * @example (identifier) - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_DEVICE = 'system.device' as const; /** * The filesystem mode - * + * * @example rw, ro - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_FILESYSTEM_MODE = 'system.filesystem.mode' as const; /** * The filesystem mount path - * + * * @example /mnt/data - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_FILESYSTEM_MOUNTPOINT = 'system.filesystem.mountpoint' as const; /** * The filesystem state - * + * * @example used - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_FILESYSTEM_STATE = 'system.filesystem.state' as const; @@ -6104,9 +5939,9 @@ export const SYSTEM_FILESYSTEM_STATE_VALUE_USED = "used" as const; /** * The filesystem type - * + * * @example ext4 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_FILESYSTEM_TYPE = 'system.filesystem.type' as const; @@ -6143,11 +5978,10 @@ export const SYSTEM_FILESYSTEM_TYPE_VALUE_REFS = "refs" as const; /** * The memory state - * + * * @example free - * * @example cached - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_MEMORY_STATE = 'system.memory.state' as const; @@ -6178,10 +6012,10 @@ export const SYSTEM_MEMORY_STATE_VALUE_SHARED = "shared" as const; export const SYSTEM_MEMORY_STATE_VALUE_USED = "used" as const; /** - * A stateless protocol **MUST** **NOT** set this attribute - * + * A stateless protocol **MUST NOT** set this attribute + * * @example close_wait - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_NETWORK_STATE = 'system.network.state' as const; @@ -6248,9 +6082,9 @@ export const SYSTEM_NETWORK_STATE_VALUE_TIME_WAIT = "time_wait" as const; /** * The paging access direction - * + * * @example in - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_PAGING_DIRECTION = 'system.paging.direction' as const; @@ -6267,9 +6101,9 @@ export const SYSTEM_PAGING_DIRECTION_VALUE_OUT = "out" as const; /** * The memory paging state - * + * * @example free - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_PAGING_STATE = 'system.paging.state' as const; @@ -6286,9 +6120,9 @@ export const SYSTEM_PAGING_STATE_VALUE_USED = "used" as const; /** * The memory paging type - * + * * @example minor - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_PAGING_TYPE = 'system.paging.type' as const; @@ -6305,9 +6139,9 @@ export const SYSTEM_PAGING_TYPE_VALUE_MINOR = "minor" as const; /** * The process state, e.g., [Linux Process State Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) - * + * * @example running - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_SYSTEM_PROCESS_STATUS = 'system.process.status' as const; @@ -6334,12 +6168,12 @@ export const SYSTEM_PROCESS_STATUS_VALUE_STOPPED = "stopped" as const; /** * Deprecated, use `system.process.status` instead. - * + * * @example running - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `system.process.status`. + * + * @deprecated Replaced by `system.process.status`. */ export const ATTR_SYSTEM_PROCESSES_STATUS = 'system.processes.status' as const; @@ -6365,45 +6199,42 @@ export const SYSTEM_PROCESSES_STATUS_VALUE_STOPPED = "stopped" as const; /** * The name of the auto instrumentation agent or distribution, if used. - * + * * @example parts-unlimited-java - * + * * @note Official auto instrumentation agents and distributions **SHOULD** set the `telemetry.distro.name` attribute to * a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TELEMETRY_DISTRO_NAME = 'telemetry.distro.name' as const; /** * The version string of the auto instrumentation agent or distribution, if used. - * + * * @example 1.2.3 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TELEMETRY_DISTRO_VERSION = 'telemetry.distro.version' as const; /** * The fully qualified human readable name of the [test case](https://en.wikipedia.org/wiki/Test_case). - * + * * @example org.example.TestCase1.test1 - * * @example example/tests/TestCase1.test1 - * * @example ExampleTestCase1_test1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TEST_CASE_NAME = 'test.case.name' as const; /** * The status of the actual test case result from test execution. - * + * * @example pass - * * @example fail - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TEST_CASE_RESULT_STATUS = 'test.case.result.status' as const; @@ -6420,28 +6251,23 @@ export const TEST_CASE_RESULT_STATUS_VALUE_PASS = "pass" as const; /** * The human readable name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). - * + * * @example TestSuite1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TEST_SUITE_NAME = 'test.suite.name' as const; /** * The status of the test suite run. - * + * * @example success - * * @example failure - * * @example skipped - * * @example aborted - * * @example timed_out - * * @example in_progress - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TEST_SUITE_RUN_STATUS = 'test.suite.run.status' as const; @@ -6478,181 +6304,177 @@ export const TEST_SUITE_RUN_STATUS_VALUE_TIMED_OUT = "timed_out" as const; /** * Current "managed" thread ID (as opposed to OS thread ID). - * + * * @example 42 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_THREAD_ID = 'thread.id' as const; /** * Current thread name. - * + * * @example "main" - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_THREAD_NAME = 'thread.name' as const; /** * String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection. - * + * * @example TLS_RSA_WITH_3DES_EDE_CBC_SHA - * * @example TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - * + * * @note The values allowed for `tls.cipher` **MUST** be one of the `Descriptions` of the [registered TLS Cipher Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CIPHER = 'tls.cipher' as const; /** * PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list. - * + * * @example MII... - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_CERTIFICATE = 'tls.client.certificate' as const; /** * Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain. - * + * * @example MII... - * * @example MI... - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_CERTIFICATE_CHAIN = 'tls.client.certificate_chain' as const; /** * Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. - * + * * @example 0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_HASH_MD5 = 'tls.client.hash.md5' as const; /** * Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. - * + * * @example 9E393D93138888D288266C2D915214D1D1CCEB2A - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_HASH_SHA1 = 'tls.client.hash.sha1' as const; /** * Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash. - * + * * @example 0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_HASH_SHA256 = 'tls.client.hash.sha256' as const; /** * Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. - * + * * @example CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_ISSUER = 'tls.client.issuer' as const; /** * A hash that identifies clients based on how they perform an SSL/TLS handshake. - * + * * @example d4e5b18d6b55c71272893221c96ba240 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_JA3 = 'tls.client.ja3' as const; /** * Date/Time indicating when client certificate is no longer considered valid. - * + * * @example 2021-01-01T00:00:00.000Z - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_NOT_AFTER = 'tls.client.not_after' as const; /** * Date/Time indicating when client certificate is first considered valid. - * + * * @example 1970-01-01T00:00:00.000Z - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_NOT_BEFORE = 'tls.client.not_before' as const; /** * Deprecated, use `server.address` instead. - * + * * @example opentelemetry.io - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `server.address. + * + * @deprecated Replaced by `server.address. */ export const ATTR_TLS_CLIENT_SERVER_NAME = 'tls.client.server_name' as const; /** * Distinguished name of subject of the x.509 certificate presented by the client. - * + * * @example CN=myclient, OU=Documentation Team, DC=example, DC=com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_SUBJECT = 'tls.client.subject' as const; /** * Array of ciphers offered by the client during the client hello. - * + * * @example TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - * * @example TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - * * @example ... - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CLIENT_SUPPORTED_CIPHERS = 'tls.client.supported_ciphers' as const; /** * String indicating the curve used for the given cipher, when applicable - * + * * @example secp256r1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_CURVE = 'tls.curve' as const; /** * Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel. - * + * * @example true - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_ESTABLISHED = 'tls.established' as const; /** * String indicating the protocol being tunneled. Per the values in the [IANA registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case. - * + * * @example http/1.1 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_NEXT_PROTOCOL = 'tls.next_protocol' as const; /** * Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_PROTOCOL_NAME = 'tls.protocol.name' as const; @@ -6669,308 +6491,293 @@ export const TLS_PROTOCOL_NAME_VALUE_TLS = "tls" as const; /** * Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) - * + * * @example 1.2 - * * @example 3 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_PROTOCOL_VERSION = 'tls.protocol.version' as const; /** * Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation. - * + * * @example true - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_RESUMED = 'tls.resumed' as const; /** * PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list. - * + * * @example MII... - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_CERTIFICATE = 'tls.server.certificate' as const; /** * Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain. - * + * * @example MII... - * * @example MI... - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_CERTIFICATE_CHAIN = 'tls.server.certificate_chain' as const; /** * Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. - * + * * @example 0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_HASH_MD5 = 'tls.server.hash.md5' as const; /** * Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. - * + * * @example 9E393D93138888D288266C2D915214D1D1CCEB2A - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_HASH_SHA1 = 'tls.server.hash.sha1' as const; /** * Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash. - * + * * @example 0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_HASH_SHA256 = 'tls.server.hash.sha256' as const; /** * Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client. - * + * * @example CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_ISSUER = 'tls.server.issuer' as const; /** * A hash that identifies servers based on how they perform an SSL/TLS handshake. - * + * * @example d4e5b18d6b55c71272893221c96ba240 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_JA3S = 'tls.server.ja3s' as const; /** * Date/Time indicating when server certificate is no longer considered valid. - * + * * @example 2021-01-01T00:00:00.000Z - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_NOT_AFTER = 'tls.server.not_after' as const; /** * Date/Time indicating when server certificate is first considered valid. - * + * * @example 1970-01-01T00:00:00.000Z - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_NOT_BEFORE = 'tls.server.not_before' as const; /** * Distinguished name of subject of the x.509 certificate presented by the server. - * + * * @example CN=myserver, OU=Documentation Team, DC=example, DC=com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_TLS_SERVER_SUBJECT = 'tls.server.subject' as const; /** * Domain extracted from the `url.full`, such as "opentelemetry.io". - * + * * @example www.foo.bar - * * @example opentelemetry.io - * * @example 3.12.167.2 - * * @example [1080:0:0:0:8:800:200C:417A] - * + * * @note In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the domain field. If the URL contains a [literal IPv6 address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by `[` and `]`, the `[` and `]` characters should also be captured in the domain field. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_DOMAIN = 'url.domain' as const; /** * The file extension extracted from the `url.full`, excluding the leading dot. - * + * * @example png - * * @example gz - * + * * @note The file extension is only set if it exists, as not every url has a file extension. When the file name has multiple extensions `example.tar.gz`, only the last one should be captured `gz`, not `tar.gz`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_EXTENSION = 'url.extension' as const; /** * Unmodified original URL as seen in the event source. - * + * * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv - * * @example search?q=OpenTelemetry - * + * * @note In network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. This field is meant to represent the URL as it was observed, complete or not. - * `url.original` might contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case password and username **SHOULD** **NOT** be redacted and attribute's value **SHOULD** remain the same. - * + * `url.original` might contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case password and username **SHOULD NOT** be redacted and attribute's value **SHOULD** remain the same. + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_ORIGINAL = 'url.original' as const; /** * Port extracted from the `url.full` - * + * * @example 443 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_PORT = 'url.port' as const; /** * The highest registered url domain, stripped of the subdomain. - * + * * @example example.com - * * @example foo.co.uk - * + * * @note This value can be determined precisely with the [public suffix list](http://publicsuffix.org). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_REGISTERED_DOMAIN = 'url.registered_domain' as const; /** * The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain. - * + * * @example east - * * @example sub2.sub1 - * + * * @note The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, with no trailing period. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_SUBDOMAIN = 'url.subdomain' as const; /** * The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). - * + * * @example /users/{id} - * * @example /users/:id - * * @example /users?id={id} - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_TEMPLATE = 'url.template' as const; /** * The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is `com`. - * + * * @example com - * * @example co.uk - * + * * @note This value can be determined precisely with the [public suffix list](http://publicsuffix.org). - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_URL_TOP_LEVEL_DOMAIN = 'url.top_level_domain' as const; /** * User email address. - * + * * @example a.einstein@example.com - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_EMAIL = 'user.email' as const; /** * User's full name - * + * * @example Albert Einstein - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_FULL_NAME = 'user.full_name' as const; /** * Unique user hash to correlate information for a user in anonymized form. - * + * * @example 364fc68eaf4c8acec74a4e52d7d1feaa - * + * * @note Useful if `user.id` or `user.name` contain confidential information and cannot be used. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_HASH = 'user.hash' as const; /** * Unique identifier of the user. - * + * * @example S-1-5-21-202424912787-2692429404-2351956786-1000 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_ID = 'user.id' as const; /** * Short name or login/username of the user. - * + * * @example a.einstein - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_NAME = 'user.name' as const; /** * Array of user roles at the time of the event. - * + * * @example admin - * * @example reporting_user - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_ROLES = 'user.roles' as const; /** * Name of the user-agent extracted from original. Usually refers to the browser's name. - * + * * @example Safari - * * @example YourApp - * + * * @note [Example](https://www.whatsmyua.info) of extracting browser's name from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant name **SHOULD** be selected. In such a scenario it should align with `user_agent.version` - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_AGENT_NAME = 'user_agent.name' as const; /** * Version of the user-agent extracted from original. Usually refers to the browser's version - * + * * @example 14.1.2 - * * @example 1.0.0 - * + * * @note [Example](https://www.whatsmyua.info) of extracting browser's version from original string. In the case of using a user-agent for non-browser products, such as microservices with multiple names/versions inside the `user_agent.original`, the most significant version **SHOULD** be selected. In such a scenario it should align with `user_agent.name` - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_USER_AGENT_VERSION = 'user_agent.version' as const; /** * The type of garbage collection. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_V8JS_GC_TYPE = 'v8js.gc.type' as const; @@ -6997,9 +6804,9 @@ export const V8JS_GC_TYPE_VALUE_WEAKCB = "weakcb" as const; /** * The name of the space type of heap memory. - * + * * @note Value can be retrieved from value `space_name` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_V8JS_HEAP_SPACE_NAME = 'v8js.heap.space.name' as const; @@ -7031,48 +6838,42 @@ export const V8JS_HEAP_SPACE_NAME_VALUE_OLD_SPACE = "old_space" as const; /** * The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. - * + * * @example 123 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_VCS_REPOSITORY_CHANGE_ID = 'vcs.repository.change.id' as const; /** * The human readable title of the change (pull request/merge request). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. - * + * * @example Fixes broken thing - * * @example feat: add my new feature - * * @example [chore] update dependency - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_VCS_REPOSITORY_CHANGE_TITLE = 'vcs.repository.change.title' as const; /** * The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. - * + * * @example my-feature-branch - * * @example tag-1-test - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_VCS_REPOSITORY_REF_NAME = 'vcs.repository.ref.name' as const; /** * The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. - * + * * @example 9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc - * * @example main - * * @example 123 - * * @example HEAD - * + * * @note The revision can be a full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), * of the recorded change to a ref within a repository pointing to a * commit [commit](https://git-scm.com/docs/git-commit) object. It does @@ -7082,18 +6883,17 @@ export const ATTR_VCS_REPOSITORY_REF_NAME = 'vcs.repository.ref.name' as const; * it is identical to the `ref.name`, it **SHOULD** still be included. It is * up to the implementer to decide which value to set as the revision * based on the VCS system and situational context. - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_VCS_REPOSITORY_REF_REVISION = 'vcs.repository.ref.revision' as const; /** * The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. - * + * * @example branch - * * @example tag - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_VCS_REPOSITORY_REF_TYPE = 'vcs.repository.ref.type' as const; @@ -7110,38 +6910,37 @@ export const VCS_REPOSITORY_REF_TYPE_VALUE_TAG = "tag" as const; /** * The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. - * + * * @example https://github.com/opentelemetry/open-telemetry-collector-contrib - * * @example https://gitlab.com/my-org/my-project/my-projects-project/repo - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_VCS_REPOSITORY_URL_FULL = 'vcs.repository.url.full' as const; /** * Additional description of the web engine (e.g. detailed version and edition information). - * + * * @example WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_WEBENGINE_DESCRIPTION = 'webengine.description' as const; /** * The name of the web engine. - * + * * @example WildFly - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_WEBENGINE_NAME = 'webengine.name' as const; /** * The version of the web engine. - * + * * @example 21.0.0 - * + * * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const ATTR_WEBENGINE_VERSION = 'webengine.version' as const; diff --git a/semantic-conventions/src/experimental_metrics.ts b/semantic-conventions/src/experimental_metrics.ts index 5cd24283ba5..5fe3da20347 100644 --- a/semantic-conventions/src/experimental_metrics.ts +++ b/semantic-conventions/src/experimental_metrics.ts @@ -20,1112 +20,1088 @@ /** * Total CPU time consumed - * + * * @note Total CPU time consumed by the specific container on all available CPU cores - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_CONTAINER_CPU_TIME = 'container.cpu.time' as const; /** * Disk bytes for the container. - * + * * @note The total number of bytes read/written successfully (aggregated from all disks). - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_CONTAINER_DISK_IO = 'container.disk.io' as const; /** * Memory usage of the container. - * + * * @note Memory usage of the container. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_CONTAINER_MEMORY_USAGE = 'container.memory.usage' as const; /** * Network bytes for the container. - * + * * @note The number of bytes sent/received on all network interfaces by the container. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_CONTAINER_NETWORK_IO = 'container.network.io' as const; /** * The number of connections that are currently in state described by the `state` attribute - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_COUNT = 'db.client.connection.count' as const; /** * The time it took to create a new connection - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_CREATE_TIME = 'db.client.connection.create_time' as const; /** * The maximum number of idle open connections allowed - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_IDLE_MAX = 'db.client.connection.idle.max' as const; /** * The minimum number of idle open connections allowed - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_IDLE_MIN = 'db.client.connection.idle.min' as const; /** * The maximum number of open connections allowed - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_MAX = 'db.client.connection.max' as const; /** * The number of pending requests for an open connection, cumulative for the entire pool - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS = 'db.client.connection.pending_requests' as const; /** * The number of connection timeouts that have occurred trying to obtain a connection from the pool - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_TIMEOUTS = 'db.client.connection.timeouts' as const; /** * The time between borrowing a connection and returning it to the pool - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_USE_TIME = 'db.client.connection.use_time' as const; /** * The time it took to obtain an open connection from the pool - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_CONNECTION_WAIT_TIME = 'db.client.connection.wait_time' as const; /** * Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. + * + * @deprecated Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. */ export const METRIC_DB_CLIENT_CONNECTIONS_CREATE_TIME = 'db.client.connections.create_time' as const; /** * Deprecated, use `db.client.connection.idle.max` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.idle.max`. + * + * @deprecated Replaced by `db.client.connection.idle.max`. */ export const METRIC_DB_CLIENT_CONNECTIONS_IDLE_MAX = 'db.client.connections.idle.max' as const; /** * Deprecated, use `db.client.connection.idle.min` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.idle.min`. + * + * @deprecated Replaced by `db.client.connection.idle.min`. */ export const METRIC_DB_CLIENT_CONNECTIONS_IDLE_MIN = 'db.client.connections.idle.min' as const; /** * Deprecated, use `db.client.connection.max` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.max`. + * + * @deprecated Replaced by `db.client.connection.max`. */ export const METRIC_DB_CLIENT_CONNECTIONS_MAX = 'db.client.connections.max' as const; /** * Deprecated, use `db.client.connection.pending_requests` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.pending_requests`. + * + * @deprecated Replaced by `db.client.connection.pending_requests`. */ export const METRIC_DB_CLIENT_CONNECTIONS_PENDING_REQUESTS = 'db.client.connections.pending_requests' as const; /** * Deprecated, use `db.client.connection.timeouts` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.timeouts`. + * + * @deprecated Replaced by `db.client.connection.timeouts`. */ export const METRIC_DB_CLIENT_CONNECTIONS_TIMEOUTS = 'db.client.connections.timeouts' as const; /** * Deprecated, use `db.client.connection.count` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.count`. + * + * @deprecated Replaced by `db.client.connection.count`. */ export const METRIC_DB_CLIENT_CONNECTIONS_USAGE = 'db.client.connections.usage' as const; /** * Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. + * + * @deprecated Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. */ export const METRIC_DB_CLIENT_CONNECTIONS_USE_TIME = 'db.client.connections.use_time' as const; /** * Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. + * + * @deprecated Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. */ export const METRIC_DB_CLIENT_CONNECTIONS_WAIT_TIME = 'db.client.connections.wait_time' as const; /** * Duration of database client operations. - * + * * @note Batch operations **SHOULD** be recorded as a single operation. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DB_CLIENT_OPERATION_DURATION = 'db.client.operation.duration' as const; /** * Measures the time taken to perform a DNS lookup. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_DNS_LOOKUP_DURATION = 'dns.lookup.duration' as const; /** * Number of invocation cold starts - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_COLDSTARTS = 'faas.coldstarts' as const; /** * Distribution of CPU usage per invocation - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_CPU_USAGE = 'faas.cpu_usage' as const; /** * Number of invocation errors - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_ERRORS = 'faas.errors' as const; /** * Measures the duration of the function's initialization, such as a cold start - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_INIT_DURATION = 'faas.init_duration' as const; /** * Number of successful invocations - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_INVOCATIONS = 'faas.invocations' as const; /** * Measures the duration of the function's logic execution - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_INVOKE_DURATION = 'faas.invoke_duration' as const; /** * Distribution of max memory usage per invocation - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_MEM_USAGE = 'faas.mem_usage' as const; /** * Distribution of net I/O usage per invocation - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_NET_IO = 'faas.net_io' as const; /** * Number of invocation timeouts - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_FAAS_TIMEOUTS = 'faas.timeouts' as const; /** * GenAI operation duration - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GEN_AI_CLIENT_OPERATION_DURATION = 'gen_ai.client.operation.duration' as const; /** * Measures number of input and output tokens used - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GEN_AI_CLIENT_TOKEN_USAGE = 'gen_ai.client.token.usage' as const; /** * Generative AI server request duration such as time-to-last byte or last output token - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GEN_AI_SERVER_REQUEST_DURATION = 'gen_ai.server.request.duration' as const; /** * Time per output token generated after the first token for successful responses - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN = 'gen_ai.server.time_per_output_token' as const; /** * Time to generate first token for successful responses - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GEN_AI_SERVER_TIME_TO_FIRST_TOKEN = 'gen_ai.server.time_to_first_token' as const; /** * Heap size target percentage configured by the user, otherwise 100. - * + * * @note The value range is [0.0,100.0]. Computed from `/gc/gogc:percent`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_CONFIG_GOGC = 'go.config.gogc' as const; /** * Count of live goroutines. - * + * * @note Computed from `/sched/goroutines:goroutines`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_GOROUTINE_COUNT = 'go.goroutine.count' as const; /** * Memory allocated to the heap by the application. - * + * * @note Computed from `/gc/heap/allocs:bytes`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_MEMORY_ALLOCATED = 'go.memory.allocated' as const; /** * Count of allocations to the heap by the application. - * + * * @note Computed from `/gc/heap/allocs:objects`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_MEMORY_ALLOCATIONS = 'go.memory.allocations' as const; /** * Heap size target for the end of the GC cycle. - * + * * @note Computed from `/gc/heap/goal:bytes`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_MEMORY_GC_GOAL = 'go.memory.gc.goal' as const; /** * Go runtime memory limit configured by the user, if a limit exists. - * + * * @note Computed from `/gc/gomemlimit:bytes`. This metric is excluded if the limit obtained from the Go runtime is math.MaxInt64. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_MEMORY_LIMIT = 'go.memory.limit' as const; /** * Memory used by the Go runtime. - * + * * @note Computed from `(/memory/classes/total:bytes - /memory/classes/heap/released:bytes)`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_MEMORY_USED = 'go.memory.used' as const; /** * The number of OS threads that can execute user-level Go code simultaneously. - * + * * @note Computed from `/sched/gomaxprocs:threads`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_PROCESSOR_LIMIT = 'go.processor.limit' as const; /** * The time goroutines have spent in the scheduler in a runnable state before actually running. - * + * * @note Computed from `/sched/latencies:seconds`. Bucket boundaries are provided by the runtime, and are subject to change. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_GO_SCHEDULE_DURATION = 'go.schedule.duration' as const; /** * Number of active HTTP requests. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_CLIENT_ACTIVE_REQUESTS = 'http.client.active_requests' as const; /** * The duration of the successfully established outbound HTTP connections. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_CLIENT_CONNECTION_DURATION = 'http.client.connection.duration' as const; /** * Number of outbound HTTP connections that are currently active or idle on the client. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_CLIENT_OPEN_CONNECTIONS = 'http.client.open_connections' as const; /** * Size of HTTP client request bodies. - * + * * @note The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_CLIENT_REQUEST_BODY_SIZE = 'http.client.request.body.size' as const; /** * Size of HTTP client response bodies. - * + * * @note The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_CLIENT_RESPONSE_BODY_SIZE = 'http.client.response.body.size' as const; /** * Number of active HTTP server requests. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_SERVER_ACTIVE_REQUESTS = 'http.server.active_requests' as const; /** * Size of HTTP server request bodies. - * + * * @note The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_SERVER_REQUEST_BODY_SIZE = 'http.server.request.body.size' as const; /** * Size of HTTP server response bodies. - * + * * @note The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_HTTP_SERVER_RESPONSE_BODY_SIZE = 'http.server.response.body.size' as const; /** * Number of buffers in the pool. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_JVM_BUFFER_COUNT = 'jvm.buffer.count' as const; /** * Measure of total memory capacity of buffers. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_JVM_BUFFER_MEMORY_LIMIT = 'jvm.buffer.memory.limit' as const; /** * Deprecated, use `jvm.buffer.memory.used` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `jvm.buffer.memory.used`. + * + * @deprecated Replaced by `jvm.buffer.memory.used`. */ export const METRIC_JVM_BUFFER_MEMORY_USAGE = 'jvm.buffer.memory.usage' as const; /** * Measure of memory used by buffers. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_JVM_BUFFER_MEMORY_USED = 'jvm.buffer.memory.used' as const; /** * Measure of initial memory requested. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_JVM_MEMORY_INIT = 'jvm.memory.init' as const; /** * Average CPU load of the whole system for the last minute as reported by the JVM. - * + * * @note The value range is [0,n], where n is the number of CPU cores - or a negative number if the value is not available. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()). - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_JVM_SYSTEM_CPU_LOAD_1M = 'jvm.system.cpu.load_1m' as const; /** * Recent CPU utilization for the whole system as reported by the JVM. - * + * * @note The value range is [0.0,1.0]. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()). - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_JVM_SYSTEM_CPU_UTILIZATION = 'jvm.system.cpu.utilization' as const; /** * Number of messages that were delivered to the application. - * + * * @note Records the number of messages pulled from the broker or number of messages dispatched to the application in push-based scenarios. * The metric **SHOULD** be reported once per message delivery. For example, if receiving and processing operations are both instrumented for a single message delivery, this counter is incremented when the message is received and not reported when it is processed. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES = 'messaging.client.consumed.messages' as const; /** * Duration of messaging operation initiated by a producer or consumer client. - * - * @note This metric **SHOULD** **NOT** be used to report processing duration - processing duration is reported in `messaging.process.duration` metric. - * + * + * @note This metric **SHOULD NOT** be used to report processing duration - processing duration is reported in `messaging.process.duration` metric. + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_MESSAGING_CLIENT_OPERATION_DURATION = 'messaging.client.operation.duration' as const; /** * Number of messages producer attempted to publish to the broker. - * - * @note This metric **MUST** **NOT** count messages that were created haven't yet been attempted to be published. - * + * + * @note This metric **MUST NOT** count messages that were created haven't yet been attempted to be published. + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_MESSAGING_CLIENT_PUBLISHED_MESSAGES = 'messaging.client.published.messages' as const; /** * Duration of processing operation. - * + * * @note This metric **MUST** be reported for operations with `messaging.operation.type` that matches `process`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_MESSAGING_PROCESS_DURATION = 'messaging.process.duration' as const; /** * Deprecated. Use `messaging.client.consumed.messages` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.client.consumed.messages`. + * + * @deprecated Replaced by `messaging.client.consumed.messages`. */ export const METRIC_MESSAGING_PROCESS_MESSAGES = 'messaging.process.messages' as const; /** * Deprecated. Use `messaging.client.operation.duration` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.client.operation.duration`. + * + * @deprecated Replaced by `messaging.client.operation.duration`. */ export const METRIC_MESSAGING_PUBLISH_DURATION = 'messaging.publish.duration' as const; /** * Deprecated. Use `messaging.client.produced.messages` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.client.produced.messages`. + * + * @deprecated Replaced by `messaging.client.produced.messages`. */ export const METRIC_MESSAGING_PUBLISH_MESSAGES = 'messaging.publish.messages' as const; /** * Deprecated. Use `messaging.client.operation.duration` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.client.operation.duration`. + * + * @deprecated Replaced by `messaging.client.operation.duration`. */ export const METRIC_MESSAGING_RECEIVE_DURATION = 'messaging.receive.duration' as const; /** * Deprecated. Use `messaging.client.consumed.messages` instead. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. - * - * @deprecated * Replaced by `messaging.client.consumed.messages`. + * + * @deprecated Replaced by `messaging.client.consumed.messages`. */ export const METRIC_MESSAGING_RECEIVE_MESSAGES = 'messaging.receive.messages' as const; /** * Event loop maximum delay. - * + * * @note Value can be retrieved from value `histogram.max` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_DELAY_MAX = 'nodejs.eventloop.delay.max' as const; /** * Event loop mean delay. - * + * * @note Value can be retrieved from value `histogram.mean` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_DELAY_MEAN = 'nodejs.eventloop.delay.mean' as const; /** * Event loop minimum delay. - * + * * @note Value can be retrieved from value `histogram.min` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_DELAY_MIN = 'nodejs.eventloop.delay.min' as const; /** * Event loop 50 percentile delay. - * + * * @note Value can be retrieved from value `histogram.percentile(50)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_DELAY_P50 = 'nodejs.eventloop.delay.p50' as const; /** * Event loop 90 percentile delay. - * + * * @note Value can be retrieved from value `histogram.percentile(90)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_DELAY_P90 = 'nodejs.eventloop.delay.p90' as const; /** * Event loop 99 percentile delay. - * + * * @note Value can be retrieved from value `histogram.percentile(99)` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_DELAY_P99 = 'nodejs.eventloop.delay.p99' as const; /** * Event loop standard deviation delay. - * + * * @note Value can be retrieved from value `histogram.stddev` of [`perf_hooks.monitorEventLoopDelay([options])`](https://nodejs.org/api/perf_hooks.html#perf_hooksmonitoreventloopdelayoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_DELAY_STDDEV = 'nodejs.eventloop.delay.stddev' as const; /** * Event loop utilization. - * + * * @note The value range is [0.0,1.0] and can be retrieved from value [`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_NODEJS_EVENTLOOP_UTILIZATION = 'nodejs.eventloop.utilization' as const; /** * Number of times the process has been context switched. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_CONTEXT_SWITCHES = 'process.context_switches' as const; /** * Total CPU seconds broken down by different states. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_CPU_TIME = 'process.cpu.time' as const; /** * Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_CPU_UTILIZATION = 'process.cpu.utilization' as const; /** * Disk bytes transferred. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_DISK_IO = 'process.disk.io' as const; /** * The amount of physical memory in use. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_MEMORY_USAGE = 'process.memory.usage' as const; /** * The amount of committed virtual memory. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_MEMORY_VIRTUAL = 'process.memory.virtual' as const; /** * Network bytes transferred. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_NETWORK_IO = 'process.network.io' as const; /** * Number of file descriptors in use by the process. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_OPEN_FILE_DESCRIPTOR_COUNT = 'process.open_file_descriptor.count' as const; /** * Number of page faults the process has made. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_PAGING_FAULTS = 'process.paging.faults' as const; /** * Process threads count. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_PROCESS_THREAD_COUNT = 'process.thread.count' as const; /** * Measures the duration of outbound RPC. - * + * * @note While streaming RPCs may record this metric as start-of-batch * to end-of-batch, it's hard to interpret in practice. * * **Streaming**: N/A. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_CLIENT_DURATION = 'rpc.client.duration' as const; /** * Measures the size of RPC request messages (uncompressed). - * + * * @note **Streaming**: Recorded per message in a streaming batch - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_CLIENT_REQUEST_SIZE = 'rpc.client.request.size' as const; /** * Measures the number of messages received per RPC. - * + * * @note Should be 1 for all non-streaming RPCs. * * **Streaming**: This metric is required for server and client streaming RPCs - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_CLIENT_REQUESTS_PER_RPC = 'rpc.client.requests_per_rpc' as const; /** * Measures the size of RPC response messages (uncompressed). - * + * * @note **Streaming**: Recorded per response in a streaming batch - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_CLIENT_RESPONSE_SIZE = 'rpc.client.response.size' as const; /** * Measures the number of messages sent per RPC. - * + * * @note Should be 1 for all non-streaming RPCs. * * **Streaming**: This metric is required for server and client streaming RPCs - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_CLIENT_RESPONSES_PER_RPC = 'rpc.client.responses_per_rpc' as const; /** * Measures the duration of inbound RPC. - * + * * @note While streaming RPCs may record this metric as start-of-batch * to end-of-batch, it's hard to interpret in practice. * * **Streaming**: N/A. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_SERVER_DURATION = 'rpc.server.duration' as const; /** * Measures the size of RPC request messages (uncompressed). - * + * * @note **Streaming**: Recorded per message in a streaming batch - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_SERVER_REQUEST_SIZE = 'rpc.server.request.size' as const; /** * Measures the number of messages received per RPC. - * + * * @note Should be 1 for all non-streaming RPCs. * * **Streaming** : This metric is required for server and client streaming RPCs - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_SERVER_REQUESTS_PER_RPC = 'rpc.server.requests_per_rpc' as const; /** * Measures the size of RPC response messages (uncompressed). - * + * * @note **Streaming**: Recorded per response in a streaming batch - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_SERVER_RESPONSE_SIZE = 'rpc.server.response.size' as const; /** * Measures the number of messages sent per RPC. - * + * * @note Should be 1 for all non-streaming RPCs. * * **Streaming**: This metric is required for server and client streaming RPCs - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_RPC_SERVER_RESPONSES_PER_RPC = 'rpc.server.responses_per_rpc' as const; /** * Reports the current frequency of the CPU in Hz - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_CPU_FREQUENCY = 'system.cpu.frequency' as const; /** * Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_CPU_LOGICAL_COUNT = 'system.cpu.logical.count' as const; /** * Reports the number of actual physical processor cores on the hardware - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_CPU_PHYSICAL_COUNT = 'system.cpu.physical.count' as const; /** * Seconds each logical CPU spent on each mode - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_CPU_TIME = 'system.cpu.time' as const; /** * Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_CPU_UTILIZATION = 'system.cpu.utilization' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_DISK_IO = 'system.disk.io' as const; /** * Time disk spent activated - * + * * @note The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not counted). Measured as: * - * - Linux: Field 13 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats) - * - Windows: The complement of - * ["Disk\% Idle Time"](https://learn.microsoft.com/archive/blogs/askcore/windows-performance-monitor-disk-counters-explained#windows-performance-monitor-disk-counters-explained) - * performance counter: `uptime * (100 - "Disk\% Idle Time") / 100` - * + * - Linux: Field 13 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats) + * - Windows: The complement of + * ["Disk% Idle Time"](https://learn.microsoft.com/archive/blogs/askcore/windows-performance-monitor-disk-counters-explained#windows-performance-monitor-disk-counters-explained) + * performance counter: `uptime * (100 - "Disk\% Idle Time") / 100` + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_DISK_IO_TIME = 'system.disk.io_time' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_DISK_MERGED = 'system.disk.merged' as const; /** * Sum of the time each operation took to complete - * + * * @note Because it is the sum of time each request took, parallel-issued requests each contribute to make the count grow. Measured as: * - * - Linux: Fields 7 & 11 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats) - * - Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter (similar for Writes) - * + * - Linux: Fields 7 & 11 from [procfs-diskstats](https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats) + * - Windows: "Avg. Disk sec/Read" perf counter multiplied by "Disk Reads/sec" perf counter (similar for Writes) + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_DISK_OPERATION_TIME = 'system.disk.operation_time' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_DISK_OPERATIONS = 'system.disk.operations' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_FILESYSTEM_USAGE = 'system.filesystem.usage' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_FILESYSTEM_UTILIZATION = 'system.filesystem.utilization' as const; /** * An estimate of how much memory is available for starting new applications, without causing swapping - * + * * @note This is an alternative to `system.memory.usage` metric with `state=free`. * Linux starting from 3.14 exports "available" memory. It takes "free" memory as a baseline, and then factors in kernel-specific values. * This is supposed to be more accurate than just "free" memory. * For reference, see the calculations [here](https://superuser.com/a/980821). * See also `MemAvailable` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_LINUX_MEMORY_AVAILABLE = 'system.linux.memory.available' as const; /** * Reports the memory used by the Linux kernel for managing caches of frequently used objects. - * + * * @note The sum over the `reclaimable` and `unreclaimable` state values in `linux.memory.slab.usage` **SHOULD** be equal to the total slab memory available on the system. * Note that the total slab memory is not constant and may vary over time. * See also the [Slab allocator](https://blogs.oracle.com/linux/post/understanding-linux-kernel-memory-statistics) and `Slab` in [/proc/meminfo](https://man7.org/linux/man-pages/man5/proc.5.html). - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_LINUX_MEMORY_SLAB_USAGE = 'system.linux.memory.slab.usage' as const; /** * Total memory available in the system. - * + * * @note Its value **SHOULD** equal the sum of `system.memory.state` over all states. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_MEMORY_LIMIT = 'system.memory.limit' as const; /** * Shared memory used (mostly by tmpfs). - * + * * @note Equivalent of `shared` from [`free` command](https://man7.org/linux/man-pages/man1/free.1.html) or * `Shmem` from [`/proc/meminfo`](https://man7.org/linux/man-pages/man5/proc.5.html)" - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_MEMORY_SHARED = 'system.memory.shared' as const; /** * Reports memory in use by state. - * + * * @note The sum over all `system.memory.state` values **SHOULD** equal the total memory * available on the system, that is `system.memory.limit`. - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_MEMORY_USAGE = 'system.memory.usage' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_MEMORY_UTILIZATION = 'system.memory.utilization' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_NETWORK_CONNECTIONS = 'system.network.connections' as const; /** * Count of packets that are dropped or discarded even though there was no error - * + * * @note Measured as: * - * - Linux: the `drop` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)) - * - Windows: [`InDiscards`/`OutDiscards`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) - * from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2) - * + * - Linux: the `drop` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)) + * - Windows: [`InDiscards`/`OutDiscards`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) + * from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2) + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_NETWORK_DROPPED = 'system.network.dropped' as const; /** * Count of network errors detected - * + * * @note Measured as: * - * - Linux: the `errs` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)). - * - Windows: [`InErrors`/`OutErrors`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) - * from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2). - * + * - Linux: the `errs` column in `/proc/dev/net` ([source](https://web.archive.org/web/20180321091318/http://www.onlamp.com/pub/a/linux/2000/11/16/LinuxAdmin.html)). + * - Windows: [`InErrors`/`OutErrors`](https://docs.microsoft.com/windows/win32/api/netioapi/ns-netioapi-mib_if_row2) + * from [`GetIfEntry2`](https://docs.microsoft.com/windows/win32/api/netioapi/nf-netioapi-getifentry2). + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_NETWORK_ERRORS = 'system.network.errors' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_NETWORK_IO = 'system.network.io' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_NETWORK_PACKETS = 'system.network.packets' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_PAGING_FAULTS = 'system.paging.faults' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_PAGING_OPERATIONS = 'system.paging.operations' as const; /** * Unix swap or windows pagefile usage - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_PAGING_USAGE = 'system.paging.usage' as const; /** - - * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_PAGING_UTILIZATION = 'system.paging.utilization' as const; /** * Total number of processes in each state - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_PROCESS_COUNT = 'system.process.count' as const; /** * Total number of processes created over uptime of the host - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_SYSTEM_PROCESS_CREATED = 'system.process.created' as const; /** * Garbage collection duration. - * + * * @note The values can be retrieve from [`perf_hooks.PerformanceObserver(...).observe({ entryTypes: ['gc'] })`](https://nodejs.org/api/perf_hooks.html#performanceobserverobserveoptions) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_V8JS_GC_DURATION = 'v8js.gc.duration' as const; /** * Heap space available size. - * + * * @note Value can be retrieved from value `space_available_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_V8JS_HEAP_SPACE_AVAILABLE_SIZE = 'v8js.heap.space.available_size' as const; /** * Committed size of a heap space. - * + * * @note Value can be retrieved from value `physical_space_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_V8JS_HEAP_SPACE_PHYSICAL_SIZE = 'v8js.heap.space.physical_size' as const; /** * Total heap memory size pre-allocated. - * + * * @note The value can be retrieved from value `space_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_V8JS_MEMORY_HEAP_LIMIT = 'v8js.memory.heap.limit' as const; /** * Heap Memory size allocated. - * + * * @note The value can be retrieved from value `space_used_size` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) - * + * * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. */ export const METRIC_V8JS_MEMORY_HEAP_USED = 'v8js.memory.heap.used' as const; diff --git a/semantic-conventions/src/stable_attributes.ts b/semantic-conventions/src/stable_attributes.ts index e502129e2bb..bf766bfbd56 100644 --- a/semantic-conventions/src/stable_attributes.ts +++ b/semantic-conventions/src/stable_attributes.ts @@ -20,9 +20,8 @@ /** * Rate-limiting result, shows whether the lease was acquired or contains a rejection reason - * + * * @example acquired - * * @example request_canceled */ export const ATTR_ASPNETCORE_RATE_LIMITING_RESULT = 'aspnetcore.rate_limiting.result' as const; @@ -114,37 +113,36 @@ export const TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = "webjs" as const; /** * The name of the telemetry SDK as defined above. - * + * * @example opentelemetry - * + * * @note The OpenTelemetry SDK **MUST** set the `telemetry.sdk.name` attribute to `opentelemetry`. * If another SDK, like a fork or a vendor-provided implementation, is used, this SDK **MUST** set the * `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point * or another suitable identifier depending on the language. - * The identifier `opentelemetry` is reserved and **MUST** **NOT** be used in this case. + * The identifier `opentelemetry` is reserved and **MUST NOT** be used in this case. * All custom identifiers **SHOULD** be stable across different versions of an implementation. */ export const ATTR_TELEMETRY_SDK_NAME = 'telemetry.sdk.name' as const; /** * The version string of the telemetry SDK. - * + * * @example 1.2.3 */ export const ATTR_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version' as const; /** * Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception. - * + * * @example Contoso.MyHandler */ export const ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = 'aspnetcore.diagnostics.handler.type' as const; /** * ASP.NET Core exception middleware handling result - * + * * @example handled - * * @example unhandled */ export const ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = 'aspnetcore.diagnostics.exception.result' as const; @@ -171,34 +169,31 @@ export const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = "unhandle /** * Rate limiting policy name. - * + * * @example fixed - * * @example sliding - * * @example token */ export const ATTR_ASPNETCORE_RATE_LIMITING_POLICY = 'aspnetcore.rate_limiting.policy' as const; /** * Flag indicating if request was handled by the application pipeline. - * + * * @example true */ export const ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = 'aspnetcore.request.is_unhandled' as const; /** * A value that indicates whether the matched route is a fallback route. - * + * * @example true */ export const ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = 'aspnetcore.routing.is_fallback' as const; /** * Match result - success or failure - * + * * @example success - * * @example failure */ export const ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = 'aspnetcore.routing.match_status' as const; @@ -215,37 +210,32 @@ export const ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = "success" as const; /** * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - * + * * @example client.example.com - * * @example 10.1.2.80 - * * @example /tmp/my.sock - * + * * @note When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries, for example proxies, if it's available. */ export const ATTR_CLIENT_ADDRESS = 'client.address' as const; /** * Client port number. - * + * * @example 65123 - * + * * @note When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries, for example proxies, if it's available. */ export const ATTR_CLIENT_PORT = 'client.port' as const; /** * Describes a class of error the operation ended with. - * + * * @example timeout - * * @example java.net.UnknownHostException - * * @example server_certificate_invalid - * * @example 500 - * + * * @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality. * * When `error.type` is set to a type (e.g., an exception type), its @@ -258,13 +248,13 @@ export const ATTR_CLIENT_PORT = 'client.port' as const; * should be prepared for `error.type` to have high cardinality at query time when no * additional filters are applied. * - * If the operation has completed successfully, instrumentations **SHOULD** **NOT** set `error.type`. + * If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`. * * If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), - * it's RECOMMENDED to: + * it's **RECOMMENDED** to: * - * * Use a domain-specific attribute - * * Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. + * - Use a domain-specific attribute + * - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. */ export const ATTR_ERROR_TYPE = 'error.type' as const; @@ -275,7 +265,7 @@ export const ERROR_TYPE_VALUE_OTHER = "_OTHER" as const; /** * **SHOULD** be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * + * * @note An exception is considered to have escaped (or left) the scope of a span, * if that span is ended while the exception is still logically "in flight". * This may be actually "in flight" in some languages (e.g. if the exception @@ -297,36 +287,33 @@ export const ATTR_EXCEPTION_ESCAPED = 'exception.escaped' as const; /** * The exception message. - * + * * @example Division by zero - * * @example Can't convert 'int' object to str implicitly */ export const ATTR_EXCEPTION_MESSAGE = 'exception.message' as const; /** * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - * - * @example "Exception in thread \"main\" java.lang.RuntimeException: Test exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)" + * + * @example "Exception in thread "main" java.lang.RuntimeException: Test exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)" */ export const ATTR_EXCEPTION_STACKTRACE = 'exception.stacktrace' as const; /** * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - * + * * @example java.net.ConnectException - * * @example OSError */ export const ATTR_EXCEPTION_TYPE = 'exception.type' as const; /** * HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. - * + * * @example http.request.header.content-type=["application/json"] - * * @example http.request.header.x-forwarded-for=["1.2.3.4", "1.2.3.5"] - * + * * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. * The `User-Agent` header is already captured in the `user_agent.original` attribute. Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. @@ -335,13 +322,11 @@ export const ATTR_HTTP_REQUEST_HEADER = (key: string) => `http.request.header.${ /** * HTTP request method. - * + * * @example GET - * * @example POST - * * @example HEAD - * + * * @note HTTP request method value **SHOULD** be "known" to the instrumentation. * By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) * and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). @@ -411,31 +396,28 @@ export const HTTP_REQUEST_METHOD_VALUE_TRACE = "TRACE" as const; /** * Original HTTP method sent by the client in the request line. - * + * * @example GeT - * * @example ACL - * * @example foo */ export const ATTR_HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original' as const; /** * The ordinal number of request resending attempt (for any reason, including redirects). - * + * * @example 3 - * + * * @note The resend count **SHOULD** be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). */ export const ATTR_HTTP_REQUEST_RESEND_COUNT = 'http.request.resend_count' as const; /** * HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. - * + * * @example http.response.header.content-type=["application/json"] - * * @example http.response.header.my-custom-header=["abc", "def"] - * + * * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information. * Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. @@ -444,63 +426,57 @@ export const ATTR_HTTP_RESPONSE_HEADER = (key: string) => `http.response.header. /** * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - * + * * @example 200 */ export const ATTR_HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code' as const; /** * The matched route, that is, the path template in the format used by the respective server framework. - * + * * @example /users/:userID? - * * @example {controller}/{action}/{id?} - * - * @note MUST **NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can **NOT** substitute it. - * SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. + * + * @note **MUST NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it. + * **SHOULD** include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. */ export const ATTR_HTTP_ROUTE = 'http.route' as const; /** * Name of the garbage collector action. - * + * * @example end of minor GC - * * @example end of major GC - * + * * @note Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). */ export const ATTR_JVM_GC_ACTION = 'jvm.gc.action' as const; /** * Name of the garbage collector. - * + * * @example G1 Young Generation - * * @example G1 Old Generation - * + * * @note Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). */ export const ATTR_JVM_GC_NAME = 'jvm.gc.name' as const; /** * Name of the memory pool. - * + * * @example G1 Old Gen - * * @example G1 Eden space - * * @example G1 Survivor Space - * + * * @note Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). */ export const ATTR_JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name' as const; /** * The type of memory. - * + * * @example heap - * * @example non_heap */ export const ATTR_JVM_MEMORY_TYPE = 'jvm.memory.type' as const; @@ -522,9 +498,8 @@ export const ATTR_JVM_THREAD_DAEMON = 'jvm.thread.daemon' as const; /** * State of the thread. - * + * * @example runnable - * * @example blocked */ export const ATTR_JVM_THREAD_STATE = 'jvm.thread.state' as const; @@ -561,67 +536,61 @@ export const JVM_THREAD_STATE_VALUE_WAITING = "waiting" as const; /** * Local address of the network connection - IP address or Unix domain socket name. - * + * * @example 10.1.2.80 - * * @example /tmp/my.sock */ export const ATTR_NETWORK_LOCAL_ADDRESS = 'network.local.address' as const; /** * Local port number of the network connection. - * + * * @example 65123 */ export const ATTR_NETWORK_LOCAL_PORT = 'network.local.port' as const; /** * Peer address of the network connection - IP address or Unix domain socket name. - * + * * @example 10.1.2.80 - * * @example /tmp/my.sock */ export const ATTR_NETWORK_PEER_ADDRESS = 'network.peer.address' as const; /** * Peer port number of the network connection. - * + * * @example 65123 */ export const ATTR_NETWORK_PEER_PORT = 'network.peer.port' as const; /** * [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. - * + * * @example amqp - * * @example http - * * @example mqtt - * + * * @note The value **SHOULD** be normalized to lowercase. */ export const ATTR_NETWORK_PROTOCOL_NAME = 'network.protocol.name' as const; /** * The actual version of the protocol used for network communication. - * + * * @example 1.1 - * * @example 2 - * - * @note If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute **SHOULD** be set to the negotiated version. If the actual protocol version is not known, this attribute **SHOULD** **NOT** be set. + * + * @note If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute **SHOULD** be set to the negotiated version. If the actual protocol version is not known, this attribute **SHOULD NOT** be set. */ export const ATTR_NETWORK_PROTOCOL_VERSION = 'network.protocol.version' as const; /** * [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). - * + * * @example tcp - * * @example udp - * + * * @note The value **SHOULD** be normalized to lowercase. * * Consider always setting the transport when setting a port number, since @@ -657,11 +626,10 @@ export const NETWORK_TRANSPORT_VALUE_UNIX = "unix" as const; /** * [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. - * + * * @example ipv4 - * * @example ipv6 - * + * * @note The value **SHOULD** be normalized to lowercase. */ export const ATTR_NETWORK_TYPE = 'network.type' as const; @@ -678,20 +646,20 @@ export const NETWORK_TYPE_VALUE_IPV6 = "ipv6" as const; /** * The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). - * + * * @example io.opentelemetry.contrib.mongodb */ export const ATTR_OTEL_SCOPE_NAME = 'otel.scope.name' as const; /** * The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). - * + * * @example 1.0.0 */ export const ATTR_OTEL_SCOPE_VERSION = 'otel.scope.version' as const; /** - * Name of the code, either "OK" or "ERROR". **MUST** **NOT** be set if the status code is UNSET. + * Name of the code, either "OK" or "ERROR". **MUST NOT** be set if the status code is UNSET. */ export const ATTR_OTEL_STATUS_CODE = 'otel.status_code' as const; @@ -707,60 +675,54 @@ export const OTEL_STATUS_CODE_VALUE_OK = "OK" as const; /** * Description of the Status if it has a value, otherwise not set. - * + * * @example resource not found */ export const ATTR_OTEL_STATUS_DESCRIPTION = 'otel.status_description' as const; /** * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - * + * * @example example.com - * * @example 10.1.2.80 - * * @example /tmp/my.sock - * + * * @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available. */ export const ATTR_SERVER_ADDRESS = 'server.address' as const; /** * Server port number. - * + * * @example 80 - * * @example 8080 - * * @example 443 - * + * * @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available. */ export const ATTR_SERVER_PORT = 'server.port' as const; /** * Logical name of the service. - * + * * @example shoppingcart - * - * @note MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs **MUST** fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value **MUST** be set to `unknown_service`. + * + * @note **MUST** be the same for all instances of horizontally scaled services. If the value was not specified, SDKs **MUST** fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value **MUST** be set to `unknown_service`. */ export const ATTR_SERVICE_NAME = 'service.name' as const; /** * The version string of the service API or implementation. The format is not defined by these conventions. - * + * * @example 2.0.0 - * * @example a01dbef8a */ export const ATTR_SERVICE_VERSION = 'service.version' as const; /** * SignalR HTTP connection closure status. - * + * * @example app_shutdown - * * @example timeout */ export const ATTR_SIGNALR_CONNECTION_STATUS = 'signalr.connection.status' as const; @@ -782,9 +744,8 @@ export const SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = "timeout" as const; /** * [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) - * + * * @example web_sockets - * * @example long_polling */ export const ATTR_SIGNALR_TRANSPORT = 'signalr.transport' as const; @@ -806,60 +767,55 @@ export const SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = "web_sockets" as const; /** * The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component - * + * * @example SemConv */ export const ATTR_URL_FRAGMENT = 'url.fragment' as const; /** * Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) - * + * * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv - * * @example //localhost - * + * * @note For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless. - * `url.full` **MUST** **NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`. + * `url.full` **MUST NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`. * `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed). Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it. */ export const ATTR_URL_FULL = 'url.full' as const; /** * The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component - * + * * @example /search - * + * * @note Sensitive content provided in `url.path` **SHOULD** be scrubbed when instrumentations can identify it. */ export const ATTR_URL_PATH = 'url.path' as const; /** * The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component - * + * * @example q=OpenTelemetry - * + * * @note Sensitive content provided in `url.query` **SHOULD** be scrubbed when instrumentations can identify it. */ export const ATTR_URL_QUERY = 'url.query' as const; /** * The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. - * + * * @example https - * * @example ftp - * * @example telnet */ export const ATTR_URL_SCHEME = 'url.scheme' as const; /** * Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. - * + * * @example CERN-LineMode/2.15 libwww/2.17b3 - * * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1 - * * @example YourApp/1.0.0 grpc-java-okhttp/1.27.2 */ export const ATTR_USER_AGENT_ORIGINAL = 'user_agent.original' as const; diff --git a/semantic-conventions/src/stable_metrics.ts b/semantic-conventions/src/stable_metrics.ts index 0d9983d20b4..a5b98f16bd0 100644 --- a/semantic-conventions/src/stable_metrics.ts +++ b/semantic-conventions/src/stable_metrics.ts @@ -20,46 +20,46 @@ /** * Number of exceptions caught by exception handling middleware. - * + * * @note Meter name: `Microsoft.AspNetCore.Diagnostics`; Added in: ASP.NET Core 8.0 */ export const METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS = 'aspnetcore.diagnostics.exceptions' as const; /** * Number of requests that are currently active on the server that hold a rate limiting lease. - * + * * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 */ export const METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES = 'aspnetcore.rate_limiting.active_request_leases' as const; /** * Number of requests that are currently queued, waiting to acquire a rate limiting lease. - * + * * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 */ export const METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS = 'aspnetcore.rate_limiting.queued_requests' as const; /** * The time the request spent in a queue waiting to acquire a rate limiting lease. - * + * * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 */ export const METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE = 'aspnetcore.rate_limiting.request.time_in_queue' as const; /** * The duration of rate limiting lease held by requests on the server. - * + * * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 */ export const METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION = 'aspnetcore.rate_limiting.request_lease.duration' as const; /** * Number of requests that tried to acquire a rate limiting lease. - * + * * @note Requests could be: * - * * Rejected by global or endpoint rate limiting policies - * * Canceled while waiting for the lease. + * - Rejected by global or endpoint rate limiting policies + * - Canceled while waiting for the lease. * * Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 */ @@ -67,7 +67,7 @@ export const METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS = 'aspnetcore.rate_limitin /** * Number of requests that were attempted to be matched to an endpoint. - * + * * @note Meter name: `Microsoft.AspNetCore.Routing`; Added in: ASP.NET Core 8.0 */ export const METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS = 'aspnetcore.routing.match_attempts' as const; @@ -104,7 +104,7 @@ export const METRIC_JVM_CPU_COUNT = 'jvm.cpu.count' as const; /** * Recent CPU utilization for the process as reported by the JVM. - * + * * @note The value range is [0.0,1.0]. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()). */ export const METRIC_JVM_CPU_RECENT_UTILIZATION = 'jvm.cpu.recent_utilization' as const; @@ -146,42 +146,42 @@ export const METRIC_JVM_THREAD_COUNT = 'jvm.thread.count' as const; /** * Number of connections that are currently active on the server. - * + * * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 */ export const METRIC_KESTREL_ACTIVE_CONNECTIONS = 'kestrel.active_connections' as const; /** * Number of TLS handshakes that are currently in progress on the server. - * + * * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 */ export const METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES = 'kestrel.active_tls_handshakes' as const; /** * The duration of connections on the server. - * + * * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 */ export const METRIC_KESTREL_CONNECTION_DURATION = 'kestrel.connection.duration' as const; /** * Number of connections that are currently queued and are waiting to start. - * + * * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 */ export const METRIC_KESTREL_QUEUED_CONNECTIONS = 'kestrel.queued_connections' as const; /** * Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start. - * + * * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 */ export const METRIC_KESTREL_QUEUED_REQUESTS = 'kestrel.queued_requests' as const; /** * Number of connections rejected by the server. - * + * * @note Connections are rejected when the currently active count exceeds the value configured with `MaxConcurrentConnections`. * Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 */ @@ -189,14 +189,14 @@ export const METRIC_KESTREL_REJECTED_CONNECTIONS = 'kestrel.rejected_connections /** * The duration of TLS handshakes on the server. - * + * * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 */ export const METRIC_KESTREL_TLS_HANDSHAKE_DURATION = 'kestrel.tls_handshake.duration' as const; /** * Number of connections that are currently upgraded (WebSockets). . - * + * * @note The counter only tracks HTTP/1.1 connections. * * Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 @@ -205,14 +205,14 @@ export const METRIC_KESTREL_UPGRADED_CONNECTIONS = 'kestrel.upgraded_connections /** * Number of connections that are currently active on the server. - * + * * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0 */ export const METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = 'signalr.server.active_connections' as const; /** * The duration of connections on the server. - * + * * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0 */ export const METRIC_SIGNALR_SERVER_CONNECTION_DURATION = 'signalr.server.connection.duration' as const; diff --git a/tsconfig.esm.json b/tsconfig.esm.json index 149b8f83947..1a99e986fd2 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -47,9 +47,6 @@ { "path": "experimental/packages/otlp-transformer/tsconfig.esm.json" }, - { - "path": "experimental/packages/propagator-aws-xray-lambda/tsconfig.esm.json" - }, { "path": "experimental/packages/sdk-events/tsconfig.esm.json" }, @@ -86,9 +83,6 @@ { "path": "packages/opentelemetry-sdk-trace-web/tsconfig.esm.json" }, - { - "path": "packages/propagator-aws-xray/tsconfig.esm.json" - }, { "path": "packages/sdk-metrics/tsconfig.esm.json" }, diff --git a/tsconfig.esnext.json b/tsconfig.esnext.json index 5f071fd2246..1ed2cfadb57 100644 --- a/tsconfig.esnext.json +++ b/tsconfig.esnext.json @@ -47,9 +47,6 @@ { "path": "experimental/packages/otlp-transformer/tsconfig.esnext.json" }, - { - "path": "experimental/packages/propagator-aws-xray-lambda/tsconfig.esnext.json" - }, { "path": "experimental/packages/sdk-events/tsconfig.esnext.json" }, @@ -86,9 +83,6 @@ { "path": "packages/opentelemetry-sdk-trace-web/tsconfig.esnext.json" }, - { - "path": "packages/propagator-aws-xray/tsconfig.esnext.json" - }, { "path": "packages/sdk-metrics/tsconfig.esnext.json" }, diff --git a/tsconfig.json b/tsconfig.json index 0069ce530a5..20d0a5a10df 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,7 +27,6 @@ "experimental/packages/otlp-exporter-base", "experimental/packages/otlp-grpc-exporter-base", "experimental/packages/otlp-transformer", - "experimental/packages/propagator-aws-xray-lambda", "experimental/packages/sampler-jaeger-remote", "experimental/packages/sdk-events", "experimental/packages/sdk-logs", @@ -46,7 +45,6 @@ "packages/opentelemetry-sdk-trace-node", "packages/opentelemetry-sdk-trace-web", "packages/opentelemetry-shim-opentracing", - "packages/propagator-aws-xray", "packages/sdk-metrics", "semantic-conventions" ], @@ -130,9 +128,6 @@ { "path": "experimental/packages/otlp-transformer" }, - { - "path": "experimental/packages/propagator-aws-xray-lambda" - }, { "path": "experimental/packages/sampler-jaeger-remote" }, @@ -187,9 +182,6 @@ { "path": "packages/opentelemetry-shim-opentracing" }, - { - "path": "packages/propagator-aws-xray" - }, { "path": "packages/sdk-metrics" },