@openclaw/diagnostics-otel 2026.6.8 → 2026.6.9-beta.1

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 (819) hide show
  1. package/dist/index.js +98 -0
  2. package/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.d.ts +4 -0
  3. package/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.js +6 -0
  4. package/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.js.map +1 -1
  5. package/node_modules/@opentelemetry/api-logs/build/esm/api/logs.d.ts +10 -2
  6. package/node_modules/@opentelemetry/api-logs/build/esm/api/logs.js +10 -2
  7. package/node_modules/@opentelemetry/api-logs/build/esm/api/logs.js.map +1 -1
  8. package/node_modules/@opentelemetry/api-logs/build/esm/index.d.ts +1 -1
  9. package/node_modules/@opentelemetry/api-logs/build/esm/index.js +1 -1
  10. package/node_modules/@opentelemetry/api-logs/build/esm/index.js.map +1 -1
  11. package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerOptions.d.ts +3 -2
  12. package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerOptions.js.map +1 -1
  13. package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerProvider.d.ts +7 -3
  14. package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerProvider.js.map +1 -1
  15. package/node_modules/@opentelemetry/api-logs/build/esm/version.d.ts +1 -1
  16. package/node_modules/@opentelemetry/api-logs/build/esm/version.js +1 -1
  17. package/node_modules/@opentelemetry/api-logs/build/esm/version.js.map +1 -1
  18. package/node_modules/@opentelemetry/api-logs/build/esnext/NoopLogger.d.ts +4 -0
  19. package/node_modules/@opentelemetry/api-logs/build/esnext/NoopLogger.js +6 -0
  20. package/node_modules/@opentelemetry/api-logs/build/esnext/NoopLogger.js.map +1 -1
  21. package/node_modules/@opentelemetry/api-logs/build/esnext/api/logs.d.ts +10 -2
  22. package/node_modules/@opentelemetry/api-logs/build/esnext/api/logs.js +10 -2
  23. package/node_modules/@opentelemetry/api-logs/build/esnext/api/logs.js.map +1 -1
  24. package/node_modules/@opentelemetry/api-logs/build/esnext/index.d.ts +1 -1
  25. package/node_modules/@opentelemetry/api-logs/build/esnext/index.js +1 -1
  26. package/node_modules/@opentelemetry/api-logs/build/esnext/index.js.map +1 -1
  27. package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerOptions.d.ts +3 -2
  28. package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerOptions.js.map +1 -1
  29. package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerProvider.d.ts +7 -3
  30. package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerProvider.js.map +1 -1
  31. package/node_modules/@opentelemetry/api-logs/build/esnext/version.d.ts +1 -1
  32. package/node_modules/@opentelemetry/api-logs/build/esnext/version.js +1 -1
  33. package/node_modules/@opentelemetry/api-logs/build/esnext/version.js.map +1 -1
  34. package/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.d.ts +4 -0
  35. package/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.js +8 -1
  36. package/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.js.map +1 -1
  37. package/node_modules/@opentelemetry/api-logs/build/src/api/logs.d.ts +10 -2
  38. package/node_modules/@opentelemetry/api-logs/build/src/api/logs.js +10 -2
  39. package/node_modules/@opentelemetry/api-logs/build/src/api/logs.js.map +1 -1
  40. package/node_modules/@opentelemetry/api-logs/build/src/index.d.ts +1 -1
  41. package/node_modules/@opentelemetry/api-logs/build/src/index.js +2 -3
  42. package/node_modules/@opentelemetry/api-logs/build/src/index.js.map +1 -1
  43. package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerOptions.d.ts +3 -2
  44. package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerOptions.js.map +1 -1
  45. package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerProvider.d.ts +7 -3
  46. package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerProvider.js.map +1 -1
  47. package/node_modules/@opentelemetry/api-logs/build/src/version.d.ts +1 -1
  48. package/node_modules/@opentelemetry/api-logs/build/src/version.js +1 -1
  49. package/node_modules/@opentelemetry/api-logs/build/src/version.js.map +1 -1
  50. package/node_modules/@opentelemetry/api-logs/package.json +5 -5
  51. package/node_modules/@opentelemetry/configuration/build/src/EnvironmentConfigFactory.js +23 -26
  52. package/node_modules/@opentelemetry/configuration/build/src/EnvironmentConfigFactory.js.map +1 -1
  53. package/node_modules/@opentelemetry/configuration/build/src/FileConfigFactory.js +3 -155
  54. package/node_modules/@opentelemetry/configuration/build/src/FileConfigFactory.js.map +1 -1
  55. package/node_modules/@opentelemetry/configuration/build/src/generated/types.d.ts +596 -614
  56. package/node_modules/@opentelemetry/configuration/build/src/generated/types.js.map +1 -1
  57. package/node_modules/@opentelemetry/configuration/build/src/index.d.ts +1 -1
  58. package/node_modules/@opentelemetry/configuration/build/src/index.js.map +1 -1
  59. package/node_modules/@opentelemetry/configuration/build/src/utils.d.ts +12 -1
  60. package/node_modules/@opentelemetry/configuration/build/src/utils.js +93 -19
  61. package/node_modules/@opentelemetry/configuration/build/src/utils.js.map +1 -1
  62. package/node_modules/@opentelemetry/configuration/build/src/version.d.ts +1 -1
  63. package/node_modules/@opentelemetry/configuration/build/src/version.js +1 -1
  64. package/node_modules/@opentelemetry/configuration/build/src/version.js.map +1 -1
  65. package/node_modules/@opentelemetry/configuration/package.json +6 -6
  66. package/node_modules/@opentelemetry/context-async-hooks/build/src/version.d.ts +1 -1
  67. package/node_modules/@opentelemetry/context-async-hooks/build/src/version.js +1 -1
  68. package/node_modules/@opentelemetry/context-async-hooks/build/src/version.js.map +1 -1
  69. package/node_modules/@opentelemetry/context-async-hooks/package.json +4 -4
  70. package/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js +14 -20
  71. package/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js.map +1 -1
  72. package/node_modules/@opentelemetry/core/build/esm/baggage/utils.d.ts +7 -1
  73. package/node_modules/@opentelemetry/core/build/esm/baggage/utils.js +32 -1
  74. package/node_modules/@opentelemetry/core/build/esm/baggage/utils.js.map +1 -1
  75. package/node_modules/@opentelemetry/core/build/esm/common/time.d.ts +7 -2
  76. package/node_modules/@opentelemetry/core/build/esm/common/time.js +10 -3
  77. package/node_modules/@opentelemetry/core/build/esm/common/time.js.map +1 -1
  78. package/node_modules/@opentelemetry/core/build/esm/index.d.ts +1 -1
  79. package/node_modules/@opentelemetry/core/build/esm/index.js +1 -1
  80. package/node_modules/@opentelemetry/core/build/esm/index.js.map +1 -1
  81. package/node_modules/@opentelemetry/core/build/esm/version.d.ts +1 -1
  82. package/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
  83. package/node_modules/@opentelemetry/core/build/esm/version.js.map +1 -1
  84. package/node_modules/@opentelemetry/core/build/esnext/baggage/propagation/W3CBaggagePropagator.js +14 -20
  85. package/node_modules/@opentelemetry/core/build/esnext/baggage/propagation/W3CBaggagePropagator.js.map +1 -1
  86. package/node_modules/@opentelemetry/core/build/esnext/baggage/utils.d.ts +7 -1
  87. package/node_modules/@opentelemetry/core/build/esnext/baggage/utils.js +32 -1
  88. package/node_modules/@opentelemetry/core/build/esnext/baggage/utils.js.map +1 -1
  89. package/node_modules/@opentelemetry/core/build/esnext/common/time.d.ts +7 -2
  90. package/node_modules/@opentelemetry/core/build/esnext/common/time.js +10 -3
  91. package/node_modules/@opentelemetry/core/build/esnext/common/time.js.map +1 -1
  92. package/node_modules/@opentelemetry/core/build/esnext/index.d.ts +1 -1
  93. package/node_modules/@opentelemetry/core/build/esnext/index.js +1 -1
  94. package/node_modules/@opentelemetry/core/build/esnext/index.js.map +1 -1
  95. package/node_modules/@opentelemetry/core/build/esnext/version.d.ts +1 -1
  96. package/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
  97. package/node_modules/@opentelemetry/core/build/esnext/version.js.map +1 -1
  98. package/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js +12 -18
  99. package/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js.map +1 -1
  100. package/node_modules/@opentelemetry/core/build/src/baggage/utils.d.ts +7 -1
  101. package/node_modules/@opentelemetry/core/build/src/baggage/utils.js +33 -1
  102. package/node_modules/@opentelemetry/core/build/src/baggage/utils.js.map +1 -1
  103. package/node_modules/@opentelemetry/core/build/src/common/time.d.ts +7 -2
  104. package/node_modules/@opentelemetry/core/build/src/common/time.js +13 -5
  105. package/node_modules/@opentelemetry/core/build/src/common/time.js.map +1 -1
  106. package/node_modules/@opentelemetry/core/build/src/index.d.ts +1 -1
  107. package/node_modules/@opentelemetry/core/build/src/index.js +3 -1
  108. package/node_modules/@opentelemetry/core/build/src/index.js.map +1 -1
  109. package/node_modules/@opentelemetry/core/build/src/version.d.ts +1 -1
  110. package/node_modules/@opentelemetry/core/build/src/version.js +1 -1
  111. package/node_modules/@opentelemetry/core/build/src/version.js.map +1 -1
  112. package/node_modules/@opentelemetry/core/package.json +6 -6
  113. package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/build/src/version.d.ts +1 -1
  114. package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/build/src/version.js +1 -1
  115. package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/build/src/version.js.map +1 -1
  116. package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/package.json +13 -13
  117. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/version.d.ts +1 -1
  118. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/version.js +1 -1
  119. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/version.js.map +1 -1
  120. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/version.d.ts +1 -1
  121. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/version.js +1 -1
  122. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/version.js.map +1 -1
  123. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/version.d.ts +1 -1
  124. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/version.js +1 -1
  125. package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/version.js.map +1 -1
  126. package/node_modules/@opentelemetry/exporter-logs-otlp-http/package.json +13 -13
  127. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esm/version.d.ts +1 -1
  128. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esm/version.js +1 -1
  129. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esm/version.js.map +1 -1
  130. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esnext/version.d.ts +1 -1
  131. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esnext/version.js +1 -1
  132. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esnext/version.js.map +1 -1
  133. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/src/version.d.ts +1 -1
  134. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/src/version.js +1 -1
  135. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/src/version.js.map +1 -1
  136. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json +14 -14
  137. package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/build/src/version.d.ts +1 -1
  138. package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/build/src/version.js +1 -1
  139. package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/build/src/version.js.map +1 -1
  140. package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/package.json +13 -13
  141. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/version.d.ts +1 -1
  142. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/version.js +1 -1
  143. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/version.js.map +1 -1
  144. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esnext/version.d.ts +1 -1
  145. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esnext/version.js +1 -1
  146. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esnext/version.js.map +1 -1
  147. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/version.d.ts +1 -1
  148. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/version.js +1 -1
  149. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/version.js.map +1 -1
  150. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/package.json +12 -12
  151. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esm/version.d.ts +1 -1
  152. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esm/version.js +1 -1
  153. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esm/version.js.map +1 -1
  154. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esnext/version.d.ts +1 -1
  155. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esnext/version.js +1 -1
  156. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esnext/version.js.map +1 -1
  157. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/src/version.d.ts +1 -1
  158. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/src/version.js +1 -1
  159. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/src/version.js.map +1 -1
  160. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json +13 -13
  161. package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusExporter.js +2 -0
  162. package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusExporter.js.map +1 -1
  163. package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusSerializer.js +15 -1
  164. package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusSerializer.js.map +1 -1
  165. package/node_modules/@opentelemetry/exporter-prometheus/build/src/semconv.d.ts +9 -0
  166. package/node_modules/@opentelemetry/exporter-prometheus/build/src/semconv.js +21 -0
  167. package/node_modules/@opentelemetry/exporter-prometheus/build/src/semconv.js.map +1 -0
  168. package/node_modules/@opentelemetry/exporter-prometheus/build/src/version.d.ts +1 -1
  169. package/node_modules/@opentelemetry/exporter-prometheus/build/src/version.js +1 -1
  170. package/node_modules/@opentelemetry/exporter-prometheus/build/src/version.js.map +1 -1
  171. package/node_modules/@opentelemetry/exporter-prometheus/package.json +7 -7
  172. package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/README.md +1 -1
  173. package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/version.d.ts +1 -1
  174. package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/version.js +1 -1
  175. package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/version.js.map +1 -1
  176. package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/package.json +12 -12
  177. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/version.d.ts +1 -1
  178. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/version.js +1 -1
  179. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/version.js.map +1 -1
  180. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esnext/version.d.ts +1 -1
  181. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esnext/version.js +1 -1
  182. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esnext/version.js.map +1 -1
  183. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/version.d.ts +1 -1
  184. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/version.js +1 -1
  185. package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/version.js.map +1 -1
  186. package/node_modules/@opentelemetry/exporter-trace-otlp-http/package.json +12 -12
  187. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esm/version.d.ts +1 -1
  188. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esm/version.js +1 -1
  189. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esm/version.js.map +1 -1
  190. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esnext/version.d.ts +1 -1
  191. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esnext/version.js +1 -1
  192. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esnext/version.js.map +1 -1
  193. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/version.d.ts +1 -1
  194. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/version.js +1 -1
  195. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/version.js.map +1 -1
  196. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json +12 -12
  197. package/node_modules/@opentelemetry/exporter-zipkin/build/esm/version.d.ts +1 -1
  198. package/node_modules/@opentelemetry/exporter-zipkin/build/esm/version.js +1 -1
  199. package/node_modules/@opentelemetry/exporter-zipkin/build/esm/version.js.map +1 -1
  200. package/node_modules/@opentelemetry/exporter-zipkin/build/esnext/version.d.ts +1 -1
  201. package/node_modules/@opentelemetry/exporter-zipkin/build/esnext/version.js +1 -1
  202. package/node_modules/@opentelemetry/exporter-zipkin/build/esnext/version.js.map +1 -1
  203. package/node_modules/@opentelemetry/exporter-zipkin/build/src/version.d.ts +1 -1
  204. package/node_modules/@opentelemetry/exporter-zipkin/build/src/version.js +1 -1
  205. package/node_modules/@opentelemetry/exporter-zipkin/build/src/version.js.map +1 -1
  206. package/node_modules/@opentelemetry/exporter-zipkin/package.json +11 -11
  207. package/node_modules/@opentelemetry/instrumentation/build/esm/instrumentation.js +1 -1
  208. package/node_modules/@opentelemetry/instrumentation/build/esm/instrumentation.js.map +1 -1
  209. package/node_modules/@opentelemetry/instrumentation/build/esm/semver.js +2 -2
  210. package/node_modules/@opentelemetry/instrumentation/build/esm/semver.js.map +1 -1
  211. package/node_modules/@opentelemetry/instrumentation/build/esm/version.d.ts +1 -1
  212. package/node_modules/@opentelemetry/instrumentation/build/esm/version.js +1 -1
  213. package/node_modules/@opentelemetry/instrumentation/build/esm/version.js.map +1 -1
  214. package/node_modules/@opentelemetry/instrumentation/build/esnext/instrumentation.js +1 -1
  215. package/node_modules/@opentelemetry/instrumentation/build/esnext/instrumentation.js.map +1 -1
  216. package/node_modules/@opentelemetry/instrumentation/build/esnext/semver.js +2 -2
  217. package/node_modules/@opentelemetry/instrumentation/build/esnext/semver.js.map +1 -1
  218. package/node_modules/@opentelemetry/instrumentation/build/esnext/version.d.ts +1 -1
  219. package/node_modules/@opentelemetry/instrumentation/build/esnext/version.js +1 -1
  220. package/node_modules/@opentelemetry/instrumentation/build/esnext/version.js.map +1 -1
  221. package/node_modules/@opentelemetry/instrumentation/build/src/instrumentation.js +1 -1
  222. package/node_modules/@opentelemetry/instrumentation/build/src/instrumentation.js.map +1 -1
  223. package/node_modules/@opentelemetry/instrumentation/build/src/semver.js +2 -2
  224. package/node_modules/@opentelemetry/instrumentation/build/src/semver.js.map +1 -1
  225. package/node_modules/@opentelemetry/instrumentation/build/src/version.d.ts +1 -1
  226. package/node_modules/@opentelemetry/instrumentation/build/src/version.js +1 -1
  227. package/node_modules/@opentelemetry/instrumentation/build/src/version.js.map +1 -1
  228. package/node_modules/@opentelemetry/instrumentation/hook.mjs +3 -14
  229. package/node_modules/@opentelemetry/instrumentation/package.json +9 -9
  230. package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.d.ts +1 -1
  231. package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js +1 -1
  232. package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js.map +1 -1
  233. package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/version.d.ts +1 -1
  234. package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/version.js +1 -1
  235. package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/version.js.map +1 -1
  236. package/node_modules/@opentelemetry/otlp-exporter-base/build/src/version.d.ts +1 -1
  237. package/node_modules/@opentelemetry/otlp-exporter-base/build/src/version.js +1 -1
  238. package/node_modules/@opentelemetry/otlp-exporter-base/build/src/version.js.map +1 -1
  239. package/node_modules/@opentelemetry/otlp-exporter-base/package.json +9 -9
  240. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/configuration/otlp-grpc-env-configuration.js +2 -2
  241. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/configuration/otlp-grpc-env-configuration.js.map +1 -1
  242. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/grpc-exporter-transport.d.ts +1 -0
  243. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/grpc-exporter-transport.js +17 -0
  244. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/grpc-exporter-transport.js.map +1 -1
  245. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/index.d.ts +1 -0
  246. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/index.js +5 -1
  247. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/index.js.map +1 -1
  248. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/version.d.ts +1 -1
  249. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/version.js +1 -1
  250. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/version.js.map +1 -1
  251. package/node_modules/@opentelemetry/otlp-grpc-exporter-base/package.json +10 -10
  252. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.d.ts +6 -3
  253. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js +7 -2
  254. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js.map +1 -1
  255. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/common-serializer.d.ts +10 -1
  256. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/common-serializer.js +9 -0
  257. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/common-serializer.js.map +1 -1
  258. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/protobuf-reader.d.ts +5 -1
  259. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/protobuf-reader.js +5 -21
  260. package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/protobuf-reader.js.map +1 -1
  261. package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.d.ts +0 -3
  262. package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js +6 -10
  263. package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js.map +1 -1
  264. package/node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/internal.js +1 -1
  265. package/node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/internal.js.map +1 -1
  266. package/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js +1 -1
  267. package/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js.map +1 -1
  268. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/internal.d.ts +6 -3
  269. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/internal.js +7 -2
  270. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/internal.js.map +1 -1
  271. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/common-serializer.d.ts +10 -1
  272. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/common-serializer.js +9 -0
  273. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/common-serializer.js.map +1 -1
  274. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/protobuf-reader.d.ts +5 -1
  275. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/protobuf-reader.js +5 -21
  276. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/protobuf-reader.js.map +1 -1
  277. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/internal.d.ts +0 -3
  278. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/internal.js +6 -10
  279. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/internal.js.map +1 -1
  280. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/metrics/internal.js +1 -1
  281. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/metrics/internal.js.map +1 -1
  282. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js +1 -1
  283. package/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js.map +1 -1
  284. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.d.ts +6 -3
  285. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.js +7 -2
  286. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.js.map +1 -1
  287. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.d.ts +10 -1
  288. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.js +9 -0
  289. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.js.map +1 -1
  290. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.d.ts +5 -1
  291. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.js +5 -21
  292. package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.js.map +1 -1
  293. package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.d.ts +0 -3
  294. package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.js +6 -11
  295. package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.js.map +1 -1
  296. package/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal.js +1 -1
  297. package/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal.js.map +1 -1
  298. package/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js +1 -1
  299. package/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js.map +1 -1
  300. package/node_modules/@opentelemetry/otlp-transformer/package.json +13 -13
  301. package/node_modules/@opentelemetry/propagator-b3/build/esm/version.d.ts +1 -1
  302. package/node_modules/@opentelemetry/propagator-b3/build/esm/version.js +1 -1
  303. package/node_modules/@opentelemetry/propagator-b3/build/esm/version.js.map +1 -1
  304. package/node_modules/@opentelemetry/propagator-b3/build/esnext/version.d.ts +1 -1
  305. package/node_modules/@opentelemetry/propagator-b3/build/esnext/version.js +1 -1
  306. package/node_modules/@opentelemetry/propagator-b3/build/esnext/version.js.map +1 -1
  307. package/node_modules/@opentelemetry/propagator-b3/build/src/version.d.ts +1 -1
  308. package/node_modules/@opentelemetry/propagator-b3/build/src/version.js +1 -1
  309. package/node_modules/@opentelemetry/propagator-b3/build/src/version.js.map +1 -1
  310. package/node_modules/@opentelemetry/propagator-b3/package.json +6 -6
  311. package/node_modules/@opentelemetry/propagator-jaeger/build/esm/version.d.ts +1 -1
  312. package/node_modules/@opentelemetry/propagator-jaeger/build/esm/version.js +1 -1
  313. package/node_modules/@opentelemetry/propagator-jaeger/build/esm/version.js.map +1 -1
  314. package/node_modules/@opentelemetry/propagator-jaeger/build/esnext/version.d.ts +1 -1
  315. package/node_modules/@opentelemetry/propagator-jaeger/build/esnext/version.js +1 -1
  316. package/node_modules/@opentelemetry/propagator-jaeger/build/esnext/version.js.map +1 -1
  317. package/node_modules/@opentelemetry/propagator-jaeger/build/src/version.d.ts +1 -1
  318. package/node_modules/@opentelemetry/propagator-jaeger/build/src/version.js +1 -1
  319. package/node_modules/@opentelemetry/propagator-jaeger/build/src/version.js.map +1 -1
  320. package/node_modules/@opentelemetry/propagator-jaeger/package.json +7 -7
  321. package/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js +2 -2
  322. package/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js.map +1 -1
  323. package/node_modules/@opentelemetry/resources/build/esm/version.d.ts +1 -1
  324. package/node_modules/@opentelemetry/resources/build/esm/version.js +1 -1
  325. package/node_modules/@opentelemetry/resources/build/esm/version.js.map +1 -1
  326. package/node_modules/@opentelemetry/resources/build/esnext/detectors/EnvDetector.js +2 -2
  327. package/node_modules/@opentelemetry/resources/build/esnext/detectors/EnvDetector.js.map +1 -1
  328. package/node_modules/@opentelemetry/resources/build/esnext/version.d.ts +1 -1
  329. package/node_modules/@opentelemetry/resources/build/esnext/version.js +1 -1
  330. package/node_modules/@opentelemetry/resources/build/esnext/version.js.map +1 -1
  331. package/node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js +2 -2
  332. package/node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js.map +1 -1
  333. package/node_modules/@opentelemetry/resources/build/src/version.d.ts +1 -1
  334. package/node_modules/@opentelemetry/resources/build/src/version.js +1 -1
  335. package/node_modules/@opentelemetry/resources/build/src/version.js.map +1 -1
  336. package/node_modules/@opentelemetry/resources/package.json +5 -5
  337. package/node_modules/@opentelemetry/sdk-logs/README.md +3 -0
  338. package/node_modules/@opentelemetry/sdk-logs/build/esm/LogRecordImpl.d.ts +4 -3
  339. package/node_modules/@opentelemetry/sdk-logs/build/esm/LogRecordImpl.js +5 -57
  340. package/node_modules/@opentelemetry/sdk-logs/build/esm/LogRecordImpl.js.map +1 -1
  341. package/node_modules/@opentelemetry/sdk-logs/build/esm/Logger.d.ts +4 -4
  342. package/node_modules/@opentelemetry/sdk-logs/build/esm/Logger.js +5 -5
  343. package/node_modules/@opentelemetry/sdk-logs/build/esm/Logger.js.map +1 -1
  344. package/node_modules/@opentelemetry/sdk-logs/build/esm/LoggerProvider.js +12 -5
  345. package/node_modules/@opentelemetry/sdk-logs/build/esm/LoggerProvider.js.map +1 -1
  346. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/BatchLogRecordProcessorBase.js +6 -3
  347. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/BatchLogRecordProcessorBase.js.map +1 -1
  348. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/ReadableLogRecord.d.ts +4 -1
  349. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/ReadableLogRecord.js.map +1 -1
  350. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SdkLogRecord.d.ts +7 -0
  351. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SdkLogRecord.js.map +1 -1
  352. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SimpleLogRecordProcessor.js +0 -1
  353. package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SimpleLogRecordProcessor.js.map +1 -1
  354. package/node_modules/@opentelemetry/sdk-logs/build/esm/internal/utils.d.ts +6 -1
  355. package/node_modules/@opentelemetry/sdk-logs/build/esm/internal/utils.js +62 -1
  356. package/node_modules/@opentelemetry/sdk-logs/build/esm/internal/utils.js.map +1 -1
  357. package/node_modules/@opentelemetry/sdk-logs/build/esm/utils/validation.d.ts +21 -2
  358. package/node_modules/@opentelemetry/sdk-logs/build/esm/utils/validation.js +112 -3
  359. package/node_modules/@opentelemetry/sdk-logs/build/esm/utils/validation.js.map +1 -1
  360. package/node_modules/@opentelemetry/sdk-logs/build/esm/version.d.ts +1 -1
  361. package/node_modules/@opentelemetry/sdk-logs/build/esm/version.js +1 -1
  362. package/node_modules/@opentelemetry/sdk-logs/build/esm/version.js.map +1 -1
  363. package/node_modules/@opentelemetry/sdk-logs/build/esnext/LogRecordImpl.d.ts +4 -3
  364. package/node_modules/@opentelemetry/sdk-logs/build/esnext/LogRecordImpl.js +5 -57
  365. package/node_modules/@opentelemetry/sdk-logs/build/esnext/LogRecordImpl.js.map +1 -1
  366. package/node_modules/@opentelemetry/sdk-logs/build/esnext/Logger.d.ts +4 -4
  367. package/node_modules/@opentelemetry/sdk-logs/build/esnext/Logger.js +5 -5
  368. package/node_modules/@opentelemetry/sdk-logs/build/esnext/Logger.js.map +1 -1
  369. package/node_modules/@opentelemetry/sdk-logs/build/esnext/LoggerProvider.js +12 -5
  370. package/node_modules/@opentelemetry/sdk-logs/build/esnext/LoggerProvider.js.map +1 -1
  371. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/BatchLogRecordProcessorBase.js +6 -3
  372. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/BatchLogRecordProcessorBase.js.map +1 -1
  373. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/ReadableLogRecord.d.ts +4 -1
  374. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/ReadableLogRecord.js.map +1 -1
  375. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SdkLogRecord.d.ts +7 -0
  376. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SdkLogRecord.js.map +1 -1
  377. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SimpleLogRecordProcessor.js +0 -1
  378. package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SimpleLogRecordProcessor.js.map +1 -1
  379. package/node_modules/@opentelemetry/sdk-logs/build/esnext/internal/utils.d.ts +6 -1
  380. package/node_modules/@opentelemetry/sdk-logs/build/esnext/internal/utils.js +62 -1
  381. package/node_modules/@opentelemetry/sdk-logs/build/esnext/internal/utils.js.map +1 -1
  382. package/node_modules/@opentelemetry/sdk-logs/build/esnext/utils/validation.d.ts +21 -2
  383. package/node_modules/@opentelemetry/sdk-logs/build/esnext/utils/validation.js +112 -3
  384. package/node_modules/@opentelemetry/sdk-logs/build/esnext/utils/validation.js.map +1 -1
  385. package/node_modules/@opentelemetry/sdk-logs/build/esnext/version.d.ts +1 -1
  386. package/node_modules/@opentelemetry/sdk-logs/build/esnext/version.js +1 -1
  387. package/node_modules/@opentelemetry/sdk-logs/build/esnext/version.js.map +1 -1
  388. package/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.d.ts +4 -3
  389. package/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.js +4 -56
  390. package/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.js.map +1 -1
  391. package/node_modules/@opentelemetry/sdk-logs/build/src/Logger.d.ts +4 -4
  392. package/node_modules/@opentelemetry/sdk-logs/build/src/Logger.js +5 -5
  393. package/node_modules/@opentelemetry/sdk-logs/build/src/Logger.js.map +1 -1
  394. package/node_modules/@opentelemetry/sdk-logs/build/src/LoggerProvider.js +11 -4
  395. package/node_modules/@opentelemetry/sdk-logs/build/src/LoggerProvider.js.map +1 -1
  396. package/node_modules/@opentelemetry/sdk-logs/build/src/export/BatchLogRecordProcessorBase.js +6 -3
  397. package/node_modules/@opentelemetry/sdk-logs/build/src/export/BatchLogRecordProcessorBase.js.map +1 -1
  398. package/node_modules/@opentelemetry/sdk-logs/build/src/export/ReadableLogRecord.d.ts +4 -1
  399. package/node_modules/@opentelemetry/sdk-logs/build/src/export/ReadableLogRecord.js.map +1 -1
  400. package/node_modules/@opentelemetry/sdk-logs/build/src/export/SdkLogRecord.d.ts +7 -0
  401. package/node_modules/@opentelemetry/sdk-logs/build/src/export/SdkLogRecord.js.map +1 -1
  402. package/node_modules/@opentelemetry/sdk-logs/build/src/export/SimpleLogRecordProcessor.js +0 -1
  403. package/node_modules/@opentelemetry/sdk-logs/build/src/export/SimpleLogRecordProcessor.js.map +1 -1
  404. package/node_modules/@opentelemetry/sdk-logs/build/src/internal/utils.d.ts +6 -1
  405. package/node_modules/@opentelemetry/sdk-logs/build/src/internal/utils.js +62 -1
  406. package/node_modules/@opentelemetry/sdk-logs/build/src/internal/utils.js.map +1 -1
  407. package/node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.d.ts +21 -2
  408. package/node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.js +115 -4
  409. package/node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.js.map +1 -1
  410. package/node_modules/@opentelemetry/sdk-logs/build/src/version.d.ts +1 -1
  411. package/node_modules/@opentelemetry/sdk-logs/build/src/version.js +1 -1
  412. package/node_modules/@opentelemetry/sdk-logs/build/src/version.js.map +1 -1
  413. package/node_modules/@opentelemetry/sdk-logs/package.json +11 -11
  414. package/node_modules/@opentelemetry/sdk-metrics/build/esm/MeterProvider.d.ts +6 -1
  415. package/node_modules/@opentelemetry/sdk-metrics/build/esm/MeterProvider.js +4 -0
  416. package/node_modules/@opentelemetry/sdk-metrics/build/esm/MeterProvider.js.map +1 -1
  417. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReader.d.ts +9 -0
  418. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReader.js +19 -0
  419. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReader.js.map +1 -1
  420. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReaderMetrics.d.ts +12 -0
  421. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReaderMetrics.js +36 -0
  422. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReaderMetrics.js.map +1 -0
  423. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/PeriodicExportingMetricReader.js +2 -0
  424. package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/PeriodicExportingMetricReader.js.map +1 -1
  425. package/node_modules/@opentelemetry/sdk-metrics/build/esm/semconv.d.ts +82 -0
  426. package/node_modules/@opentelemetry/sdk-metrics/build/esm/semconv.js +91 -0
  427. package/node_modules/@opentelemetry/sdk-metrics/build/esm/semconv.js.map +1 -0
  428. package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/DeltaMetricProcessor.js +0 -3
  429. package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/DeltaMetricProcessor.js.map +1 -1
  430. package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/HashMap.js +0 -1
  431. package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/HashMap.js.map +1 -1
  432. package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/TemporalMetricProcessor.js +0 -2
  433. package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/TemporalMetricProcessor.js.map +1 -1
  434. package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.d.ts +1 -1
  435. package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.js +1 -1
  436. package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.js.map +1 -1
  437. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/MeterProvider.d.ts +6 -1
  438. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/MeterProvider.js +4 -0
  439. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/MeterProvider.js.map +1 -1
  440. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReader.d.ts +9 -0
  441. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReader.js +19 -0
  442. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReader.js.map +1 -1
  443. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReaderMetrics.d.ts +12 -0
  444. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReaderMetrics.js +36 -0
  445. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReaderMetrics.js.map +1 -0
  446. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/PeriodicExportingMetricReader.js +2 -0
  447. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/PeriodicExportingMetricReader.js.map +1 -1
  448. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/semconv.d.ts +82 -0
  449. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/semconv.js +91 -0
  450. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/semconv.js.map +1 -0
  451. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/DeltaMetricProcessor.js +0 -3
  452. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/DeltaMetricProcessor.js.map +1 -1
  453. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/HashMap.js +0 -1
  454. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/HashMap.js.map +1 -1
  455. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/TemporalMetricProcessor.js +0 -2
  456. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/TemporalMetricProcessor.js.map +1 -1
  457. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.d.ts +1 -1
  458. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.js +1 -1
  459. package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.js.map +1 -1
  460. package/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.d.ts +6 -1
  461. package/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.js +4 -0
  462. package/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.js.map +1 -1
  463. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.d.ts +9 -0
  464. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.js +19 -0
  465. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.js.map +1 -1
  466. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReaderMetrics.d.ts +12 -0
  467. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReaderMetrics.js +40 -0
  468. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReaderMetrics.js.map +1 -0
  469. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js +2 -0
  470. package/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js.map +1 -1
  471. package/node_modules/@opentelemetry/sdk-metrics/build/src/semconv.d.ts +82 -0
  472. package/node_modules/@opentelemetry/sdk-metrics/build/src/semconv.js +94 -0
  473. package/node_modules/@opentelemetry/sdk-metrics/build/src/semconv.js.map +1 -0
  474. package/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.js +0 -3
  475. package/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.js.map +1 -1
  476. package/node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.js +0 -1
  477. package/node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.js.map +1 -1
  478. package/node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.js +0 -2
  479. package/node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.js.map +1 -1
  480. package/node_modules/@opentelemetry/sdk-metrics/build/src/version.d.ts +1 -1
  481. package/node_modules/@opentelemetry/sdk-metrics/build/src/version.js +1 -1
  482. package/node_modules/@opentelemetry/sdk-metrics/build/src/version.js.map +1 -1
  483. package/node_modules/@opentelemetry/sdk-metrics/package.json +10 -10
  484. package/node_modules/@opentelemetry/sdk-node/README.md +1 -0
  485. package/node_modules/@opentelemetry/sdk-node/build/src/index.d.ts +0 -1
  486. package/node_modules/@opentelemetry/sdk-node/build/src/index.js +1 -3
  487. package/node_modules/@opentelemetry/sdk-node/build/src/index.js.map +1 -1
  488. package/node_modules/@opentelemetry/sdk-node/build/src/sdk.js +3 -3
  489. package/node_modules/@opentelemetry/sdk-node/build/src/sdk.js.map +1 -1
  490. package/node_modules/@opentelemetry/sdk-node/build/src/start.js +2 -2
  491. package/node_modules/@opentelemetry/sdk-node/build/src/start.js.map +1 -1
  492. package/node_modules/@opentelemetry/sdk-node/build/src/utils.d.ts +1 -1
  493. package/node_modules/@opentelemetry/sdk-node/build/src/utils.js +175 -103
  494. package/node_modules/@opentelemetry/sdk-node/build/src/utils.js.map +1 -1
  495. package/node_modules/@opentelemetry/sdk-node/build/src/version.d.ts +1 -1
  496. package/node_modules/@opentelemetry/sdk-node/build/src/version.js +1 -1
  497. package/node_modules/@opentelemetry/sdk-node/build/src/version.js.map +1 -1
  498. package/node_modules/@opentelemetry/sdk-node/package.json +30 -29
  499. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.d.ts +3 -0
  500. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js +10 -1
  501. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js.map +1 -1
  502. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.d.ts +3 -0
  503. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js +23 -0
  504. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js.map +1 -1
  505. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.d.ts +8 -0
  506. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js +10 -0
  507. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js.map +1 -1
  508. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/inspect.d.ts +32 -0
  509. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/inspect.js +53 -0
  510. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/inspect.js.map +1 -0
  511. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.d.ts +1 -1
  512. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js +1 -1
  513. package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js.map +1 -1
  514. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/BasicTracerProvider.d.ts +3 -0
  515. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/BasicTracerProvider.js +10 -1
  516. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/BasicTracerProvider.js.map +1 -1
  517. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Span.d.ts +3 -0
  518. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Span.js +23 -0
  519. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Span.js.map +1 -1
  520. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Tracer.d.ts +8 -0
  521. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Tracer.js +10 -0
  522. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Tracer.js.map +1 -1
  523. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/inspect.d.ts +32 -0
  524. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/inspect.js +53 -0
  525. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/inspect.js.map +1 -0
  526. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.d.ts +1 -1
  527. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.js +1 -1
  528. package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.js.map +1 -1
  529. package/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.d.ts +3 -0
  530. package/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js +10 -1
  531. package/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js.map +1 -1
  532. package/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.d.ts +3 -0
  533. package/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.js +23 -0
  534. package/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.js.map +1 -1
  535. package/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.d.ts +8 -0
  536. package/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js +10 -0
  537. package/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js.map +1 -1
  538. package/node_modules/@opentelemetry/sdk-trace-base/build/src/inspect.d.ts +32 -0
  539. package/node_modules/@opentelemetry/sdk-trace-base/build/src/inspect.js +58 -0
  540. package/node_modules/@opentelemetry/sdk-trace-base/build/src/inspect.js.map +1 -0
  541. package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.d.ts +1 -1
  542. package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.js +1 -1
  543. package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.js.map +1 -1
  544. package/node_modules/@opentelemetry/sdk-trace-base/package.json +9 -9
  545. package/node_modules/@opentelemetry/sdk-trace-node/build/src/version.d.ts +1 -1
  546. package/node_modules/@opentelemetry/sdk-trace-node/build/src/version.js +1 -1
  547. package/node_modules/@opentelemetry/sdk-trace-node/build/src/version.js.map +1 -1
  548. package/node_modules/@opentelemetry/sdk-trace-node/package.json +8 -8
  549. package/node_modules/@protobufjs/aspromise/LICENSE +26 -0
  550. package/node_modules/@protobufjs/aspromise/README.md +13 -0
  551. package/node_modules/{protobufjs/src/util/aspromise.d.ts → @protobufjs/aspromise/index.d.ts} +13 -13
  552. package/node_modules/{protobufjs/src/util/aspromise.js → @protobufjs/aspromise/index.js} +52 -52
  553. package/node_modules/@protobufjs/aspromise/package.json +21 -0
  554. package/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
  555. package/node_modules/@protobufjs/base64/LICENSE +26 -0
  556. package/node_modules/@protobufjs/base64/README.md +19 -0
  557. package/node_modules/{protobufjs/src/util/base64.d.ts → @protobufjs/base64/index.d.ts} +32 -32
  558. package/node_modules/{protobufjs/src/util/base64.js → @protobufjs/base64/index.js} +139 -146
  559. package/node_modules/@protobufjs/base64/package.json +21 -0
  560. package/node_modules/@protobufjs/base64/tests/index.js +46 -0
  561. package/node_modules/@protobufjs/codegen/LICENSE +26 -0
  562. package/node_modules/@protobufjs/codegen/README.md +49 -0
  563. package/node_modules/{protobufjs/src/util/codegen.d.ts → @protobufjs/codegen/index.d.ts} +31 -31
  564. package/node_modules/{protobufjs/src/util/codegen.js → @protobufjs/codegen/index.js} +112 -113
  565. package/node_modules/@protobufjs/codegen/package.json +13 -0
  566. package/node_modules/@protobufjs/codegen/tests/index.js +13 -0
  567. package/node_modules/@protobufjs/eventemitter/CHANGELOG.md +8 -0
  568. package/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
  569. package/node_modules/@protobufjs/eventemitter/README.md +22 -0
  570. package/node_modules/{protobufjs/src/util/eventemitter.d.ts → @protobufjs/eventemitter/index.d.ts} +45 -45
  571. package/node_modules/{protobufjs/src/util/eventemitter.js → @protobufjs/eventemitter/index.js} +86 -86
  572. package/node_modules/@protobufjs/eventemitter/package.json +21 -0
  573. package/node_modules/@protobufjs/eventemitter/tests/index.js +83 -0
  574. package/node_modules/@protobufjs/fetch/CHANGELOG.md +8 -0
  575. package/node_modules/@protobufjs/fetch/LICENSE +26 -0
  576. package/node_modules/@protobufjs/fetch/README.md +13 -0
  577. package/node_modules/{protobufjs/src/util/fetch.d.ts → @protobufjs/fetch/index.d.ts} +56 -56
  578. package/node_modules/{protobufjs/src/util/fetch.js → @protobufjs/fetch/index.js} +112 -112
  579. package/node_modules/@protobufjs/fetch/package.json +27 -0
  580. package/node_modules/@protobufjs/fetch/tests/data/file.txt +1 -0
  581. package/node_modules/@protobufjs/fetch/tests/index.js +158 -0
  582. package/node_modules/@protobufjs/fetch/util/fs.js +11 -0
  583. package/node_modules/@protobufjs/float/LICENSE +26 -0
  584. package/node_modules/@protobufjs/float/README.md +102 -0
  585. package/node_modules/@protobufjs/float/bench/index.js +87 -0
  586. package/node_modules/@protobufjs/float/bench/suite.js +46 -0
  587. package/node_modules/{protobufjs/src/util/float.js → @protobufjs/float/index.js} +335 -335
  588. package/node_modules/@protobufjs/float/package.json +26 -0
  589. package/node_modules/@protobufjs/float/tests/index.js +100 -0
  590. package/node_modules/@protobufjs/inquire/CHANGELOG.md +8 -0
  591. package/node_modules/@protobufjs/inquire/LICENSE +26 -0
  592. package/node_modules/@protobufjs/inquire/README.md +13 -0
  593. package/node_modules/{protobufjs/src/util/inquire.d.ts → @protobufjs/inquire/index.d.ts} +10 -10
  594. package/node_modules/{protobufjs/src/util/inquire.js → @protobufjs/inquire/index.js} +38 -38
  595. package/node_modules/@protobufjs/inquire/package.json +21 -0
  596. package/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
  597. package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
  598. package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
  599. package/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
  600. package/node_modules/@protobufjs/inquire/tests/index.js +20 -0
  601. package/node_modules/@protobufjs/path/LICENSE +26 -0
  602. package/node_modules/@protobufjs/path/README.md +19 -0
  603. package/node_modules/{protobufjs/src/util/path.d.ts → @protobufjs/path/index.d.ts} +22 -22
  604. package/node_modules/{protobufjs/src/util/path.js → @protobufjs/path/index.js} +65 -72
  605. package/node_modules/@protobufjs/path/package.json +21 -0
  606. package/node_modules/@protobufjs/path/tests/index.js +60 -0
  607. package/node_modules/@protobufjs/pool/.npmignore +3 -0
  608. package/node_modules/@protobufjs/pool/LICENSE +26 -0
  609. package/node_modules/@protobufjs/pool/README.md +13 -0
  610. package/node_modules/{protobufjs/src/util/pool.d.ts → @protobufjs/pool/index.d.ts} +32 -32
  611. package/node_modules/{protobufjs/src/util/pool.js → @protobufjs/pool/index.js} +48 -48
  612. package/node_modules/@protobufjs/pool/package.json +21 -0
  613. package/node_modules/@protobufjs/pool/tests/index.js +33 -0
  614. package/node_modules/@protobufjs/utf8/LICENSE +26 -0
  615. package/node_modules/@protobufjs/utf8/README.md +20 -0
  616. package/node_modules/{protobufjs/src/util/utf8.d.ts → @protobufjs/utf8/index.d.ts} +24 -24
  617. package/node_modules/{protobufjs/src/util/utf8.js → @protobufjs/utf8/index.js} +104 -130
  618. package/node_modules/@protobufjs/utf8/package.json +21 -0
  619. package/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt +207 -0
  620. package/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
  621. package/node_modules/@protobufjs/utf8/tests/index.js +74 -0
  622. package/node_modules/@types/node/LICENSE +21 -0
  623. package/node_modules/@types/node/README.md +15 -0
  624. package/node_modules/@types/node/assert/strict.d.ts +59 -0
  625. package/node_modules/@types/node/assert.d.ts +950 -0
  626. package/node_modules/@types/node/async_hooks.d.ts +711 -0
  627. package/node_modules/@types/node/buffer.buffer.d.ts +466 -0
  628. package/node_modules/@types/node/buffer.d.ts +1765 -0
  629. package/node_modules/@types/node/child_process.d.ts +1366 -0
  630. package/node_modules/@types/node/cluster.d.ts +432 -0
  631. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  632. package/node_modules/@types/node/console.d.ts +93 -0
  633. package/node_modules/@types/node/constants.d.ts +14 -0
  634. package/node_modules/@types/node/crypto.d.ts +4058 -0
  635. package/node_modules/@types/node/dgram.d.ts +537 -0
  636. package/node_modules/@types/node/diagnostics_channel.d.ts +552 -0
  637. package/node_modules/@types/node/dns/promises.d.ts +497 -0
  638. package/node_modules/@types/node/dns.d.ts +876 -0
  639. package/node_modules/@types/node/domain.d.ts +150 -0
  640. package/node_modules/@types/node/events.d.ts +1008 -0
  641. package/node_modules/@types/node/fs/promises.d.ts +1468 -0
  642. package/node_modules/@types/node/fs.d.ts +4780 -0
  643. package/node_modules/@types/node/globals.d.ts +150 -0
  644. package/node_modules/@types/node/globals.typedarray.d.ts +101 -0
  645. package/node_modules/@types/node/http.d.ts +2147 -0
  646. package/node_modules/@types/node/http2.d.ts +2485 -0
  647. package/node_modules/@types/node/https.d.ts +400 -0
  648. package/node_modules/@types/node/index.d.ts +117 -0
  649. package/node_modules/@types/node/inspector/promises.d.ts +35 -0
  650. package/node_modules/@types/node/inspector.d.ts +264 -0
  651. package/node_modules/@types/node/inspector.generated.d.ts +4406 -0
  652. package/node_modules/@types/node/module.d.ts +755 -0
  653. package/node_modules/@types/node/net.d.ts +970 -0
  654. package/node_modules/@types/node/os.d.ts +498 -0
  655. package/node_modules/@types/node/package.json +155 -0
  656. package/node_modules/@types/node/path/posix.d.ts +8 -0
  657. package/node_modules/@types/node/path/win32.d.ts +8 -0
  658. package/node_modules/@types/node/path.d.ts +178 -0
  659. package/node_modules/@types/node/perf_hooks.d.ts +612 -0
  660. package/node_modules/@types/node/process.d.ts +2204 -0
  661. package/node_modules/@types/node/punycode.d.ts +89 -0
  662. package/node_modules/@types/node/querystring.d.ts +139 -0
  663. package/node_modules/@types/node/quic.d.ts +897 -0
  664. package/node_modules/@types/node/readline/promises.d.ts +158 -0
  665. package/node_modules/@types/node/readline.d.ts +507 -0
  666. package/node_modules/@types/node/repl.d.ts +420 -0
  667. package/node_modules/@types/node/sea.d.ts +47 -0
  668. package/node_modules/@types/node/sqlite.d.ts +1068 -0
  669. package/node_modules/@types/node/stream/consumers.d.ts +114 -0
  670. package/node_modules/@types/node/stream/iter.d.ts +301 -0
  671. package/node_modules/@types/node/stream/promises.d.ts +211 -0
  672. package/node_modules/@types/node/stream/web.d.ts +300 -0
  673. package/node_modules/@types/node/stream.d.ts +1774 -0
  674. package/node_modules/@types/node/string_decoder.d.ts +27 -0
  675. package/node_modules/@types/node/test/reporters.d.ts +59 -0
  676. package/node_modules/@types/node/test.d.ts +2279 -0
  677. package/node_modules/@types/node/timers/promises.d.ts +93 -0
  678. package/node_modules/@types/node/timers.d.ts +149 -0
  679. package/node_modules/@types/node/tls.d.ts +1193 -0
  680. package/node_modules/@types/node/trace_events.d.ts +103 -0
  681. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
  682. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  683. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  684. package/node_modules/@types/node/ts5.6/index.d.ts +119 -0
  685. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  686. package/node_modules/@types/node/ts5.7/index.d.ts +119 -0
  687. package/node_modules/@types/node/tty.d.ts +225 -0
  688. package/node_modules/@types/node/url.d.ts +556 -0
  689. package/node_modules/@types/node/util/types.d.ts +558 -0
  690. package/node_modules/@types/node/util.d.ts +1677 -0
  691. package/node_modules/@types/node/v8.d.ts +980 -0
  692. package/node_modules/@types/node/vm.d.ts +1136 -0
  693. package/node_modules/@types/node/wasi.d.ts +131 -0
  694. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
  695. package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  696. package/node_modules/@types/node/web-globals/console.d.ts +9 -0
  697. package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  698. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  699. package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  700. package/node_modules/@types/node/web-globals/events.d.ts +106 -0
  701. package/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
  702. package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  703. package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  704. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  705. package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  706. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  707. package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
  708. package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  709. package/node_modules/@types/node/web-globals/url.d.ts +24 -0
  710. package/node_modules/@types/node/worker_threads.d.ts +671 -0
  711. package/node_modules/@types/node/zlib/iter.d.ts +131 -0
  712. package/node_modules/@types/node/zlib.d.ts +589 -0
  713. package/node_modules/protobufjs/README.md +556 -263
  714. package/node_modules/protobufjs/dist/light/protobuf.js +1569 -1919
  715. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  716. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  717. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  718. package/node_modules/protobufjs/dist/minimal/protobuf.js +906 -1132
  719. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  720. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  721. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  722. package/node_modules/protobufjs/dist/protobuf.js +1576 -1993
  723. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  724. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  725. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  726. package/node_modules/protobufjs/ext/descriptor/README.md +70 -3
  727. package/node_modules/protobufjs/ext/descriptor/index.d.ts +193 -0
  728. package/node_modules/protobufjs/ext/descriptor/index.js +1185 -1
  729. package/node_modules/protobufjs/ext/descriptor/test.js +54 -0
  730. package/node_modules/protobufjs/index.d.ts +720 -834
  731. package/node_modules/protobufjs/package.json +44 -20
  732. package/node_modules/protobufjs/src/converter.js +36 -60
  733. package/node_modules/protobufjs/src/decoder.js +53 -124
  734. package/node_modules/protobufjs/src/encoder.js +2 -10
  735. package/node_modules/protobufjs/src/enum.js +3 -8
  736. package/node_modules/protobufjs/src/field.js +11 -13
  737. package/node_modules/protobufjs/src/index-light.js +1 -1
  738. package/node_modules/protobufjs/src/mapfield.js +0 -1
  739. package/node_modules/protobufjs/src/message.js +11 -5
  740. package/node_modules/protobufjs/src/method.js +4 -5
  741. package/node_modules/protobufjs/src/namespace.js +3 -10
  742. package/node_modules/protobufjs/src/object.js +20 -20
  743. package/node_modules/protobufjs/src/oneof.js +0 -3
  744. package/node_modules/protobufjs/src/parse.js +16 -78
  745. package/node_modules/protobufjs/src/reader.js +31 -136
  746. package/node_modules/protobufjs/src/reader_buffer.js +3 -24
  747. package/node_modules/protobufjs/src/root.js +3 -7
  748. package/node_modules/protobufjs/src/roots.js +1 -1
  749. package/node_modules/protobufjs/src/service.js +6 -13
  750. package/node_modules/protobufjs/src/tokenize.js +1 -6
  751. package/node_modules/protobufjs/src/type.js +30 -44
  752. package/node_modules/protobufjs/src/typescript.jsdoc +15 -0
  753. package/node_modules/protobufjs/src/util/minimal.js +12 -36
  754. package/node_modules/protobufjs/src/util.js +17 -6
  755. package/node_modules/protobufjs/src/verifier.js +6 -6
  756. package/node_modules/protobufjs/src/wrappers.js +1 -0
  757. package/node_modules/protobufjs/src/writer.js +16 -42
  758. package/node_modules/protobufjs/src/writer_buffer.js +1 -18
  759. package/node_modules/protobufjs/tsconfig.json +5 -3
  760. package/node_modules/undici-types/LICENSE +21 -0
  761. package/node_modules/undici-types/README.md +6 -0
  762. package/node_modules/undici-types/agent.d.ts +32 -0
  763. package/node_modules/undici-types/api.d.ts +43 -0
  764. package/node_modules/undici-types/balanced-pool.d.ts +30 -0
  765. package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
  766. package/node_modules/undici-types/cache.d.ts +36 -0
  767. package/node_modules/undici-types/client-stats.d.ts +15 -0
  768. package/node_modules/undici-types/client.d.ts +123 -0
  769. package/node_modules/undici-types/connector.d.ts +36 -0
  770. package/node_modules/undici-types/content-type.d.ts +21 -0
  771. package/node_modules/undici-types/cookies.d.ts +30 -0
  772. package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  773. package/node_modules/undici-types/dispatcher.d.ts +279 -0
  774. package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  775. package/node_modules/undici-types/errors.d.ts +177 -0
  776. package/node_modules/undici-types/eventsource.d.ts +66 -0
  777. package/node_modules/undici-types/fetch.d.ts +211 -0
  778. package/node_modules/undici-types/formdata.d.ts +108 -0
  779. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  780. package/node_modules/undici-types/global-origin.d.ts +7 -0
  781. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  782. package/node_modules/undici-types/handlers.d.ts +15 -0
  783. package/node_modules/undici-types/header.d.ts +160 -0
  784. package/node_modules/undici-types/index.d.ts +91 -0
  785. package/node_modules/undici-types/interceptors.d.ts +80 -0
  786. package/node_modules/undici-types/mock-agent.d.ts +68 -0
  787. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  788. package/node_modules/undici-types/mock-client.d.ts +27 -0
  789. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  790. package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  791. package/node_modules/undici-types/mock-pool.d.ts +27 -0
  792. package/node_modules/undici-types/package.json +55 -0
  793. package/node_modules/undici-types/patch.d.ts +29 -0
  794. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  795. package/node_modules/undici-types/pool.d.ts +41 -0
  796. package/node_modules/undici-types/proxy-agent.d.ts +29 -0
  797. package/node_modules/undici-types/readable.d.ts +68 -0
  798. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  799. package/node_modules/undici-types/retry-handler.d.ts +125 -0
  800. package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  801. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  802. package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
  803. package/node_modules/undici-types/util.d.ts +18 -0
  804. package/node_modules/undici-types/utility.d.ts +7 -0
  805. package/node_modules/undici-types/webidl.d.ts +347 -0
  806. package/node_modules/undici-types/websocket.d.ts +188 -0
  807. package/npm-shrinkwrap.json +294 -204
  808. package/package.json +13 -13
  809. package/node_modules/protobufjs/ext/README.md +0 -81
  810. package/node_modules/protobufjs/ext/descriptor.d.ts +0 -86
  811. package/node_modules/protobufjs/ext/descriptor.generated.d.ts +0 -409
  812. package/node_modules/protobufjs/ext/descriptor.js +0 -1266
  813. package/node_modules/protobufjs/ext/textformat.d.ts +0 -19
  814. package/node_modules/protobufjs/ext/textformat.generated.d.ts +0 -11
  815. package/node_modules/protobufjs/ext/textformat.js +0 -1235
  816. package/node_modules/protobufjs/google/protobuf/compiler/plugin.json +0 -126
  817. package/node_modules/protobufjs/google/protobuf/compiler/plugin.proto +0 -47
  818. package/node_modules/protobufjs/src/typescript.js +0 -25
  819. /package/node_modules/{protobufjs/src/util/float.d.ts → @protobufjs/float/index.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Span.js","sourceRoot":"","sources":["../../src/Span.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA4B7C;;GAEG;AACH,MAAM,OAAO,QAAQ;IACnB,qEAAqE;IACrE,2DAA2D;IAC1C,YAAY,CAAc;IAClC,IAAI,CAAW;IACf,iBAAiB,CAAe;IAChC,UAAU,GAAe,EAAE,CAAC;IAC5B,KAAK,GAAW,EAAE,CAAC;IACnB,MAAM,GA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C,IAAI,CACP,wDAAwD,IAAI,CAAC,YAAY,CAAC,OAAO,aAAa,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,EACzH,KAAK,CACN,CAAC;SACH;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,uDAAuD;IACvD,yDAAyD;IACzD,iDAAiD;IACzC,oBAAoB,CAAC,KAAa,EAAE,KAAa;QACvD,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,EAAE;YACzB,OAAO,KAAK,CAAC;SACd;QACD,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;;;;;;OAWG;IACK,eAAe,CAAC,KAAqB;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,0BAA0B,CAAC;QAC9C,cAAc;QACd,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,kDAAkD;YAClD,IAAI,CAAC,IAAI,CAAC,+CAA+C,KAAK,EAAE,CAAC,CAAC;YAClE,OAAO,KAAK,CAAC;SACd;QAED,SAAS;QACT,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SAChD;QAED,mBAAmB;QACnB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,OAAQ,KAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAC7B,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CACtE,CAAC;SACH;QAED,mDAAmD;QACnD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n Context,\n Exception,\n HrTime,\n Link,\n Span as APISpan,\n SpanOptions as APISpanOptions,\n Attributes,\n AttributeValue,\n SpanContext,\n SpanKind,\n SpanStatus,\n TimeInput,\n} from '@opentelemetry/api';\nimport { diag, SpanStatusCode } from '@opentelemetry/api';\nimport type { InstrumentationScope } from '@opentelemetry/core';\nimport {\n addHrTimes,\n millisToHrTime,\n hrTime,\n hrTimeDuration,\n isAttributeValue,\n isTimeInput,\n isTimeInputHrTime,\n otperformance,\n sanitizeAttributes,\n} from '@opentelemetry/core';\nimport type { Resource } from '@opentelemetry/resources';\nimport {\n ATTR_EXCEPTION_MESSAGE,\n ATTR_EXCEPTION_STACKTRACE,\n ATTR_EXCEPTION_TYPE,\n} from '@opentelemetry/semantic-conventions';\nimport type { ReadableSpan } from './export/ReadableSpan';\nimport { ExceptionEventName } from './enums';\nimport type { SpanProcessor } from './SpanProcessor';\nimport type { TimedEvent } from './TimedEvent';\nimport type { SpanLimits } from './types';\n\n/**\n * This type provides the properties of @link{ReadableSpan} at the same time\n * of the Span API\n */\nexport type Span = APISpan & ReadableSpan;\n\n// `root` is omitted because it is consumed by Tracer.startSpan() to strip\n// parent context but it has no meaning when constructing a Span directly.\ntype SpanOptions = Omit<APISpanOptions, 'root'> & {\n resource: Resource;\n scope: InstrumentationScope;\n context: Context;\n spanContext: SpanContext;\n name: string;\n // Required here to override optional `kind` from the API's SpanOptions\n // SpanImpl assigns it unconditionally and ReadableSpan expects it to be set.\n kind: SpanKind;\n parentSpanContext?: SpanContext;\n spanLimits: SpanLimits;\n spanProcessor: SpanProcessor;\n recordEndMetrics?: () => void;\n};\n\n/**\n * This class represents a span.\n */\nexport class SpanImpl implements Span {\n // Below properties are included to implement ReadableSpan for export\n // purposes but are not intended to be written-to directly.\n private readonly _spanContext: SpanContext;\n readonly kind: SpanKind;\n readonly parentSpanContext?: SpanContext;\n readonly attributes: Attributes = {};\n readonly links: Link[] = [];\n readonly events: TimedEvent[] = [];\n readonly startTime: HrTime;\n readonly resource: Resource;\n readonly instrumentationScope: InstrumentationScope;\n\n private _droppedAttributesCount = 0;\n private _droppedEventsCount: number = 0;\n private _droppedLinksCount: number = 0;\n private _attributesCount: number = 0;\n\n name: string;\n status: SpanStatus = {\n code: SpanStatusCode.UNSET,\n };\n endTime: HrTime = [0, 0];\n private _ended = false;\n private _duration: HrTime = [-1, -1];\n private readonly _spanProcessor: SpanProcessor;\n private readonly _spanLimits: SpanLimits;\n private readonly _attributeValueLengthLimit: number;\n private readonly _recordEndMetrics?: () => void;\n\n private readonly _performanceStartTime: number;\n private readonly _performanceOffset: number;\n private readonly _startTimeProvided: boolean;\n\n /**\n * Constructs a new SpanImpl instance.\n */\n constructor(opts: SpanOptions) {\n const now = Date.now();\n\n this._spanContext = opts.spanContext;\n this._performanceStartTime = otperformance.now();\n this._performanceOffset =\n now - (this._performanceStartTime + otperformance.timeOrigin);\n this._startTimeProvided = opts.startTime != null;\n this._spanLimits = opts.spanLimits;\n this._attributeValueLengthLimit =\n this._spanLimits.attributeValueLengthLimit ?? 0;\n this._spanProcessor = opts.spanProcessor;\n\n this.name = opts.name;\n this.parentSpanContext = opts.parentSpanContext;\n this.kind = opts.kind;\n if (opts.links) {\n for (const link of opts.links) {\n this.addLink(link);\n }\n }\n this.startTime = this._getTime(opts.startTime ?? now);\n this.resource = opts.resource;\n this.instrumentationScope = opts.scope;\n this._recordEndMetrics = opts.recordEndMetrics;\n\n if (opts.attributes != null) {\n this.setAttributes(opts.attributes);\n }\n\n this._spanProcessor.onStart(this, opts.context);\n }\n\n spanContext(): SpanContext {\n return this._spanContext;\n }\n\n setAttribute(key: string, value?: AttributeValue): this;\n setAttribute(key: string, value: unknown): this {\n if (value == null || this._isSpanEnded()) return this;\n if (key.length === 0) {\n diag.warn(`Invalid attribute key: ${key}`);\n return this;\n }\n if (!isAttributeValue(value)) {\n diag.warn(`Invalid attribute value set for key: ${key}`);\n return this;\n }\n\n const { attributeCountLimit } = this._spanLimits;\n const isNewKey = !Object.prototype.hasOwnProperty.call(\n this.attributes,\n key\n );\n\n if (\n attributeCountLimit !== undefined &&\n this._attributesCount >= attributeCountLimit &&\n isNewKey\n ) {\n this._droppedAttributesCount++;\n return this;\n }\n\n this.attributes[key] = this._truncateToSize(value);\n if (isNewKey) {\n this._attributesCount++;\n }\n return this;\n }\n\n setAttributes(attributes: Attributes): this {\n for (const key in attributes) {\n if (Object.prototype.hasOwnProperty.call(attributes, key)) {\n this.setAttribute(key, attributes[key]);\n }\n }\n return this;\n }\n\n /**\n *\n * @param name Span Name\n * @param [attributesOrStartTime] Span attributes or start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [timeStamp] Specified time stamp for the event\n */\n addEvent(\n name: string,\n attributesOrStartTime?: Attributes | TimeInput,\n timeStamp?: TimeInput\n ): this {\n if (this._isSpanEnded()) return this;\n\n const { eventCountLimit } = this._spanLimits;\n\n if (eventCountLimit === 0) {\n diag.warn('No events allowed.');\n this._droppedEventsCount++;\n return this;\n }\n\n if (\n eventCountLimit !== undefined &&\n this.events.length >= eventCountLimit\n ) {\n if (this._droppedEventsCount === 0) {\n diag.debug('Dropping extra events.');\n }\n this.events.shift();\n this._droppedEventsCount++;\n }\n\n if (isTimeInput(attributesOrStartTime)) {\n if (!isTimeInput(timeStamp)) {\n timeStamp = attributesOrStartTime;\n }\n attributesOrStartTime = undefined;\n }\n\n const sanitized = sanitizeAttributes(attributesOrStartTime);\n const { attributePerEventCountLimit } = this._spanLimits;\n const attributes: Attributes = {};\n let droppedAttributesCount = 0;\n let eventAttributesCount = 0;\n\n for (const attr in sanitized) {\n if (!Object.prototype.hasOwnProperty.call(sanitized, attr)) {\n continue;\n }\n const attrVal = sanitized[attr];\n if (\n attributePerEventCountLimit !== undefined &&\n eventAttributesCount >= attributePerEventCountLimit\n ) {\n droppedAttributesCount++;\n continue;\n }\n attributes[attr] = this._truncateToSize(attrVal!);\n eventAttributesCount++;\n }\n\n this.events.push({\n name,\n attributes,\n time: this._getTime(timeStamp),\n droppedAttributesCount,\n });\n return this;\n }\n\n addLink(link: Link): this {\n if (this._isSpanEnded()) return this;\n\n const { linkCountLimit } = this._spanLimits;\n\n if (linkCountLimit === 0) {\n this._droppedLinksCount++;\n return this;\n }\n\n if (linkCountLimit !== undefined && this.links.length >= linkCountLimit) {\n if (this._droppedLinksCount === 0) {\n diag.debug('Dropping extra links.');\n }\n this.links.shift();\n this._droppedLinksCount++;\n }\n\n const { attributePerLinkCountLimit } = this._spanLimits;\n const sanitized = sanitizeAttributes(link.attributes);\n const attributes: Attributes = {};\n let droppedAttributesCount = 0;\n let linkAttributesCount = 0;\n\n for (const attr in sanitized) {\n if (!Object.prototype.hasOwnProperty.call(sanitized, attr)) {\n continue;\n }\n const attrVal = sanitized[attr];\n if (\n attributePerLinkCountLimit !== undefined &&\n linkAttributesCount >= attributePerLinkCountLimit\n ) {\n droppedAttributesCount++;\n continue;\n }\n attributes[attr] = this._truncateToSize(attrVal!);\n linkAttributesCount++;\n }\n\n const processedLink: Link = { context: link.context };\n if (linkAttributesCount > 0) {\n processedLink.attributes = attributes;\n }\n if (droppedAttributesCount > 0) {\n processedLink.droppedAttributesCount = droppedAttributesCount;\n }\n\n this.links.push(processedLink);\n return this;\n }\n\n addLinks(links: Link[]): this {\n for (const link of links) {\n this.addLink(link);\n }\n return this;\n }\n\n setStatus(status: SpanStatus): this {\n if (this._isSpanEnded()) return this;\n if (status.code === SpanStatusCode.UNSET) return this;\n if (this.status.code === SpanStatusCode.OK) return this;\n\n const newStatus: SpanStatus = { code: status.code };\n\n // When using try-catch, the caught \"error\" is of type `any`. When then assigning `any` to `status.message`,\n // TypeScript will not error. While this can happen during use of any API, it is more common on Span#setStatus()\n // as it's likely used in a catch-block. Therefore, we validate if `status.message` is actually a string, null, or\n // undefined to avoid an incorrect type causing issues downstream.\n if (status.code === SpanStatusCode.ERROR) {\n if (typeof status.message === 'string') {\n newStatus.message = status.message;\n } else if (status.message != null) {\n diag.warn(\n `Dropping invalid status.message of type '${typeof status.message}', expected 'string'`\n );\n }\n }\n\n this.status = newStatus;\n return this;\n }\n\n updateName(name: string): this {\n if (this._isSpanEnded()) return this;\n this.name = name;\n return this;\n }\n\n end(endTime?: TimeInput): void {\n if (this._isSpanEnded()) {\n diag.error(\n `${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`\n );\n return;\n }\n this.endTime = this._getTime(endTime);\n this._duration = hrTimeDuration(this.startTime, this.endTime);\n\n if (this._duration[0] < 0) {\n diag.warn(\n 'Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.',\n this.startTime,\n this.endTime\n );\n this.endTime = this.startTime.slice() as HrTime;\n this._duration = [0, 0];\n }\n\n if (this._droppedEventsCount > 0) {\n diag.warn(\n `Dropped ${this._droppedEventsCount} events because eventCountLimit reached`\n );\n }\n if (this._droppedLinksCount > 0) {\n diag.warn(\n `Dropped ${this._droppedLinksCount} links because linkCountLimit reached`\n );\n }\n if (this._spanProcessor.onEnding) {\n this._spanProcessor.onEnding(this);\n }\n\n this._recordEndMetrics?.();\n this._ended = true;\n this._spanProcessor.onEnd(this);\n }\n\n private _getTime(inp?: TimeInput): HrTime {\n if (typeof inp === 'number' && inp <= otperformance.now()) {\n // must be a performance timestamp\n // apply correction and convert to hrtime\n return hrTime(inp + this._performanceOffset);\n }\n\n if (typeof inp === 'number') {\n return millisToHrTime(inp);\n }\n\n if (inp instanceof Date) {\n return millisToHrTime(inp.getTime());\n }\n\n if (isTimeInputHrTime(inp)) {\n return inp;\n }\n\n if (this._startTimeProvided) {\n // if user provided a time for the start manually\n // we can't use duration to calculate event/end times\n return millisToHrTime(Date.now());\n }\n\n const msDuration = otperformance.now() - this._performanceStartTime;\n return addHrTimes(this.startTime, millisToHrTime(msDuration));\n }\n\n isRecording(): boolean {\n return this._ended === false;\n }\n\n recordException(exception: Exception, time?: TimeInput): void {\n const attributes: Attributes = {};\n if (typeof exception === 'string') {\n attributes[ATTR_EXCEPTION_MESSAGE] = exception;\n } else if (exception) {\n if (exception.code) {\n attributes[ATTR_EXCEPTION_TYPE] = exception.code.toString();\n } else if (exception.name) {\n attributes[ATTR_EXCEPTION_TYPE] = exception.name;\n }\n if (exception.message) {\n attributes[ATTR_EXCEPTION_MESSAGE] = exception.message;\n }\n if (exception.stack) {\n attributes[ATTR_EXCEPTION_STACKTRACE] = exception.stack;\n }\n }\n\n // these are minimum requirements from spec\n if (attributes[ATTR_EXCEPTION_TYPE] || attributes[ATTR_EXCEPTION_MESSAGE]) {\n this.addEvent(ExceptionEventName, attributes, time);\n } else {\n diag.warn(`Failed to record an exception ${exception}`);\n }\n }\n\n get duration(): HrTime {\n return this._duration;\n }\n\n get ended(): boolean {\n return this._ended;\n }\n\n get droppedAttributesCount(): number {\n return this._droppedAttributesCount;\n }\n\n get droppedEventsCount(): number {\n return this._droppedEventsCount;\n }\n\n get droppedLinksCount(): number {\n return this._droppedLinksCount;\n }\n\n private _isSpanEnded(): boolean {\n if (this._ended) {\n const error = new Error(\n `Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`\n );\n\n diag.warn(\n `Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,\n error\n );\n }\n return this._ended;\n }\n\n // Utility function to truncate given value within size\n // for value type of string, will truncate to given limit\n // for type of non-string, will return same value\n private _truncateToLimitUtil(value: string, limit: number): string {\n if (value.length <= limit) {\n return value;\n }\n return value.substring(0, limit);\n }\n\n /**\n * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then\n * return string with truncated to {@code attributeValueLengthLimit} characters\n *\n * If the given attribute value is array of strings then\n * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters\n *\n * Otherwise return same Attribute {@code value}\n *\n * @param value Attribute value\n * @returns truncated attribute value if required, otherwise same value\n */\n private _truncateToSize(value: AttributeValue): AttributeValue {\n const limit = this._attributeValueLengthLimit;\n // Check limit\n if (limit <= 0) {\n // Negative values are invalid, so do not truncate\n diag.warn(`Attribute value limit must be positive, got ${limit}`);\n return value;\n }\n\n // String\n if (typeof value === 'string') {\n return this._truncateToLimitUtil(value, limit);\n }\n\n // Array of strings\n if (Array.isArray(value)) {\n return (value as []).map(val =>\n typeof val === 'string' ? this._truncateToLimitUtil(val, limit) : val\n );\n }\n\n // Other types, no need to apply value length limit\n return value;\n }\n}\n"]}
