@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.
Files changed (348) hide show
  1. package/README.md +12 -12
  2. package/node_modules/@oclif/plugin-plugins/README.md +7 -7
  3. package/node_modules/@oclif/plugin-plugins/oclif.manifest.json +1 -1
  4. package/node_modules/@oclif/plugin-plugins/package.json +7 -7
  5. package/node_modules/@opentelemetry/core/dist/common/attributes.cjs +5 -0
  6. package/node_modules/@opentelemetry/core/dist/common/attributes.cjs.map +1 -1
  7. package/node_modules/@opentelemetry/core/dist/common/attributes.mjs +5 -0
  8. package/node_modules/@opentelemetry/core/dist/common/attributes.mjs.map +1 -1
  9. package/node_modules/@opentelemetry/core/dist/version.cjs +1 -1
  10. package/node_modules/@opentelemetry/core/dist/version.cjs.map +1 -1
  11. package/node_modules/@opentelemetry/core/dist/version.mjs +1 -1
  12. package/node_modules/@opentelemetry/core/dist/version.mjs.map +1 -1
  13. package/node_modules/@opentelemetry/core/package.json +2 -2
  14. package/node_modules/@opentelemetry/resources/README.md +21 -2
  15. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.cjs +9 -47
  16. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.cjs.map +1 -1
  17. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.cts +10 -24
  18. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.cts.map +1 -1
  19. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.mts +10 -24
  20. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.d.mts.map +1 -1
  21. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.mjs +9 -47
  22. package/node_modules/@opentelemetry/resources/dist/detectors/EnvDetector.mjs.map +1 -1
  23. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.cjs +70 -0
  24. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.cjs.map +1 -0
  25. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.cts +35 -0
  26. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.cts.map +1 -0
  27. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.mts +35 -0
  28. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.d.mts.map +1 -0
  29. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.mjs +69 -0
  30. package/node_modules/@opentelemetry/resources/dist/detectors/ResourceAttributesEnvDetector.mjs.map +1 -0
  31. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.cjs +19 -0
  32. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.cjs.map +1 -0
  33. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.cts +12 -0
  34. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.cts.map +1 -0
  35. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.mts +12 -0
  36. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.d.mts.map +1 -0
  37. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.mjs +19 -0
  38. package/node_modules/@opentelemetry/resources/dist/detectors/ServiceNameEnvDetector.mjs.map +1 -0
  39. package/node_modules/@opentelemetry/resources/dist/detectors/index.d.cts +3 -1
  40. package/node_modules/@opentelemetry/resources/dist/detectors/index.d.mts +3 -1
  41. package/node_modules/@opentelemetry/resources/dist/detectors/index.mjs +3 -1
  42. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.cjs +0 -3
  43. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.cjs.map +1 -1
  44. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.cts +0 -3
  45. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.cts.map +1 -1
  46. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.mts +0 -3
  47. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.d.mts.map +1 -1
  48. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.mjs +0 -3
  49. package/node_modules/@opentelemetry/resources/dist/detectors/platform/node/ServiceInstanceIdDetector.mjs.map +1 -1
  50. package/node_modules/@opentelemetry/resources/dist/index.cjs +4 -0
  51. package/node_modules/@opentelemetry/resources/dist/index.d.cts +3 -1
  52. package/node_modules/@opentelemetry/resources/dist/index.d.mts +3 -1
  53. package/node_modules/@opentelemetry/resources/dist/index.mjs +3 -1
  54. package/node_modules/@opentelemetry/resources/package.json +3 -3
  55. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs +1461 -176
  56. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs.map +1 -1
  57. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.cts +1363 -171
  58. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.cts.map +1 -1
  59. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.mts +1363 -171
  60. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.d.mts.map +1 -1
  61. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs +1363 -171
  62. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs.map +1 -1
  63. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs +1 -1
  64. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs.map +1 -1
  65. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.d.cts +1 -1
  66. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.d.mts +1 -1
  67. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs +1 -1
  68. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs.map +1 -1
  69. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs +382 -95
  70. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs.map +1 -1
  71. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.cts +358 -94
  72. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.cts.map +1 -1
  73. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.mts +358 -94
  74. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.d.mts.map +1 -1
  75. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs +358 -94
  76. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs.map +1 -1
  77. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.cjs +132 -8
  78. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.d.cts +5 -5
  79. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.d.mts +5 -5
  80. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.mjs +5 -5
  81. package/node_modules/@opentelemetry/semantic-conventions/dist/index.cjs +8 -0
  82. package/node_modules/@opentelemetry/semantic-conventions/dist/index.d.cts +3 -3
  83. package/node_modules/@opentelemetry/semantic-conventions/dist/index.d.mts +3 -3
  84. package/node_modules/@opentelemetry/semantic-conventions/dist/index.mjs +3 -3
  85. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs +104 -13
  86. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs.map +1 -1
  87. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.cts +99 -14
  88. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.cts.map +1 -1
  89. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.mts +99 -14
  90. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.d.mts.map +1 -1
  91. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs +99 -14
  92. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs.map +1 -1
  93. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs +16 -0
  94. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs.map +1 -1
  95. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.cts +15 -1
  96. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.cts.map +1 -1
  97. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.mts +15 -1
  98. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.d.mts.map +1 -1
  99. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs +15 -1
  100. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs.map +1 -1
  101. package/node_modules/@opentelemetry/semantic-conventions/package.json +2 -2
  102. package/node_modules/@salesforce/plugin-trust/README.md +14 -30
  103. package/node_modules/@salesforce/plugin-trust/oclif.manifest.json +1 -1
  104. package/node_modules/@salesforce/plugin-trust/package.json +4 -4
  105. package/node_modules/npm/docs/content/commands/npm-ls.md +1 -1
  106. package/node_modules/npm/docs/content/commands/npm.md +1 -1
  107. package/node_modules/npm/docs/output/commands/npm-access.html +2 -2
  108. package/node_modules/npm/docs/output/commands/npm-adduser.html +2 -2
  109. package/node_modules/npm/docs/output/commands/npm-approve-scripts.html +2 -2
  110. package/node_modules/npm/docs/output/commands/npm-audit.html +2 -2
  111. package/node_modules/npm/docs/output/commands/npm-bugs.html +2 -2
  112. package/node_modules/npm/docs/output/commands/npm-cache.html +2 -2
  113. package/node_modules/npm/docs/output/commands/npm-ci.html +2 -2
  114. package/node_modules/npm/docs/output/commands/npm-completion.html +2 -2
  115. package/node_modules/npm/docs/output/commands/npm-config.html +2 -2
  116. package/node_modules/npm/docs/output/commands/npm-dedupe.html +2 -2
  117. package/node_modules/npm/docs/output/commands/npm-deny-scripts.html +2 -2
  118. package/node_modules/npm/docs/output/commands/npm-deprecate.html +2 -2
  119. package/node_modules/npm/docs/output/commands/npm-diff.html +2 -2
  120. package/node_modules/npm/docs/output/commands/npm-dist-tag.html +2 -2
  121. package/node_modules/npm/docs/output/commands/npm-docs.html +2 -2
  122. package/node_modules/npm/docs/output/commands/npm-doctor.html +2 -2
  123. package/node_modules/npm/docs/output/commands/npm-edit.html +2 -2
  124. package/node_modules/npm/docs/output/commands/npm-exec.html +2 -2
  125. package/node_modules/npm/docs/output/commands/npm-explain.html +2 -2
  126. package/node_modules/npm/docs/output/commands/npm-explore.html +2 -2
  127. package/node_modules/npm/docs/output/commands/npm-find-dupes.html +2 -2
  128. package/node_modules/npm/docs/output/commands/npm-fund.html +2 -2
  129. package/node_modules/npm/docs/output/commands/npm-get.html +2 -2
  130. package/node_modules/npm/docs/output/commands/npm-help-search.html +2 -2
  131. package/node_modules/npm/docs/output/commands/npm-help.html +2 -2
  132. package/node_modules/npm/docs/output/commands/npm-init.html +2 -2
  133. package/node_modules/npm/docs/output/commands/npm-install-ci-test.html +2 -2
  134. package/node_modules/npm/docs/output/commands/npm-install-scripts.html +2 -2
  135. package/node_modules/npm/docs/output/commands/npm-install-test.html +2 -2
  136. package/node_modules/npm/docs/output/commands/npm-install.html +2 -2
  137. package/node_modules/npm/docs/output/commands/npm-link.html +2 -2
  138. package/node_modules/npm/docs/output/commands/npm-ll.html +2 -2
  139. package/node_modules/npm/docs/output/commands/npm-login.html +2 -2
  140. package/node_modules/npm/docs/output/commands/npm-logout.html +2 -2
  141. package/node_modules/npm/docs/output/commands/npm-ls.html +3 -3
  142. package/node_modules/npm/docs/output/commands/npm-org.html +2 -2
  143. package/node_modules/npm/docs/output/commands/npm-outdated.html +2 -2
  144. package/node_modules/npm/docs/output/commands/npm-owner.html +2 -2
  145. package/node_modules/npm/docs/output/commands/npm-pack.html +2 -2
  146. package/node_modules/npm/docs/output/commands/npm-ping.html +2 -2
  147. package/node_modules/npm/docs/output/commands/npm-pkg.html +2 -2
  148. package/node_modules/npm/docs/output/commands/npm-prefix.html +2 -2
  149. package/node_modules/npm/docs/output/commands/npm-profile.html +2 -2
  150. package/node_modules/npm/docs/output/commands/npm-prune.html +2 -2
  151. package/node_modules/npm/docs/output/commands/npm-publish.html +2 -2
  152. package/node_modules/npm/docs/output/commands/npm-query.html +2 -2
  153. package/node_modules/npm/docs/output/commands/npm-rebuild.html +2 -2
  154. package/node_modules/npm/docs/output/commands/npm-repo.html +2 -2
  155. package/node_modules/npm/docs/output/commands/npm-restart.html +2 -2
  156. package/node_modules/npm/docs/output/commands/npm-root.html +2 -2
  157. package/node_modules/npm/docs/output/commands/npm-run.html +2 -2
  158. package/node_modules/npm/docs/output/commands/npm-sbom.html +2 -2
  159. package/node_modules/npm/docs/output/commands/npm-search.html +2 -2
  160. package/node_modules/npm/docs/output/commands/npm-set.html +2 -2
  161. package/node_modules/npm/docs/output/commands/npm-shrinkwrap.html +2 -2
  162. package/node_modules/npm/docs/output/commands/npm-stage.html +2 -2
  163. package/node_modules/npm/docs/output/commands/npm-star.html +2 -2
  164. package/node_modules/npm/docs/output/commands/npm-stars.html +2 -2
  165. package/node_modules/npm/docs/output/commands/npm-start.html +2 -2
  166. package/node_modules/npm/docs/output/commands/npm-stop.html +2 -2
  167. package/node_modules/npm/docs/output/commands/npm-team.html +2 -2
  168. package/node_modules/npm/docs/output/commands/npm-test.html +2 -2
  169. package/node_modules/npm/docs/output/commands/npm-token.html +2 -2
  170. package/node_modules/npm/docs/output/commands/npm-trust.html +2 -2
  171. package/node_modules/npm/docs/output/commands/npm-undeprecate.html +2 -2
  172. package/node_modules/npm/docs/output/commands/npm-uninstall.html +2 -2
  173. package/node_modules/npm/docs/output/commands/npm-unpublish.html +2 -2
  174. package/node_modules/npm/docs/output/commands/npm-unstar.html +2 -2
  175. package/node_modules/npm/docs/output/commands/npm-update.html +2 -2
  176. package/node_modules/npm/docs/output/commands/npm-version.html +2 -2
  177. package/node_modules/npm/docs/output/commands/npm-view.html +2 -2
  178. package/node_modules/npm/docs/output/commands/npm-whoami.html +2 -2
  179. package/node_modules/npm/docs/output/commands/npm.html +3 -3
  180. package/node_modules/npm/docs/output/commands/npx.html +2 -2
  181. package/node_modules/npm/docs/output/configuring-npm/folders.html +2 -2
  182. package/node_modules/npm/docs/output/configuring-npm/install.html +2 -2
  183. package/node_modules/npm/docs/output/configuring-npm/npm-global.html +2 -2
  184. package/node_modules/npm/docs/output/configuring-npm/npm-json.html +2 -2
  185. package/node_modules/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +2 -2
  186. package/node_modules/npm/docs/output/configuring-npm/npmrc.html +2 -2
  187. package/node_modules/npm/docs/output/configuring-npm/package-json.html +2 -2
  188. package/node_modules/npm/docs/output/configuring-npm/package-lock-json.html +2 -2
  189. package/node_modules/npm/docs/output/using-npm/config.html +2 -2
  190. package/node_modules/npm/docs/output/using-npm/dependency-selectors.html +2 -2
  191. package/node_modules/npm/docs/output/using-npm/developers.html +2 -2
  192. package/node_modules/npm/docs/output/using-npm/logging.html +2 -2
  193. package/node_modules/npm/docs/output/using-npm/orgs.html +2 -2
  194. package/node_modules/npm/docs/output/using-npm/package-spec.html +2 -2
  195. package/node_modules/npm/docs/output/using-npm/registry.html +2 -2
  196. package/node_modules/npm/docs/output/using-npm/removal.html +2 -2
  197. package/node_modules/npm/docs/output/using-npm/scope.html +2 -2
  198. package/node_modules/npm/docs/output/using-npm/scripts.html +2 -2
  199. package/node_modules/npm/docs/output/using-npm/workspaces.html +2 -2
  200. package/node_modules/npm/lib/cli/entry.js +1 -1
  201. package/node_modules/npm/man/man1/npm-access.1 +1 -1
  202. package/node_modules/npm/man/man1/npm-adduser.1 +1 -1
  203. package/node_modules/npm/man/man1/npm-approve-scripts.1 +1 -1
  204. package/node_modules/npm/man/man1/npm-audit.1 +1 -1
  205. package/node_modules/npm/man/man1/npm-bugs.1 +1 -1
  206. package/node_modules/npm/man/man1/npm-cache.1 +1 -1
  207. package/node_modules/npm/man/man1/npm-ci.1 +1 -1
  208. package/node_modules/npm/man/man1/npm-completion.1 +1 -1
  209. package/node_modules/npm/man/man1/npm-config.1 +1 -1
  210. package/node_modules/npm/man/man1/npm-dedupe.1 +1 -1
  211. package/node_modules/npm/man/man1/npm-deny-scripts.1 +1 -1
  212. package/node_modules/npm/man/man1/npm-deprecate.1 +1 -1
  213. package/node_modules/npm/man/man1/npm-diff.1 +1 -1
  214. package/node_modules/npm/man/man1/npm-dist-tag.1 +1 -1
  215. package/node_modules/npm/man/man1/npm-docs.1 +1 -1
  216. package/node_modules/npm/man/man1/npm-doctor.1 +1 -1
  217. package/node_modules/npm/man/man1/npm-edit.1 +1 -1
  218. package/node_modules/npm/man/man1/npm-exec.1 +1 -1
  219. package/node_modules/npm/man/man1/npm-explain.1 +1 -1
  220. package/node_modules/npm/man/man1/npm-explore.1 +1 -1
  221. package/node_modules/npm/man/man1/npm-find-dupes.1 +1 -1
  222. package/node_modules/npm/man/man1/npm-fund.1 +1 -1
  223. package/node_modules/npm/man/man1/npm-get.1 +1 -1
  224. package/node_modules/npm/man/man1/npm-help-search.1 +1 -1
  225. package/node_modules/npm/man/man1/npm-help.1 +1 -1
  226. package/node_modules/npm/man/man1/npm-init.1 +1 -1
  227. package/node_modules/npm/man/man1/npm-install-ci-test.1 +1 -1
  228. package/node_modules/npm/man/man1/npm-install-scripts.1 +1 -1
  229. package/node_modules/npm/man/man1/npm-install-test.1 +1 -1
  230. package/node_modules/npm/man/man1/npm-install.1 +1 -1
  231. package/node_modules/npm/man/man1/npm-link.1 +1 -1
  232. package/node_modules/npm/man/man1/npm-ll.1 +1 -1
  233. package/node_modules/npm/man/man1/npm-login.1 +1 -1
  234. package/node_modules/npm/man/man1/npm-logout.1 +1 -1
  235. package/node_modules/npm/man/man1/npm-ls.1 +2 -2
  236. package/node_modules/npm/man/man1/npm-org.1 +1 -1
  237. package/node_modules/npm/man/man1/npm-outdated.1 +1 -1
  238. package/node_modules/npm/man/man1/npm-owner.1 +1 -1
  239. package/node_modules/npm/man/man1/npm-pack.1 +1 -1
  240. package/node_modules/npm/man/man1/npm-ping.1 +1 -1
  241. package/node_modules/npm/man/man1/npm-pkg.1 +1 -1
  242. package/node_modules/npm/man/man1/npm-prefix.1 +1 -1
  243. package/node_modules/npm/man/man1/npm-profile.1 +1 -1
  244. package/node_modules/npm/man/man1/npm-prune.1 +1 -1
  245. package/node_modules/npm/man/man1/npm-publish.1 +1 -1
  246. package/node_modules/npm/man/man1/npm-query.1 +1 -1
  247. package/node_modules/npm/man/man1/npm-rebuild.1 +1 -1
  248. package/node_modules/npm/man/man1/npm-repo.1 +1 -1
  249. package/node_modules/npm/man/man1/npm-restart.1 +1 -1
  250. package/node_modules/npm/man/man1/npm-root.1 +1 -1
  251. package/node_modules/npm/man/man1/npm-run.1 +1 -1
  252. package/node_modules/npm/man/man1/npm-sbom.1 +1 -1
  253. package/node_modules/npm/man/man1/npm-search.1 +1 -1
  254. package/node_modules/npm/man/man1/npm-set.1 +1 -1
  255. package/node_modules/npm/man/man1/npm-shrinkwrap.1 +1 -1
  256. package/node_modules/npm/man/man1/npm-stage.1 +1 -1
  257. package/node_modules/npm/man/man1/npm-star.1 +1 -1
  258. package/node_modules/npm/man/man1/npm-stars.1 +1 -1
  259. package/node_modules/npm/man/man1/npm-start.1 +1 -1
  260. package/node_modules/npm/man/man1/npm-stop.1 +1 -1
  261. package/node_modules/npm/man/man1/npm-team.1 +1 -1
  262. package/node_modules/npm/man/man1/npm-test.1 +1 -1
  263. package/node_modules/npm/man/man1/npm-token.1 +1 -1
  264. package/node_modules/npm/man/man1/npm-trust.1 +1 -1
  265. package/node_modules/npm/man/man1/npm-undeprecate.1 +1 -1
  266. package/node_modules/npm/man/man1/npm-uninstall.1 +1 -1
  267. package/node_modules/npm/man/man1/npm-unpublish.1 +1 -1
  268. package/node_modules/npm/man/man1/npm-unstar.1 +1 -1
  269. package/node_modules/npm/man/man1/npm-update.1 +1 -1
  270. package/node_modules/npm/man/man1/npm-version.1 +1 -1
  271. package/node_modules/npm/man/man1/npm-view.1 +1 -1
  272. package/node_modules/npm/man/man1/npm-whoami.1 +1 -1
  273. package/node_modules/npm/man/man1/npm.1 +2 -2
  274. package/node_modules/npm/man/man1/npx.1 +1 -1
  275. package/node_modules/npm/man/man5/folders.5 +1 -1
  276. package/node_modules/npm/man/man5/install.5 +1 -1
  277. package/node_modules/npm/man/man5/npm-global.5 +1 -1
  278. package/node_modules/npm/man/man5/npm-json.5 +1 -1
  279. package/node_modules/npm/man/man5/npm-shrinkwrap-json.5 +1 -1
  280. package/node_modules/npm/man/man5/npmrc.5 +1 -1
  281. package/node_modules/npm/man/man5/package-json.5 +1 -1
  282. package/node_modules/npm/man/man5/package-lock-json.5 +1 -1
  283. package/node_modules/npm/man/man7/config.7 +1 -1
  284. package/node_modules/npm/man/man7/dependency-selectors.7 +1 -1
  285. package/node_modules/npm/man/man7/developers.7 +1 -1
  286. package/node_modules/npm/man/man7/logging.7 +1 -1
  287. package/node_modules/npm/man/man7/orgs.7 +1 -1
  288. package/node_modules/npm/man/man7/package-spec.7 +1 -1
  289. package/node_modules/npm/man/man7/registry.7 +1 -1
  290. package/node_modules/npm/man/man7/removal.7 +1 -1
  291. package/node_modules/npm/man/man7/scope.7 +1 -1
  292. package/node_modules/npm/man/man7/scripts.7 +1 -1
  293. package/node_modules/npm/man/man7/workspaces.7 +1 -1
  294. package/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js +9 -2
  295. package/node_modules/npm/node_modules/@npmcli/promise-spawn/package.json +3 -2
  296. package/node_modules/npm/node_modules/bin-links/lib/get-paths.js +2 -0
  297. package/node_modules/npm/node_modules/bin-links/package.json +2 -1
  298. package/node_modules/npm/node_modules/ip-address/dist/common.js +2 -2
  299. package/node_modules/npm/node_modules/ip-address/dist/ipv4.js +7 -0
  300. package/node_modules/npm/node_modules/ip-address/dist/ipv6.js +7 -4
  301. package/node_modules/npm/node_modules/ip-address/dist/v6/constants.js +3 -0
  302. package/node_modules/npm/node_modules/ip-address/package.json +3 -2
  303. package/node_modules/npm/node_modules/libnpmexec/README.md +9 -1
  304. package/node_modules/npm/node_modules/libnpmexec/lib/index.js +6 -2
  305. package/node_modules/npm/node_modules/libnpmexec/lib/run-script.js +22 -5
  306. package/node_modules/npm/node_modules/libnpmexec/package.json +1 -1
  307. package/node_modules/npm/node_modules/pacote/lib/registry.js +71 -2
  308. package/node_modules/npm/node_modules/pacote/package.json +3 -2
  309. package/node_modules/npm/node_modules/semver/classes/range.js +2 -2
  310. package/node_modules/npm/node_modules/semver/internal/constants.js +30 -0
  311. package/node_modules/npm/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  312. package/node_modules/npm/node_modules/semver/package.json +1 -1
  313. package/node_modules/npm/node_modules/undici/docs/docs/api/Client.md +2 -0
  314. package/node_modules/npm/node_modules/undici/lib/dispatcher/agent.js +6 -2
  315. package/node_modules/npm/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
  316. package/node_modules/npm/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
  317. package/node_modules/npm/node_modules/undici/lib/dispatcher/client.js +3 -2
  318. package/node_modules/npm/node_modules/undici/lib/dispatcher/dispatcher-base.js +9 -0
  319. package/node_modules/npm/node_modules/undici/lib/web/eventsource/eventsource-stream.js +91 -10
  320. package/node_modules/npm/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  321. package/node_modules/npm/node_modules/undici/lib/web/fetch/index.js +7 -9
  322. package/node_modules/npm/node_modules/undici/lib/web/websocket/receiver.js +14 -0
  323. package/node_modules/npm/node_modules/undici/package.json +1 -1
  324. package/node_modules/npm/package.json +5 -5
  325. package/node_modules/semver/classes/range.js +2 -2
  326. package/node_modules/semver/internal/constants.js +30 -0
  327. package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  328. package/node_modules/semver/package.json +1 -1
  329. package/oclif.manifest.json +1 -1
  330. package/package.json +6 -6
  331. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/MSVSUtil.cpython-314.pyc +0 -0
  332. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/MSVSVersion.cpython-314.pyc +0 -0
  333. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/__init__.cpython-314.pyc +0 -0
  334. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/common.cpython-314.pyc +0 -0
  335. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/input.cpython-314.pyc +0 -0
  336. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/msvs_emulation.cpython-314.pyc +0 -0
  337. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/ninja_syntax.cpython-314.pyc +0 -0
  338. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/simple_copy.cpython-314.pyc +0 -0
  339. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/xcode_emulation.cpython-314.pyc +0 -0
  340. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/xcode_ninja.cpython-314.pyc +0 -0
  341. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__pycache__/xcodeproj_file.cpython-314.pyc +0 -0
  342. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/__init__.cpython-314.pyc +0 -0
  343. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/make.cpython-314.pyc +0 -0
  344. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/ninja.cpython-314.pyc +0 -0
  345. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__/xcode.cpython-314.pyc +0 -0
  346. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__pycache__/__init__.cpython-314.pyc +0 -0
  347. package/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__pycache__/_structures.cpython-314.pyc +0 -0
  348. 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, ResourceDetector } from "../types.cjs";
