@salesforce/cli 2.159.0 → 2.159.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/node_modules/@oclif/plugin-plugins/README.md +7 -7
- package/node_modules/@oclif/plugin-plugins/oclif.manifest.json +1 -1
- package/node_modules/@oclif/plugin-plugins/package.json +7 -7
- package/node_modules/@opentelemetry/core/dist/common/attributes.cjs +5 -0
- package/node_modules/@opentelemetry/core/dist/common/attributes.cjs.map +1 -1
- package/node_modules/@opentelemetry/core/dist/common/attributes.mjs +5 -0
- package/node_modules/@opentelemetry/core/dist/common/attributes.mjs.map +1 -1
- package/node_modules/@opentelemetry/core/dist/version.cjs +1 -1
- package/node_modules/@opentelemetry/core/dist/version.cjs.map +1 -1
- package/node_modules/@opentelemetry/core/dist/version.mjs +1 -1
- package/node_modules/@opentelemetry/core/dist/version.mjs.map +1 -1
- package/node_modules/@opentelemetry/core/package.json +2 -2
- package/node_modules/@opentelemetry/resources/README.md +21 -2
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.cjs +9 -47
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.cjs.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.cts +10 -24
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.cts.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.mts +10 -24
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.mts.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.mjs +9 -47
- package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.mjs.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.cjs +70 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.cjs.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.cts +35 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.cts.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.mts +35 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.mts.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.mjs +69 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.mjs.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.cjs +19 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.cjs.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.cts +12 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.cts.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.mts +12 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.mts.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.mjs +19 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.mjs.map +1 -0
- package/node_modules/@opentelemetry/resources/dist/detectors/index.d.cts +3 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/index.d.mts +3 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/index.mjs +3 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.cjs +0 -3
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.cjs.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.cts +0 -3
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.cts.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.mts +0 -3
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.mts.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.mjs +0 -3
- package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.mjs.map +1 -1
- package/node_modules/@opentelemetry/resources/dist/index.cjs +4 -0
- package/node_modules/@opentelemetry/resources/dist/index.d.cts +3 -1
- package/node_modules/@opentelemetry/resources/dist/index.d.mts +3 -1
- package/node_modules/@opentelemetry/resources/dist/index.mjs +3 -1
- package/node_modules/@opentelemetry/resources/package.json +3 -3
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs +1461 -176
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.cts +1363 -171
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.cts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.mts +1363 -171
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.mts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs +1363 -171
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.d.cts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.d.mts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs +382 -95
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.cts +358 -94
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.cts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.mts +358 -94
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.mts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs +358 -94
- package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.cjs +132 -8
- package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.d.cts +5 -5
- package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.d.mts +5 -5
- package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.mjs +5 -5
- package/node_modules/@opentelemetry/semantic-conventions/dist/index.cjs +8 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/index.d.cts +3 -3
- package/node_modules/@opentelemetry/semantic-conventions/dist/index.d.mts +3 -3
- package/node_modules/@opentelemetry/semantic-conventions/dist/index.mjs +3 -3
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs +104 -13
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.cts +99 -14
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.cts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.mts +99 -14
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.mts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs +99 -14
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs +16 -0
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.cts +15 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.cts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.mts +15 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.mts.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs +15 -1
- package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/package.json +2 -2
- package/node_modules/@salesforce/plugin-trust/README.md +14 -30
- package/node_modules/@salesforce/plugin-trust/oclif.manifest.json +1 -1
- package/node_modules/@salesforce/plugin-trust/package.json +4 -4
- package/node_modules/npm/docs/content/commands/npm-ls.md +1 -1
- package/node_modules/npm/docs/content/commands/npm.md +1 -1
- package/node_modules/npm/docs/output/commands/npm-access.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-adduser.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-approve-scripts.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-audit.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-bugs.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-cache.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-ci.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-completion.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-config.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-dedupe.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-deny-scripts.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-deprecate.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-diff.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-dist-tag.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-docs.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-doctor.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-edit.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-exec.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-explain.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-explore.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-find-dupes.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-fund.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-get.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-help-search.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-help.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-init.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-install-ci-test.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-install-scripts.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-install-test.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-install.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-link.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-ll.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-login.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-logout.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-ls.html +3 -3
- package/node_modules/npm/docs/output/commands/npm-org.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-outdated.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-owner.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-pack.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-ping.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-pkg.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-prefix.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-profile.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-prune.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-publish.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-query.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-rebuild.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-repo.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-restart.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-root.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-run.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-sbom.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-search.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-set.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-shrinkwrap.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-stage.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-star.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-stars.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-start.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-stop.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-team.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-test.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-token.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-trust.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-undeprecate.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-uninstall.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-unpublish.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-unstar.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-update.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-version.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-view.html +2 -2
- package/node_modules/npm/docs/output/commands/npm-whoami.html +2 -2
- package/node_modules/npm/docs/output/commands/npm.html +3 -3
- package/node_modules/npm/docs/output/commands/npx.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/folders.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/install.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/npm-global.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/npm-json.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/npmrc.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/package-json.html +2 -2
- package/node_modules/npm/docs/output/configuring-npm/package-lock-json.html +2 -2
- package/node_modules/npm/docs/output/using-npm/config.html +2 -2
- package/node_modules/npm/docs/output/using-npm/dependency-selectors.html +2 -2
- package/node_modules/npm/docs/output/using-npm/developers.html +2 -2
- package/node_modules/npm/docs/output/using-npm/logging.html +2 -2
- package/node_modules/npm/docs/output/using-npm/orgs.html +2 -2
- package/node_modules/npm/docs/output/using-npm/package-spec.html +2 -2
- package/node_modules/npm/docs/output/using-npm/registry.html +2 -2
- package/node_modules/npm/docs/output/using-npm/removal.html +2 -2
- package/node_modules/npm/docs/output/using-npm/scope.html +2 -2
- package/node_modules/npm/docs/output/using-npm/scripts.html +2 -2
- package/node_modules/npm/docs/output/using-npm/workspaces.html +2 -2
- package/node_modules/npm/lib/cli/entry.js +1 -1
- package/node_modules/npm/man/man1/npm-access.1 +1 -1
- package/node_modules/npm/man/man1/npm-adduser.1 +1 -1
- package/node_modules/npm/man/man1/npm-approve-scripts.1 +1 -1
- package/node_modules/npm/man/man1/npm-audit.1 +1 -1
- package/node_modules/npm/man/man1/npm-bugs.1 +1 -1
- package/node_modules/npm/man/man1/npm-cache.1 +1 -1
- package/node_modules/npm/man/man1/npm-ci.1 +1 -1
- package/node_modules/npm/man/man1/npm-completion.1 +1 -1
- package/node_modules/npm/man/man1/npm-config.1 +1 -1
- package/node_modules/npm/man/man1/npm-dedupe.1 +1 -1
- package/node_modules/npm/man/man1/npm-deny-scripts.1 +1 -1
- package/node_modules/npm/man/man1/npm-deprecate.1 +1 -1
- package/node_modules/npm/man/man1/npm-diff.1 +1 -1
- package/node_modules/npm/man/man1/npm-dist-tag.1 +1 -1
- package/node_modules/npm/man/man1/npm-docs.1 +1 -1
- package/node_modules/npm/man/man1/npm-doctor.1 +1 -1
- package/node_modules/npm/man/man1/npm-edit.1 +1 -1
- package/node_modules/npm/man/man1/npm-exec.1 +1 -1
- package/node_modules/npm/man/man1/npm-explain.1 +1 -1
- package/node_modules/npm/man/man1/npm-explore.1 +1 -1
- package/node_modules/npm/man/man1/npm-find-dupes.1 +1 -1
- package/node_modules/npm/man/man1/npm-fund.1 +1 -1
- package/node_modules/npm/man/man1/npm-get.1 +1 -1
- package/node_modules/npm/man/man1/npm-help-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-help.1 +1 -1
- package/node_modules/npm/man/man1/npm-init.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-ci-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-scripts.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install.1 +1 -1
- package/node_modules/npm/man/man1/npm-link.1 +1 -1
- package/node_modules/npm/man/man1/npm-ll.1 +1 -1
- package/node_modules/npm/man/man1/npm-login.1 +1 -1
- package/node_modules/npm/man/man1/npm-logout.1 +1 -1
- package/node_modules/npm/man/man1/npm-ls.1 +2 -2
- package/node_modules/npm/man/man1/npm-org.1 +1 -1
- package/node_modules/npm/man/man1/npm-outdated.1 +1 -1
- package/node_modules/npm/man/man1/npm-owner.1 +1 -1
- package/node_modules/npm/man/man1/npm-pack.1 +1 -1
- package/node_modules/npm/man/man1/npm-ping.1 +1 -1
- package/node_modules/npm/man/man1/npm-pkg.1 +1 -1
- package/node_modules/npm/man/man1/npm-prefix.1 +1 -1
- package/node_modules/npm/man/man1/npm-profile.1 +1 -1
- package/node_modules/npm/man/man1/npm-prune.1 +1 -1
- package/node_modules/npm/man/man1/npm-publish.1 +1 -1
- package/node_modules/npm/man/man1/npm-query.1 +1 -1
- package/node_modules/npm/man/man1/npm-rebuild.1 +1 -1
- package/node_modules/npm/man/man1/npm-repo.1 +1 -1
- package/node_modules/npm/man/man1/npm-restart.1 +1 -1
- package/node_modules/npm/man/man1/npm-root.1 +1 -1
- package/node_modules/npm/man/man1/npm-run.1 +1 -1
- package/node_modules/npm/man/man1/npm-sbom.1 +1 -1
- package/node_modules/npm/man/man1/npm-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-set.1 +1 -1
- package/node_modules/npm/man/man1/npm-shrinkwrap.1 +1 -1
- package/node_modules/npm/man/man1/npm-stage.1 +1 -1
- package/node_modules/npm/man/man1/npm-star.1 +1 -1
- package/node_modules/npm/man/man1/npm-stars.1 +1 -1
- package/node_modules/npm/man/man1/npm-start.1 +1 -1
- package/node_modules/npm/man/man1/npm-stop.1 +1 -1
- package/node_modules/npm/man/man1/npm-team.1 +1 -1
- package/node_modules/npm/man/man1/npm-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-token.1 +1 -1
- package/node_modules/npm/man/man1/npm-trust.1 +1 -1
- package/node_modules/npm/man/man1/npm-undeprecate.1 +1 -1
- package/node_modules/npm/man/man1/npm-uninstall.1 +1 -1
- package/node_modules/npm/man/man1/npm-unpublish.1 +1 -1
- package/node_modules/npm/man/man1/npm-unstar.1 +1 -1
- package/node_modules/npm/man/man1/npm-update.1 +1 -1
- package/node_modules/npm/man/man1/npm-version.1 +1 -1
- package/node_modules/npm/man/man1/npm-view.1 +1 -1
- package/node_modules/npm/man/man1/npm-whoami.1 +1 -1
- package/node_modules/npm/man/man1/npm.1 +2 -2
- package/node_modules/npm/man/man1/npx.1 +1 -1
- package/node_modules/npm/man/man5/folders.5 +1 -1
- package/node_modules/npm/man/man5/install.5 +1 -1
- package/node_modules/npm/man/man5/npm-global.5 +1 -1
- package/node_modules/npm/man/man5/npm-json.5 +1 -1
- package/node_modules/npm/man/man5/npm-shrinkwrap-json.5 +1 -1
- package/node_modules/npm/man/man5/npmrc.5 +1 -1
- package/node_modules/npm/man/man5/package-json.5 +1 -1
- package/node_modules/npm/man/man5/package-lock-json.5 +1 -1
- package/node_modules/npm/man/man7/config.7 +1 -1
- package/node_modules/npm/man/man7/dependency-selectors.7 +1 -1
- package/node_modules/npm/man/man7/developers.7 +1 -1
- package/node_modules/npm/man/man7/logging.7 +1 -1
- package/node_modules/npm/man/man7/orgs.7 +1 -1
- package/node_modules/npm/man/man7/package-spec.7 +1 -1
- package/node_modules/npm/man/man7/registry.7 +1 -1
- package/node_modules/npm/man/man7/removal.7 +1 -1
- package/node_modules/npm/man/man7/scope.7 +1 -1
- package/node_modules/npm/man/man7/scripts.7 +1 -1
- package/node_modules/npm/man/man7/workspaces.7 +1 -1
- package/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js +9 -2
- package/node_modules/npm/node_modules/@npmcli/promise-spawn/package.json +3 -2
- package/node_modules/npm/node_modules/bin-links/lib/get-paths.js +2 -0
- package/node_modules/npm/node_modules/bin-links/package.json +2 -1
- package/node_modules/npm/node_modules/ip-address/dist/common.js +2 -2
- package/node_modules/npm/node_modules/ip-address/dist/ipv4.js +7 -0
- package/node_modules/npm/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/npm/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/npm/node_modules/ip-address/package.json +3 -2
- package/node_modules/npm/node_modules/libnpmexec/README.md +9 -1
- package/node_modules/npm/node_modules/libnpmexec/lib/index.js +6 -2
- package/node_modules/npm/node_modules/libnpmexec/lib/run-script.js +22 -5
- package/node_modules/npm/node_modules/libnpmexec/package.json +1 -1
- package/node_modules/npm/node_modules/pacote/lib/registry.js +71 -2
- package/node_modules/npm/node_modules/pacote/package.json +3 -2
- package/node_modules/npm/node_modules/semver/classes/range.js +2 -2
- package/node_modules/npm/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/npm/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/npm/node_modules/semver/package.json +1 -1
- package/node_modules/npm/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/npm/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/npm/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/npm/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/npm/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/npm/node_modules/undici/lib/dispatcher/dispatcher-base.js +9 -0
- package/node_modules/npm/node_modules/undici/lib/web/eventsource/eventsource-stream.js +91 -10
- package/node_modules/npm/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/npm/node_modules/undici/lib/web/fetch/index.js +7 -9
- package/node_modules/npm/node_modules/undici/lib/web/websocket/receiver.js +14 -0
- package/node_modules/npm/node_modules/undici/package.json +1 -1
- package/node_modules/npm/package.json +5 -5
- package/node_modules/semver/classes/range.js +2 -2
- package/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/MSVSUtil.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/MSVSVersion.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/__init__.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/common.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/input.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/msvs_emulation.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/ninja_syntax.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/simple_copy.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/xcode_emulation.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/xcode_ninja.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/xcodeproj_file.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/__init__.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/make.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/ninja.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/xcode.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__pycache__/__init__.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__pycache__/_structures.cpython-314.pyc +0 -0
- package/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__pycache__/version.cpython-314.pyc +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ResourceDetectionConfig } from "../config.cjs";
|
|
2
|
-
import { DetectedResource
|
|
2
|
+
import { DetectedResource } from "../types.cjs";
|
|
3
|
+
import { ResourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.cjs";
|
|
3
4
|
//#region src/detectors/EnvDetector.d.ts
|
|
4
5
|
/**
|
|
5
|
-
* EnvDetector
|
|
6
|
-
*
|
|
6
|
+
* EnvDetector reads attributes from OTEL_RESOURCE_ATTRIBUTES and
|
|
7
|
+
* OTEL_SERVICE_NAME.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Use {ResourceAttributesEnvDetector} and {ServiceNameEnvDetector}
|
|
7
10
|
*/
|
|
8
|
-
declare class EnvDetector
|
|
9
|
-
private readonly _MAX_LENGTH;
|
|
10
|
-
private readonly _COMMA_SEPARATOR;
|
|
11
|
-
private readonly _LABEL_KEY_VALUE_SPLITTER;
|
|
11
|
+
declare class EnvDetector extends ResourceAttributesEnvDetector {
|
|
12
12
|
/**
|
|
13
13
|
* Returns a {@link Resource} populated with attributes from the
|
|
14
14
|
* OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async
|
|
@@ -17,24 +17,10 @@ declare class EnvDetector implements ResourceDetector {
|
|
|
17
17
|
* @param config The resource detection config
|
|
18
18
|
*/
|
|
19
19
|
detect(_config?: ResourceDetectionConfig): DetectedResource;
|
|
20
|
-
/**
|
|
21
|
-
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
22
|
-
* variable.
|
|
23
|
-
*
|
|
24
|
-
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the
|
|
25
|
-
* format "key1=value1,key2=value2". The ',' and '=' characters in keys
|
|
26
|
-
* and values MUST be percent-encoded. Other characters MAY be percent-encoded.
|
|
27
|
-
*
|
|
28
|
-
* Per the spec, on any error (e.g., decoding failure), the entire environment
|
|
29
|
-
* variable value is discarded.
|
|
30
|
-
*
|
|
31
|
-
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
32
|
-
* of key/value pairs.
|
|
33
|
-
* @returns The parsed resource attributes.
|
|
34
|
-
* @throws Error if parsing fails (caller handles by discarding all attributes)
|
|
35
|
-
*/
|
|
36
|
-
private _parseResourceAttributes;
|
|
37
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use {resourceAttributesEnvDetector} and {serviceNameEnvDetector}
|
|
23
|
+
*/
|
|
38
24
|
declare const envDetector: EnvDetector;
|
|
39
25
|
//#endregion
|
|
40
26
|
export { envDetector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvDetector.d.cts","names":[],"sources":["../../src/detectors/EnvDetector.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvDetector.d.cts","names":[],"sources":["../../src/detectors/EnvDetector.d.ts"],"mappings":";;;;;;;;;;cASc,oBAAoB;;;;;;;;EAQ9B,OAAO,UAAU,0BAA0B;;;;;cAK1B,aAAa"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ResourceDetectionConfig } from "../config.mjs";
|
|
2
|
-
import { DetectedResource
|
|
2
|
+
import { DetectedResource } from "../types.mjs";
|
|
3
|
+
import { ResourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.mjs";
|
|
3
4
|
//#region src/detectors/EnvDetector.d.ts
|
|
4
5
|
/**
|
|
5
|
-
* EnvDetector
|
|
6
|
-
*
|
|
6
|
+
* EnvDetector reads attributes from OTEL_RESOURCE_ATTRIBUTES and
|
|
7
|
+
* OTEL_SERVICE_NAME.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Use {ResourceAttributesEnvDetector} and {ServiceNameEnvDetector}
|
|
7
10
|
*/
|
|
8
|
-
declare class EnvDetector
|
|
9
|
-
private readonly _MAX_LENGTH;
|
|
10
|
-
private readonly _COMMA_SEPARATOR;
|
|
11
|
-
private readonly _LABEL_KEY_VALUE_SPLITTER;
|
|
11
|
+
declare class EnvDetector extends ResourceAttributesEnvDetector {
|
|
12
12
|
/**
|
|
13
13
|
* Returns a {@link Resource} populated with attributes from the
|
|
14
14
|
* OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async
|
|
@@ -17,24 +17,10 @@ declare class EnvDetector implements ResourceDetector {
|
|
|
17
17
|
* @param config The resource detection config
|
|
18
18
|
*/
|
|
19
19
|
detect(_config?: ResourceDetectionConfig): DetectedResource;
|
|
20
|
-
/**
|
|
21
|
-
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
22
|
-
* variable.
|
|
23
|
-
*
|
|
24
|
-
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the
|
|
25
|
-
* format "key1=value1,key2=value2". The ',' and '=' characters in keys
|
|
26
|
-
* and values MUST be percent-encoded. Other characters MAY be percent-encoded.
|
|
27
|
-
*
|
|
28
|
-
* Per the spec, on any error (e.g., decoding failure), the entire environment
|
|
29
|
-
* variable value is discarded.
|
|
30
|
-
*
|
|
31
|
-
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
32
|
-
* of key/value pairs.
|
|
33
|
-
* @returns The parsed resource attributes.
|
|
34
|
-
* @throws Error if parsing fails (caller handles by discarding all attributes)
|
|
35
|
-
*/
|
|
36
|
-
private _parseResourceAttributes;
|
|
37
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use {resourceAttributesEnvDetector} and {serviceNameEnvDetector}
|
|
23
|
+
*/
|
|
38
24
|
declare const envDetector: EnvDetector;
|
|
39
25
|
//#endregion
|
|
40
26
|
export { envDetector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvDetector.d.mts","names":[],"sources":["../../src/detectors/EnvDetector.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvDetector.d.mts","names":[],"sources":["../../src/detectors/EnvDetector.d.ts"],"mappings":";;;;;;;;;;cASc,oBAAoB;;;;;;;;EAQ9B,OAAO,UAAU,0BAA0B;;;;;cAK1B,aAAa"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { ResourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.mjs";
|
|
1
2
|
import { diag } from "@opentelemetry/api";
|
|
2
3
|
import { getStringFromEnv } from "@opentelemetry/core";
|
|
3
4
|
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
|
4
5
|
//#region src/detectors/EnvDetector.ts
|
|
5
6
|
/**
|
|
6
|
-
* EnvDetector
|
|
7
|
-
*
|
|
7
|
+
* EnvDetector reads attributes from OTEL_RESOURCE_ATTRIBUTES and
|
|
8
|
+
* OTEL_SERVICE_NAME.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Use {ResourceAttributesEnvDetector} and {ServiceNameEnvDetector}
|
|
8
11
|
*/
|
|
9
|
-
var EnvDetector = class {
|
|
10
|
-
_MAX_LENGTH = 255;
|
|
11
|
-
_COMMA_SEPARATOR = ",";
|
|
12
|
-
_LABEL_KEY_VALUE_SPLITTER = "=";
|
|
12
|
+
var EnvDetector = class extends ResourceAttributesEnvDetector {
|
|
13
13
|
/**
|
|
14
14
|
* Returns a {@link Resource} populated with attributes from the
|
|
15
15
|
* OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async
|
|
@@ -30,48 +30,10 @@ var EnvDetector = class {
|
|
|
30
30
|
if (serviceName) attributes[ATTR_SERVICE_NAME] = serviceName;
|
|
31
31
|
return { attributes };
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
35
|
-
* variable.
|
|
36
|
-
*
|
|
37
|
-
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the
|
|
38
|
-
* format "key1=value1,key2=value2". The ',' and '=' characters in keys
|
|
39
|
-
* and values MUST be percent-encoded. Other characters MAY be percent-encoded.
|
|
40
|
-
*
|
|
41
|
-
* Per the spec, on any error (e.g., decoding failure), the entire environment
|
|
42
|
-
* variable value is discarded.
|
|
43
|
-
*
|
|
44
|
-
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
45
|
-
* of key/value pairs.
|
|
46
|
-
* @returns The parsed resource attributes.
|
|
47
|
-
* @throws Error if parsing fails (caller handles by discarding all attributes)
|
|
48
|
-
*/
|
|
49
|
-
_parseResourceAttributes(rawEnvAttributes) {
|
|
50
|
-
if (!rawEnvAttributes) return {};
|
|
51
|
-
const attributes = {};
|
|
52
|
-
const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR).filter((attr) => attr.trim() !== "");
|
|
53
|
-
for (const rawAttribute of rawAttributes) {
|
|
54
|
-
const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER);
|
|
55
|
-
if (keyValuePair.length !== 2) throw new Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${rawAttribute}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);
|
|
56
|
-
const [rawKey, rawValue] = keyValuePair;
|
|
57
|
-
const key = rawKey.trim();
|
|
58
|
-
const value = rawValue.trim();
|
|
59
|
-
if (key.length === 0) throw new Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${rawAttribute}".`);
|
|
60
|
-
let decodedKey;
|
|
61
|
-
let decodedValue;
|
|
62
|
-
try {
|
|
63
|
-
decodedKey = decodeURIComponent(key);
|
|
64
|
-
decodedValue = decodeURIComponent(value);
|
|
65
|
-
} catch (e) {
|
|
66
|
-
throw new Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${rawAttribute}": ${e instanceof Error ? e.message : e}`, { cause: e });
|
|
67
|
-
}
|
|
68
|
-
if (decodedKey.length > this._MAX_LENGTH) throw new Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${decodedKey}".`);
|
|
69
|
-
if (decodedValue.length > this._MAX_LENGTH) throw new Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${decodedKey}".`);
|
|
70
|
-
attributes[decodedKey] = decodedValue;
|
|
71
|
-
}
|
|
72
|
-
return attributes;
|
|
73
|
-
}
|
|
74
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use {resourceAttributesEnvDetector} and {serviceNameEnvDetector}
|
|
36
|
+
*/
|
|
75
37
|
const envDetector = new EnvDetector();
|
|
76
38
|
//#endregion
|
|
77
39
|
export { envDetector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvDetector.mjs","names":[],"sources":["../../src/detectors/EnvDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';\nimport type { ResourceDetectionConfig } from '../config';\nimport type { DetectedResource
|
|
1
|
+
{"version":3,"file":"EnvDetector.mjs","names":[],"sources":["../../src/detectors/EnvDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';\nimport type { ResourceDetectionConfig } from '../config';\nimport type { DetectedResource } from '../types';\nimport { getStringFromEnv } from '@opentelemetry/core';\nimport { ResourceAttributesEnvDetector } from './ResourceAttributesEnvDetector';\n\n/**\n * EnvDetector reads attributes from OTEL_RESOURCE_ATTRIBUTES and\n * OTEL_SERVICE_NAME.\n *\n * @deprecated Use {ResourceAttributesEnvDetector} and {ServiceNameEnvDetector}\n */\nclass EnvDetector extends ResourceAttributesEnvDetector {\n /**\n * Returns a {@link Resource} populated with attributes from the\n * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async\n * function to conform to the Detector interface.\n *\n * @param config The resource detection config\n */\n override detect(_config?: ResourceDetectionConfig): DetectedResource {\n const attributes: Attributes = {};\n\n const rawAttributes = getStringFromEnv('OTEL_RESOURCE_ATTRIBUTES');\n const serviceName = getStringFromEnv('OTEL_SERVICE_NAME');\n\n if (rawAttributes) {\n try {\n const parsedAttributes = this._parseResourceAttributes(rawAttributes);\n Object.assign(attributes, parsedAttributes);\n } catch (e) {\n diag.debug(`EnvDetector failed: ${e instanceof Error ? e.message : e}`);\n }\n }\n\n if (serviceName) {\n attributes[ATTR_SERVICE_NAME] = serviceName;\n }\n\n return { attributes };\n }\n}\n\n/**\n * @deprecated Use {resourceAttributesEnvDetector} and {serviceNameEnvDetector}\n */\nexport const envDetector = new EnvDetector();\n"],"mappings":";;;;;;;;;;;AAmBA,IAAM,cAAN,cAA0B,8BAA8B;;;;;;;;CAQtD,OAAgB,SAAqD;EACnE,MAAM,aAAyB,CAAC;EAEhC,MAAM,gBAAgB,iBAAiB,0BAA0B;EACjE,MAAM,cAAc,iBAAiB,mBAAmB;EAExD,IAAI,eACF,IAAI;GACF,MAAM,mBAAmB,KAAK,yBAAyB,aAAa;GACpE,OAAO,OAAO,YAAY,gBAAgB;EAC5C,SAAS,GAAG;GACV,KAAK,MAAM,uBAAuB,aAAa,QAAQ,EAAE,UAAU,GAAG;EACxE;EAGF,IAAI,aACF,WAAW,qBAAqB;EAGlC,OAAO,EAAE,WAAW;CACtB;AACF;;;;AAKA,MAAa,cAAc,IAAI,YAAY"}
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.cjs
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
let _opentelemetry_api = require("@opentelemetry/api");
|
|
2
|
+
let _opentelemetry_core = require("@opentelemetry/core");
|
|
3
|
+
//#region src/detectors/ResourceAttributesEnvDetector.ts
|
|
4
|
+
/**
|
|
5
|
+
* A detector that reads attributes from the OTEL_RESOURCE_ATTRIBUTES
|
|
6
|
+
* environment variable.
|
|
7
|
+
*/
|
|
8
|
+
var ResourceAttributesEnvDetector = class {
|
|
9
|
+
_MAX_LENGTH = 255;
|
|
10
|
+
_COMMA_SEPARATOR = ",";
|
|
11
|
+
_LABEL_KEY_VALUE_SPLITTER = "=";
|
|
12
|
+
detect(_config) {
|
|
13
|
+
const attributes = {};
|
|
14
|
+
const rawAttributes = (0, _opentelemetry_core.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES");
|
|
15
|
+
if (rawAttributes) try {
|
|
16
|
+
const parsedAttributes = this._parseResourceAttributes(rawAttributes);
|
|
17
|
+
Object.assign(attributes, parsedAttributes);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
_opentelemetry_api.diag.debug(`ResourceAttributesEnvDetector failed: ${e instanceof Error ? e.message : e}`);
|
|
20
|
+
}
|
|
21
|
+
return { attributes };
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
25
|
+
* variable.
|
|
26
|
+
*
|
|
27
|
+
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the
|
|
28
|
+
* format "key1=value1,key2=value2". The ',' and '=' characters in keys
|
|
29
|
+
* and values MUST be percent-encoded. Other characters MAY be percent-encoded.
|
|
30
|
+
*
|
|
31
|
+
* Per the spec, on any error (e.g., decoding failure), the entire environment
|
|
32
|
+
* variable value is discarded.
|
|
33
|
+
*
|
|
34
|
+
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
35
|
+
* of key/value pairs.
|
|
36
|
+
* @returns The parsed resource attributes.
|
|
37
|
+
* @throws Error if parsing fails (caller handles by discarding all attributes)
|
|
38
|
+
*/
|
|
39
|
+
_parseResourceAttributes(rawEnvAttributes) {
|
|
40
|
+
if (!rawEnvAttributes) return {};
|
|
41
|
+
const attributes = {};
|
|
42
|
+
const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR).filter((attr) => attr.trim() !== "");
|
|
43
|
+
for (const rawAttribute of rawAttributes) {
|
|
44
|
+
const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER);
|
|
45
|
+
if (keyValuePair.length !== 2) throw new Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${rawAttribute}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);
|
|
46
|
+
const [rawKey, rawValue] = keyValuePair;
|
|
47
|
+
const key = rawKey.trim();
|
|
48
|
+
const value = rawValue.trim();
|
|
49
|
+
if (key.length === 0) throw new Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${rawAttribute}".`);
|
|
50
|
+
let decodedKey;
|
|
51
|
+
let decodedValue;
|
|
52
|
+
try {
|
|
53
|
+
decodedKey = decodeURIComponent(key);
|
|
54
|
+
decodedValue = decodeURIComponent(value);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
throw new Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${rawAttribute}": ${e instanceof Error ? e.message : e}`, { cause: e });
|
|
57
|
+
}
|
|
58
|
+
if (decodedKey.length > this._MAX_LENGTH) throw new Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${decodedKey}".`);
|
|
59
|
+
if (decodedValue.length > this._MAX_LENGTH) throw new Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${decodedKey}".`);
|
|
60
|
+
attributes[decodedKey] = decodedValue;
|
|
61
|
+
}
|
|
62
|
+
return attributes;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const resourceAttributesEnvDetector = new ResourceAttributesEnvDetector();
|
|
66
|
+
//#endregion
|
|
67
|
+
exports.ResourceAttributesEnvDetector = ResourceAttributesEnvDetector;
|
|
68
|
+
exports.resourceAttributesEnvDetector = resourceAttributesEnvDetector;
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=ResourceAttributesEnvDetector.cjs.map
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceAttributesEnvDetector.cjs","names":["getStringFromEnv"],"sources":["../../src/detectors/ResourceAttributesEnvDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type { ResourceDetectionConfig } from '../config';\nimport type { DetectedResource, ResourceDetector } from '../types';\nimport { getStringFromEnv } from '@opentelemetry/core';\n\n/**\n * A detector that reads attributes from the OTEL_RESOURCE_ATTRIBUTES\n * environment variable.\n */\nexport class ResourceAttributesEnvDetector implements ResourceDetector {\n // Type, attribute keys, and attribute values should not exceed 256 characters.\n private readonly _MAX_LENGTH = 255;\n\n // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes.\n private readonly _COMMA_SEPARATOR = ',';\n\n // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='.\n private readonly _LABEL_KEY_VALUE_SPLITTER = '=';\n\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n const attributes: Attributes = {};\n\n const rawAttributes = getStringFromEnv('OTEL_RESOURCE_ATTRIBUTES');\n if (rawAttributes) {\n try {\n const parsedAttributes = this._parseResourceAttributes(rawAttributes);\n Object.assign(attributes, parsedAttributes);\n } catch (e) {\n diag.debug(\n `ResourceAttributesEnvDetector failed: ${e instanceof Error ? e.message : e}`\n );\n }\n }\n\n return { attributes };\n }\n\n /**\n * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment\n * variable.\n *\n * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the\n * format \"key1=value1,key2=value2\". The ',' and '=' characters in keys\n * and values MUST be percent-encoded. Other characters MAY be percent-encoded.\n *\n * Per the spec, on any error (e.g., decoding failure), the entire environment\n * variable value is discarded.\n *\n * @param rawEnvAttributes The resource attributes as a comma-separated list\n * of key/value pairs.\n * @returns The parsed resource attributes.\n * @throws Error if parsing fails (caller handles by discarding all attributes)\n */\n protected _parseResourceAttributes(rawEnvAttributes?: string): Attributes {\n if (!rawEnvAttributes) return {};\n\n const attributes: Attributes = {};\n const rawAttributes: string[] = rawEnvAttributes\n .split(this._COMMA_SEPARATOR)\n .filter(attr => attr.trim() !== ''); // Filter out empty entries\n\n for (const rawAttribute of rawAttributes) {\n const keyValuePair: string[] = rawAttribute.split(\n this._LABEL_KEY_VALUE_SPLITTER\n );\n\n // Per spec: ',' and '=' MUST be percent-encoded in keys and values.\n // If we get != 2 parts, there's an unencoded '=' which is an error.\n if (keyValuePair.length !== 2) {\n throw new Error(\n `Invalid format for OTEL_RESOURCE_ATTRIBUTES: \"${rawAttribute}\". ` +\n \"Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.\"\n );\n }\n\n const [rawKey, rawValue] = keyValuePair;\n const key = rawKey.trim();\n const value = rawValue.trim();\n\n if (key.length === 0) {\n throw new Error(\n `Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in \"${rawAttribute}\".`\n );\n }\n\n let decodedKey: string;\n let decodedValue: string;\n try {\n decodedKey = decodeURIComponent(key);\n decodedValue = decodeURIComponent(value);\n } catch (e) {\n throw new Error(\n `Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry \"${rawAttribute}\": ${e instanceof Error ? e.message : e}`,\n { cause: e }\n );\n }\n\n if (decodedKey.length > this._MAX_LENGTH) {\n throw new Error(\n `Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: \"${decodedKey}\".`\n );\n }\n\n if (decodedValue.length > this._MAX_LENGTH) {\n throw new Error(\n `Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key \"${decodedKey}\".`\n );\n }\n\n attributes[decodedKey] = decodedValue;\n }\n\n return attributes;\n }\n}\n\nexport const resourceAttributesEnvDetector =\n new ResourceAttributesEnvDetector();\n"],"mappings":";;;;;;;AAeA,IAAa,gCAAb,MAAuE;CAErE,cAA+B;CAG/B,mBAAoC;CAGpC,4BAA6C;CAE7C,OAAO,SAAqD;EAC1D,MAAM,aAAyB,CAAC;EAEhC,MAAM,iBAAA,GAAgBA,oBAAAA,iBAAAA,CAAiB,0BAA0B;EACjE,IAAI,eACF,IAAI;GACF,MAAM,mBAAmB,KAAK,yBAAyB,aAAa;GACpE,OAAO,OAAO,YAAY,gBAAgB;EAC5C,SAAS,GAAG;GACV,mBAAA,KAAK,MACH,yCAAyC,aAAa,QAAQ,EAAE,UAAU,GAC5E;EACF;EAGF,OAAO,EAAE,WAAW;CACtB;;;;;;;;;;;;;;;;;CAkBA,yBAAmC,kBAAuC;EACxE,IAAI,CAAC,kBAAkB,OAAO,CAAC;EAE/B,MAAM,aAAyB,CAAC;EAChC,MAAM,gBAA0B,iBAC7B,MAAM,KAAK,gBAAgB,CAAC,CAC5B,QAAO,SAAQ,KAAK,KAAK,MAAM,EAAE;EAEpC,KAAK,MAAM,gBAAgB,eAAe;GACxC,MAAM,eAAyB,aAAa,MAC1C,KAAK,yBACP;GAIA,IAAI,aAAa,WAAW,GAC1B,MAAM,IAAI,MACR,iDAAiD,aAAa,sGAEhE;GAGF,MAAM,CAAC,QAAQ,YAAY;GAC3B,MAAM,MAAM,OAAO,KAAK;GACxB,MAAM,QAAQ,SAAS,KAAK;GAE5B,IAAI,IAAI,WAAW,GACjB,MAAM,IAAI,MACR,6DAA6D,aAAa,GAC5E;GAGF,IAAI;GACJ,IAAI;GACJ,IAAI;IACF,aAAa,mBAAmB,GAAG;IACnC,eAAe,mBAAmB,KAAK;GACzC,SAAS,GAAG;IACV,MAAM,IAAI,MACR,4DAA4D,aAAa,KAAK,aAAa,QAAQ,EAAE,UAAU,KAC/G,EAAE,OAAO,EAAE,CACb;GACF;GAEA,IAAI,WAAW,SAAS,KAAK,aAC3B,MAAM,IAAI,MACR,+CAA+C,KAAK,YAAY,gBAAgB,WAAW,GAC7F;GAGF,IAAI,aAAa,SAAS,KAAK,aAC7B,MAAM,IAAI,MACR,iDAAiD,KAAK,YAAY,uBAAuB,WAAW,GACtG;GAGF,WAAW,cAAc;EAC3B;EAEA,OAAO;CACT;AACF;AAEA,MAAa,gCACX,IAAI,8BAA8B"}
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.cts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ResourceDetectionConfig } from "../config.cjs";
|
|
2
|
+
import { DetectedResource, ResourceDetector } from "../types.cjs";
|
|
3
|
+
import { Attributes } from "@opentelemetry/api";
|
|
4
|
+
//#region src/detectors/ResourceAttributesEnvDetector.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A detector that reads attributes from the OTEL_RESOURCE_ATTRIBUTES
|
|
7
|
+
* environment variable.
|
|
8
|
+
*/
|
|
9
|
+
declare class ResourceAttributesEnvDetector implements ResourceDetector {
|
|
10
|
+
private readonly _MAX_LENGTH;
|
|
11
|
+
private readonly _COMMA_SEPARATOR;
|
|
12
|
+
private readonly _LABEL_KEY_VALUE_SPLITTER;
|
|
13
|
+
detect(_config?: ResourceDetectionConfig): DetectedResource;
|
|
14
|
+
/**
|
|
15
|
+
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
16
|
+
* variable.
|
|
17
|
+
*
|
|
18
|
+
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the
|
|
19
|
+
* format "key1=value1,key2=value2". The ',' and '=' characters in keys
|
|
20
|
+
* and values MUST be percent-encoded. Other characters MAY be percent-encoded.
|
|
21
|
+
*
|
|
22
|
+
* Per the spec, on any error (e.g., decoding failure), the entire environment
|
|
23
|
+
* variable value is discarded.
|
|
24
|
+
*
|
|
25
|
+
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
26
|
+
* of key/value pairs.
|
|
27
|
+
* @returns The parsed resource attributes.
|
|
28
|
+
* @throws Error if parsing fails (caller handles by discarding all attributes)
|
|
29
|
+
*/
|
|
30
|
+
protected _parseResourceAttributes(rawEnvAttributes?: string): Attributes;
|
|
31
|
+
}
|
|
32
|
+
declare const resourceAttributesEnvDetector: ResourceAttributesEnvDetector;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ResourceAttributesEnvDetector, resourceAttributesEnvDetector };
|
|
35
|
+
//# sourceMappingURL=ResourceAttributesEnvDetector.d.cts.map
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.cts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceAttributesEnvDetector.d.cts","names":[],"sources":["../../src/detectors/ResourceAttributesEnvDetector.d.ts"],"mappings":";;;;;;;;cAOqB,yCAAyC;mBACzC;mBACA;mBACA;EACjB,OAAO,UAAU,0BAA0B;;;;;;;;;;;;;;;;;YAiBjC,yBAAyB,4BAA4B;;cAE9C,+BAA+B"}
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.mts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ResourceDetectionConfig } from "../config.mjs";
|
|
2
|
+
import { DetectedResource, ResourceDetector } from "../types.mjs";
|
|
3
|
+
import { Attributes } from "@opentelemetry/api";
|
|
4
|
+
//#region src/detectors/ResourceAttributesEnvDetector.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A detector that reads attributes from the OTEL_RESOURCE_ATTRIBUTES
|
|
7
|
+
* environment variable.
|
|
8
|
+
*/
|
|
9
|
+
declare class ResourceAttributesEnvDetector implements ResourceDetector {
|
|
10
|
+
private readonly _MAX_LENGTH;
|
|
11
|
+
private readonly _COMMA_SEPARATOR;
|
|
12
|
+
private readonly _LABEL_KEY_VALUE_SPLITTER;
|
|
13
|
+
detect(_config?: ResourceDetectionConfig): DetectedResource;
|
|
14
|
+
/**
|
|
15
|
+
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
16
|
+
* variable.
|
|
17
|
+
*
|
|
18
|
+
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the
|
|
19
|
+
* format "key1=value1,key2=value2". The ',' and '=' characters in keys
|
|
20
|
+
* and values MUST be percent-encoded. Other characters MAY be percent-encoded.
|
|
21
|
+
*
|
|
22
|
+
* Per the spec, on any error (e.g., decoding failure), the entire environment
|
|
23
|
+
* variable value is discarded.
|
|
24
|
+
*
|
|
25
|
+
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
26
|
+
* of key/value pairs.
|
|
27
|
+
* @returns The parsed resource attributes.
|
|
28
|
+
* @throws Error if parsing fails (caller handles by discarding all attributes)
|
|
29
|
+
*/
|
|
30
|
+
protected _parseResourceAttributes(rawEnvAttributes?: string): Attributes;
|
|
31
|
+
}
|
|
32
|
+
declare const resourceAttributesEnvDetector: ResourceAttributesEnvDetector;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ResourceAttributesEnvDetector, resourceAttributesEnvDetector };
|
|
35
|
+
//# sourceMappingURL=ResourceAttributesEnvDetector.d.mts.map
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceAttributesEnvDetector.d.mts","names":[],"sources":["../../src/detectors/ResourceAttributesEnvDetector.d.ts"],"mappings":";;;;;;;;cAOqB,yCAAyC;mBACzC;mBACA;mBACA;EACjB,OAAO,UAAU,0BAA0B;;;;;;;;;;;;;;;;;YAiBjC,yBAAyB,4BAA4B;;cAE9C,+BAA+B"}
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.mjs
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { diag } from "@opentelemetry/api";
|
|
2
|
+
import { getStringFromEnv } from "@opentelemetry/core";
|
|
3
|
+
//#region src/detectors/ResourceAttributesEnvDetector.ts
|
|
4
|
+
/**
|
|
5
|
+
* A detector that reads attributes from the OTEL_RESOURCE_ATTRIBUTES
|
|
6
|
+
* environment variable.
|
|
7
|
+
*/
|
|
8
|
+
var ResourceAttributesEnvDetector = class {
|
|
9
|
+
_MAX_LENGTH = 255;
|
|
10
|
+
_COMMA_SEPARATOR = ",";
|
|
11
|
+
_LABEL_KEY_VALUE_SPLITTER = "=";
|
|
12
|
+
detect(_config) {
|
|
13
|
+
const attributes = {};
|
|
14
|
+
const rawAttributes = getStringFromEnv("OTEL_RESOURCE_ATTRIBUTES");
|
|
15
|
+
if (rawAttributes) try {
|
|
16
|
+
const parsedAttributes = this._parseResourceAttributes(rawAttributes);
|
|
17
|
+
Object.assign(attributes, parsedAttributes);
|
|
18
|
+
} catch (e) {
|
|
19
|
+
diag.debug(`ResourceAttributesEnvDetector failed: ${e instanceof Error ? e.message : e}`);
|
|
20
|
+
}
|
|
21
|
+
return { attributes };
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
25
|
+
* variable.
|
|
26
|
+
*
|
|
27
|
+
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the
|
|
28
|
+
* format "key1=value1,key2=value2". The ',' and '=' characters in keys
|
|
29
|
+
* and values MUST be percent-encoded. Other characters MAY be percent-encoded.
|
|
30
|
+
*
|
|
31
|
+
* Per the spec, on any error (e.g., decoding failure), the entire environment
|
|
32
|
+
* variable value is discarded.
|
|
33
|
+
*
|
|
34
|
+
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
35
|
+
* of key/value pairs.
|
|
36
|
+
* @returns The parsed resource attributes.
|
|
37
|
+
* @throws Error if parsing fails (caller handles by discarding all attributes)
|
|
38
|
+
*/
|
|
39
|
+
_parseResourceAttributes(rawEnvAttributes) {
|
|
40
|
+
if (!rawEnvAttributes) return {};
|
|
41
|
+
const attributes = {};
|
|
42
|
+
const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR).filter((attr) => attr.trim() !== "");
|
|
43
|
+
for (const rawAttribute of rawAttributes) {
|
|
44
|
+
const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER);
|
|
45
|
+
if (keyValuePair.length !== 2) throw new Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${rawAttribute}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);
|
|
46
|
+
const [rawKey, rawValue] = keyValuePair;
|
|
47
|
+
const key = rawKey.trim();
|
|
48
|
+
const value = rawValue.trim();
|
|
49
|
+
if (key.length === 0) throw new Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${rawAttribute}".`);
|
|
50
|
+
let decodedKey;
|
|
51
|
+
let decodedValue;
|
|
52
|
+
try {
|
|
53
|
+
decodedKey = decodeURIComponent(key);
|
|
54
|
+
decodedValue = decodeURIComponent(value);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
throw new Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${rawAttribute}": ${e instanceof Error ? e.message : e}`, { cause: e });
|
|
57
|
+
}
|
|
58
|
+
if (decodedKey.length > this._MAX_LENGTH) throw new Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${decodedKey}".`);
|
|
59
|
+
if (decodedValue.length > this._MAX_LENGTH) throw new Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${decodedKey}".`);
|
|
60
|
+
attributes[decodedKey] = decodedValue;
|
|
61
|
+
}
|
|
62
|
+
return attributes;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const resourceAttributesEnvDetector = new ResourceAttributesEnvDetector();
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ResourceAttributesEnvDetector, resourceAttributesEnvDetector };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=ResourceAttributesEnvDetector.mjs.map
|
package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceAttributesEnvDetector.mjs","names":[],"sources":["../../src/detectors/ResourceAttributesEnvDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { diag } from '@opentelemetry/api';\nimport type { ResourceDetectionConfig } from '../config';\nimport type { DetectedResource, ResourceDetector } from '../types';\nimport { getStringFromEnv } from '@opentelemetry/core';\n\n/**\n * A detector that reads attributes from the OTEL_RESOURCE_ATTRIBUTES\n * environment variable.\n */\nexport class ResourceAttributesEnvDetector implements ResourceDetector {\n // Type, attribute keys, and attribute values should not exceed 256 characters.\n private readonly _MAX_LENGTH = 255;\n\n // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes.\n private readonly _COMMA_SEPARATOR = ',';\n\n // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='.\n private readonly _LABEL_KEY_VALUE_SPLITTER = '=';\n\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n const attributes: Attributes = {};\n\n const rawAttributes = getStringFromEnv('OTEL_RESOURCE_ATTRIBUTES');\n if (rawAttributes) {\n try {\n const parsedAttributes = this._parseResourceAttributes(rawAttributes);\n Object.assign(attributes, parsedAttributes);\n } catch (e) {\n diag.debug(\n `ResourceAttributesEnvDetector failed: ${e instanceof Error ? e.message : e}`\n );\n }\n }\n\n return { attributes };\n }\n\n /**\n * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment\n * variable.\n *\n * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes in the\n * format \"key1=value1,key2=value2\". The ',' and '=' characters in keys\n * and values MUST be percent-encoded. Other characters MAY be percent-encoded.\n *\n * Per the spec, on any error (e.g., decoding failure), the entire environment\n * variable value is discarded.\n *\n * @param rawEnvAttributes The resource attributes as a comma-separated list\n * of key/value pairs.\n * @returns The parsed resource attributes.\n * @throws Error if parsing fails (caller handles by discarding all attributes)\n */\n protected _parseResourceAttributes(rawEnvAttributes?: string): Attributes {\n if (!rawEnvAttributes) return {};\n\n const attributes: Attributes = {};\n const rawAttributes: string[] = rawEnvAttributes\n .split(this._COMMA_SEPARATOR)\n .filter(attr => attr.trim() !== ''); // Filter out empty entries\n\n for (const rawAttribute of rawAttributes) {\n const keyValuePair: string[] = rawAttribute.split(\n this._LABEL_KEY_VALUE_SPLITTER\n );\n\n // Per spec: ',' and '=' MUST be percent-encoded in keys and values.\n // If we get != 2 parts, there's an unencoded '=' which is an error.\n if (keyValuePair.length !== 2) {\n throw new Error(\n `Invalid format for OTEL_RESOURCE_ATTRIBUTES: \"${rawAttribute}\". ` +\n \"Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.\"\n );\n }\n\n const [rawKey, rawValue] = keyValuePair;\n const key = rawKey.trim();\n const value = rawValue.trim();\n\n if (key.length === 0) {\n throw new Error(\n `Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in \"${rawAttribute}\".`\n );\n }\n\n let decodedKey: string;\n let decodedValue: string;\n try {\n decodedKey = decodeURIComponent(key);\n decodedValue = decodeURIComponent(value);\n } catch (e) {\n throw new Error(\n `Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry \"${rawAttribute}\": ${e instanceof Error ? e.message : e}`,\n { cause: e }\n );\n }\n\n if (decodedKey.length > this._MAX_LENGTH) {\n throw new Error(\n `Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: \"${decodedKey}\".`\n );\n }\n\n if (decodedValue.length > this._MAX_LENGTH) {\n throw new Error(\n `Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key \"${decodedKey}\".`\n );\n }\n\n attributes[decodedKey] = decodedValue;\n }\n\n return attributes;\n }\n}\n\nexport const resourceAttributesEnvDetector =\n new ResourceAttributesEnvDetector();\n"],"mappings":";;;;;;;AAeA,IAAa,gCAAb,MAAuE;CAErE,cAA+B;CAG/B,mBAAoC;CAGpC,4BAA6C;CAE7C,OAAO,SAAqD;EAC1D,MAAM,aAAyB,CAAC;EAEhC,MAAM,gBAAgB,iBAAiB,0BAA0B;EACjE,IAAI,eACF,IAAI;GACF,MAAM,mBAAmB,KAAK,yBAAyB,aAAa;GACpE,OAAO,OAAO,YAAY,gBAAgB;EAC5C,SAAS,GAAG;GACV,KAAK,MACH,yCAAyC,aAAa,QAAQ,EAAE,UAAU,GAC5E;EACF;EAGF,OAAO,EAAE,WAAW;CACtB;;;;;;;;;;;;;;;;;CAkBA,yBAAmC,kBAAuC;EACxE,IAAI,CAAC,kBAAkB,OAAO,CAAC;EAE/B,MAAM,aAAyB,CAAC;EAChC,MAAM,gBAA0B,iBAC7B,MAAM,KAAK,gBAAgB,CAAC,CAC5B,QAAO,SAAQ,KAAK,KAAK,MAAM,EAAE;EAEpC,KAAK,MAAM,gBAAgB,eAAe;GACxC,MAAM,eAAyB,aAAa,MAC1C,KAAK,yBACP;GAIA,IAAI,aAAa,WAAW,GAC1B,MAAM,IAAI,MACR,iDAAiD,aAAa,sGAEhE;GAGF,MAAM,CAAC,QAAQ,YAAY;GAC3B,MAAM,MAAM,OAAO,KAAK;GACxB,MAAM,QAAQ,SAAS,KAAK;GAE5B,IAAI,IAAI,WAAW,GACjB,MAAM,IAAI,MACR,6DAA6D,aAAa,GAC5E;GAGF,IAAI;GACJ,IAAI;GACJ,IAAI;IACF,aAAa,mBAAmB,GAAG;IACnC,eAAe,mBAAmB,KAAK;GACzC,SAAS,GAAG;IACV,MAAM,IAAI,MACR,4DAA4D,aAAa,KAAK,aAAa,QAAQ,EAAE,UAAU,KAC/G,EAAE,OAAO,EAAE,CACb;GACF;GAEA,IAAI,WAAW,SAAS,KAAK,aAC3B,MAAM,IAAI,MACR,+CAA+C,KAAK,YAAY,gBAAgB,WAAW,GAC7F;GAGF,IAAI,aAAa,SAAS,KAAK,aAC7B,MAAM,IAAI,MACR,iDAAiD,KAAK,YAAY,uBAAuB,WAAW,GACtG;GAGF,WAAW,cAAc;EAC3B;EAEA,OAAO;CACT;AACF;AAEA,MAAa,gCACX,IAAI,8BAA8B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
let _opentelemetry_core = require("@opentelemetry/core");
|
|
2
|
+
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
3
|
+
//#region src/detectors/ServiceNameEnvDetector.ts
|
|
4
|
+
/**
|
|
5
|
+
* ServiceNameEnvDetector detects 'service.name' from OTEL_SERVICE_NAME.
|
|
6
|
+
*/
|
|
7
|
+
var ServiceNameEnvDetector = class {
|
|
8
|
+
detect() {
|
|
9
|
+
const attributes = {};
|
|
10
|
+
const serviceName = (0, _opentelemetry_core.getStringFromEnv)("OTEL_SERVICE_NAME");
|
|
11
|
+
if (serviceName) attributes[_opentelemetry_semantic_conventions.ATTR_SERVICE_NAME] = serviceName;
|
|
12
|
+
return { attributes };
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const serviceNameEnvDetector = new ServiceNameEnvDetector();
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.serviceNameEnvDetector = serviceNameEnvDetector;
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=ServiceNameEnvDetector.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceNameEnvDetector.cjs","names":["getStringFromEnv","ATTR_SERVICE_NAME"],"sources":["../../src/detectors/ServiceNameEnvDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { getStringFromEnv } from '@opentelemetry/core';\nimport type { DetectedResource, ResourceDetector } from '../types';\nimport { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';\n\n/**\n * ServiceNameEnvDetector detects 'service.name' from OTEL_SERVICE_NAME.\n */\nclass ServiceNameEnvDetector implements ResourceDetector {\n detect(): DetectedResource {\n const attributes: Attributes = {};\n const serviceName = getStringFromEnv('OTEL_SERVICE_NAME');\n if (serviceName) {\n attributes[ATTR_SERVICE_NAME] = serviceName;\n }\n return { attributes };\n }\n}\n\nexport const serviceNameEnvDetector = new ServiceNameEnvDetector();\n"],"mappings":";;;;;;AAaA,IAAM,yBAAN,MAAyD;CACvD,SAA2B;EACzB,MAAM,aAAyB,CAAC;EAChC,MAAM,eAAA,GAAcA,oBAAAA,iBAAAA,CAAiB,mBAAmB;EACxD,IAAI,aACF,WAAWC,oCAAAA,qBAAqB;EAElC,OAAO,EAAE,WAAW;CACtB;AACF;AAEA,MAAa,yBAAyB,IAAI,uBAAuB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DetectedResource, ResourceDetector } from "../types.cjs";
|
|
2
|
+
//#region src/detectors/ServiceNameEnvDetector.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* ServiceNameEnvDetector detects 'service.name' from OTEL_SERVICE_NAME.
|
|
5
|
+
*/
|
|
6
|
+
declare class ServiceNameEnvDetector implements ResourceDetector {
|
|
7
|
+
detect(): DetectedResource;
|
|
8
|
+
}
|
|
9
|
+
declare const serviceNameEnvDetector: ServiceNameEnvDetector;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { serviceNameEnvDetector };
|
|
12
|
+
//# sourceMappingURL=ServiceNameEnvDetector.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceNameEnvDetector.d.cts","names":[],"sources":["../../src/detectors/ServiceNameEnvDetector.d.ts"],"mappings":";;;;;cAIc,kCAAkC;EAC5C,UAAU;;cAEO,wBAAwB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DetectedResource, ResourceDetector } from "../types.mjs";
|
|
2
|
+
//#region src/detectors/ServiceNameEnvDetector.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* ServiceNameEnvDetector detects 'service.name' from OTEL_SERVICE_NAME.
|
|
5
|
+
*/
|
|
6
|
+
declare class ServiceNameEnvDetector implements ResourceDetector {
|
|
7
|
+
detect(): DetectedResource;
|
|
8
|
+
}
|
|
9
|
+
declare const serviceNameEnvDetector: ServiceNameEnvDetector;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { serviceNameEnvDetector };
|
|
12
|
+
//# sourceMappingURL=ServiceNameEnvDetector.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceNameEnvDetector.d.mts","names":[],"sources":["../../src/detectors/ServiceNameEnvDetector.d.ts"],"mappings":";;;;;cAIc,kCAAkC;EAC5C,UAAU;;cAEO,wBAAwB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getStringFromEnv } from "@opentelemetry/core";
|
|
2
|
+
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
|
3
|
+
//#region src/detectors/ServiceNameEnvDetector.ts
|
|
4
|
+
/**
|
|
5
|
+
* ServiceNameEnvDetector detects 'service.name' from OTEL_SERVICE_NAME.
|
|
6
|
+
*/
|
|
7
|
+
var ServiceNameEnvDetector = class {
|
|
8
|
+
detect() {
|
|
9
|
+
const attributes = {};
|
|
10
|
+
const serviceName = getStringFromEnv("OTEL_SERVICE_NAME");
|
|
11
|
+
if (serviceName) attributes[ATTR_SERVICE_NAME] = serviceName;
|
|
12
|
+
return { attributes };
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const serviceNameEnvDetector = new ServiceNameEnvDetector();
|
|
16
|
+
//#endregion
|
|
17
|
+
export { serviceNameEnvDetector };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=ServiceNameEnvDetector.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceNameEnvDetector.mjs","names":[],"sources":["../../src/detectors/ServiceNameEnvDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { getStringFromEnv } from '@opentelemetry/core';\nimport type { DetectedResource, ResourceDetector } from '../types';\nimport { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';\n\n/**\n * ServiceNameEnvDetector detects 'service.name' from OTEL_SERVICE_NAME.\n */\nclass ServiceNameEnvDetector implements ResourceDetector {\n detect(): DetectedResource {\n const attributes: Attributes = {};\n const serviceName = getStringFromEnv('OTEL_SERVICE_NAME');\n if (serviceName) {\n attributes[ATTR_SERVICE_NAME] = serviceName;\n }\n return { attributes };\n }\n}\n\nexport const serviceNameEnvDetector = new ServiceNameEnvDetector();\n"],"mappings":";;;;;;AAaA,IAAM,yBAAN,MAAyD;CACvD,SAA2B;EACzB,MAAM,aAAyB,CAAC;EAChC,MAAM,cAAc,iBAAiB,mBAAmB;EACxD,IAAI,aACF,WAAW,qBAAqB;EAElC,OAAO,EAAE,WAAW;CACtB;AACF;AAEA,MAAa,yBAAyB,IAAI,uBAAuB"}
|
|
@@ -4,5 +4,7 @@ import { osDetector } from "./platform/node/OSDetector.cjs";
|
|
|
4
4
|
import { processDetector } from "./platform/node/ProcessDetector.cjs";
|
|
5
5
|
import { serviceInstanceIdDetector } from "./platform/node/ServiceInstanceIdDetector.cjs";
|
|
6
6
|
import "./platform/node/index.cjs";
|
|
7
|
+
import { resourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.cjs";
|
|
7
8
|
import { envDetector } from "./EnvDetector.cjs";
|
|
8
|
-
|
|
9
|
+
import { serviceNameEnvDetector } from "./ServiceNameEnvDetector.cjs";
|
|
10
|
+
export { envDetector, hostDetector, osDetector, processDetector, resourceAttributesEnvDetector, serviceInstanceIdDetector, serviceNameEnvDetector };
|
|
@@ -4,5 +4,7 @@ import { osDetector } from "./platform/node/OSDetector.mjs";
|
|
|
4
4
|
import { processDetector } from "./platform/node/ProcessDetector.mjs";
|
|
5
5
|
import { serviceInstanceIdDetector } from "./platform/node/ServiceInstanceIdDetector.mjs";
|
|
6
6
|
import "./platform/node/index.mjs";
|
|
7
|
+
import { resourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.mjs";
|
|
7
8
|
import { envDetector } from "./EnvDetector.mjs";
|
|
8
|
-
|
|
9
|
+
import { serviceNameEnvDetector } from "./ServiceNameEnvDetector.mjs";
|
|
10
|
+
export { envDetector, hostDetector, osDetector, processDetector, resourceAttributesEnvDetector, serviceInstanceIdDetector, serviceNameEnvDetector };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { resourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.mjs";
|
|
1
2
|
import { envDetector } from "./EnvDetector.mjs";
|
|
3
|
+
import { serviceNameEnvDetector } from "./ServiceNameEnvDetector.mjs";
|
|
2
4
|
import "./NoopDetector.mjs";
|
|
3
5
|
import { hostDetector, osDetector, processDetector, serviceInstanceIdDetector } from "#platform";
|
|
4
|
-
export { envDetector, hostDetector, osDetector, processDetector, serviceInstanceIdDetector };
|
|
6
|
+
export { envDetector, hostDetector, osDetector, processDetector, resourceAttributesEnvDetector, serviceInstanceIdDetector, serviceNameEnvDetector };
|
|
@@ -11,9 +11,6 @@ var ServiceInstanceIdDetector = class {
|
|
|
11
11
|
return { attributes: { [require_semconv.ATTR_SERVICE_INSTANCE_ID]: this._serviceInstanceId } };
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
/**
|
|
15
|
-
* @experimental
|
|
16
|
-
*/
|
|
17
14
|
const serviceInstanceIdDetector = new ServiceInstanceIdDetector();
|
|
18
15
|
//#endregion
|
|
19
16
|
exports.serviceInstanceIdDetector = serviceInstanceIdDetector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceInstanceIdDetector.cjs","names":["randomUUID","ATTR_SERVICE_INSTANCE_ID"],"sources":["../../../../src/detectors/platform/node/ServiceInstanceIdDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ATTR_SERVICE_INSTANCE_ID } from '../../../semconv';\nimport { randomUUID } from 'crypto';\nimport type { ResourceDetectionConfig } from '../../../config';\nimport type { DetectedResource, ResourceDetector } from '../../../types';\n\n/**\n * ServiceInstanceIdDetector detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetector implements ResourceDetector {\n // Multiple calls to ServiceInstanceIdDetector return the same ID.\n private _serviceInstanceId: string | undefined;\n\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n if (!this._serviceInstanceId) {\n this._serviceInstanceId = randomUUID();\n }\n return {\n attributes: {\n [ATTR_SERVICE_INSTANCE_ID]: this._serviceInstanceId,\n },\n };\n }\n}\n\
|
|
1
|
+
{"version":3,"file":"ServiceInstanceIdDetector.cjs","names":["randomUUID","ATTR_SERVICE_INSTANCE_ID"],"sources":["../../../../src/detectors/platform/node/ServiceInstanceIdDetector.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ATTR_SERVICE_INSTANCE_ID } from '../../../semconv';\nimport { randomUUID } from 'crypto';\nimport type { ResourceDetectionConfig } from '../../../config';\nimport type { DetectedResource, ResourceDetector } from '../../../types';\n\n/**\n * ServiceInstanceIdDetector detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetector implements ResourceDetector {\n // Multiple calls to ServiceInstanceIdDetector return the same ID.\n private _serviceInstanceId: string | undefined;\n\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n if (!this._serviceInstanceId) {\n this._serviceInstanceId = randomUUID();\n }\n return {\n attributes: {\n [ATTR_SERVICE_INSTANCE_ID]: this._serviceInstanceId,\n },\n };\n }\n}\n\nexport const serviceInstanceIdDetector = new ServiceInstanceIdDetector();\n"],"mappings":";;;;;;AAaA,IAAM,4BAAN,MAA4D;CAE1D;CAEA,OAAO,SAAqD;EAC1D,IAAI,CAAC,KAAK,oBACR,KAAK,sBAAA,GAAqBA,OAAAA,WAAAA,CAAW;EAEvC,OAAO,EACL,YAAY,GACTC,gBAAAA,2BAA2B,KAAK,mBACnC,EACF;CACF;AACF;AAEA,MAAa,4BAA4B,IAAI,0BAA0B"}
|
|
@@ -8,9 +8,6 @@ declare class ServiceInstanceIdDetector implements ResourceDetector {
|
|
|
8
8
|
private _serviceInstanceId;
|
|
9
9
|
detect(_config?: ResourceDetectionConfig): DetectedResource;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* @experimental
|
|
13
|
-
*/
|
|
14
11
|
declare const serviceInstanceIdDetector: ServiceInstanceIdDetector;
|
|
15
12
|
//#endregion
|
|
16
13
|
export { serviceInstanceIdDetector };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceInstanceIdDetector.d.cts","names":[],"sources":["../../../../src/detectors/platform/node/ServiceInstanceIdDetector.d.ts"],"mappings":";;;;;;cAKc,qCAAqC;UACvC;EACR,OAAO,UAAU,0BAA0B
|
|
1
|
+
{"version":3,"file":"ServiceInstanceIdDetector.d.cts","names":[],"sources":["../../../../src/detectors/platform/node/ServiceInstanceIdDetector.d.ts"],"mappings":";;;;;;cAKc,qCAAqC;UACvC;EACR,OAAO,UAAU,0BAA0B;;cAE1B,2BAA2B"}
|
|
@@ -8,9 +8,6 @@ declare class ServiceInstanceIdDetector implements ResourceDetector {
|
|
|
8
8
|
private _serviceInstanceId;
|
|
9
9
|
detect(_config?: ResourceDetectionConfig): DetectedResource;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* @experimental
|
|
13
|
-
*/
|
|
14
11
|
declare const serviceInstanceIdDetector: ServiceInstanceIdDetector;
|
|
15
12
|
//#endregion
|
|
16
13
|
export { serviceInstanceIdDetector };
|