1
+ {"version":3,"file":"Span.js","sourceRoot":"","sources":["../../src/Span.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,OAAO,EACL,aAAa,EACb,aAAa,EACb,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAyBnB;;GAEG;AACH,MAAM,OAAO,QAAQ;IACnB,qEAAqE;IACrE,2DAA2D;IAC1C,YAAY,CAAc;IAClC,IAAI,CAAW;IACf,iBAAiB,CAAe;IAChC,UAAU,GAAe,EAAE,CAAC;IAC5B,KAAK,GAAW,EAAE,CAAC;IACnB,MAAM,GAAiB,EAAE,CAAC;IAC1B,SAAS,CAAS;IAClB,QAAQ,CAAW;IACnB,oBAAoB,CAAuB;IAE5C,uBAAuB,GAAG,CAAC,CAAC;IAC5B,mBAAmB,GAAW,CAAC,CAAC;IAChC,kBAAkB,GAAW,CAAC,CAAC;IAC/B,gBAAgB,GAAW,CAAC,CAAC;IAErC,IAAI,CAAS;IACb,MAAM,GAAe;QACnB,IAAI,EAAE,cAAc,CAAC,KAAK;KAC3B,CAAC;IACF,OAAO,GAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjB,MAAM,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AK,EAAE,IAAI,CAAC,KAAK;YACjB,sBAAsB,EAAE,IAAI,CAAC,uBAAuB;YACpD,kBAAkB,EAAE,IAAI,CAAC,mBAAmB;YAC5C,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;YAC1C,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;YAC/C,QAAQ,EAAE,EAAE,UAAU,EAAE,yBAAyB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;SACnE,CAAC;QACF,OAAO,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n Context,\n Exception,\n HrTime,\n Link,\n Span as APISpan,\n SpanOptions as APISpanOptions,\n Attributes,\n AttributeValue,\n SpanContext,\n SpanKind,\n SpanStatus,\n TimeInput,\n} from '@opentelemetry/api';\nimport { diag, SpanStatusCode } from '@opentelemetry/api';\nimport type { InstrumentationScope } from '@opentelemetry/core';\nimport {\n addHrTimes,\n millisToHrTime,\n hrTime,\n hrTimeDuration,\n isAttributeValue,\n isTimeInput,\n isTimeInputHrTime,\n otperformance,\n sanitizeAttributes,\n} from '@opentelemetry/core';\nimport type { Resource } from '@opentelemetry/resources';\nimport {\n ATTR_EXCEPTION_MESSAGE,\n ATTR_EXCEPTION_STACKTRACE,\n ATTR_EXCEPTION_TYPE,\n} from '@opentelemetry/semantic-conventions';\nimport type { ReadableSpan } from './export/ReadableSpan';\nimport { ExceptionEventName } from './enums';\nimport type { SpanProcessor } from './SpanProcessor';\nimport type { TimedEvent } from './TimedEvent';\nimport type { SpanLimits } from './types';\nimport type { InspectFn, InspectStylizeOptions } from './inspect';\nimport {\n formatInspect,\n inspectCustom,\n settledResourceAttributes,\n} from './inspect';\n\n/**\n * This type provides the properties of @link{ReadableSpan} at the same time\n * of the Span API\n */\nexport type Span = APISpan & ReadableSpan;\n\n// `root` is omitted because it is consumed by Tracer.startSpan() to strip\n// parent context but it has no meaning when constructing a Span directly.\ntype SpanOptions = Omit<APISpanOptions, 'root'> & {\n resource: Resource;\n scope: InstrumentationScope;\n context: Context;\n spanContext: SpanContext;\n name: string;\n // Required here to override optional `kind` from the API's SpanOptions\n // SpanImpl assigns it unconditionally and ReadableSpan expects it to be set.\n kind: SpanKind;\n parentSpanContext?: SpanContext;\n spanLimits: SpanLimits;\n spanProcessor: SpanProcessor;\n recordEndMetrics?: () => void;\n};\n\n/**\n * This class represents a span.\n */\nexport class SpanImpl implements Span {\n // Below properties are included to implement ReadableSpan for export\n // purposes but are not intended to be written-to directly.\n private readonly _spanContext: SpanContext;\n readonly kind: SpanKind;\n readonly parentSpanContext?: SpanContext;\n readonly attributes: Attributes = {};\n readonly links: Link[] = [];\n readonly events: TimedEvent[] = [];\n readonly startTime: HrTime;\n readonly resource: Resource;\n readonly instrumentationScope: InstrumentationScope;\n\n private _droppedAttributesCount = 0;\n private _droppedEventsCount: number = 0;\n private _droppedLinksCount: number = 0;\n private _attributesCount: number = 0;\n\n name: string;\n status: SpanStatus = {\n code: SpanStatusCode.UNSET,\n };\n endTime: HrTime = [0, 0];\n private _ended = false;\n private _duration: HrTime = [-1, -1];\n private readonly _spanProcessor: SpanProcessor;\n private readonly _spanLimits: SpanLimits;\n private readonly _attributeValueLengthLimit: number;\n private readonly _recordEndMetrics?: () => void;\n\n private readonly _performanceStartTime: number;\n private readonly _performanceOffset: number;\n private readonly _startTimeProvided: boolean;\n\n /**\n * Constructs a new SpanImpl instance.\n */\n constructor(opts: SpanOptions) {\n const now = Date.now();\n\n this._spanContext = opts.spanContext;\n this._performanceStartTime = otperformance.now();\n this._performanceOffset =\n now - (this._performanceStartTime + otperformance.timeOrigin);\n this._startTimeProvided = opts.startTime != null;\n this._spanLimits = opts.spanLimits;\n this._attributeValueLengthLimit =\n this._spanLimits.attributeValueLengthLimit ?? 0;\n this._spanProcessor = opts.spanProcessor;\n\n this.name = opts.name;\n this.parentSpanContext = opts.parentSpanContext;\n this.kind = opts.kind;\n if (opts.links) {\n for (const link of opts.links) {\n this.addLink(link);\n }\n }\n this.startTime = this._getTime(opts.startTime ?? now);\n this.resource = opts.resource;\n this.instrumentationScope = opts.scope;\n this._recordEndMetrics = opts.recordEndMetrics;\n\n if (opts.attributes != null) {\n this.setAttributes(opts.attributes);\n }\n\n this._spanProcessor.onStart(this, opts.context);\n }\n\n spanContext(): SpanContext {\n return this._spanContext;\n }\n\n setAttribute(key: string, value?: AttributeValue): this;\n setAttribute(key: string, value: unknown): this {\n if (value == null || this._isSpanEnded()) return this;\n if (key.length === 0) {\n diag.warn(`Invalid attribute key: ${key}`);\n return this;\n }\n if (!isAttributeValue(value)) {\n diag.warn(`Invalid attribute value set for key: ${key}`);\n return this;\n }\n\n const { attributeCountLimit } = this._spanLimits;\n const isNewKey = !Object.prototype.hasOwnProperty.call(\n this.attributes,\n key\n );\n\n if (\n attributeCountLimit !== undefined &&\n this._attributesCount >= attributeCountLimit &&\n isNewKey\n ) {\n this._droppedAttributesCount++;\n return this;\n }\n\n this.attributes[key] = this._truncateToSize(value);\n if (isNewKey) {\n this._attributesCount++;\n }\n return this;\n }\n\n setAttributes(attributes: Attributes): this {\n for (const key in attributes) {\n if (Object.prototype.hasOwnProperty.call(attributes, key)) {\n this.setAttribute(key, attributes[key]);\n }\n }\n return this;\n }\n\n /**\n *\n * @param name Span Name\n * @param [attributesOrStartTime] Span attributes or start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [timeStamp] Specified time stamp for the event\n */\n addEvent(\n name: string,\n attributesOrStartTime?: Attributes | TimeInput,\n timeStamp?: TimeInput\n ): this {\n if (this._isSpanEnded()) return this;\n\n const { eventCountLimit } = this._spanLimits;\n\n if (eventCountLimit === 0) {\n diag.warn('No events allowed.');\n this._droppedEventsCount++;\n return this;\n }\n\n if (\n eventCountLimit !== undefined &&\n this.events.length >= eventCountLimit\n ) {\n if (this._droppedEventsCount === 0) {\n diag.debug('Dropping extra events.');\n }\n this.events.shift();\n this._droppedEventsCount++;\n }\n\n if (isTimeInput(attributesOrStartTime)) {\n if (!isTimeInput(timeStamp)) {\n timeStamp = attributesOrStartTime;\n }\n attributesOrStartTime = undefined;\n }\n\n const sanitized = sanitizeAttributes(attributesOrStartTime);\n const { attributePerEventCountLimit } = this._spanLimits;\n const attributes: Attributes = {};\n let droppedAttributesCount = 0;\n let eventAttributesCount = 0;\n\n for (const attr in sanitized) {\n if (!Object.prototype.hasOwnProperty.call(sanitized, attr)) {\n continue;\n }\n const attrVal = sanitized[attr];\n if (\n attributePerEventCountLimit !== undefined &&\n eventAttributesCount >= attributePerEventCountLimit\n ) {\n droppedAttributesCount++;\n continue;\n }\n attributes[attr] = this._truncateToSize(attrVal!);\n eventAttributesCount++;\n }\n\n this.events.push({\n name,\n attributes,\n time: this._getTime(timeStamp),\n droppedAttributesCount,\n });\n return this;\n }\n\n addLink(link: Link): this {\n if (this._isSpanEnded()) return this;\n\n const { linkCountLimit } = this._spanLimits;\n\n if (linkCountLimit === 0) {\n this._droppedLinksCount++;\n return this;\n }\n\n if (linkCountLimit !== undefined && this.links.length >= linkCountLimit) {\n if (this._droppedLinksCount === 0) {\n diag.debug('Dropping extra links.');\n }\n this.links.shift();\n this._droppedLinksCount++;\n }\n\n const { attributePerLinkCountLimit } = this._spanLimits;\n const sanitized = sanitizeAttributes(link.attributes);\n const attributes: Attributes = {};\n let droppedAttributesCount = 0;\n let linkAttributesCount = 0;\n\n for (const attr in sanitized) {\n if (!Object.prototype.hasOwnProperty.call(sanitized, attr)) {\n continue;\n }\n const attrVal = sanitized[attr];\n if (\n attributePerLinkCountLimit !== undefined &&\n linkAttributesCount >= attributePerLinkCountLimit\n ) {\n droppedAttributesCount++;\n continue;\n }\n attributes[attr] = this._truncateToSize(attrVal!);\n linkAttributesCount++;\n }\n\n const processedLink: Link = { context: link.context };\n if (linkAttributesCount > 0) {\n processedLink.attributes = attributes;\n }\n if (droppedAttributesCount > 0) {\n processedLink.droppedAttributesCount = droppedAttributesCount;\n }\n\n this.links.push(processedLink);\n return this;\n }\n\n addLinks(links: Link[]): this {\n for (const link of links) {\n this.addLink(link);\n }\n return this;\n }\n\n setStatus(status: SpanStatus): this {\n if (this._isSpanEnded()) return this;\n if (status.code === SpanStatusCode.UNSET) return this;\n if (this.status.code === SpanStatusCode.OK) return this;\n\n const newStatus: SpanStatus = { code: status.code };\n\n // When using try-catch, the caught \"error\" is of type `any`. When then assigning `any` to `status.message`,\n // TypeScript will not error. While this can happen during use of any API, it is more common on Span#setStatus()\n // as it's likely used in a catch-block. Therefore, we validate if `status.message` is actually a string, null, or\n // undefined to avoid an incorrect type causing issues downstream.\n if (status.code === SpanStatusCode.ERROR) {\n if (typeof status.message === 'string') {\n newStatus.message = status.message;\n } else if (status.message != null) {\n diag.warn(\n `Dropping invalid status.message of type '${typeof status.message}', expected 'string'`\n );\n }\n }\n\n this.status = newStatus;\n return this;\n }\n\n updateName(name: string): this {\n if (this._isSpanEnded()) return this;\n this.name = name;\n return this;\n }\n\n end(endTime?: TimeInput): void {\n if (this._isSpanEnded()) {\n diag.error(\n `${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`\n );\n return;\n }\n this.endTime = this._getTime(endTime);\n this._duration = hrTimeDuration(this.startTime, this.endTime);\n\n if (this._duration[0] < 0) {\n diag.warn(\n 'Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.',\n this.startTime,\n this.endTime\n );\n this.endTime = this.startTime.slice() as HrTime;\n this._duration = [0, 0];\n }\n\n if (this._droppedEventsCount > 0) {\n diag.warn(\n `Dropped ${this._droppedEventsCount} events because eventCountLimit reached`\n );\n }\n if (this._droppedLinksCount > 0) {\n diag.warn(\n `Dropped ${this._droppedLinksCount} links because linkCountLimit reached`\n );\n }\n if (this._spanProcessor.onEnding) {\n this._spanProcessor.onEnding(this);\n }\n\n this._recordEndMetrics?.();\n this._ended = true;\n this._spanProcessor.onEnd(this);\n }\n\n private _getTime(inp?: TimeInput): HrTime {\n if (typeof inp === 'number' && inp <= otperformance.now()) {\n // must be a performance timestamp\n // apply correction and convert to hrtime\n return hrTime(inp + this._performanceOffset);\n }\n\n if (typeof inp === 'number') {\n return millisToHrTime(inp);\n }\n\n if (inp instanceof Date) {\n return millisToHrTime(inp.getTime());\n }\n\n if (isTimeInputHrTime(inp)) {\n return inp;\n }\n\n if (this._startTimeProvided) {\n // if user provided a time for the start manually\n // we can't use duration to calculate event/end times\n return millisToHrTime(Date.now());\n }\n\n const msDuration = otperformance.now() - this._performanceStartTime;\n return addHrTimes(this.startTime, millisToHrTime(msDuration));\n }\n\n isRecording(): boolean {\n return this._ended === false;\n }\n\n recordException(exception: Exception, time?: TimeInput): void {\n const attributes: Attributes = {};\n if (typeof exception === 'string') {\n attributes[ATTR_EXCEPTION_MESSAGE] = exception;\n } else if (exception) {\n if (exception.code) {\n attributes[ATTR_EXCEPTION_TYPE] = exception.code.toString();\n } else if (exception.name) {\n attributes[ATTR_EXCEPTION_TYPE] = exception.name;\n }\n if (exception.message) {\n attributes[ATTR_EXCEPTION_MESSAGE] = exception.message;\n }\n if (exception.stack) {\n attributes[ATTR_EXCEPTION_STACKTRACE] = exception.stack;\n }\n }\n\n // these are minimum requirements from spec\n if (attributes[ATTR_EXCEPTION_TYPE] || attributes[ATTR_EXCEPTION_MESSAGE]) {\n this.addEvent(ExceptionEventName, attributes, time);\n } else {\n diag.warn(`Failed to record an exception ${exception}`);\n }\n }\n\n get duration(): HrTime {\n return this._duration;\n }\n\n get ended(): boolean {\n return this._ended;\n }\n\n get droppedAttributesCount(): number {\n return this._droppedAttributesCount;\n }\n\n get droppedEventsCount(): number {\n return this._droppedEventsCount;\n }\n\n get droppedLinksCount(): number {\n return this._droppedLinksCount;\n }\n\n private _isSpanEnded(): boolean {\n if (this._ended) {\n const error = new Error(\n `Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`\n );\n\n diag.warn(\n `Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,\n error\n );\n }\n return this._ended;\n }\n\n // Utility function to truncate given value within size\n // for value type of string, will truncate to given limit\n // for type of non-string, will return same value\n private _truncateToLimitUtil(value: string, limit: number): string {\n if (value.length <= limit) {\n return value;\n }\n return value.substring(0, limit);\n }\n\n /**\n * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then\n * return string with truncated to {@code attributeValueLengthLimit} characters\n *\n * If the given attribute value is array of strings then\n * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters\n *\n * Otherwise return same Attribute {@code value}\n *\n * @param value Attribute value\n * @returns truncated attribute value if required, otherwise same value\n */\n private _truncateToSize(value: AttributeValue): AttributeValue {\n const limit = this._attributeValueLengthLimit;\n // Check limit\n if (limit <= 0) {\n // Negative values are invalid, so do not truncate\n diag.warn(`Attribute value limit must be positive, got ${limit}`);\n return value;\n }\n\n // String\n if (typeof value === 'string') {\n return this._truncateToLimitUtil(value, limit);\n }\n\n // Array of strings\n if (Array.isArray(value)) {\n return (value as []).map(val =>\n typeof val === 'string' ? this._truncateToLimitUtil(val, limit) : val\n );\n }\n\n // Other types, no need to apply value length limit\n return value;\n }\n\n [inspectCustom](\n depth: number,\n options: InspectStylizeOptions | undefined,\n inspect: InspectFn | undefined\n ): unknown {\n const payload = {\n name: this.name,\n kind: this.kind,\n spanContext: this._spanContext,\n parentSpanContext: this.parentSpanContext,\n status: this.status,\n startTime: this.startTime,\n endTime: this.endTime,\n duration: this._duration,\n ended: this._ended,\n attributes: this.attributes,\n events: this.events,\n links: this.links,\n droppedAttributesCount: this._droppedAttributesCount,\n droppedEventsCount: this._droppedEventsCount,\n droppedLinksCount: this._droppedLinksCount,\n instrumentationScope: this.instrumentationScope,\n resource: { attributes: settledResourceAttributes(this.resource) },\n };\n return formatInspect('SpanImpl', payload, depth, options, inspect);\n }\n}\n"]}
@@ -3,6 +3,8 @@ import type { InstrumentationScope } from '@opentelemetry/core';
3
3
  import type { GeneralLimits, SpanLimits, TracerConfig } from './types';