2
+ import { DetectedResource } from "../types.cjs";
3
+ import { ResourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.cjs";
3
4
  //#region src/detectors/EnvDetector.d.ts
4
5
  /**
5
- * EnvDetector can be used to detect the presence of and create a Resource
6
- * from the OTEL_RESOURCE_ATTRIBUTES environment variable.
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 implements ResourceDetector {
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":";;;;;;;cAMc,uBAAuB;mBAChB;mBACA;mBACA;;;;;;;;EAQjB,OAAO,UAAU,0BAA0B;;;;;;;;;;;;;;;;;UAiBnC;;cAES,aAAa"}
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, ResourceDetector } from "../types.mjs";
2
+ import { DetectedResource } from "../types.mjs";
3
+ import { ResourceAttributesEnvDetector } from "./ResourceAttributesEnvDetector.mjs";
3
4
  //#region src/detectors/EnvDetector.d.ts
4
5
  /**
5
- * EnvDetector can be used to detect the presence of and create a Resource
6
- * from the OTEL_RESOURCE_ATTRIBUTES environment variable.
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 implements ResourceDetector {
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":";;;;;;;cAMc,uBAAuB;mBAChB;mBACA;mBACA;;;;;;;;EAQjB,OAAO,UAAU,0BAA0B;;;;;;;;;;;;;;;;;UAiBnC;;cAES,aAAa"}
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 can be used to detect the presence of and create a Resource
7
- * from the OTEL_RESOURCE_ATTRIBUTES environment variable.
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, ResourceDetector } from '../types';\nimport { getStringFromEnv } from '@opentelemetry/core';\n\n/**\n * EnvDetector can be used to detect the presence of and create a Resource\n * from the OTEL_RESOURCE_ATTRIBUTES environment variable.\n */\nclass EnvDetector 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 /**\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 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 * 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 private _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 envDetector = new EnvDetector();\n"],"mappings":";;;;;;;;AAgBA,IAAM,cAAN,MAA8C;CAE5C,cAA+B;CAG/B,mBAAoC;CAGpC,4BAA6C;;;;;;;;CAS7C,OAAO,SAAqD;EAC1D,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;;;;;;;;;;;;;;;;;CAkBA,yBAAiC,kBAAuC;EACtE,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,cAAc,IAAI,YAAY"}
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"}
@@ -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
@@ -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"}
@@ -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
@@ -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"}
@@ -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
@@ -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"}
@@ -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
@@ -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
- export { envDetector, hostDetector, osDetector, processDetector, serviceInstanceIdDetector };
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
- export { envDetector, hostDetector, osDetector, processDetector, serviceInstanceIdDetector };
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\n/**\n * @experimental\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;;;;AAKA,MAAa,4BAA4B,IAAI,0BAA0B"}
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;;;;;cAK1B,2BAA2B"}
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 };