@microsoft/opentelemetry 0.1.0-alpha.2 → 0.1.0-alpha.4

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 (347) hide show
  1. package/README.md +69 -4
  2. package/dist/commonjs/a365/configuration/A365Configuration.d.ts +42 -0
  3. package/dist/commonjs/a365/configuration/A365Configuration.d.ts.map +1 -0
  4. package/dist/commonjs/a365/configuration/A365Configuration.js +162 -0
  5. package/dist/commonjs/a365/configuration/A365Configuration.js.map +1 -0
  6. package/dist/commonjs/a365/configuration/A365ConfigurationOptions.d.ts +53 -0
  7. package/dist/commonjs/a365/configuration/A365ConfigurationOptions.d.ts.map +1 -0
  8. package/dist/commonjs/a365/configuration/A365ConfigurationOptions.js +5 -0
  9. package/dist/commonjs/a365/configuration/A365ConfigurationOptions.js.map +1 -0
  10. package/dist/commonjs/a365/configuration/index.d.ts +3 -0
  11. package/dist/commonjs/a365/configuration/index.d.ts.map +1 -0
  12. package/dist/commonjs/a365/configuration/index.js +9 -0
  13. package/dist/commonjs/a365/configuration/index.js.map +1 -0
  14. package/dist/commonjs/a365/constants.d.ts +93 -0
  15. package/dist/commonjs/a365/constants.d.ts.map +1 -0
  16. package/dist/commonjs/a365/constants.js +120 -0
  17. package/dist/commonjs/a365/constants.js.map +1 -0
  18. package/dist/commonjs/a365/context/tokenContext.d.ts +25 -0
  19. package/dist/commonjs/a365/context/tokenContext.d.ts.map +1 -0
  20. package/dist/commonjs/a365/context/tokenContext.js +67 -0
  21. package/dist/commonjs/a365/context/tokenContext.js.map +1 -0
  22. package/dist/commonjs/a365/context.d.ts +31 -0
  23. package/dist/commonjs/a365/context.d.ts.map +1 -0
  24. package/dist/commonjs/a365/context.js +109 -0
  25. package/dist/commonjs/a365/context.js.map +1 -0
  26. package/dist/commonjs/a365/contracts.d.ts +250 -0
  27. package/dist/commonjs/a365/contracts.d.ts.map +1 -0
  28. package/dist/commonjs/a365/contracts.js +52 -0
  29. package/dist/commonjs/a365/contracts.js.map +1 -0
  30. package/dist/commonjs/a365/exporter/Agent365Exporter.d.ts +25 -0
  31. package/dist/commonjs/a365/exporter/Agent365Exporter.d.ts.map +1 -0
  32. package/dist/commonjs/a365/exporter/Agent365Exporter.js +219 -0
  33. package/dist/commonjs/a365/exporter/Agent365Exporter.js.map +1 -0
  34. package/dist/commonjs/a365/exporter/Agent365ExporterOptions.d.ts +43 -0
  35. package/dist/commonjs/a365/exporter/Agent365ExporterOptions.d.ts.map +1 -0
  36. package/dist/commonjs/a365/exporter/Agent365ExporterOptions.js +30 -0
  37. package/dist/commonjs/a365/exporter/Agent365ExporterOptions.js.map +1 -0
  38. package/dist/commonjs/a365/exporter/ExporterEventNames.d.ts +9 -0
  39. package/dist/commonjs/a365/exporter/ExporterEventNames.d.ts.map +1 -0
  40. package/dist/commonjs/a365/exporter/ExporterEventNames.js +15 -0
  41. package/dist/commonjs/a365/exporter/ExporterEventNames.js.map +1 -0
  42. package/dist/commonjs/a365/exporter/index.d.ts +6 -0
  43. package/dist/commonjs/a365/exporter/index.d.ts.map +1 -0
  44. package/dist/commonjs/a365/exporter/index.js +15 -0
  45. package/dist/commonjs/a365/exporter/index.js.map +1 -0
  46. package/dist/commonjs/a365/exporter/utils.d.ts +41 -0
  47. package/dist/commonjs/a365/exporter/utils.d.ts.map +1 -0
  48. package/dist/commonjs/a365/exporter/utils.js +410 -0
  49. package/dist/commonjs/a365/exporter/utils.js.map +1 -0
  50. package/dist/commonjs/a365/hosting/baggageBuilderUtils.d.ts +22 -0
  51. package/dist/commonjs/a365/hosting/baggageBuilderUtils.d.ts.map +1 -0
  52. package/dist/commonjs/a365/hosting/baggageBuilderUtils.js +47 -0
  53. package/dist/commonjs/a365/hosting/baggageBuilderUtils.js.map +1 -0
  54. package/dist/commonjs/a365/hosting/baggageMiddleware.d.ts +9 -0
  55. package/dist/commonjs/a365/hosting/baggageMiddleware.d.ts.map +1 -0
  56. package/dist/commonjs/a365/hosting/baggageMiddleware.js +38 -0
  57. package/dist/commonjs/a365/hosting/baggageMiddleware.js.map +1 -0
  58. package/dist/commonjs/a365/hosting/index.d.ts +9 -0
  59. package/dist/commonjs/a365/hosting/index.d.ts.map +1 -0
  60. package/dist/commonjs/a365/hosting/index.js +25 -0
  61. package/dist/commonjs/a365/hosting/index.js.map +1 -0
  62. package/dist/commonjs/a365/hosting/observabilityHostingManager.d.ts +30 -0
  63. package/dist/commonjs/a365/hosting/observabilityHostingManager.d.ts.map +1 -0
  64. package/dist/commonjs/a365/hosting/observabilityHostingManager.js +49 -0
  65. package/dist/commonjs/a365/hosting/observabilityHostingManager.js.map +1 -0
  66. package/dist/commonjs/a365/hosting/outputLoggingMiddleware.d.ts +24 -0
  67. package/dist/commonjs/a365/hosting/outputLoggingMiddleware.d.ts.map +1 -0
  68. package/dist/commonjs/a365/hosting/outputLoggingMiddleware.js +82 -0
  69. package/dist/commonjs/a365/hosting/outputLoggingMiddleware.js.map +1 -0
  70. package/dist/commonjs/a365/hosting/scopeUtils.d.ts +56 -0
  71. package/dist/commonjs/a365/hosting/scopeUtils.d.ts.map +1 -0
  72. package/dist/commonjs/a365/hosting/scopeUtils.js +161 -0
  73. package/dist/commonjs/a365/hosting/scopeUtils.js.map +1 -0
  74. package/dist/commonjs/a365/hosting/turnContextUtils.d.ts +32 -0
  75. package/dist/commonjs/a365/hosting/turnContextUtils.d.ts.map +1 -0
  76. package/dist/commonjs/a365/hosting/turnContextUtils.js +141 -0
  77. package/dist/commonjs/a365/hosting/turnContextUtils.js.map +1 -0
  78. package/dist/commonjs/a365/hosting/types.d.ts +52 -0
  79. package/dist/commonjs/a365/hosting/types.d.ts.map +1 -0
  80. package/dist/commonjs/a365/hosting/types.js +5 -0
  81. package/dist/commonjs/a365/hosting/types.js.map +1 -0
  82. package/dist/commonjs/a365/index.d.ts +18 -0
  83. package/dist/commonjs/a365/index.d.ts.map +1 -0
  84. package/dist/commonjs/a365/index.js +69 -0
  85. package/dist/commonjs/a365/index.js.map +1 -0
  86. package/dist/commonjs/a365/message-utils.d.ts +42 -0
  87. package/dist/commonjs/a365/message-utils.d.ts.map +1 -0
  88. package/dist/commonjs/a365/message-utils.js +116 -0
  89. package/dist/commonjs/a365/message-utils.js.map +1 -0
  90. package/dist/commonjs/a365/middleware/BaggageBuilder.d.ts +112 -0
  91. package/dist/commonjs/a365/middleware/BaggageBuilder.d.ts.map +1 -0
  92. package/dist/commonjs/a365/middleware/BaggageBuilder.js +248 -0
  93. package/dist/commonjs/a365/middleware/BaggageBuilder.js.map +1 -0
  94. package/dist/commonjs/a365/middleware/index.d.ts +2 -0
  95. package/dist/commonjs/a365/middleware/index.d.ts.map +1 -0
  96. package/dist/commonjs/a365/middleware/index.js +9 -0
  97. package/dist/commonjs/a365/middleware/index.js.map +1 -0
  98. package/dist/commonjs/a365/processors/A365SpanProcessor.d.ts +32 -0
  99. package/dist/commonjs/a365/processors/A365SpanProcessor.d.ts.map +1 -0
  100. package/dist/commonjs/a365/processors/A365SpanProcessor.js +104 -0
  101. package/dist/commonjs/a365/processors/A365SpanProcessor.js.map +1 -0
  102. package/dist/commonjs/a365/processors/PerRequestSpanProcessor.d.ts +44 -0
  103. package/dist/commonjs/a365/processors/PerRequestSpanProcessor.d.ts.map +1 -0
  104. package/dist/commonjs/a365/processors/PerRequestSpanProcessor.js +260 -0
  105. package/dist/commonjs/a365/processors/PerRequestSpanProcessor.js.map +1 -0
  106. package/dist/commonjs/a365/processors/index.d.ts +5 -0
  107. package/dist/commonjs/a365/processors/index.d.ts.map +1 -0
  108. package/dist/commonjs/a365/processors/index.js +13 -0
  109. package/dist/commonjs/a365/processors/index.js.map +1 -0
  110. package/dist/commonjs/a365/processors/util.d.ts +10 -0
  111. package/dist/commonjs/a365/processors/util.d.ts.map +1 -0
  112. package/dist/commonjs/a365/processors/util.js +56 -0
  113. package/dist/commonjs/a365/processors/util.js.map +1 -0
  114. package/dist/commonjs/a365/scopes/ExecuteToolScope.d.ts +24 -0
  115. package/dist/commonjs/a365/scopes/ExecuteToolScope.d.ts.map +1 -0
  116. package/dist/commonjs/a365/scopes/ExecuteToolScope.js +60 -0
  117. package/dist/commonjs/a365/scopes/ExecuteToolScope.js.map +1 -0
  118. package/dist/commonjs/a365/scopes/InferenceScope.d.ts +29 -0
  119. package/dist/commonjs/a365/scopes/InferenceScope.d.ts.map +1 -0
  120. package/dist/commonjs/a365/scopes/InferenceScope.js +75 -0
  121. package/dist/commonjs/a365/scopes/InferenceScope.js.map +1 -0
  122. package/dist/commonjs/a365/scopes/InvokeAgentScope.d.ts +25 -0
  123. package/dist/commonjs/a365/scopes/InvokeAgentScope.d.ts.map +1 -0
  124. package/dist/commonjs/a365/scopes/InvokeAgentScope.js +84 -0
  125. package/dist/commonjs/a365/scopes/InvokeAgentScope.js.map +1 -0
  126. package/dist/commonjs/a365/scopes/OpenTelemetryScope.d.ts +69 -0
  127. package/dist/commonjs/a365/scopes/OpenTelemetryScope.d.ts.map +1 -0
  128. package/dist/commonjs/a365/scopes/OpenTelemetryScope.js +211 -0
  129. package/dist/commonjs/a365/scopes/OpenTelemetryScope.js.map +1 -0
  130. package/dist/commonjs/a365/scopes/OutputScope.d.ts +26 -0
  131. package/dist/commonjs/a365/scopes/OutputScope.d.ts.map +1 -0
  132. package/dist/commonjs/a365/scopes/OutputScope.js +73 -0
  133. package/dist/commonjs/a365/scopes/OutputScope.js.map +1 -0
  134. package/dist/commonjs/a365/scopes/index.d.ts +6 -0
  135. package/dist/commonjs/a365/scopes/index.d.ts.map +1 -0
  136. package/dist/commonjs/a365/scopes/index.js +16 -0
  137. package/dist/commonjs/a365/scopes/index.js.map +1 -0
  138. package/dist/commonjs/a365/utils/utils.d.ts +6 -0
  139. package/dist/commonjs/a365/utils/utils.d.ts.map +1 -0
  140. package/dist/commonjs/a365/utils/utils.js +14 -0
  141. package/dist/commonjs/a365/utils/utils.js.map +1 -0
  142. package/dist/commonjs/azureMonitor/index.d.ts +14 -0
  143. package/dist/commonjs/azureMonitor/index.d.ts.map +1 -1
  144. package/dist/commonjs/azureMonitor/index.js +29 -0
  145. package/dist/commonjs/azureMonitor/index.js.map +1 -1
  146. package/dist/commonjs/azureMonitor/metrics/handler.js +2 -2
  147. package/dist/commonjs/azureMonitor/metrics/handler.js.map +1 -1
  148. package/dist/commonjs/azureMonitor/metrics/quickpulse/types.d.ts +1 -1
  149. package/dist/commonjs/azureMonitor/traces/handler.d.ts +0 -3
  150. package/dist/commonjs/azureMonitor/traces/handler.d.ts.map +1 -1
  151. package/dist/commonjs/azureMonitor/traces/handler.js +8 -19
  152. package/dist/commonjs/azureMonitor/traces/handler.js.map +1 -1
  153. package/dist/commonjs/distro/distro.d.ts +3 -1
  154. package/dist/commonjs/distro/distro.d.ts.map +1 -1
  155. package/dist/commonjs/distro/distro.js +88 -92
  156. package/dist/commonjs/distro/distro.js.map +1 -1
  157. package/dist/commonjs/distro/instrumentations.d.ts +31 -0
  158. package/dist/commonjs/distro/instrumentations.d.ts.map +1 -0
  159. package/dist/commonjs/distro/instrumentations.js +131 -0
  160. package/dist/commonjs/distro/instrumentations.js.map +1 -0
  161. package/dist/commonjs/distro/types.d.ts +2 -1
  162. package/dist/commonjs/distro/types.d.ts.map +1 -1
  163. package/dist/commonjs/index.d.ts +8 -12
  164. package/dist/commonjs/index.d.ts.map +1 -1
  165. package/dist/commonjs/index.js +48 -20
  166. package/dist/commonjs/index.js.map +1 -1
  167. package/dist/commonjs/package.json +1 -0
  168. package/dist/commonjs/shared/jsonConfig.d.ts +2 -1
  169. package/dist/commonjs/shared/jsonConfig.d.ts.map +1 -1
  170. package/dist/commonjs/shared/module.js +15 -11
  171. package/dist/commonjs/shared/module.js.map +1 -1
  172. package/dist/commonjs/types.d.ts +8 -32
  173. package/dist/commonjs/types.d.ts.map +1 -1
  174. package/dist/commonjs/types.js +1 -1
  175. package/dist/commonjs/types.js.map +1 -1
  176. package/dist/esm/a365/configuration/A365Configuration.d.ts +42 -0
  177. package/dist/esm/a365/configuration/A365Configuration.d.ts.map +1 -0
  178. package/dist/esm/a365/configuration/A365Configuration.js +158 -0
  179. package/dist/esm/a365/configuration/A365Configuration.js.map +1 -0
  180. package/dist/esm/a365/configuration/A365ConfigurationOptions.d.ts +53 -0
  181. package/dist/esm/a365/configuration/A365ConfigurationOptions.d.ts.map +1 -0
  182. package/dist/esm/a365/configuration/A365ConfigurationOptions.js +4 -0
  183. package/dist/esm/a365/configuration/A365ConfigurationOptions.js.map +1 -0
  184. package/dist/esm/a365/configuration/index.d.ts +3 -0
  185. package/dist/esm/a365/configuration/index.d.ts.map +1 -0
  186. package/dist/esm/a365/configuration/index.js +4 -0
  187. package/dist/esm/a365/configuration/index.js.map +1 -0
  188. package/dist/esm/a365/constants.d.ts +93 -0
  189. package/dist/esm/a365/constants.d.ts.map +1 -0
  190. package/dist/esm/a365/constants.js +116 -0
  191. package/dist/esm/a365/constants.js.map +1 -0
  192. package/dist/esm/a365/context/tokenContext.d.ts +25 -0
  193. package/dist/esm/a365/context/tokenContext.d.ts.map +1 -0
  194. package/dist/esm/a365/context/tokenContext.js +62 -0
  195. package/dist/esm/a365/context/tokenContext.js.map +1 -0
  196. package/dist/esm/a365/context.d.ts +31 -0
  197. package/dist/esm/a365/context.d.ts.map +1 -0
  198. package/dist/esm/a365/context.js +101 -0
  199. package/dist/esm/a365/context.js.map +1 -0
  200. package/dist/esm/a365/contracts.d.ts +250 -0
  201. package/dist/esm/a365/contracts.d.ts.map +1 -0
  202. package/dist/esm/a365/contracts.js +49 -0
  203. package/dist/esm/a365/contracts.js.map +1 -0
  204. package/dist/esm/a365/exporter/Agent365Exporter.d.ts +25 -0
  205. package/dist/esm/a365/exporter/Agent365Exporter.d.ts.map +1 -0
  206. package/dist/esm/a365/exporter/Agent365Exporter.js +215 -0
  207. package/dist/esm/a365/exporter/Agent365Exporter.js.map +1 -0
  208. package/dist/esm/a365/exporter/Agent365ExporterOptions.d.ts +43 -0
  209. package/dist/esm/a365/exporter/Agent365ExporterOptions.d.ts.map +1 -0
  210. package/dist/esm/a365/exporter/Agent365ExporterOptions.js +26 -0
  211. package/dist/esm/a365/exporter/Agent365ExporterOptions.js.map +1 -0
  212. package/dist/esm/a365/exporter/ExporterEventNames.d.ts +9 -0
  213. package/dist/esm/a365/exporter/ExporterEventNames.d.ts.map +1 -0
  214. package/dist/esm/a365/exporter/ExporterEventNames.js +12 -0
  215. package/dist/esm/a365/exporter/ExporterEventNames.js.map +1 -0
  216. package/dist/esm/a365/exporter/index.d.ts +6 -0
  217. package/dist/esm/a365/exporter/index.d.ts.map +1 -0
  218. package/dist/esm/a365/exporter/index.js +7 -0
  219. package/dist/esm/a365/exporter/index.js.map +1 -0
  220. package/dist/esm/a365/exporter/utils.d.ts +41 -0
  221. package/dist/esm/a365/exporter/utils.d.ts.map +1 -0
  222. package/dist/esm/a365/exporter/utils.js +398 -0
  223. package/dist/esm/a365/exporter/utils.js.map +1 -0
  224. package/dist/esm/a365/hosting/baggageBuilderUtils.d.ts +22 -0
  225. package/dist/esm/a365/hosting/baggageBuilderUtils.d.ts.map +1 -0
  226. package/dist/esm/a365/hosting/baggageBuilderUtils.js +43 -0
  227. package/dist/esm/a365/hosting/baggageBuilderUtils.js.map +1 -0
  228. package/dist/esm/a365/hosting/baggageMiddleware.d.ts +9 -0
  229. package/dist/esm/a365/hosting/baggageMiddleware.d.ts.map +1 -0
  230. package/dist/esm/a365/hosting/baggageMiddleware.js +34 -0
  231. package/dist/esm/a365/hosting/baggageMiddleware.js.map +1 -0
  232. package/dist/esm/a365/hosting/index.d.ts +9 -0
  233. package/dist/esm/a365/hosting/index.d.ts.map +1 -0
  234. package/dist/esm/a365/hosting/index.js +9 -0
  235. package/dist/esm/a365/hosting/index.js.map +1 -0
  236. package/dist/esm/a365/hosting/observabilityHostingManager.d.ts +30 -0
  237. package/dist/esm/a365/hosting/observabilityHostingManager.d.ts.map +1 -0
  238. package/dist/esm/a365/hosting/observabilityHostingManager.js +45 -0
  239. package/dist/esm/a365/hosting/observabilityHostingManager.js.map +1 -0
  240. package/dist/esm/a365/hosting/outputLoggingMiddleware.d.ts +24 -0
  241. package/dist/esm/a365/hosting/outputLoggingMiddleware.d.ts.map +1 -0
  242. package/dist/esm/a365/hosting/outputLoggingMiddleware.js +78 -0
  243. package/dist/esm/a365/hosting/outputLoggingMiddleware.js.map +1 -0
  244. package/dist/esm/a365/hosting/scopeUtils.d.ts +56 -0
  245. package/dist/esm/a365/hosting/scopeUtils.d.ts.map +1 -0
  246. package/dist/esm/a365/hosting/scopeUtils.js +157 -0
  247. package/dist/esm/a365/hosting/scopeUtils.js.map +1 -0
  248. package/dist/esm/a365/hosting/turnContextUtils.d.ts +32 -0
  249. package/dist/esm/a365/hosting/turnContextUtils.d.ts.map +1 -0
  250. package/dist/esm/a365/hosting/turnContextUtils.js +133 -0
  251. package/dist/esm/a365/hosting/turnContextUtils.js.map +1 -0
  252. package/dist/esm/a365/hosting/types.d.ts +52 -0
  253. package/dist/esm/a365/hosting/types.d.ts.map +1 -0
  254. package/dist/esm/a365/hosting/types.js +4 -0
  255. package/dist/esm/a365/hosting/types.js.map +1 -0
  256. package/dist/esm/a365/index.d.ts +18 -0
  257. package/dist/esm/a365/index.d.ts.map +1 -0
  258. package/dist/esm/a365/index.js +22 -0
  259. package/dist/esm/a365/index.js.map +1 -0
  260. package/dist/esm/a365/message-utils.d.ts +42 -0
  261. package/dist/esm/a365/message-utils.d.ts.map +1 -0
  262. package/dist/esm/a365/message-utils.js +107 -0
  263. package/dist/esm/a365/message-utils.js.map +1 -0
  264. package/dist/esm/a365/middleware/BaggageBuilder.d.ts +112 -0
  265. package/dist/esm/a365/middleware/BaggageBuilder.d.ts.map +1 -0
  266. package/dist/esm/a365/middleware/BaggageBuilder.js +243 -0
  267. package/dist/esm/a365/middleware/BaggageBuilder.js.map +1 -0
  268. package/dist/esm/a365/middleware/index.d.ts +2 -0
  269. package/dist/esm/a365/middleware/index.d.ts.map +1 -0
  270. package/dist/esm/a365/middleware/index.js +4 -0
  271. package/dist/esm/a365/middleware/index.js.map +1 -0
  272. package/dist/esm/a365/processors/A365SpanProcessor.d.ts +32 -0
  273. package/dist/esm/a365/processors/A365SpanProcessor.d.ts.map +1 -0
  274. package/dist/esm/a365/processors/A365SpanProcessor.js +100 -0
  275. package/dist/esm/a365/processors/A365SpanProcessor.js.map +1 -0
  276. package/dist/esm/a365/processors/PerRequestSpanProcessor.d.ts +44 -0
  277. package/dist/esm/a365/processors/PerRequestSpanProcessor.d.ts.map +1 -0
  278. package/dist/esm/a365/processors/PerRequestSpanProcessor.js +256 -0
  279. package/dist/esm/a365/processors/PerRequestSpanProcessor.js.map +1 -0
  280. package/dist/esm/a365/processors/index.d.ts +5 -0
  281. package/dist/esm/a365/processors/index.d.ts.map +1 -0
  282. package/dist/esm/a365/processors/index.js +6 -0
  283. package/dist/esm/a365/processors/index.js.map +1 -0
  284. package/dist/esm/a365/processors/util.d.ts +10 -0
  285. package/dist/esm/a365/processors/util.d.ts.map +1 -0
  286. package/dist/esm/a365/processors/util.js +53 -0
  287. package/dist/esm/a365/processors/util.js.map +1 -0
  288. package/dist/esm/a365/scopes/ExecuteToolScope.d.ts +24 -0
  289. package/dist/esm/a365/scopes/ExecuteToolScope.d.ts.map +1 -0
  290. package/dist/esm/a365/scopes/ExecuteToolScope.js +56 -0
  291. package/dist/esm/a365/scopes/ExecuteToolScope.js.map +1 -0
  292. package/dist/esm/a365/scopes/InferenceScope.d.ts +29 -0
  293. package/dist/esm/a365/scopes/InferenceScope.d.ts.map +1 -0
  294. package/dist/esm/a365/scopes/InferenceScope.js +71 -0
  295. package/dist/esm/a365/scopes/InferenceScope.js.map +1 -0
  296. package/dist/esm/a365/scopes/InvokeAgentScope.d.ts +25 -0
  297. package/dist/esm/a365/scopes/InvokeAgentScope.d.ts.map +1 -0
  298. package/dist/esm/a365/scopes/InvokeAgentScope.js +80 -0
  299. package/dist/esm/a365/scopes/InvokeAgentScope.js.map +1 -0
  300. package/dist/esm/a365/scopes/OpenTelemetryScope.d.ts +69 -0
  301. package/dist/esm/a365/scopes/OpenTelemetryScope.d.ts.map +1 -0
  302. package/dist/esm/a365/scopes/OpenTelemetryScope.js +207 -0
  303. package/dist/esm/a365/scopes/OpenTelemetryScope.js.map +1 -0
  304. package/dist/esm/a365/scopes/OutputScope.d.ts +26 -0
  305. package/dist/esm/a365/scopes/OutputScope.d.ts.map +1 -0
  306. package/dist/esm/a365/scopes/OutputScope.js +69 -0
  307. package/dist/esm/a365/scopes/OutputScope.js.map +1 -0
  308. package/dist/esm/a365/scopes/index.d.ts +6 -0
  309. package/dist/esm/a365/scopes/index.d.ts.map +1 -0
  310. package/dist/esm/a365/scopes/index.js +8 -0
  311. package/dist/esm/a365/scopes/index.js.map +1 -0
  312. package/dist/esm/a365/utils/utils.d.ts +6 -0
  313. package/dist/esm/a365/utils/utils.d.ts.map +1 -0
  314. package/dist/esm/a365/utils/utils.js +11 -0
  315. package/dist/esm/a365/utils/utils.js.map +1 -0
  316. package/dist/esm/azureMonitor/index.d.ts +14 -0
  317. package/dist/esm/azureMonitor/index.d.ts.map +1 -1
  318. package/dist/esm/azureMonitor/index.js +27 -0
  319. package/dist/esm/azureMonitor/index.js.map +1 -1
  320. package/dist/esm/azureMonitor/metrics/handler.js +2 -2
  321. package/dist/esm/azureMonitor/metrics/handler.js.map +1 -1
  322. package/dist/esm/azureMonitor/metrics/quickpulse/types.d.ts +1 -1
  323. package/dist/esm/azureMonitor/traces/handler.d.ts +0 -3
  324. package/dist/esm/azureMonitor/traces/handler.d.ts.map +1 -1
  325. package/dist/esm/azureMonitor/traces/handler.js +6 -19
  326. package/dist/esm/azureMonitor/traces/handler.js.map +1 -1
  327. package/dist/esm/distro/distro.d.ts +3 -1
  328. package/dist/esm/distro/distro.d.ts.map +1 -1
  329. package/dist/esm/distro/distro.js +89 -93
  330. package/dist/esm/distro/distro.js.map +1 -1
  331. package/dist/esm/distro/instrumentations.d.ts +31 -0
  332. package/dist/esm/distro/instrumentations.d.ts.map +1 -0
  333. package/dist/esm/distro/instrumentations.js +126 -0
  334. package/dist/esm/distro/instrumentations.js.map +1 -0
  335. package/dist/esm/distro/types.d.ts +2 -1
  336. package/dist/esm/distro/types.d.ts.map +1 -1
  337. package/dist/esm/index.d.ts +8 -12
  338. package/dist/esm/index.d.ts.map +1 -1
  339. package/dist/esm/index.js +6 -17
  340. package/dist/esm/index.js.map +1 -1
  341. package/dist/esm/shared/jsonConfig.d.ts +2 -1
  342. package/dist/esm/shared/jsonConfig.d.ts.map +1 -1
  343. package/dist/esm/types.d.ts +8 -32
  344. package/dist/esm/types.d.ts.map +1 -1
  345. package/dist/esm/types.js +1 -1
  346. package/dist/esm/types.js.map +1 -1
  347. package/package.json +7 -8