4
4
  import type { SpanProcessor } from './SpanProcessor';
5
5
  import type { Resource } from '@opentelemetry/resources';
6
+ import type { InspectFn, InspectStylizeOptions } from './inspect';
7
+ import { inspectCustom } from './inspect';
6
8
  /**
7
9
  * This class represents a basic tracer.
8
10
  */
@@ -30,6 +32,11 @@ export declare class Tracer implements api.Tracer {
30
32
  * Additionally the new span gets set in context and this context is activated
31
33
  * for the duration of the function call.
32
34
  *
35
+ * **Important**: The callback function is responsible for calling `span.end()`
36
+ * to finish the span. Unlike some other OpenTelemetry implementations, the span
37
+ * is NOT automatically ended when the callback returns. If `span.end()` is not
38
+ * called, the span will never be exported and will be silently lost.
39
+ *
33
40
  * @param name The name of the span
34
41
  * @param [options] SpanOptions used for span creation
35
42
  * @param [context] Context to use to extract parent
@@ -74,5 +81,6 @@ export declare class Tracer implements api.Tracer {
74
81
  getGeneralLimits(): GeneralLimits;
75
82
  /** Returns the active {@link SpanLimits}. */
76
83
  getSpanLimits(): SpanLimits;
84
+ [inspectCustom](depth: number, options: InspectStylizeOptions | undefined, inspect: InspectFn | undefined): unknown;
77
85
  }
78
86
  //# sourceMappingURL=Tracer.d.ts.map
@@ -9,6 +9,7 @@ import { mergeConfig } from './utility';
9
9
  import { RandomIdGenerator } from './platform';
10
10
  import { TracerMetrics } from './TracerMetrics';
11
11
  import { VERSION } from './version';
12
+ import { formatInspect, inspectCustom, settledResourceAttributes, } from './inspect';
12
13
  /**
13
14
  * This class represents a basic tracer.
14
15
  */
@@ -142,5 +143,14 @@ export class Tracer {
142
143
  getSpanLimits() {
143
144
  return this._spanLimits;
144
145
  }
146
+ [inspectCustom](depth, options, inspect) {
147
+ const payload = {
148
+ instrumentationScope: this.instrumentationScope,
149
+ resource: { attributes: settledResourceAttributes(this._resource) },
150
+ spanLimits: this._spanLimits,
151
+ generalLimits: this._generalLimits,
152
+ };
153
+ return formatInspect('Tracer', payload, depth, options, inspect);
154
+ }
145
155
  }
146
156
  //# sourceMappingURL=Tracer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tracer.js","sourceRoot":"","sources":["../../src/Tracer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,MAAM;IACA,QAAQ,CAAU;IAClB,cAAc,CAAgB;IAC9B,WAAW,CAAa;IACxB,YAAY,CAAc;IAClC,oBAAoB,CAAuB;IAEnC,SAAS,CAAW;IACpB,cAAc,CAAgB;IAC9B,cAAc,CAAgB;IAE/C;;OAEG;IACH,YACE,oBAA0C,EAC1C,MAAoB,EACpB,QAAkB,EAClB,aAA4B;QAE5B,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;QACpC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,aAAa,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,iBAAiB,EAAE,CAAC;QAClE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;QAEjD,MAAM,K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AClD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;QACvD,MAAM,kBAAkB,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAElE,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;IAED,gDAAgD;IAChD,gBAAgB;QACd,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,6CAA6C;IAC7C,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as api from '@opentelemetry/api';\nimport type { InstrumentationScope } from '@opentelemetry/core';\nimport { sanitizeAttributes, isTracingSuppressed } from '@opentelemetry/core';\nimport { SpanImpl } from './Span';\nimport type { GeneralLimits, SpanLimits, TracerConfig } from './types';\nimport { mergeConfig } from './utility';\nimport type { SpanProcessor } from './SpanProcessor';\nimport type { Sampler } from './Sampler';\nimport type { IdGenerator } from './IdGenerator';\nimport { RandomIdGenerator } from './platform';\nimport type { Resource } from '@opentelemetry/resources';\nimport { TracerMetrics } from './TracerMetrics';\nimport { VERSION } from './version';\n\n/**\n * This class represents a basic tracer.\n */\nexport class Tracer implements api.Tracer {\n private readonly _sampler: Sampler;\n private readonly _generalLimits: GeneralLimits;\n private readonly _spanLimits: SpanLimits;\n private readonly _idGenerator: IdGenerator;\n readonly instrumentationScope: InstrumentationScope;\n\n private readonly _resource: Resource;\n private readonly _spanProcessor: SpanProcessor;\n private readonly _tracerMetrics: TracerMetrics;\n\n /**\n * Constructs a new Tracer instance.\n */\n constructor(\n instrumentationScope: InstrumentationScope,\n config: TracerConfig,\n resource: Resource,\n spanProcessor: SpanProcessor\n ) {\n const localConfig = mergeConfig(config);\n this._sampler = localConfig.sampler;\n this._generalLimits = localConfig.generalLimits;\n this._spanLimits = localConfig.spanLimits;\n this._idGenerator = config.idGenerator || new RandomIdGenerator();\n this._resource = resource;\n this._spanProcessor = spanProcessor;\n this.instrumentationScope = instrumentationScope;\n\n const meter = localConfig.meterProvider\n ? localConfig.meterProvider.getMeter('@opentelemetry/sdk-trace', VERSION)\n : api.createNoopMeter();\n this._tracerMetrics = new TracerMetrics(meter);\n }\n\n /**\n * Starts a new Span or returns the default NoopSpan based on the sampling\n * decision.\n */\n startSpan(\n name: string,\n options: api.SpanOptions = {},\n context = api.context.active()\n ): api.Span {\n // remove span from context in case a root span is requested via options\n if (options.root) {\n context = api.trace.deleteSpan(context);\n }\n const parentSpan = api.trace.getSpan(context);\n\n if (isTracingSuppressed(context)) {\n api.diag.debug('Instrumentation suppressed, returning Noop Span');\n const nonRecordingSpan = api.trace.wrapSpanContext(\n api.INVALID_SPAN_CONTEXT\n );\n return nonRecordingSpan;\n }\n\n const parentSpanContext = parentSpan?.spanContext();\n const spanId = this._idGenerator.generateSpanId();\n let validParentSpanContext;\n let traceId;\n let traceState;\n if (\n !parentSpanContext ||\n !api.trace.isSpanContextValid(parentSpanContext)\n ) {\n // New root span.\n traceId = this._idGenerator.generateTraceId();\n } else {\n // New child span.\n traceId = parentSpanContext.traceId;\n traceState = parentSpanContext.traceState;\n validParentSpanContext = parentSpanContext;\n }\n\n const spanKind = options.kind ?? api.SpanKind.INTERNAL;\n const links = (options.links ?? []).map(link => {\n return {\n context: link.context,\n attributes: sanitizeAttributes(link.attributes),\n };\n });\n const attributes = sanitizeAttributes(options.attributes);\n // make sampling decision\n const samplingResult = this._sampler.shouldSample(\n context,\n traceId,\n name,\n spanKind,\n attributes,\n links\n );\n\n const recordEndMetrics = this._tracerMetrics.startSpan(\n parentSpanContext,\n samplingResult.decision\n );\n\n traceState = samplingResult.traceState ?? traceState;\n\n const traceFlags =\n samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED\n ? api.TraceFlags.SAMPLED\n : api.TraceFlags.NONE;\n const spanContext = { traceId, spanId, traceFlags, traceState };\n if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {\n api.diag.debug(\n 'Recording is off, propagating context in a non-recording span'\n );\n const nonRecordingSpan = api.trace.wrapSpanContext(spanContext);\n return nonRecordingSpan;\n }\n\n // Set initial span attributes. The attributes object may have been mutated\n // by the sampler, so we sanitize the merged attributes before setting them.\n const initAttributes = sanitizeAttributes(\n Object.assign(attributes, samplingResult.attributes)\n );\n\n const span = new SpanImpl({\n resource: this._resource,\n scope: this.instrumentationScope,\n context,\n spanContext,\n name,\n kind: spanKind,\n links,\n parentSpanContext: validParentSpanContext,\n attributes: initAttributes,\n startTime: options.startTime,\n spanProcessor: this._spanProcessor,\n spanLimits: this._spanLimits,\n recordEndMetrics,\n });\n return span;\n }\n\n /**\n * Starts a new {@link Span} and calls the given function passing it the\n * created span as first argument.\n * Additionally the new span gets set in context and this context is activated\n * for the duration of the function call.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @param fn function called in the context of the span and receives the newly created span as an argument\n * @returns return value of fn\n * @example\n * const something = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * span.setStatus({code: SpanStatusCode.OK});\n * return something;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * } finally {\n * span.end();\n * }\n * });\n * @example\n * const span = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * return span;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * }\n * });\n * do some more work\n * span.end();\n */\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n opts: api.SpanOptions,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n opts: api.SpanOptions,\n ctx: api.Context,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n arg2?: F | api.SpanOptions,\n arg3?: F | api.Context,\n arg4?: F\n ): ReturnType<F> | undefined {\n let opts: api.SpanOptions | undefined;\n let ctx: api.Context | undefined;\n let fn: F;\n\n if (arguments.length < 2) {\n return;\n } else if (arguments.length === 2) {\n fn = arg2 as F;\n } else if (arguments.length === 3) {\n opts = arg2 as api.SpanOptions | undefined;\n fn = arg3 as F;\n } else {\n opts = arg2 as api.SpanOptions | undefined;\n ctx = arg3 as api.Context | undefined;\n fn = arg4 as F;\n }\n\n const parentContext = ctx ?? api.context.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = api.trace.setSpan(parentContext, span);\n\n return api.context.with(contextWithSpanSet, fn, undefined, span);\n }\n\n /** Returns the active {@link GeneralLimits}. */\n getGeneralLimits(): GeneralLimits {\n return this._generalLimits;\n }\n\n /** Returns the active {@link SpanLimits}. */\n getSpanLimits(): SpanLimits {\n return this._spanLimits;\n }\n}\n"]}
1
+ {"version":3,"file":"Tracer.js","sourceRoot":"","sources":["../../src/Tracer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,aAAa,EACb,aAAa,EACb,yBAAyB,GAC1B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C,OAA8B;QAE9B,MAAM,OAAO,GAAG;YACd,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;YAC/C,QAAQ,EAAE,EAAE,UAAU,EAAE,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACnE,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,aAAa,EAAE,IAAI,CAAC,cAAc;SACnC,CAAC;QACF,OAAO,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as api from '@opentelemetry/api';\nimport type { InstrumentationScope } from '@opentelemetry/core';\nimport { sanitizeAttributes, isTracingSuppressed } from '@opentelemetry/core';\nimport { SpanImpl } from './Span';\nimport type { GeneralLimits, SpanLimits, TracerConfig } from './types';\nimport { mergeConfig } from './utility';\nimport type { SpanProcessor } from './SpanProcessor';\nimport type { Sampler } from './Sampler';\nimport type { IdGenerator } from './IdGenerator';\nimport { RandomIdGenerator } from './platform';\nimport type { Resource } from '@opentelemetry/resources';\nimport { TracerMetrics } from './TracerMetrics';\nimport { VERSION } from './version';\nimport type { InspectFn, InspectStylizeOptions } from './inspect';\nimport {\n formatInspect,\n inspectCustom,\n settledResourceAttributes,\n} from './inspect';\n\n/**\n * This class represents a basic tracer.\n */\nexport class Tracer implements api.Tracer {\n private readonly _sampler: Sampler;\n private readonly _generalLimits: GeneralLimits;\n private readonly _spanLimits: SpanLimits;\n private readonly _idGenerator: IdGenerator;\n readonly instrumentationScope: InstrumentationScope;\n\n private readonly _resource: Resource;\n private readonly _spanProcessor: SpanProcessor;\n private readonly _tracerMetrics: TracerMetrics;\n\n /**\n * Constructs a new Tracer instance.\n */\n constructor(\n instrumentationScope: InstrumentationScope,\n config: TracerConfig,\n resource: Resource,\n spanProcessor: SpanProcessor\n ) {\n const localConfig = mergeConfig(config);\n this._sampler = localConfig.sampler;\n this._generalLimits = localConfig.generalLimits;\n this._spanLimits = localConfig.spanLimits;\n this._idGenerator = config.idGenerator || new RandomIdGenerator();\n this._resource = resource;\n this._spanProcessor = spanProcessor;\n this.instrumentationScope = instrumentationScope;\n\n const meter = localConfig.meterProvider\n ? localConfig.meterProvider.getMeter('@opentelemetry/sdk-trace', VERSION)\n : api.createNoopMeter();\n this._tracerMetrics = new TracerMetrics(meter);\n }\n\n /**\n * Starts a new Span or returns the default NoopSpan based on the sampling\n * decision.\n */\n startSpan(\n name: string,\n options: api.SpanOptions = {},\n context = api.context.active()\n ): api.Span {\n // remove span from context in case a root span is requested via options\n if (options.root) {\n context = api.trace.deleteSpan(context);\n }\n const parentSpan = api.trace.getSpan(context);\n\n if (isTracingSuppressed(context)) {\n api.diag.debug('Instrumentation suppressed, returning Noop Span');\n const nonRecordingSpan = api.trace.wrapSpanContext(\n api.INVALID_SPAN_CONTEXT\n );\n return nonRecordingSpan;\n }\n\n const parentSpanContext = parentSpan?.spanContext();\n const spanId = this._idGenerator.generateSpanId();\n let validParentSpanContext;\n let traceId;\n let traceState;\n if (\n !parentSpanContext ||\n !api.trace.isSpanContextValid(parentSpanContext)\n ) {\n // New root span.\n traceId = this._idGenerator.generateTraceId();\n } else {\n // New child span.\n traceId = parentSpanContext.traceId;\n traceState = parentSpanContext.traceState;\n validParentSpanContext = parentSpanContext;\n }\n\n const spanKind = options.kind ?? api.SpanKind.INTERNAL;\n const links = (options.links ?? []).map(link => {\n return {\n context: link.context,\n attributes: sanitizeAttributes(link.attributes),\n };\n });\n const attributes = sanitizeAttributes(options.attributes);\n // make sampling decision\n const samplingResult = this._sampler.shouldSample(\n context,\n traceId,\n name,\n spanKind,\n attributes,\n links\n );\n\n const recordEndMetrics = this._tracerMetrics.startSpan(\n parentSpanContext,\n samplingResult.decision\n );\n\n traceState = samplingResult.traceState ?? traceState;\n\n const traceFlags =\n samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED\n ? api.TraceFlags.SAMPLED\n : api.TraceFlags.NONE;\n const spanContext = { traceId, spanId, traceFlags, traceState };\n if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {\n api.diag.debug(\n 'Recording is off, propagating context in a non-recording span'\n );\n const nonRecordingSpan = api.trace.wrapSpanContext(spanContext);\n return nonRecordingSpan;\n }\n\n // Set initial span attributes. The attributes object may have been mutated\n // by the sampler, so we sanitize the merged attributes before setting them.\n const initAttributes = sanitizeAttributes(\n Object.assign(attributes, samplingResult.attributes)\n );\n\n const span = new SpanImpl({\n resource: this._resource,\n scope: this.instrumentationScope,\n context,\n spanContext,\n name,\n kind: spanKind,\n links,\n parentSpanContext: validParentSpanContext,\n attributes: initAttributes,\n startTime: options.startTime,\n spanProcessor: this._spanProcessor,\n spanLimits: this._spanLimits,\n recordEndMetrics,\n });\n return span;\n }\n\n /**\n * Starts a new {@link Span} and calls the given function passing it the\n * created span as first argument.\n * Additionally the new span gets set in context and this context is activated\n * for the duration of the function call.\n *\n * **Important**: The callback function is responsible for calling `span.end()`\n * to finish the span. Unlike some other OpenTelemetry implementations, the span\n * is NOT automatically ended when the callback returns. If `span.end()` is not\n * called, the span will never be exported and will be silently lost.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @param fn function called in the context of the span and receives the newly created span as an argument\n * @returns return value of fn\n * @example\n * const something = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * span.setStatus({code: SpanStatusCode.OK});\n * return something;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * } finally {\n * span.end();\n * }\n * });\n * @example\n * const span = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * return span;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * }\n * });\n * do some more work\n * span.end();\n */\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n opts: api.SpanOptions,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n opts: api.SpanOptions,\n ctx: api.Context,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: api.Span) => ReturnType<F>>(\n name: string,\n arg2?: F | api.SpanOptions,\n arg3?: F | api.Context,\n arg4?: F\n ): ReturnType<F> | undefined {\n let opts: api.SpanOptions | undefined;\n let ctx: api.Context | undefined;\n let fn: F;\n\n if (arguments.length < 2) {\n return;\n } else if (arguments.length === 2) {\n fn = arg2 as F;\n } else if (arguments.length === 3) {\n opts = arg2 as api.SpanOptions | undefined;\n fn = arg3 as F;\n } else {\n opts = arg2 as api.SpanOptions | undefined;\n ctx = arg3 as api.Context | undefined;\n fn = arg4 as F;\n }\n\n const parentContext = ctx ?? api.context.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = api.trace.setSpan(parentContext, span);\n\n return api.context.with(contextWithSpanSet, fn, undefined, span);\n }\n\n /** Returns the active {@link GeneralLimits}. */\n getGeneralLimits(): GeneralLimits {\n return this._generalLimits;\n }\n\n /** Returns the active {@link SpanLimits}. */\n getSpanLimits(): SpanLimits {\n return this._spanLimits;\n }\n\n [inspectCustom](\n depth: number,\n options: InspectStylizeOptions | undefined,\n inspect: InspectFn | undefined\n ): unknown {\n const payload = {\n instrumentationScope: this.instrumentationScope,\n resource: { attributes: settledResourceAttributes(this._resource) },\n spanLimits: this._spanLimits,\n generalLimits: this._generalLimits,\n };\n return formatInspect('Tracer', payload, depth, options, inspect);\n }\n}\n"]}
@@ -0,0 +1,32 @@
1
+ import type { Attributes } from '@opentelemetry/api';
2
+ import type { Resource } from '@opentelemetry/resources';
3
+ /**
4
+ * Well-known symbol used by Node.js `util.inspect` (and `console.*`) to
5
+ * render an object via a custom representation. Defined as a global Symbol
6
+ * so it works without importing from `node:util`, keeping this module safe
7
+ * for browser builds (where the symbol is simply never looked up).
8
+ */
9
+ export declare const inspectCustom: unique symbol;
10
+ /**
11
+ * Collect a Resource's settled attributes without touching the
12
+ * `attributes` getter, which emits diag.error/debug entries when async
13
+ * attribute detectors are still pending. Promise-like (unsettled)
14
+ * entries are silently skipped so logging a Span/Tracer/Provider during
15
+ * startup doesn't recurse through the diag pipeline.
16
+ */
17
+ export declare function settledResourceAttributes(resource: Resource): Attributes;
18
+ export type InspectFn = (value: unknown, options: unknown) => string;
19
+ export interface InspectStylizeOptions {
20
+ depth?: number | null;
21
+ stylize?: (text: string, styleType: string) => string;
22
+ }
23
+ /**
24
+ * Build a class-tagged inspect representation. Returns a stub like
25
+ * `[ClassName]` once the recursion budget is exhausted, otherwise returns
26
+ * `ClassName <inspected payload>` so nested fields keep proper coloring,
27
+ * indentation, and depth handling. In environments that don't supply an
28
+ * `inspect` callback (e.g. browsers), falls back to returning the raw
29
+ * payload object.
30
+ */
31
+ export declare function formatInspect(className: string, payload: object, depth: number, options: InspectStylizeOptions | undefined, inspect: InspectFn | undefined): unknown;
32
+ //# sourceMappingURL=inspect.d.ts.map
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Copyright The OpenTelemetry Authors
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /**
6
+ * Well-known symbol used by Node.js `util.inspect` (and `console.*`) to
7
+ * render an object via a custom representation. Defined as a global Symbol
8
+ * so it works without importing from `node:util`, keeping this module safe
9
+ * for browser builds (where the symbol is simply never looked up).
10
+ */
11
+ export const inspectCustom = Symbol.for('nodejs.util.inspect.custom');
12
+ /**
13
+ * Collect a Resource's settled attributes without touching the
14
+ * `attributes` getter, which emits diag.error/debug entries when async
15
+ * attribute detectors are still pending. Promise-like (unsettled)
16
+ * entries are silently skipped so logging a Span/Tracer/Provider during
17
+ * startup doesn't recurse through the diag pipeline.
18
+ */
19
+ export function settledResourceAttributes(resource) {
20
+ const attrs = {};
21
+ for (const [k, v] of resource.getRawAttributes()) {
22
+ if (typeof v?.then === 'function') {
23
+ continue;
24
+ }
25
+ if (v != null) {
26
+ attrs[k] ??= v;
27
+ }
28
+ }
29
+ return attrs;
30
+ }
31
+ /**
32
+ * Build a class-tagged inspect representation. Returns a stub like
33
+ * `[ClassName]` once the recursion budget is exhausted, otherwise returns
34
+ * `ClassName <inspected payload>` so nested fields keep proper coloring,
35
+ * indentation, and depth handling. In environments that don't supply an
36
+ * `inspect` callback (e.g. browsers), falls back to returning the raw
37
+ * payload object.
38
+ */
39
+ export function formatInspect(className, payload, depth, options, inspect) {
40
+ if (typeof depth === 'number' && depth < 0) {
41
+ const tag = `[${className}]`;
42
+ return options?.stylize ? options.stylize(tag, 'special') : tag;
43
+ }
44
+ if (typeof inspect !== 'function' || !options) {
45
+ return payload;
46
+ }
47
+ const childOptions = {
48
+ ...options,
49
+ depth: options.depth == null ? options.depth : options.depth - 1,
50
+ };
51
+ return `${className} ${inspect(payload, childOptions)}`;
52
+ }
53
+ //# sourceMappingURL=inspect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../src/inspect.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAkB;IAC1D,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,QAAQ,CAAC,gBAAgB,EAAE,EAAE;QAChD,IAAI,OAAQ,CAAmC,EAAE,IAAI,KAAK,UAAU,EAAE;YACpE,SAAS;SACV;QACD,IAAI,CAAC,IAAI,IAAI,EAAE;YACb,KAAK,CAAC,CAAC,CAAC,KAAK,CAAmB,CAAC;SAClC;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AASD;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAiB,EACjB,OAAe,EACf,KAAa,EACb,OAA0C,EAC1C,OAA8B;IAE9B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,EAAE;QAC1C,MAAM,GAAG,GAAG,IAAI,SAAS,GAAG,CAAC;QAC7B,OAAO,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;KACjE;IACD,IAAI,OAAO,OAAO,KAAK,UAAU,IAAI,CAAC,OAAO,EAAE;QAC7C,OAAO,OAAO,CAAC;KAChB;IACD,MAAM,YAAY,GAAG;QACnB,GAAG,OAAO;QACV,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC;KACjE,CAAC;IACF,OAAO,GAAG,SAAS,IAAI,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC;AAC1D,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes, AttributeValue } from '@opentelemetry/api';\nimport type { Resource } from '@opentelemetry/resources';\n\n/**\n * Well-known symbol used by Node.js `util.inspect` (and `console.*`) to\n * render an object via a custom representation. Defined as a global Symbol\n * so it works without importing from `node:util`, keeping this module safe\n * for browser builds (where the symbol is simply never looked up).\n */\nexport const inspectCustom = Symbol.for('nodejs.util.inspect.custom');\n\n/**\n * Collect a Resource's settled attributes without touching the\n * `attributes` getter, which emits diag.error/debug entries when async\n * attribute detectors are still pending. Promise-like (unsettled)\n * entries are silently skipped so logging a Span/Tracer/Provider during\n * startup doesn't recurse through the diag pipeline.\n */\nexport function settledResourceAttributes(resource: Resource): Attributes {\n const attrs: Attributes = {};\n for (const [k, v] of resource.getRawAttributes()) {\n if (typeof (v as Partial<PromiseLike<unknown>>)?.then === 'function') {\n continue;\n }\n if (v != null) {\n attrs[k] ??= v as AttributeValue;\n }\n }\n return attrs;\n}\n\nexport type InspectFn = (value: unknown, options: unknown) => string;\n\nexport interface InspectStylizeOptions {\n depth?: number | null;\n stylize?: (text: string, styleType: string) => string;\n}\n\n/**\n * Build a class-tagged inspect representation. Returns a stub like\n * `[ClassName]` once the recursion budget is exhausted, otherwise returns\n * `ClassName <inspected payload>` so nested fields keep proper coloring,\n * indentation, and depth handling. In environments that don't supply an\n * `inspect` callback (e.g. browsers), falls back to returning the raw\n * payload object.\n */\nexport function formatInspect(\n className: string,\n payload: object,\n depth: number,\n options: InspectStylizeOptions | undefined,\n inspect: InspectFn | undefined\n): unknown {\n if (typeof depth === 'number' && depth < 0) {\n const tag = `[${className}]`;\n return options?.stylize ? options.stylize(tag, 'special') : tag;\n }\n if (typeof inspect !== 'function' || !options) {\n return payload;\n }\n const childOptions = {\n ...options,\n depth: options.depth == null ? options.depth : options.depth - 1,\n };\n return `${className} ${inspect(payload, childOptions)}`;\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.7.1";
1
+ export declare const VERSION = "2.8.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -3,5 +3,5 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  // this is autogenerated file, see scripts/version-update.js
6
- export const VERSION = '2.7.1';
6
+ export const VERSION = '2.8.0';
7
7
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '2.7.1';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '2.8.0';\n"]}
@@ -1,5 +1,7 @@
1
1
  import type { TracerProvider, Tracer as ApiTracer } from '@opentelemetry/api';
2
2
  import type { TracerConfig } from './types';
3
+ import type { InspectFn, InspectStylizeOptions } from './inspect';
4
+ import { inspectCustom } from './inspect';
3
5
  export declare enum ForceFlushState {
4
6
  'resolved' = 0,
5
7
  'timeout' = 1,
@@ -20,5 +22,6 @@ export declare class BasicTracerProvider implements TracerProvider {
20
22
  }): ApiTracer;
21
23
  forceFlush(): Promise<void>;
22
24
  shutdown(): Promise<void>;
25
+ [inspectCustom](depth: number, options: InspectStylizeOptions | undefined, inspect: InspectFn | undefined): unknown;
23
26
  }
24
27
  //# sourceMappingURL=BasicTracerProvider.d.ts.map
@@ -8,6 +8,7 @@ import { Tracer } from './Tracer';
8
8
  import { loadDefaultConfig } from './config';
9
9
  import { MultiSpanProcessor } from './MultiSpanProcessor';
10
10
  import { reconfigureLimits } from './utility';
11
+ import { formatInspect, inspectCustom, settledResourceAttributes, } from './inspect';
11
12
  export var ForceFlushState;
12
13
  (function (ForceFlushState) {
13
14
  ForceFlushState[ForceFlushState["resolved"] = 0] = "resolved";
@@ -40,7 +41,6 @@ export class BasicTracerProvider {
40
41
  if (!this._tracers.has(key)) {
41
42
  this._tracers.set(key, new Tracer({ name, version, schemaUrl: options?.schemaUrl }, this._config, this._resource, this._activeSpanProcessor));
42
43
  }
43
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
44
44
  return this._tracers.get(key);
45
45
  }
46
46
  forceFlush() {
@@ -85,5 +85,14 @@ export class BasicTracerProvider {
85
85
  shutdown() {
86
86
  return this._activeSpanProcessor.shutdown();
87
87
  }
88
+ [inspectCustom](depth, options, inspect) {
89
+ const processors = this._activeSpanProcessor['_spanProcessors'];
90
+ const payload = {
91
+ resource: { attributes: settledResourceAttributes(this._resource) },
92
+ tracers: Array.from(this._tracers.keys()),
93
+ spanProcessors: processors.map(p => p.constructor?.name ?? 'SpanProcessor'),
94
+ };
95
+ return formatInspect('BasicTracerProvider', payload, depth, options, inspect);
96
+ }
88
97
  }
89
98
  //# sourceMappingURL=BasicTracerProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BasicTracerProvider.js","sourceRoot":"","sources":["../../src/BasicTracerProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,6DAAU,CAAA;IACV,2DAAS,CAAA;IACT,uDAAO,CAAA;IACP,iEAAY,CAAA;AACd,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED;;GAEG;AACH,MAAM,OAAO,mBAAmB;IACb,OAAO,CAAe;IACtB,QAAQ,GAAwB,IAAI,GAAG,EAAE,CAAC;IAC1C,SAAS,CAAW;IACpB,oBAAoB,CAAqB;IAE1D,YAAY,SAAuB,EAAE;QACnC,MAAM,YAAY,GAAG,KAAK,CACxB,EAAE,EACF,iBAAiB,EAAE,EACnB,iBAAiB,CAAC,MAAM,CAAC,CAC1B,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,IAAI,e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CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;IAC9C,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { TracerProvider, Tracer as ApiTracer } from '@opentelemetry/api';\nimport { merge } from '@opentelemetry/core';\nimport type { Resource } from '@opentelemetry/resources';\nimport { defaultResource } from '@opentelemetry/resources';\nimport type { SpanProcessor } from './SpanProcessor';\nimport { Tracer } from './Tracer';\nimport { loadDefaultConfig } from './config';\nimport { MultiSpanProcessor } from './MultiSpanProcessor';\nimport type { TracerConfig } from './types';\nimport { reconfigureLimits } from './utility';\n\nexport enum ForceFlushState {\n 'resolved',\n 'timeout',\n 'error',\n 'unresolved',\n}\n\n/**\n * This class represents a basic tracer provider which platform libraries can extend\n */\nexport class BasicTracerProvider implements TracerProvider {\n private readonly _config: TracerConfig;\n private readonly _tracers: Map<string, Tracer> = new Map();\n private readonly _resource: Resource;\n private readonly _activeSpanProcessor: MultiSpanProcessor;\n\n constructor(config: TracerConfig = {}) {\n const mergedConfig = merge(\n {},\n loadDefaultConfig(),\n reconfigureLimits(config)\n );\n this._resource = mergedConfig.resource ?? defaultResource();\n\n this._config = Object.assign({}, mergedConfig, {\n resource: this._resource,\n });\n\n const spanProcessors: SpanProcessor[] = [];\n\n if (config.spanProcessors?.length) {\n spanProcessors.push(...config.spanProcessors);\n }\n\n this._activeSpanProcessor = new MultiSpanProcessor(spanProcessors);\n }\n\n getTracer(\n name: string,\n version?: string,\n options?: { schemaUrl?: string }\n ): ApiTracer {\n const key = `${name}@${version || ''}:${options?.schemaUrl || ''}`;\n if (!this._tracers.has(key)) {\n this._tracers.set(\n key,\n new Tracer(\n { name, version, schemaUrl: options?.schemaUrl },\n this._config,\n this._resource,\n this._activeSpanProcessor\n )\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this._tracers.get(key)!;\n }\n\n forceFlush(): Promise<void> {\n const timeout = this._config.forceFlushTimeoutMillis;\n const promises = this._activeSpanProcessor['_spanProcessors'].map(\n (spanProcessor: SpanProcessor) => {\n return new Promise(resolve => {\n let state: ForceFlushState;\n const timeoutInterval = setTimeout(() => {\n resolve(\n new Error(\n `Span processor did not completed within timeout period of ${timeout} ms`\n )\n );\n state = ForceFlushState.timeout;\n }, timeout);\n\n spanProcessor\n .forceFlush()\n .then(() => {\n clearTimeout(timeoutInterval);\n if (state !== ForceFlushState.timeout) {\n state = ForceFlushState.resolved;\n resolve(state);\n }\n })\n .catch(error => {\n clearTimeout(timeoutInterval);\n state = ForceFlushState.error;\n resolve(error);\n });\n });\n }\n );\n\n return new Promise<void>((resolve, reject) => {\n Promise.all(promises)\n .then(results => {\n const errors = results.filter(\n result => result !== ForceFlushState.resolved\n );\n if (errors.length > 0) {\n reject(errors);\n } else {\n resolve();\n }\n })\n .catch(error => reject([error]));\n });\n }\n\n shutdown(): Promise<void> {\n return this._activeSpanProcessor.shutdown();\n }\n}\n"]}
1
+ {"version":3,"file":"BasicTracerProvider.js","sourceRoot":"","sources":["../../src/BasicTracerProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EACL,aAAa,EACb,aAAa,EACb,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,6DAAU,CAAA;IACV,2DAAS,CAAA;IACT,uDAAO,CAAA;IACP,iEAAY,CAAA;AACd,CAAC,EALW,eAAe,KAAf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,CAAC,QAAQ,CAC9C,CAAC;gBACF,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;oBACrB,MAAM,CAAC,MAAM,CAAC,CAAC;iBAChB;qBAAM;oBACL,OAAO,EAAE,CAAC;iBACX;YACH,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;IAC9C,CAAC;IAED,CAAC,aAAa,CAAC,CACb,KAAa,EACb,OAA0C,EAC1C,OAA8B;QAE9B,MAAM,UAAU,GAAG,IAAI,CAAC,oBAAoB,CAC1C,iBAAiB,CACC,CAAC;QACrB,MAAM,OAAO,GAAG;YACd,QAAQ,EAAE,EAAE,UAAU,EAAE,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACnE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACzC,cAAc,EAAE,UAAU,CAAC,GAAG,CAC5B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,IAAI,eAAe,CAC5C;SACF,CAAC;QACF,OAAO,aAAa,CAClB,qBAAqB,EACrB,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { TracerProvider, Tracer as ApiTracer } from '@opentelemetry/api';\nimport { merge } from '@opentelemetry/core';\nimport type { Resource } from '@opentelemetry/resources';\nimport { defaultResource } from '@opentelemetry/resources';\nimport type { SpanProcessor } from './SpanProcessor';\nimport { Tracer } from './Tracer';\nimport { loadDefaultConfig } from './config';\nimport { MultiSpanProcessor } from './MultiSpanProcessor';\nimport type { TracerConfig } from './types';\nimport { reconfigureLimits } from './utility';\nimport type { InspectFn, InspectStylizeOptions } from './inspect';\nimport {\n formatInspect,\n inspectCustom,\n settledResourceAttributes,\n} from './inspect';\n\nexport enum ForceFlushState {\n 'resolved',\n 'timeout',\n 'error',\n 'unresolved',\n}\n\n/**\n * This class represents a basic tracer provider which platform libraries can extend\n */\nexport class BasicTracerProvider implements TracerProvider {\n private readonly _config: TracerConfig;\n private readonly _tracers: Map<string, Tracer> = new Map();\n private readonly _resource: Resource;\n private readonly _activeSpanProcessor: MultiSpanProcessor;\n\n constructor(config: TracerConfig = {}) {\n const mergedConfig = merge(\n {},\n loadDefaultConfig(),\n reconfigureLimits(config)\n );\n this._resource = mergedConfig.resource ?? defaultResource();\n\n this._config = Object.assign({}, mergedConfig, {\n resource: this._resource,\n });\n\n const spanProcessors: SpanProcessor[] = [];\n\n if (config.spanProcessors?.length) {\n spanProcessors.push(...config.spanProcessors);\n }\n\n this._activeSpanProcessor = new MultiSpanProcessor(spanProcessors);\n }\n\n getTracer(\n name: string,\n version?: string,\n options?: { schemaUrl?: string }\n ): ApiTracer {\n const key = `${name}@${version || ''}:${options?.schemaUrl || ''}`;\n if (!this._tracers.has(key)) {\n this._tracers.set(\n key,\n new Tracer(\n { name, version, schemaUrl: options?.schemaUrl },\n this._config,\n this._resource,\n this._activeSpanProcessor\n )\n );\n }\n\n return this._tracers.get(key)!;\n }\n\n forceFlush(): Promise<void> {\n const timeout = this._config.forceFlushTimeoutMillis;\n const promises = this._activeSpanProcessor['_spanProcessors'].map(\n (spanProcessor: SpanProcessor) => {\n return new Promise(resolve => {\n let state: ForceFlushState;\n const timeoutInterval = setTimeout(() => {\n resolve(\n new Error(\n `Span processor did not completed within timeout period of ${timeout} ms`\n )\n );\n state = ForceFlushState.timeout;\n }, timeout);\n\n spanProcessor\n .forceFlush()\n .then(() => {\n clearTimeout(timeoutInterval);\n if (state !== ForceFlushState.timeout) {\n state = ForceFlushState.resolved;\n resolve(state);\n }\n })\n .catch(error => {\n clearTimeout(timeoutInterval);\n state = ForceFlushState.error;\n resolve(error);\n });\n });\n }\n );\n\n return new Promise<void>((resolve, reject) => {\n Promise.all(promises)\n .then(results => {\n const errors = results.filter(\n result => result !== ForceFlushState.resolved\n );\n if (errors.length > 0) {\n reject(errors);\n } else {\n resolve();\n }\n })\n .catch(error => reject([error]));\n });\n }\n\n shutdown(): Promise<void> {\n return this._activeSpanProcessor.shutdown();\n }\n\n [inspectCustom](\n depth: number,\n options: InspectStylizeOptions | undefined,\n inspect: InspectFn | undefined\n ): unknown {\n const processors = this._activeSpanProcessor[\n '_spanProcessors'\n ] as SpanProcessor[];\n const payload = {\n resource: { attributes: settledResourceAttributes(this._resource) },\n tracers: Array.from(this._tracers.keys()),\n spanProcessors: processors.map(\n p => p.constructor?.name ?? 'SpanProcessor'\n ),\n };\n return formatInspect(\n 'BasicTracerProvider',\n payload,\n depth,\n options,\n inspect\n );\n }\n}\n"]}
@@ -5,6 +5,8 @@ import type { ReadableSpan } from './export/ReadableSpan';
5
5
  import type { SpanProcessor } from './SpanProcessor';
6
6
  import type { TimedEvent } from './TimedEvent';
7
7
  import type { SpanLimits } from './types';
8
+ import type { InspectFn, InspectStylizeOptions } from './inspect';
9
+ import { inspectCustom } from './inspect';
8
10
  /**
9
11
  * This type provides the properties of @link{ReadableSpan} at the same time
10
12
  * of the Span API
@@ -94,6 +96,7 @@ export declare class SpanImpl implements Span {
94
96
  * @returns truncated attribute value if required, otherwise same value
95
97
  */
96
98
  private _truncateToSize;
99
+ [inspectCustom](depth: number, options: InspectStylizeOptions | undefined, inspect: InspectFn | undefined): unknown;
97
100
  }
98
101
  export {};
99
102
  //# sourceMappingURL=Span.d.ts.map
@@ -6,6 +6,7 @@ import { diag, SpanStatusCode } from '@opentelemetry/api';
6
6
  import { addHrTimes, millisToHrTime, hrTime, hrTimeDuration, isAttributeValue, isTimeInput, isTimeInputHrTime, otperformance, sanitizeAttributes, } from '@opentelemetry/core';
7
7
  import { ATTR_EXCEPTION_MESSAGE, ATTR_EXCEPTION_STACKTRACE, ATTR_EXCEPTION_TYPE, } from '@opentelemetry/semantic-conventions';
8
8
  import { ExceptionEventName } from './enums';
9
+ import { formatInspect, inspectCustom, settledResourceAttributes, } from './inspect';
9
10
  /**
10
11
  * This class represents a span.
11
12
  */
@@ -380,5 +381,27 @@ export class SpanImpl {
380
381
  // Other types, no need to apply value length limit
381
382
  return value;
382
383
  }
384
+ [inspectCustom](depth, options, inspect) {
385
+ const payload = {
386
+ name: this.name,
387
+ kind: this.kind,
388
+ spanContext: this._spanContext,
389
+ parentSpanContext: this.parentSpanContext,
390
+ status: this.status,
391
+ startTime: this.startTime,
392
+ endTime: this.endTime,
393
+ duration: this._duration,
394
+ ended: this._ended,
395
+ attributes: this.attributes,
396
+ events: this.events,
397
+ links: this.links,
398
+ droppedAttributesCount: this._droppedAttributesCount,
399
+ droppedEventsCount: this._droppedEventsCount,
400
+ droppedLinksCount: this._droppedLinksCount,
401
+ instrumentationScope: this.instrumentationScope,
402
+ resource: { attributes: settledResourceAttributes(this.resource) },
403
+ };
404
+ return formatInspect('SpanImpl', payload, depth, options, inspect);
405
+ }
383
406
  }
384
407
  //# sourceMappingURL=Span.js.map