@@ -8,8 +8,10 @@ exports._getSdkInstance = _getSdkInstance;
8
8
  const api_1 = require("@opentelemetry/api");
9
9
  const api_logs_1 = require("@opentelemetry/api-logs");
10
10
  const sdk_node_1 = require("@opentelemetry/sdk-node");
11
+ const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
12
+ const sdk_logs_1 = require("@opentelemetry/sdk-logs");
13
+ const sdk_metrics_1 = require("@opentelemetry/sdk-metrics");
11
14
  const config_js_1 = require("../shared/config.js");
12
- const jsonConfig_js_1 = require("../shared/jsonConfig.js");
13
15
  const index_js_1 = require("../azureMonitor/metrics/index.js");
14
16
  const handler_js_1 = require("../azureMonitor/traces/handler.js");
15
17
  const index_js_2 = require("../azureMonitor/logs/index.js");
@@ -18,8 +20,9 @@ const opentelemetryInstrumentationPatcher_js_1 = require("../azureMonitor/utils/
18
20
  const common_js_1 = require("../utils/common.js");
19
21
  const index_js_3 = require("../azureMonitor/index.js");
20
22
  const index_js_4 = require("../otlp/index.js");
21
- const agents_a365_observability_1 = require("@microsoft/agents-a365-observability");
23
+ const index_js_5 = require("../a365/index.js");
22
24
  const types_js_2 = require("../types.js");
25
+ const instrumentations_js_1 = require("./instrumentations.js");
23
26
  process.env["AZURE_MONITOR_DISTRO_VERSION"] = types_js_1.AZURE_MONITOR_OPENTELEMETRY_VERSION;
24
27
  process.env["MICROSOFT_OPENTELEMETRY_VERSION"] = types_js_2.MICROSOFT_OPENTELEMETRY_VERSION;
25
28
  let sdk;
@@ -29,7 +32,9 @@ let disposeAzureMonitor;
29
32
  *
30
33
  * This is the primary entry point for the distro. It sets up OpenTelemetry
31
34
  * providers and instrumentations, then attaches the configured exporters:
32
- * - Azure Monitor (when `options.azureMonitor` is provided)
35
+ * - Azure Monitor (when `options.azureMonitor` is provided or the
36
+ * `APPLICATIONINSIGHTS_CONNECTION_STRING` env var is set; explicitly disable
37
+ * with `options.azureMonitor.enabled = false`)
33
38
  * - OTLP HTTP (when `OTEL_EXPORTER_OTLP_ENDPOINT` is set)
34
39
  * - A365 (when `options.a365.enabled` is true or `ENABLE_A365_OBSERVABILITY_EXPORTER=true`)
35
40
  *
@@ -38,8 +43,18 @@ let disposeAzureMonitor;
38
43
  function useMicrosoftOpenTelemetry(options) {
39
44
  const config = new config_js_1.InternalConfig(options);
40
45
  (0, opentelemetryInstrumentationPatcher_js_1.patchOpenTelemetryInstrumentationEnable)();
46
+ // Azure Monitor is enabled when configured programmatically or via JSON config.
47
+ // An explicit `enabled: false` always wins, even if a connection string is present.
48
+ // Connection-string validation is delegated to the Azure Monitor module.
49
+ const azureMonitorRequested = options?.azureMonitor?.enabled !== false &&
50
+ (!!options?.azureMonitor || (0, index_js_3.hasAzureMonitorConnectionString)(config));
51
+ const azureMonitorEnabled = azureMonitorRequested && (0, index_js_3.validateAzureMonitorConfig)(config);
52
+ // Reset dispose callback to avoid stale references from a previous initialization
53
+ disposeAzureMonitor = undefined;
41
54
  // ── Azure Monitor components (statsbeat, browser SDK loader, etc.) ─
42
- disposeAzureMonitor = (0, index_js_3.setupAzureMonitorComponents)(config);
55
+ if (azureMonitorEnabled) {
56
+ disposeAzureMonitor = (0, index_js_3.setupAzureMonitorComponents)(config);
57
+ }
43
58
  // ── Register global providers ─────────────────────────────────────
44
59
  // Remove global providers in OpenTelemetry, these would be overridden if present
45
60
  api_1.metrics.disable();
@@ -54,22 +69,29 @@ function useMicrosoftOpenTelemetry(options) {
54
69
  // registerGlobal() to create a fresh one with the correct version.
55
70
  const globalOpentelemetryApiKey = Symbol.for("opentelemetry.js.api.1");
56
71
  delete globalThis[globalOpentelemetryApiKey];
57
- // ── Azure Monitor handlers ────────────────────────────────────────
58
- const metricHandler = new index_js_1.MetricHandler(config);
59
- const traceHandler = new handler_js_1.TraceHandler(config, metricHandler);
60
- const logHandler = new index_js_2.LogHandler(config, metricHandler);
61
- const instrumentations = traceHandler
62
- .getInstrumentations()
63
- .concat(logHandler.getInstrumentations());
72
+ // ── Instrumentations, sampler, and views (always created) ─────────
73
+ const instrumentations = (0, instrumentations_js_1.createInstrumentations)(config, {
74
+ filterAzureMonitorRequests: azureMonitorEnabled,
75
+ });
76
+ const sampler = (0, instrumentations_js_1.createSampler)(config);
77
+ const views = (0, instrumentations_js_1.createViews)(config);
78
+ // ── Azure Monitor handlers (only when configured) ─────────────────
79
+ let metricHandler;
80
+ let traceHandler;
81
+ let logHandler;
82
+ if (azureMonitorEnabled) {
83
+ metricHandler = new index_js_1.MetricHandler(config);
84
+ traceHandler = new handler_js_1.TraceHandler(config, metricHandler);
85
+ logHandler = new index_js_2.LogHandler(config, metricHandler);
86
+ }
64
87
  const resourceDetectorsList = (0, common_js_1.parseResourceDetectorsFromEnvVar)();
65
88
  // ── Merge user-provided processors / readers / views ──────────────
66
89
  // Clone caller-provided arrays to avoid mutating them when OTLP components are appended.
67
90
  const spanProcessors = [...(options?.spanProcessors || [])];
68
91
  const logRecordProcessors = [...(options?.logRecordProcessors || [])];
69
92
  const customViews = [...(options?.views || [])];
70
- // Always include Azure Monitor metric reader
71
93
  const metricReaders = [
72
- metricHandler.getMetricReader(),
94
+ ...(metricHandler ? [metricHandler.getMetricReader()] : []),
73
95
  ...(options?.metricReaders || []),
74
96
  ];
75
97
  // ── OTLP HTTP exporters (enabled via OTEL_EXPORTER_OTLP_ENDPOINT) ─
@@ -85,104 +107,78 @@ function useMicrosoftOpenTelemetry(options) {
85
107
  logRecordProcessors.push(otlp.logRecordProcessor);
86
108
  }
87
109
  }
88
- // ── A365 observability (enabled via env var, JSON config, or options) ──
89
- // Precedence: env vars > JSON config > programmatic options.
90
- const envExporterFlag = (process.env.ENABLE_A365_OBSERVABILITY_EXPORTER ?? "")
91
- .trim()
92
- .toLowerCase();
93
- const jsonA365 = jsonConfig_js_1.JsonConfig.getInstance().a365;
94
- // Merge A365 options: programmatic < JSON config < env vars
95
- const mergedA365 = {
96
- enabled: options?.a365?.enabled,
97
- tokenResolver: options?.a365?.tokenResolver,
98
- clusterCategory: options?.a365?.clusterCategory,
99
- domainOverride: options?.a365?.domainOverride,
100
- authScopes: options?.a365?.authScopes,
101
- perRequestExport: options?.a365?.perRequestExport,
102
- // JSON config overrides programmatic options
103
- ...(jsonA365
104
- ? {
105
- ...(jsonA365.enabled !== undefined ? { enabled: jsonA365.enabled } : {}),
106
- ...(jsonA365.clusterCategory !== undefined
107
- ? { clusterCategory: jsonA365.clusterCategory }
108
- : {}),
109
- ...(jsonA365.domainOverride !== undefined
110
- ? { domainOverride: jsonA365.domainOverride }
111
- : {}),
112
- ...(jsonA365.authScopes !== undefined ? { authScopes: jsonA365.authScopes } : {}),
113
- ...(jsonA365.perRequestExport !== undefined
114
- ? { perRequestExport: jsonA365.perRequestExport }
115
- : {}),
116
- // tokenResolver cannot come from JSON — it's a function
117
- }
118
- : {}),
119
- };
120
- // Env var has highest precedence for enabled (tri-state: unset → fall through, true/false → override)
121
- let a365Enabled;
122
- if (envExporterFlag) {
123
- a365Enabled = ["true", "1", "yes", "on"].includes(envExporterFlag);
110
+ // ── A365 exporter (enabled via options.a365 or env vars) ──────────
111
+ const a365Config = new index_js_5.A365Configuration(options?.a365);
112
+ const a365ConsoleExportFallback = !a365Config.enabled && !!options?.a365;
113
+ if (a365Config.enabled) {
114
+ const a365Exporter = new index_js_5.Agent365Exporter({
115
+ clusterCategory: a365Config.clusterCategory,
116
+ domainOverride: a365Config.domainOverride,
117
+ tokenResolver: a365Config.tokenResolver,
118
+ });
119
+ // A365SpanProcessor copies baggage (tenant, agent, session, etc.) to span attributes
120
+ if (a365Config.baggage.enrichSpans) {
121
+ spanProcessors.push(new index_js_5.A365SpanProcessor());
122
+ }
123
+ // PerRequestSpanProcessor buffers spans per trace and exports on root completion
124
+ // with the request's auth token; BatchSpanProcessor for standard batch export
125
+ const a365ExportProcessor = a365Config.perRequestExport
126
+ ? new index_js_5.PerRequestSpanProcessor(a365Exporter)
127
+ : new sdk_trace_base_1.BatchSpanProcessor(a365Exporter);
128
+ spanProcessors.push(a365ExportProcessor);
129
+ }
130
+ else if (a365ConsoleExportFallback) {
131
+ // A365 options provided but exporter disabled — fall back to console export
132
+ // so developers can validate spans locally (matches upstream A365 SDK behavior
133
+ // when ENABLE_A365_OBSERVABILITY_EXPORTER=false).
134
+ spanProcessors.push(new sdk_trace_base_1.SimpleSpanProcessor(new sdk_trace_base_1.ConsoleSpanExporter()));
124
135
  }
125
- else {
126
- a365Enabled = mergedA365.enabled ?? false;
136
+ // Merge views: use Azure Monitor views when available (they cover the same
137
+ // instrumentations as createViews), otherwise fall back to the standalone views.
138
+ const allViews = [
139
+ ...(metricHandler ? metricHandler.getViews() : views),
140
+ ...customViews,
141
+ ];
142
+ // ── Console exporters (auto-enabled when no other exporter is active, or explicitly) ─
143
+ const hasCustomProcessors = (options?.spanProcessors?.length ?? 0) > 0 ||
144
+ (options?.metricReaders?.length ?? 0) > 0 ||
145
+ (options?.logRecordProcessors?.length ?? 0) > 0;
146
+ const consoleEnabled = options?.enableConsoleExporters ??
147
+ (!azureMonitorEnabled && !(0, index_js_4.isOtlpEnabled)() && !a365Config.enabled && !hasCustomProcessors);
148
+ if (consoleEnabled) {
149
+ // Skip span console exporter when A365 fallback already added one
150
+ if (!a365ConsoleExportFallback) {
151
+ spanProcessors.push(new sdk_trace_base_1.SimpleSpanProcessor(new sdk_trace_base_1.ConsoleSpanExporter()));
152
+ }
153
+ metricReaders.push(new sdk_metrics_1.PeriodicExportingMetricReader({
154
+ exporter: new sdk_metrics_1.ConsoleMetricExporter(),
155
+ exportIntervalMillis: config.metricExportIntervalMillis,
156
+ }));
157
+ logRecordProcessors.push(new sdk_logs_1.SimpleLogRecordProcessor(new sdk_logs_1.ConsoleLogRecordExporter()));
127
158
  }
128
- const views = metricHandler.getViews().concat(customViews);
129
159
  // ── Create and start NodeSDK ──────────────────────────────────────
130
160
  const sdkConfig = {
131
161
  autoDetectResources: true,
132
162
  metricReaders: metricReaders,
133
- views,
163
+ views: allViews,
134
164
  instrumentations: instrumentations,
135
165
  logRecordProcessors: [
136
- logHandler.getAzureLogRecordProcessor(),
166
+ ...(logHandler ? [logHandler.getAzureLogRecordProcessor()] : []),
137
167
  ...logRecordProcessors,
138
- logHandler.getBatchLogRecordProcessor(),
168
+ ...(logHandler ? [logHandler.getBatchLogRecordProcessor()] : []),
139
169
  ],
140
170
  resource: config.resource,
141
- sampler: traceHandler.getSampler(),
171
+ sampler,
142
172
  spanProcessors: [
143
- traceHandler.getAzureMonitorSpanProcessor(),
173
+ ...(traceHandler ? [traceHandler.getAzureMonitorSpanProcessor()] : []),
144
174
  ...spanProcessors,
145
- traceHandler.getBatchSpanProcessor(),
175
+ ...(traceHandler ? [traceHandler.getBatchSpanProcessor()] : []),
146
176
  ],
147
177
  resourceDetectors: resourceDetectorsList,
148
178
  };
149
179
  sdk = new sdk_node_1.NodeSDK(sdkConfig);
150
180
  // TODO: Enable auto-attach warning — see autoAttach.ts
151
181
  sdk.start();
152
- // ── A365: attach processors to the now-active global provider ─────
153
- // ObservabilityManager.start() detects the existing global TracerProvider
154
- // and adds its baggage-enricher + exporter processors without creating
155
- // a second NodeSDK instance.
156
- if (a365Enabled) {
157
- // Ensure the env var is set so the npm package's internal exporter check passes
158
- if (!process.env.ENABLE_A365_OBSERVABILITY_EXPORTER) {
159
- process.env.ENABLE_A365_OBSERVABILITY_EXPORTER = "true";
160
- }
161
- if (mergedA365.perRequestExport && !process.env.ENABLE_A365_OBSERVABILITY_PER_REQUEST_EXPORT) {
162
- process.env.ENABLE_A365_OBSERVABILITY_PER_REQUEST_EXPORT = "true";
163
- }
164
- if (mergedA365.domainOverride && !process.env.A365_OBSERVABILITY_DOMAIN_OVERRIDE) {
165
- process.env.A365_OBSERVABILITY_DOMAIN_OVERRIDE = mergedA365.domainOverride;
166
- }
167
- // Build a config provider if the caller specified domain override or auth scopes
168
- let configProvider;
169
- if (mergedA365.domainOverride || mergedA365.authScopes) {
170
- const domainOverride = mergedA365.domainOverride ?? null;
171
- const authScopes = mergedA365.authScopes;
172
- configProvider = {
173
- getConfiguration: () => new agents_a365_observability_1.ObservabilityConfiguration({
174
- isObservabilityExporterEnabled: () => true,
175
- observabilityDomainOverride: () => domainOverride,
176
- ...(authScopes ? { observabilityAuthenticationScopes: () => authScopes } : {}),
177
- }),
178
- };
179
- }
180
- agents_a365_observability_1.ObservabilityManager.start({
181
- tokenResolver: mergedA365.tokenResolver,
182
- clusterCategory: mergedA365.clusterCategory,
183
- configProvider,
184
- });
185
- }
186
182
  }
187
183
  /**
188
184
  * Shutdown Microsoft OpenTelemetry distribution.
@@ -1 +1 @@
1
- {"version":3,"file":"distro.js","sourceRoot":"","sources":["../../../src/distro/distro.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6ClC,8DAqKC;AAKD,wEAGC;AAOD,0CAEC;AAjOD,4CAAoD;AACpD,sDAA+C;AAE/C,sDAAkD;AAKlD,mDAAqD;AACrD,2DAAqD;AACrD,+DAAiE;AACjE,kEAAiE;AACjE,4DAA2D;AAC3D,0CAAkE;AAClE,yHAAuH;AACvH,kDAAsE;AACtE,uDAAuE;AACvE,+CAAuE;AACvE,oFAG8C;AAG9C,0CAA8D;AAE9D,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,GAAG,8CAAmC,CAAC;AAClF,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,GAAG,0CAA+B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mB,EAAE;YACnB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChE,GAAG,mBAAmB;YACtB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SACjE;QACD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO;QACP,cAAc,EAAE;YACd,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACtE,GAAG,cAAc;YACjB,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE;QACD,iBAAiB,EAAE,qBAAqB;KACzC,CAAC;IACF,GAAG,GAAG,IAAI,kBAAO,CAAC,SAAS,CAAC,CAAC;IAC7B,uDAAuD;IACvD,GAAG,CAAC,KAAK,EAAE,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,8BAA8B;IAC5C,mBAAmB,EAAE,EAAE,CAAC;IACxB,OAAO,GAAG,EAAE,QAAQ,EAAE,CAAC;AACzB,CAAC;AAED;;;GAGG;AAEH,SAAgB,eAAe;IAC7B,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Sampler } from "@opentelemetry/sdk-trace-base";
2
+ import type { Instrumentation } from "@opentelemetry/instrumentation";
3
+ import type { ViewOptions } from "@opentelemetry/sdk-metrics";
4
+ import type { InternalConfig } from "../shared/config.js";
5
+ /**
6
+ * Build the list of auto-instrumentations based on the distro configuration.
7
+ * This covers trace instrumentations (HTTP, Azure SDK, DB clients, Azure
8
+ * Functions) and log instrumentations (Bunyan, Winston).
9
+ *
10
+ * When `filterAzureMonitorRequests` is true the HTTP instrumentation will
11
+ * suppress outgoing requests generated by the Azure Monitor exporter so they
12
+ * don't appear as dependency telemetry.
13
+ */
14
+ export declare function createInstrumentations(config: InternalConfig, options?: {
15
+ filterAzureMonitorRequests?: boolean;
16
+ }): Instrumentation[];
17
+ /**
18
+ * Create an OTel sampler based on the distro configuration.
19
+ *
20
+ * Precedence:
21
+ * 1. Explicit sampler provided via environment config (e.g. OTEL_TRACES_SAMPLER)
22
+ * 2. Rate-limited sampler when `tracesPerSecond` > 0
23
+ * 3. Percentage-based ApplicationInsightsSampler using `samplingRatio`
24
+ */
25
+ export declare function createSampler(config: InternalConfig): Sampler;
26
+ /**
27
+ * Create metric views for the enabled instrumentations so that metric readers
28
+ * have access to metrics produced by those instrumentations.
29
+ */
30
+ export declare function createViews(config: InternalConfig): ViewOptions[];
31
+ //# sourceMappingURL=instrumentations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentations.d.ts","sourceRoot":"","sources":["../../../src/distro/instrumentations.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAa7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAO1D;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE;IAAE,0BAA0B,CAAC,EAAE,OAAO,CAAA;CAAE,GACjD,eAAe,EAAE,CA0EnB;AAID;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAQ7D;AAID;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,WAAW,EAAE,CA0BjE"}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.createInstrumentations = createInstrumentations;
6
+ exports.createSampler = createSampler;
7
+ exports.createViews = createViews;
8
+ const opentelemetry_instrumentation_azure_sdk_1 = require("@azure/opentelemetry-instrumentation-azure-sdk");
9
+ const monitor_opentelemetry_exporter_1 = require("@azure/monitor-opentelemetry-exporter");
10
+ const instrumentation_http_1 = require("@opentelemetry/instrumentation-http");
11
+ const instrumentation_mongodb_1 = require("@opentelemetry/instrumentation-mongodb");
12
+ const instrumentation_mysql_1 = require("@opentelemetry/instrumentation-mysql");
13
+ const instrumentation_pg_1 = require("@opentelemetry/instrumentation-pg");
14
+ const instrumentation_redis_1 = require("@opentelemetry/instrumentation-redis");
15
+ const functions_opentelemetry_instrumentation_1 = require("@azure/functions-opentelemetry-instrumentation");
16
+ const instrumentation_bunyan_1 = require("@opentelemetry/instrumentation-bunyan");
17
+ const instrumentation_winston_1 = require("@opentelemetry/instrumentation-winston");
18
+ const common_js_1 = require("../azureMonitor/utils/common.js");
19
+ const sampler_js_1 = require("../azureMonitor/traces/sampler.js");
20
+ const logUtils_js_1 = require("../azureMonitor/utils/logUtils.js");
21
+ // ── Instrumentations ────────────────────────────────────────────────
22
+ /**
23
+ * Build the list of auto-instrumentations based on the distro configuration.
24
+ * This covers trace instrumentations (HTTP, Azure SDK, DB clients, Azure
25
+ * Functions) and log instrumentations (Bunyan, Winston).
26
+ *
27
+ * When `filterAzureMonitorRequests` is true the HTTP instrumentation will
28
+ * suppress outgoing requests generated by the Azure Monitor exporter so they
29
+ * don't appear as dependency telemetry.
30
+ */
31
+ function createInstrumentations(config, options) {
32
+ const instrumentations = [];
33
+ const filterAzureMonitor = options?.filterAzureMonitorRequests ?? false;
34
+ // ── Trace instrumentations ──────────────────────────────────────
35
+ if (config.instrumentationOptions.http?.enabled) {
36
+ const httpConfig = config.instrumentationOptions.http;
37
+ if (filterAzureMonitor) {
38
+ const providedHook = httpConfig.ignoreOutgoingRequestHook;
39
+ const mergedHook = (request) => {
40
+ const isAzureMonitorRequest = (0, common_js_1.ignoreOutgoingRequestHook)(request);
41
+ if (!isAzureMonitorRequest && providedHook) {
42
+ return providedHook(request);
43
+ }
44
+ return isAzureMonitorRequest;
45
+ };
46
+ httpConfig.ignoreOutgoingRequestHook = mergedHook;
47
+ }
48
+ instrumentations.push(new instrumentation_http_1.HttpInstrumentation(httpConfig));
49
+ }
50
+ if (config.instrumentationOptions.azureSdk?.enabled) {
51
+ instrumentations.push((0, opentelemetry_instrumentation_azure_sdk_1.createAzureSdkInstrumentation)(config.instrumentationOptions.azureSdk));
52
+ }
53
+ if (config.instrumentationOptions.mongoDb?.enabled) {
54
+ instrumentations.push(new instrumentation_mongodb_1.MongoDBInstrumentation(config.instrumentationOptions.mongoDb));
55
+ }
56
+ if (config.instrumentationOptions.mySql?.enabled) {
57
+ instrumentations.push(new instrumentation_mysql_1.MySQLInstrumentation(config.instrumentationOptions.mySql));
58
+ }
59
+ if (config.instrumentationOptions.postgreSql?.enabled) {
60
+ instrumentations.push(new instrumentation_pg_1.PgInstrumentation(config.instrumentationOptions.postgreSql));
61
+ }
62
+ if (config.instrumentationOptions.redis?.enabled ||
63
+ config.instrumentationOptions.redis4?.enabled) {
64
+ instrumentations.push(new instrumentation_redis_1.RedisInstrumentation(config.instrumentationOptions.redis));
65
+ }
66
+ if (config.instrumentationOptions.azureFunctions?.enabled) {
67
+ instrumentations.push(new functions_opentelemetry_instrumentation_1.AzureFunctionsInstrumentation(config.instrumentationOptions.azureFunctions));
68
+ }
69
+ // ── Log instrumentations ────────────────────────────────────────
70
+ const logLevelEnv = process.env.APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL;
71
+ if (config.instrumentationOptions.bunyan?.enabled) {
72
+ instrumentations.push(new instrumentation_bunyan_1.BunyanInstrumentation({
73
+ ...config.instrumentationOptions.bunyan,
74
+ logSeverity: logLevelEnv ? (0, logUtils_js_1.logLevelToSeverityNumber)(logLevelEnv) : undefined,
75
+ }));
76
+ }
77
+ if (config.instrumentationOptions.winston?.enabled) {
78
+ instrumentations.push(new instrumentation_winston_1.WinstonInstrumentation({
79
+ ...config.instrumentationOptions.winston,
80
+ logSeverity: logLevelEnv ? (0, logUtils_js_1.logLevelToSeverityNumber)(logLevelEnv) : undefined,
81
+ }));
82
+ }
83
+ return instrumentations;
84
+ }
85
+ // ── Sampler ─────────────────────────────────────────────────────────
86
+ /**
87
+ * Create an OTel sampler based on the distro configuration.
88
+ *
89
+ * Precedence:
90
+ * 1. Explicit sampler provided via environment config (e.g. OTEL_TRACES_SAMPLER)
91
+ * 2. Rate-limited sampler when `tracesPerSecond` > 0
92
+ * 3. Percentage-based ApplicationInsightsSampler using `samplingRatio`
93
+ */
94
+ function createSampler(config) {
95
+ if (config.sampler) {
96
+ return config.sampler;
97
+ }
98
+ if (config.tracesPerSecond && config.tracesPerSecond > 0) {
99
+ return new monitor_opentelemetry_exporter_1.RateLimitedSampler(config.tracesPerSecond);
100
+ }
101
+ return new sampler_js_1.ApplicationInsightsSampler(config.samplingRatio);
102
+ }
103
+ // ── Metric views ────────────────────────────────────────────────────
104
+ /**
105
+ * Create metric views for the enabled instrumentations so that metric readers
106
+ * have access to metrics produced by those instrumentations.
107
+ */
108
+ function createViews(config) {
109
+ const views = [];
110
+ if (config.instrumentationOptions.azureSdk?.enabled) {
111
+ views.push({ meterName: "@azure/opentelemetry-instrumentation-azure-sdk" });
112
+ }
113
+ if (config.instrumentationOptions.http?.enabled) {
114
+ views.push({ meterName: "@opentelemetry/instrumentation-http" });
115
+ }
116
+ if (config.instrumentationOptions.mongoDb?.enabled) {
117
+ views.push({ meterName: "@opentelemetry/instrumentation-mongodb" });
118
+ }
119
+ if (config.instrumentationOptions.mySql?.enabled) {
120
+ views.push({ meterName: "@opentelemetry/instrumentation-mysql" });
121
+ }
122
+ if (config.instrumentationOptions.postgreSql?.enabled) {
123
+ views.push({ meterName: "@opentelemetry/instrumentation-pg" });
124
+ }
125
+ if (config.instrumentationOptions.redis?.enabled ||
126
+ config.instrumentationOptions.redis4?.enabled) {
127
+ views.push({ meterName: "@opentelemetry/instrumentation-redis" });
128
+ }
129
+ return views;
130
+ }
131
+ //# sourceMappingURL=instrumentations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentations.js","sourceRoot":"","sources":["../../../src/distro/instrumentations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA2ClC,wDA6EC;AAYD,sCAQC;AAQD,kCA0BC;AArKD,4GAA+F;AAC/F,0FAA2E;AAM3E,8EAA0E;AAC1E,oFAAgF;AAChF,gFAA4E;AAC5E,0EAAsE;AACtE,gFAA4E;AAC5E,4GAA+F;AAC/F,kFAA8E;AAC9E,oFAAgF;AAKhF,+DAA4E;AAC5E,kEAA+E;AAC/E,mEAA6E;AAE7E,uEAAuE;AAEvE;;;;;;;;GAQG;AACH,SAAgB,sBAAsB,CACpC,MAAsB,EACtB,OAAkD;IAElD,MAAM,gBAAgB,GAAsB,EAAE,CAAC;IAC/C,MAAM,kBAAkB,GAAG,OAAO,EAAE,0BAA0B,IAAI,KAAK,CAAC;IAExE,mEAAmE;IACnE,IAAI,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;QAChD,MAAM,UAAU,GAAG,MAAM,CAAC,sBAAsB,CAAC,IAAiC,CAAC;QAEnF,IAAI,kBAAkB,EAAE,CAAC;YACvB,MAAM,YAAY,GAAG,UAAU,CAAC,yBAAyB,CAAC;YAC1D,MAAM,UAAU,GAAkC,CAAC,OAAuB,EAAE,EAAE;gBAC5E,MAAM,qBAAqB,GAAG,IAAA,qCAAyB,EAAC,OAAO,CAAC,CAAC;gBACjE,IAAI,CAAC,qBAAqB,IAAI,YAAY,EAAE,CAAC;oBAC3C,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;gBAC/B,CAAC;gBACD,OAAO,qBAAqB,CA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CAAC,MAAsB;IAChD,MAAM,KAAK,GAAkB,EAAE,CAAC;IAEhC,IAAI,MAAM,CAAC,sBAAsB,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpD,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,gDAAgD,EAAE,CAAC,CAAC;IAC9E,CAAC;IACD,IAAI,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,qCAAqC,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,IAAI,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,wCAAwC,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;QACjD,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,sCAAsC,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,IAAI,MAAM,CAAC,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,mCAAmC,EAAE,CAAC,CAAC;IACjE,CAAC;IACD,IACE,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO;QAC5C,MAAM,CAAC,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAC7C,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,sCAAsC,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,3 +1,4 @@
1
- export type { MicrosoftOpenTelemetryOptions, InstrumentationOptions, BrowserSdkLoaderOptions, A365Options, } from "../types.js";
1
+ export type { MicrosoftOpenTelemetryOptions, InstrumentationOptions, BrowserSdkLoaderOptions, } from "../types.js";
2
+ export type { A365Options } from "../a365/index.js";
2
3
  export { MICROSOFT_OPENTELEMETRY_VERSION } from "../types.js";
3
4
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/distro/types.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/distro/types.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC"}
@@ -1,17 +1,13 @@
1
- import type { AzureMonitorOpenTelemetryOptions, MicrosoftOpenTelemetryOptions } from "./types.js";
1
+ import type { AzureMonitorOpenTelemetryOptions } from "./types.js";
2
2
  export type { AzureMonitorOpenTelemetryOptions };
3
3
  export { useMicrosoftOpenTelemetry, shutdownMicrosoftOpenTelemetry, MICROSOFT_OPENTELEMETRY_VERSION, } from "./distro/index.js";
4
4
  export type { MicrosoftOpenTelemetryOptions, InstrumentationOptions, BrowserSdkLoaderOptions, A365Options, } from "./distro/index.js";
5
+ export { A365Configuration } from "./a365/index.js";
6
+ export type { ClusterCategory, A365BaggageOptions, A365HostingOptions } from "./a365/index.js";
7
+ export { OpenTelemetryScope, InvokeAgentScope, ExecuteToolScope, InferenceScope, OutputScope, OpenTelemetryConstants, MessageRole, FinishReason, Modality, InvocationRole, InferenceOperationType, A365_MESSAGE_SCHEMA_VERSION, isParentSpanRef, createContextWithParentSpanRef, runWithParentSpanRef, injectContextToHeaders, extractContextFromHeaders, runWithExtractedTraceContext, BaggageBuilder, BaggageScope, A365SpanProcessor, PerRequestSpanProcessor, GENERIC_ATTRIBUTES, INVOKE_AGENT_ATTRIBUTES, runWithExportToken, updateExportToken, getExportToken, } from "./a365/index.js";
8
+ export type { AgentDetails, UserDetails, CallerDetails, Request as A365Request, Channel, ServiceEndpoint, InvokeAgentScopeDetails, ToolCallDetails, InferenceDetails, InferenceResponse, OutputResponse, SpanDetails as A365SpanDetails, ParentSpanRef, ParentContext, ChatMessage, InputMessages, OutputMessage, OutputMessages, InputMessagesParam, OutputMessagesParam, ResponseMessagesParam, MessagePart, TextPart, ToolCallRequestPart, ToolCallResponsePart, ReasoningPart, HeadersCarrier, } from "./a365/index.js";
9
+ export type { PerRequestSpanProcessorOptions } from "./a365/index.js";
10
+ export { BaggageBuilderUtils, ScopeUtils, getCallerBaggagePairs, getTargetAgentBaggagePairs, getTenantIdPair, getChannelBaggagePairs, getConversationIdAndItemLinkPairs, resolveEmbodiedAgentIds, BaggageMiddleware, OutputLoggingMiddleware, A365_PARENT_SPAN_KEY, A365_AUTH_TOKEN_KEY, ObservabilityHostingManager, } from "./a365/index.js";
11
+ export type { ObservabilityHostingOptions, TurnContextLike, ActivityLike, MiddlewareLike, SendActivitiesHandler, } from "./a365/index.js";
5
12
  export type { OpenAIAgentsInstrumentationConfig, LangChainInstrumentationConfig } from "./types.js";
6
- /**
7
- * Initialize Azure Monitor Distro
8
- * @param options - Microsoft OpenTelemetry Options
9
- * @deprecated Use {@link useMicrosoftOpenTelemetry} instead.
10
- */
11
- export declare function useAzureMonitor(options?: MicrosoftOpenTelemetryOptions): void;
12
- /**
13
- * Shutdown Azure Monitor Open Telemetry Distro
14
- * @deprecated Use {@link shutdownMicrosoftOpenTelemetry} instead.
15
- */
16
- export declare function shutdownAzureMonitor(): Promise<void>;
17
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE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ACd,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,IAAI,WAAW,EACtB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,WAAW,IAAI,eAAe,EAC9B,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAGtE,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,iCAAiC,EACjC,uBAAuB,EACvB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,2BAA2B,EAC3B,eAAe,EACf,YAAY,EACZ,cAAc,EACd,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,iCAAiC,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC"}
@@ -2,28 +2,56 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.MICROSOFT_OPENTELEMETRY_VERSION = exports.shutdownMicrosoftOpenTelemetry = exports.useMicrosoftOpenTelemetry = void 0;
6
- exports.useAzureMonitor = useAzureMonitor;
7
- exports.shutdownAzureMonitor = shutdownAzureMonitor;
8
- const distro_js_1 = require("./distro/distro.js");
5
+ exports.ObservabilityHostingManager = exports.A365_AUTH_TOKEN_KEY = exports.A365_PARENT_SPAN_KEY = exports.OutputLoggingMiddleware = exports.BaggageMiddleware = exports.resolveEmbodiedAgentIds = exports.getConversationIdAndItemLinkPairs = exports.getChannelBaggagePairs = exports.getTenantIdPair = exports.getTargetAgentBaggagePairs = exports.getCallerBaggagePairs = exports.ScopeUtils = exports.BaggageBuilderUtils = exports.getExportToken = exports.updateExportToken = exports.runWithExportToken = exports.INVOKE_AGENT_ATTRIBUTES = exports.GENERIC_ATTRIBUTES = exports.PerRequestSpanProcessor = exports.A365SpanProcessor = exports.BaggageScope = exports.BaggageBuilder = exports.runWithExtractedTraceContext = exports.extractContextFromHeaders = exports.injectContextToHeaders = exports.runWithParentSpanRef = exports.createContextWithParentSpanRef = exports.isParentSpanRef = exports.A365_MESSAGE_SCHEMA_VERSION = exports.InferenceOperationType = exports.InvocationRole = exports.Modality = exports.FinishReason = exports.MessageRole = exports.OpenTelemetryConstants = exports.OutputScope = exports.InferenceScope = exports.ExecuteToolScope = exports.InvokeAgentScope = exports.OpenTelemetryScope = exports.A365Configuration = exports.MICROSOFT_OPENTELEMETRY_VERSION = exports.shutdownMicrosoftOpenTelemetry = exports.useMicrosoftOpenTelemetry = void 0;
9
6
  var index_js_1 = require("./distro/index.js");
10
7
  Object.defineProperty(exports, "useMicrosoftOpenTelemetry", { enumerable: true, get: function () { return index_js_1.useMicrosoftOpenTelemetry; } });
11
8
  Object.defineProperty(exports, "shutdownMicrosoftOpenTelemetry", { enumerable: true, get: function () { return index_js_1.shutdownMicrosoftOpenTelemetry; } });
12
9
  Object.defineProperty(exports, "MICROSOFT_OPENTELEMETRY_VERSION", { enumerable: true, get: function () { return index_js_1.MICROSOFT_OPENTELEMETRY_VERSION; } });
13
- // ── Azure Monitor backward-compatible API ───────────────────────────────────
14
- /**
15
- * Initialize Azure Monitor Distro
16
- * @param options - Microsoft OpenTelemetry Options
17
- * @deprecated Use {@link useMicrosoftOpenTelemetry} instead.
18
- */
19
- function useAzureMonitor(options) {
20
- (0, distro_js_1.useMicrosoftOpenTelemetry)(options);
21
- }
22
- /**
23
- * Shutdown Azure Monitor Open Telemetry Distro
24
- * @deprecated Use {@link shutdownMicrosoftOpenTelemetry} instead.
25
- */
26
- function shutdownAzureMonitor() {
27
- return (0, distro_js_1.shutdownMicrosoftOpenTelemetry)();
28
- }
10
+ // ── Re-exports from A365 configuration ──────────────────────────────────────
11
+ var index_js_2 = require("./a365/index.js");
12
+ Object.defineProperty(exports, "A365Configuration", { enumerable: true, get: function () { return index_js_2.A365Configuration; } });
13
+ // ── Re-exports from A365 scopes (manual telemetry API) ──────────────────────
14
+ var index_js_3 = require("./a365/index.js");
15
+ Object.defineProperty(exports, "OpenTelemetryScope", { enumerable: true, get: function () { return index_js_3.OpenTelemetryScope; } });
16
+ Object.defineProperty(exports, "InvokeAgentScope", { enumerable: true, get: function () { return index_js_3.InvokeAgentScope; } });
17
+ Object.defineProperty(exports, "ExecuteToolScope", { enumerable: true, get: function () { return index_js_3.ExecuteToolScope; } });
18
+ Object.defineProperty(exports, "InferenceScope", { enumerable: true, get: function () { return index_js_3.InferenceScope; } });
19
+ Object.defineProperty(exports, "OutputScope", { enumerable: true, get: function () { return index_js_3.OutputScope; } });
20
+ Object.defineProperty(exports, "OpenTelemetryConstants", { enumerable: true, get: function () { return index_js_3.OpenTelemetryConstants; } });
21
+ Object.defineProperty(exports, "MessageRole", { enumerable: true, get: function () { return index_js_3.MessageRole; } });
22
+ Object.defineProperty(exports, "FinishReason", { enumerable: true, get: function () { return index_js_3.FinishReason; } });
23
+ Object.defineProperty(exports, "Modality", { enumerable: true, get: function () { return index_js_3.Modality; } });
24
+ Object.defineProperty(exports, "InvocationRole", { enumerable: true, get: function () { return index_js_3.InvocationRole; } });
25
+ Object.defineProperty(exports, "InferenceOperationType", { enumerable: true, get: function () { return index_js_3.InferenceOperationType; } });
26
+ Object.defineProperty(exports, "A365_MESSAGE_SCHEMA_VERSION", { enumerable: true, get: function () { return index_js_3.A365_MESSAGE_SCHEMA_VERSION; } });
27
+ Object.defineProperty(exports, "isParentSpanRef", { enumerable: true, get: function () { return index_js_3.isParentSpanRef; } });
28
+ Object.defineProperty(exports, "createContextWithParentSpanRef", { enumerable: true, get: function () { return index_js_3.createContextWithParentSpanRef; } });
29
+ Object.defineProperty(exports, "runWithParentSpanRef", { enumerable: true, get: function () { return index_js_3.runWithParentSpanRef; } });
30
+ Object.defineProperty(exports, "injectContextToHeaders", { enumerable: true, get: function () { return index_js_3.injectContextToHeaders; } });
31
+ Object.defineProperty(exports, "extractContextFromHeaders", { enumerable: true, get: function () { return index_js_3.extractContextFromHeaders; } });
32
+ Object.defineProperty(exports, "runWithExtractedTraceContext", { enumerable: true, get: function () { return index_js_3.runWithExtractedTraceContext; } });
33
+ Object.defineProperty(exports, "BaggageBuilder", { enumerable: true, get: function () { return index_js_3.BaggageBuilder; } });
34
+ Object.defineProperty(exports, "BaggageScope", { enumerable: true, get: function () { return index_js_3.BaggageScope; } });
35
+ Object.defineProperty(exports, "A365SpanProcessor", { enumerable: true, get: function () { return index_js_3.A365SpanProcessor; } });
36
+ Object.defineProperty(exports, "PerRequestSpanProcessor", { enumerable: true, get: function () { return index_js_3.PerRequestSpanProcessor; } });
37
+ Object.defineProperty(exports, "GENERIC_ATTRIBUTES", { enumerable: true, get: function () { return index_js_3.GENERIC_ATTRIBUTES; } });
38
+ Object.defineProperty(exports, "INVOKE_AGENT_ATTRIBUTES", { enumerable: true, get: function () { return index_js_3.INVOKE_AGENT_ATTRIBUTES; } });
39
+ Object.defineProperty(exports, "runWithExportToken", { enumerable: true, get: function () { return index_js_3.runWithExportToken; } });
40
+ Object.defineProperty(exports, "updateExportToken", { enumerable: true, get: function () { return index_js_3.updateExportToken; } });
41
+ Object.defineProperty(exports, "getExportToken", { enumerable: true, get: function () { return index_js_3.getExportToken; } });
42
+ // ── Re-exports from A365 hosting utilities ──────────────────────────────────
43
+ var index_js_4 = require("./a365/index.js");
44
+ Object.defineProperty(exports, "BaggageBuilderUtils", { enumerable: true, get: function () { return index_js_4.BaggageBuilderUtils; } });
45
+ Object.defineProperty(exports, "ScopeUtils", { enumerable: true, get: function () { return index_js_4.ScopeUtils; } });
46
+ Object.defineProperty(exports, "getCallerBaggagePairs", { enumerable: true, get: function () { return index_js_4.getCallerBaggagePairs; } });
47
+ Object.defineProperty(exports, "getTargetAgentBaggagePairs", { enumerable: true, get: function () { return index_js_4.getTargetAgentBaggagePairs; } });
48
+ Object.defineProperty(exports, "getTenantIdPair", { enumerable: true, get: function () { return index_js_4.getTenantIdPair; } });
49
+ Object.defineProperty(exports, "getChannelBaggagePairs", { enumerable: true, get: function () { return index_js_4.getChannelBaggagePairs; } });
50
+ Object.defineProperty(exports, "getConversationIdAndItemLinkPairs", { enumerable: true, get: function () { return index_js_4.getConversationIdAndItemLinkPairs; } });
51
+ Object.defineProperty(exports, "resolveEmbodiedAgentIds", { enumerable: true, get: function () { return index_js_4.resolveEmbodiedAgentIds; } });
52
+ Object.defineProperty(exports, "BaggageMiddleware", { enumerable: true, get: function () { return index_js_4.BaggageMiddleware; } });
53
+ Object.defineProperty(exports, "OutputLoggingMiddleware", { enumerable: true, get: function () { return index_js_4.OutputLoggingMiddleware; } });
54
+ Object.defineProperty(exports, "A365_PARENT_SPAN_KEY", { enumerable: true, get: function () { return index_js_4.A365_PARENT_SPAN_KEY; } });
55
+ Object.defineProperty(exports, "A365_AUTH_TOKEN_KEY", { enumerable: true, get: function () { return index_js_4.A365_AUTH_TOKEN_KEY; } });
56
+ Object.defineProperty(exports, "ObservabilityHostingManager", { enumerable: true, get: function () { return index_js_4.ObservabilityHostingManager; } });
29
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA6BlC,0CAEC;AAMD,oDAEC;AApCD,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