@depup/sentry__node 10.47.0-depup.1 → 10.67.0-depup.0

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 (989) hide show
  1. package/README.md +5 -4
  2. package/build/cjs/debug-build.js +0 -5
  3. package/build/cjs/debug-build.js.map +1 -1
  4. package/build/cjs/index.js +81 -68
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/init.js +0 -6
  7. package/build/cjs/init.js.map +1 -1
  8. package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
  9. package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
  10. package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
  11. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  12. package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
  13. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  14. package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
  15. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  16. package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
  17. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  18. package/build/cjs/integrations/fs/index.js +17 -0
  19. package/build/cjs/integrations/fs/index.js.map +1 -0
  20. package/build/cjs/integrations/fs/vendored/constants.js +138 -0
  21. package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
  22. package/build/cjs/integrations/fs/vendored/instrumentation.js +230 -0
  23. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
  24. package/build/cjs/integrations/fs/vendored/utils.js +31 -0
  25. package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
  26. package/build/cjs/integrations/http.js +19 -175
  27. package/build/cjs/integrations/http.js.map +1 -1
  28. package/build/cjs/integrations/node-fetch.js +10 -94
  29. package/build/cjs/integrations/node-fetch.js.map +1 -1
  30. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +15 -0
  31. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  32. package/build/cjs/integrations/tracing/amqplib/index.js +21 -0
  33. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
  34. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
  35. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  36. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
  37. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  38. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +26 -0
  39. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  40. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +17 -0
  41. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  42. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +129 -0
  43. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  44. package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
  45. package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
  46. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  47. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  48. package/build/cjs/integrations/tracing/connect/index.js +35 -0
  49. package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
  50. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +16 -0
  51. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  52. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +137 -0
  53. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  54. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
  55. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  56. package/build/cjs/integrations/tracing/connect/vendored/utils.js +36 -0
  57. package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
  58. package/build/cjs/integrations/tracing/dataloader/index.js +26 -0
  59. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
  60. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +217 -0
  61. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  62. package/build/cjs/integrations/tracing/express.js +44 -147
  63. package/build/cjs/integrations/tracing/express.js.map +1 -1
  64. package/build/cjs/integrations/tracing/fastify/index.js +19 -234
  65. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  66. package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
  67. package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
  68. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
  69. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  70. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +78 -162
  71. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  72. package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
  73. package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
  74. package/build/cjs/integrations/tracing/firebase/firebase.js +4 -33
  75. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  76. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  77. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  78. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +73 -215
  79. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  80. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  81. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  82. package/build/cjs/integrations/tracing/genericPool/index.js +21 -0
  83. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -0
  84. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +122 -0
  85. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  86. package/build/cjs/integrations/tracing/google-genai/index.js +3 -58
  87. package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
  88. package/build/cjs/integrations/tracing/google-genai/instrumentation.js +23 -43
  89. package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  90. package/build/cjs/integrations/tracing/graphql/index.js +34 -0
  91. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -0
  92. package/build/cjs/integrations/tracing/graphql/vendored/enum.js +47 -0
  93. package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  94. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
  95. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  96. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +329 -0
  97. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  98. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +6 -0
  99. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  100. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +8 -0
  101. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  102. package/build/cjs/integrations/tracing/graphql/vendored/utils.js +265 -0
  103. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  104. package/build/cjs/integrations/tracing/hapi/index.js +16 -91
  105. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  106. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +11 -0
  107. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  108. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +255 -0
  109. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  110. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +24 -0
  111. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  112. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +85 -0
  113. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  114. package/build/cjs/integrations/tracing/hono/constants.js +6 -7
  115. package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
  116. package/build/cjs/integrations/tracing/hono/index.js +26 -77
  117. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  118. package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
  119. package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
  120. package/build/cjs/integrations/tracing/index.js +74 -83
  121. package/build/cjs/integrations/tracing/index.js.map +1 -1
  122. package/build/cjs/integrations/tracing/kafka/index.js +21 -0
  123. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
  124. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +237 -0
  125. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  126. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +22 -0
  127. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  128. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +114 -0
  129. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  130. package/build/cjs/integrations/tracing/knex/index.js +26 -0
  131. package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
  132. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +135 -0
  133. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  134. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +10 -0
  135. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  136. package/build/cjs/integrations/tracing/knex/vendored/utils.js +84 -0
  137. package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
  138. package/build/cjs/integrations/tracing/koa/index.js +46 -0
  139. package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
  140. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
  141. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  142. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +127 -0
  143. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  144. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
  145. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  146. package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
  147. package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
  148. package/build/cjs/integrations/tracing/koa/vendored/utils.js +36 -0
  149. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
  150. package/build/cjs/integrations/tracing/langchain/index.js +3 -96
  151. package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
  152. package/build/cjs/integrations/tracing/langchain/instrumentation.js +80 -140
  153. package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
  154. package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
  155. package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
  156. package/build/cjs/integrations/tracing/langgraph/instrumentation.js +76 -40
  157. package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  158. package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
  159. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
  160. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +38 -0
  161. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  162. package/build/cjs/integrations/tracing/mongo/index.js +21 -0
  163. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
  164. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +129 -0
  165. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  166. package/build/cjs/integrations/tracing/mongo/vendored/patches.js +150 -0
  167. package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  168. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +40 -0
  169. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  170. package/build/cjs/integrations/tracing/mongoose/index.js +22 -0
  171. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
  172. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +240 -0
  173. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  174. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +41 -0
  175. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  176. package/build/cjs/integrations/tracing/mysql/index.js +21 -0
  177. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
  178. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +185 -0
  179. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  180. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +8 -0
  181. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  182. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +38 -0
  183. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  184. package/build/cjs/integrations/tracing/mysql2/index.js +22 -0
  185. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
  186. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +138 -0
  187. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  188. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +8 -0
  189. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  190. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +81 -0
  191. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  192. package/build/cjs/integrations/tracing/openai/index.js +3 -58
  193. package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
  194. package/build/cjs/integrations/tracing/openai/instrumentation.js +25 -49
  195. package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
  196. package/build/cjs/integrations/tracing/postgres/index.js +27 -0
  197. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
  198. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +11 -0
  199. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  200. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
  201. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  202. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +225 -0
  203. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  204. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +8 -0
  205. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  206. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +151 -0
  207. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  208. package/build/cjs/integrations/tracing/postgresjs.js +77 -190
  209. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  210. package/build/cjs/integrations/tracing/redis/cache.js +41 -0
  211. package/build/cjs/integrations/tracing/redis/cache.js.map +1 -0
  212. package/build/cjs/integrations/tracing/redis/index.js +50 -0
  213. package/build/cjs/integrations/tracing/redis/index.js.map +1 -0
  214. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +147 -0
  215. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  216. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +445 -0
  217. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  218. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +8 -0
  219. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  220. package/build/cjs/integrations/tracing/tedious/index.js +21 -0
  221. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
  222. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +154 -0
  223. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  224. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +8 -0
  225. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  226. package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
  227. package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  228. package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
  229. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
  230. package/build/cjs/integrations/tracing/vercelai/index.js +7 -53
  231. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  232. package/build/cjs/integrations/tracing/vercelai/instrumentation.js +60 -158
  233. package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  234. package/build/cjs/preload.js +1 -14
  235. package/build/cjs/preload.js.map +1 -1
  236. package/build/cjs/sdk/diagnosticsChannelInjection.js +21 -0
  237. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -0
  238. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +33 -0
  239. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  240. package/build/cjs/sdk/index.js +33 -35
  241. package/build/cjs/sdk/index.js.map +1 -1
  242. package/build/cjs/sdk/initOtel.js +74 -60
  243. package/build/cjs/sdk/initOtel.js.map +1 -1
  244. package/build/cjs/utils/redisCache.js +24 -52
  245. package/build/cjs/utils/redisCache.js.map +1 -1
  246. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +21 -0
  247. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  248. package/build/esm/debug-build.js +0 -5
  249. package/build/esm/debug-build.js.map +1 -1
  250. package/build/esm/index.js +24 -22
  251. package/build/esm/index.js.map +1 -1
  252. package/build/esm/init.js +0 -6
  253. package/build/esm/init.js.map +1 -1
  254. package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
  255. package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
  256. package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
  257. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  258. package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
  259. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  260. package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
  261. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  262. package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
  263. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  264. package/build/esm/integrations/fs/index.js +15 -0
  265. package/build/esm/integrations/fs/index.js.map +1 -0
  266. package/build/esm/integrations/fs/vendored/constants.js +134 -0
  267. package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
  268. package/build/esm/integrations/fs/vendored/instrumentation.js +228 -0
  269. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
  270. package/build/esm/integrations/fs/vendored/utils.js +28 -0
  271. package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
  272. package/build/esm/integrations/http.js +22 -176
  273. package/build/esm/integrations/http.js.map +1 -1
  274. package/build/esm/integrations/node-fetch.js +12 -95
  275. package/build/esm/integrations/node-fetch.js.map +1 -1
  276. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +13 -0
  277. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  278. package/build/esm/integrations/tracing/amqplib/index.js +18 -0
  279. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
  280. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
  281. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  282. package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
  283. package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  284. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +14 -0
  285. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  286. package/build/esm/integrations/tracing/amqplib/vendored/types.js +15 -0
  287. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  288. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +117 -0
  289. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  290. package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
  291. package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
  292. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  293. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  294. package/build/esm/integrations/tracing/connect/index.js +31 -0
  295. package/build/esm/integrations/tracing/connect/index.js.map +1 -0
  296. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +13 -0
  297. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  298. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +135 -0
  299. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  300. package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
  301. package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  302. package/build/esm/integrations/tracing/connect/vendored/utils.js +32 -0
  303. package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
  304. package/build/esm/integrations/tracing/dataloader/index.js +23 -0
  305. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
  306. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +215 -0
  307. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  308. package/build/esm/integrations/tracing/express.js +45 -148
  309. package/build/esm/integrations/tracing/express.js.map +1 -1
  310. package/build/esm/integrations/tracing/fastify/index.js +21 -235
  311. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  312. package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
  313. package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
  314. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
  315. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  316. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +74 -158
  317. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  318. package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
  319. package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
  320. package/build/esm/integrations/tracing/firebase/firebase.js +6 -35
  321. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  322. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  323. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  324. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +72 -214
  325. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  326. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  327. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  328. package/build/esm/integrations/tracing/genericPool/index.js +18 -0
  329. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
  330. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
  331. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  332. package/build/esm/integrations/tracing/google-genai/index.js +3 -58
  333. package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
  334. package/build/esm/integrations/tracing/google-genai/instrumentation.js +23 -43
  335. package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  336. package/build/esm/integrations/tracing/graphql/index.js +31 -0
  337. package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
  338. package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
  339. package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  340. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +13 -0
  341. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  342. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +327 -0
  343. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  344. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
  345. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  346. package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
  347. package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  348. package/build/esm/integrations/tracing/graphql/vendored/utils.js +257 -0
  349. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  350. package/build/esm/integrations/tracing/hapi/index.js +16 -91
  351. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  352. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
  353. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  354. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +253 -0
  355. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  356. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
  357. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  358. package/build/esm/integrations/tracing/hapi/vendored/utils.js +76 -0
  359. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  360. package/build/esm/integrations/tracing/hono/constants.js +6 -7
  361. package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
  362. package/build/esm/integrations/tracing/hono/index.js +22 -73
  363. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  364. package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
  365. package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
  366. package/build/esm/integrations/tracing/index.js +20 -29
  367. package/build/esm/integrations/tracing/index.js.map +1 -1
  368. package/build/esm/integrations/tracing/kafka/index.js +18 -0
  369. package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
  370. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +235 -0
  371. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  372. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +12 -0
  373. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  374. package/build/esm/integrations/tracing/kafka/vendored/utils.js +108 -0
  375. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  376. package/build/esm/integrations/tracing/knex/index.js +23 -0
  377. package/build/esm/integrations/tracing/knex/index.js.map +1 -0
  378. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +133 -0
  379. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  380. package/build/esm/integrations/tracing/knex/vendored/semconv.js +6 -0
  381. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  382. package/build/esm/integrations/tracing/knex/vendored/utils.js +75 -0
  383. package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
  384. package/build/esm/integrations/tracing/koa/index.js +42 -0
  385. package/build/esm/integrations/tracing/koa/index.js.map +1 -0
  386. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
  387. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  388. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +125 -0
  389. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  390. package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
  391. package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  392. package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
  393. package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
  394. package/build/esm/integrations/tracing/koa/vendored/utils.js +33 -0
  395. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
  396. package/build/esm/integrations/tracing/langchain/index.js +3 -96
  397. package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
  398. package/build/esm/integrations/tracing/langchain/instrumentation.js +80 -140
  399. package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
  400. package/build/esm/integrations/tracing/langgraph/index.js +3 -73
  401. package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
  402. package/build/esm/integrations/tracing/langgraph/instrumentation.js +78 -42
  403. package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  404. package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
  405. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
  406. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +36 -0
  407. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  408. package/build/esm/integrations/tracing/mongo/index.js +18 -0
  409. package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
  410. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +127 -0
  411. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  412. package/build/esm/integrations/tracing/mongo/vendored/patches.js +142 -0
  413. package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  414. package/build/esm/integrations/tracing/mongo/vendored/utils.js +34 -0
  415. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  416. package/build/esm/integrations/tracing/mongoose/index.js +19 -0
  417. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
  418. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +236 -0
  419. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  420. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +38 -0
  421. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  422. package/build/esm/integrations/tracing/mysql/index.js +18 -0
  423. package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
  424. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +183 -0
  425. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  426. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +5 -0
  427. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  428. package/build/esm/integrations/tracing/mysql/vendored/utils.js +33 -0
  429. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  430. package/build/esm/integrations/tracing/mysql2/index.js +19 -0
  431. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
  432. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +136 -0
  433. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  434. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +5 -0
  435. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  436. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +75 -0
  437. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  438. package/build/esm/integrations/tracing/openai/index.js +3 -58
  439. package/build/esm/integrations/tracing/openai/index.js.map +1 -1
  440. package/build/esm/integrations/tracing/openai/instrumentation.js +25 -49
  441. package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
  442. package/build/esm/integrations/tracing/postgres/index.js +24 -0
  443. package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
  444. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +9 -0
  445. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  446. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
  447. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  448. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +223 -0
  449. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  450. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +5 -0
  451. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  452. package/build/esm/integrations/tracing/postgres/vendored/utils.js +136 -0
  453. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  454. package/build/esm/integrations/tracing/postgresjs.js +77 -190
  455. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  456. package/build/esm/integrations/tracing/redis/cache.js +38 -0
  457. package/build/esm/integrations/tracing/redis/cache.js.map +1 -0
  458. package/build/esm/integrations/tracing/redis/index.js +43 -0
  459. package/build/esm/integrations/tracing/redis/index.js.map +1 -0
  460. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +145 -0
  461. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  462. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +443 -0
  463. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  464. package/build/esm/integrations/tracing/redis/vendored/semconv.js +5 -0
  465. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  466. package/build/esm/integrations/tracing/tedious/index.js +18 -0
  467. package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
  468. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +152 -0
  469. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  470. package/build/esm/integrations/tracing/tedious/vendored/semconv.js +5 -0
  471. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  472. package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
  473. package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  474. package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
  475. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
  476. package/build/esm/integrations/tracing/vercelai/index.js +8 -54
  477. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  478. package/build/esm/integrations/tracing/vercelai/instrumentation.js +60 -158
  479. package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  480. package/build/esm/package.json +1 -1
  481. package/build/esm/preload.js +1 -14
  482. package/build/esm/preload.js.map +1 -1
  483. package/build/esm/sdk/diagnosticsChannelInjection.js +17 -0
  484. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -0
  485. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +30 -0
  486. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  487. package/build/esm/sdk/index.js +33 -36
  488. package/build/esm/sdk/index.js.map +1 -1
  489. package/build/esm/sdk/initOtel.js +77 -63
  490. package/build/esm/sdk/initOtel.js.map +1 -1
  491. package/build/esm/utils/redisCache.js +24 -52
  492. package/build/esm/utils/redisCache.js.map +1 -1
  493. package/build/esm/utils/setHttpServerSpanRouteAttribute.js +19 -0
  494. package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  495. package/build/import-hook.mjs +6 -0
  496. package/build/types/index.d.ts +6 -4
  497. package/build/types/index.d.ts.map +1 -1
  498. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  499. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
  500. package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
  501. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  502. package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
  503. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
  504. package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
  505. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
  506. package/build/types/integrations/fs/index.d.ts +14 -0
  507. package/build/types/integrations/fs/index.d.ts.map +1 -0
  508. package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
  509. package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
  510. package/build/types/integrations/fs/vendored/instrumentation.d.ts +3 -0
  511. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
  512. package/build/types/integrations/fs/vendored/types.d.ts +23 -0
  513. package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
  514. package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
  515. package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
  516. package/build/types/integrations/http.d.ts +12 -17
  517. package/build/types/integrations/http.d.ts.map +1 -1
  518. package/build/types/integrations/node-fetch.d.ts +8 -35
  519. package/build/types/integrations/node-fetch.d.ts.map +1 -1
  520. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  521. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +1 -0
  522. package/build/types/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  523. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
  524. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  525. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
  526. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  527. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
  528. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  529. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
  530. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  531. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
  532. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  533. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
  534. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  535. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
  536. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  537. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
  538. package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  539. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
  540. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  541. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
  542. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  543. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
  544. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
  545. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
  546. package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  547. package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
  548. package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  549. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
  550. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  551. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
  552. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  553. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
  554. package/build/types/integrations/tracing/express.d.ts +15 -68
  555. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  556. package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
  557. package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
  558. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
  559. package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
  560. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  561. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  562. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
  563. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  564. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
  565. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  566. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
  567. package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
  568. package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
  569. package/build/types/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  570. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
  571. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  572. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
  573. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  574. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
  575. package/build/types/integrations/tracing/google-genai/index.d.ts +11 -8
  576. package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
  577. package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -1
  578. package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  579. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
  580. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  581. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
  582. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  583. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
  584. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  585. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
  586. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  587. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
  588. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  589. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
  590. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  591. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
  592. package/build/types/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  593. package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
  594. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  595. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
  596. package/build/types/integrations/tracing/hapi/index.d.ts +4 -2
  597. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  598. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  599. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
  600. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  601. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
  602. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  603. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
  604. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  605. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
  606. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  607. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
  608. package/build/types/integrations/tracing/hono/index.d.ts +9 -1
  609. package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
  610. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  611. package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  612. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
  613. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  614. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
  615. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  616. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
  617. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  618. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
  619. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  620. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -0
  621. package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  622. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
  623. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  624. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
  625. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  626. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
  627. package/build/types/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  628. package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
  629. package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  630. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
  631. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  632. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
  633. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  634. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
  635. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  636. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
  637. package/build/types/integrations/tracing/koa/vendored/types.d.ts +13 -0
  638. package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
  639. package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  640. package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
  641. package/build/types/integrations/tracing/langchain/index.d.ts +16 -12
  642. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  643. package/build/types/integrations/tracing/langchain/instrumentation.d.ts +10 -1
  644. package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
  645. package/build/types/integrations/tracing/langgraph/index.d.ts +11 -8
  646. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  647. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  648. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -1
  649. package/build/types/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  650. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
  651. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  652. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
  653. package/build/{types-ts3.8/integrations/tracing/mongo.d.ts → types/integrations/tracing/mongo/index.d.ts} +22 -24
  654. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
  655. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  656. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
  657. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  658. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
  659. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  660. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
  661. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  662. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
  663. package/build/types/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  664. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
  665. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  666. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
  667. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  668. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
  669. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  670. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
  671. package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  672. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
  673. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  674. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
  675. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  676. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
  677. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  678. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
  679. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  680. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
  681. package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  682. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
  683. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  684. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
  685. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  686. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
  687. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  688. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
  689. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  690. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
  691. package/build/types/integrations/tracing/openai/index.d.ts +11 -8
  692. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  693. package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  694. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
  695. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  696. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
  697. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  698. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
  699. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  700. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
  701. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  702. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
  703. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  704. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
  705. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  706. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
  707. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  708. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
  709. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  710. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
  711. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  712. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
  713. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  714. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  715. package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
  716. package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
  717. package/build/types/integrations/tracing/redis/index.d.ts +28 -0
  718. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -0
  719. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  720. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -0
  721. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  722. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -0
  723. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  724. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -0
  725. package/build/types/integrations/tracing/redis/vendored/types.d.ts +24 -0
  726. package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -0
  727. package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  728. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
  729. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  730. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
  731. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  732. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
  733. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  734. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
  735. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  736. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
  737. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  738. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  739. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
  740. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  741. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  742. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
  743. package/build/types/integrations/tracing/vercelai/types.d.ts +11 -4
  744. package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
  745. package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
  746. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
  747. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  748. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
  749. package/build/types/sdk/index.d.ts +18 -0
  750. package/build/types/sdk/index.d.ts.map +1 -1
  751. package/build/types/sdk/initOtel.d.ts +2 -3
  752. package/build/types/sdk/initOtel.d.ts.map +1 -1
  753. package/build/types/utils/redisCache.d.ts +1 -1
  754. package/build/types/utils/redisCache.d.ts.map +1 -1
  755. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  756. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
  757. package/build/types-ts3.8/index.d.ts +6 -4
  758. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  759. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  760. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  761. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  762. package/build/types-ts3.8/integrations/fs/index.d.ts +14 -0
  763. package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
  764. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +3 -0
  765. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +23 -0
  766. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
  767. package/build/types-ts3.8/integrations/http.d.ts +12 -17
  768. package/build/types-ts3.8/integrations/node-fetch.d.ts +8 -35
  769. package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  770. package/build/types-ts3.8/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  771. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  772. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  773. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  774. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  775. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  776. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  777. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  778. package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  779. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  780. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  781. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
  782. package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  783. package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  784. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  785. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  786. package/build/types-ts3.8/integrations/tracing/express.d.ts +15 -68
  787. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  788. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  789. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  790. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  791. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  792. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
  793. package/build/types-ts3.8/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  794. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  795. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  796. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +11 -8
  797. package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  798. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  799. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  800. package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  801. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  802. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  803. package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  804. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  805. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  806. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +4 -2
  807. package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  808. package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  809. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  810. package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  811. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  812. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +9 -1
  813. package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  814. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  815. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  816. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  817. package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  818. package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  819. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  820. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  821. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  822. package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  823. package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  824. package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  825. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  826. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +13 -0
  827. package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  828. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +16 -12
  829. package/build/types-ts3.8/integrations/tracing/langchain/instrumentation.d.ts +10 -1
  830. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +11 -8
  831. package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  832. package/build/types-ts3.8/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  833. package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  834. package/build/{types/integrations/tracing/mongo.d.ts → types-ts3.8/integrations/tracing/mongo/index.d.ts} +22 -24
  835. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  836. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  837. package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  838. package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  839. package/build/types-ts3.8/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  840. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  841. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  842. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  843. package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  844. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  845. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  846. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  847. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  848. package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  849. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  850. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  851. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  852. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  853. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +11 -8
  854. package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  855. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  856. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  857. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  858. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  859. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  860. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  861. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  862. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  863. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  864. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  865. package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
  866. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +28 -0
  867. package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  868. package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  869. package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  870. package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +24 -0
  871. package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  872. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  873. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  874. package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  875. package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  876. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  877. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
  878. package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  879. package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +11 -4
  880. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
  881. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  882. package/build/types-ts3.8/sdk/index.d.ts +18 -0
  883. package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
  884. package/build/types-ts3.8/utils/redisCache.d.ts +1 -1
  885. package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  886. package/changes.json +9 -5
  887. package/package.json +33 -41
  888. package/build/cjs/integrations/fs.js +0 -142
  889. package/build/cjs/integrations/fs.js.map +0 -1
  890. package/build/cjs/integrations/tracing/amqplib.js +0 -47
  891. package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
  892. package/build/cjs/integrations/tracing/connect.js +0 -110
  893. package/build/cjs/integrations/tracing/connect.js.map +0 -1
  894. package/build/cjs/integrations/tracing/dataloader.js +0 -72
  895. package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
  896. package/build/cjs/integrations/tracing/genericPool.js +0 -59
  897. package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
  898. package/build/cjs/integrations/tracing/graphql.js +0 -127
  899. package/build/cjs/integrations/tracing/graphql.js.map +0 -1
  900. package/build/cjs/integrations/tracing/kafka.js +0 -48
  901. package/build/cjs/integrations/tracing/kafka.js.map +0 -1
  902. package/build/cjs/integrations/tracing/knex.js +0 -57
  903. package/build/cjs/integrations/tracing/knex.js.map +0 -1
  904. package/build/cjs/integrations/tracing/koa.js +0 -138
  905. package/build/cjs/integrations/tracing/koa.js.map +0 -1
  906. package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
  907. package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
  908. package/build/cjs/integrations/tracing/mongo.js +0 -93
  909. package/build/cjs/integrations/tracing/mongo.js.map +0 -1
  910. package/build/cjs/integrations/tracing/mongoose.js +0 -46
  911. package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
  912. package/build/cjs/integrations/tracing/mysql.js +0 -38
  913. package/build/cjs/integrations/tracing/mysql.js.map +0 -1
  914. package/build/cjs/integrations/tracing/mysql2.js +0 -46
  915. package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
  916. package/build/cjs/integrations/tracing/postgres.js +0 -48
  917. package/build/cjs/integrations/tracing/postgres.js.map +0 -1
  918. package/build/cjs/integrations/tracing/prisma.js +0 -203
  919. package/build/cjs/integrations/tracing/prisma.js.map +0 -1
  920. package/build/cjs/integrations/tracing/redis.js +0 -121
  921. package/build/cjs/integrations/tracing/redis.js.map +0 -1
  922. package/build/cjs/integrations/tracing/tedious.js +0 -67
  923. package/build/cjs/integrations/tracing/tedious.js.map +0 -1
  924. package/build/esm/integrations/fs.js +0 -140
  925. package/build/esm/integrations/fs.js.map +0 -1
  926. package/build/esm/integrations/tracing/amqplib.js +0 -44
  927. package/build/esm/integrations/tracing/amqplib.js.map +0 -1
  928. package/build/esm/integrations/tracing/connect.js +0 -106
  929. package/build/esm/integrations/tracing/connect.js.map +0 -1
  930. package/build/esm/integrations/tracing/dataloader.js +0 -69
  931. package/build/esm/integrations/tracing/dataloader.js.map +0 -1
  932. package/build/esm/integrations/tracing/genericPool.js +0 -56
  933. package/build/esm/integrations/tracing/genericPool.js.map +0 -1
  934. package/build/esm/integrations/tracing/graphql.js +0 -124
  935. package/build/esm/integrations/tracing/graphql.js.map +0 -1
  936. package/build/esm/integrations/tracing/kafka.js +0 -45
  937. package/build/esm/integrations/tracing/kafka.js.map +0 -1
  938. package/build/esm/integrations/tracing/knex.js +0 -54
  939. package/build/esm/integrations/tracing/knex.js.map +0 -1
  940. package/build/esm/integrations/tracing/koa.js +0 -134
  941. package/build/esm/integrations/tracing/koa.js.map +0 -1
  942. package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
  943. package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
  944. package/build/esm/integrations/tracing/mongo.js +0 -89
  945. package/build/esm/integrations/tracing/mongo.js.map +0 -1
  946. package/build/esm/integrations/tracing/mongoose.js +0 -43
  947. package/build/esm/integrations/tracing/mongoose.js.map +0 -1
  948. package/build/esm/integrations/tracing/mysql.js +0 -35
  949. package/build/esm/integrations/tracing/mysql.js.map +0 -1
  950. package/build/esm/integrations/tracing/mysql2.js +0 -43
  951. package/build/esm/integrations/tracing/mysql2.js.map +0 -1
  952. package/build/esm/integrations/tracing/postgres.js +0 -45
  953. package/build/esm/integrations/tracing/postgres.js.map +0 -1
  954. package/build/esm/integrations/tracing/prisma.js +0 -200
  955. package/build/esm/integrations/tracing/prisma.js.map +0 -1
  956. package/build/esm/integrations/tracing/redis.js +0 -117
  957. package/build/esm/integrations/tracing/redis.js.map +0 -1
  958. package/build/esm/integrations/tracing/tedious.js +0 -64
  959. package/build/esm/integrations/tracing/tedious.js.map +0 -1
  960. package/build/types/integrations/fs.d.ts +0 -24
  961. package/build/types/integrations/fs.d.ts.map +0 -1
  962. package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
  963. package/build/types/integrations/tracing/connect.d.ts.map +0 -1
  964. package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
  965. package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
  966. package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
  967. package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
  968. package/build/types/integrations/tracing/knex.d.ts.map +0 -1
  969. package/build/types/integrations/tracing/koa.d.ts.map +0 -1
  970. package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
  971. package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
  972. package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
  973. package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
  974. package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
  975. package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
  976. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -38
  977. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
  978. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -31
  979. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
  980. package/build/types/integrations/tracing/prisma.d.ts +0 -50
  981. package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
  982. package/build/types/integrations/tracing/redis.d.ts +0 -41
  983. package/build/types/integrations/tracing/redis.d.ts.map +0 -1
  984. package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
  985. package/build/types-ts3.8/integrations/fs.d.ts +0 -24
  986. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -44
  987. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -34
  988. package/build/types-ts3.8/integrations/tracing/prisma.d.ts +0 -50
  989. package/build/types-ts3.8/integrations/tracing/redis.d.ts +0 -41
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-amqplib\n * - Upstream version: @opentelemetry/instrumentation-amqplib@0.65.0\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs; the channel/connection\n * patches live in `patches.ts` and span creation in `utils.ts`\n * - Dropped the instrumentation config and all hooks; origin is folded into span creation instead of\n * `index.ts` hooks (see `patches.ts`/`utils.ts` for details)\n */\n\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport { SDK_VERSION } from '@sentry/core';\nimport { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile';\nimport {\n getAckAllPatch,\n getAckPatch,\n getChannelEmitPatch,\n getConfirmedPublishPatch,\n getConnectPatch,\n getConsumePatch,\n getPublishPatch,\n} from './patches';\nimport { EndOperation } from './types';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-amqplib';\nconst supportedVersions = ['>=0.5.5 <2'];\n\nexport class AmqplibInstrumentation extends InstrumentationBase<InstrumentationConfig> {\n public constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n protected init(): InstrumentationNodeModuleDefinition {\n const channelModelModuleFile = new InstrumentationNodeModuleFile(\n 'amqplib/lib/channel_model.js',\n supportedVersions,\n this.patchChannelModel.bind(this),\n this.unpatchChannelModel.bind(this),\n );\n\n const callbackModelModuleFile = new InstrumentationNodeModuleFile(\n 'amqplib/lib/callback_model.js',\n supportedVersions,\n this.patchChannelModel.bind(this),\n this.unpatchChannelModel.bind(this),\n );\n\n const connectModuleFile = new InstrumentationNodeModuleFile(\n 'amqplib/lib/connect.js',\n supportedVersions,\n this.patchConnect.bind(this),\n this.unpatchConnect.bind(this),\n );\n\n const module = new InstrumentationNodeModuleDefinition('amqplib', supportedVersions, undefined, undefined, [\n channelModelModuleFile,\n connectModuleFile,\n callbackModelModuleFile,\n ]);\n return module;\n }\n\n private patchConnect(moduleExports: any): any {\n const unpatchedExports = this.unpatchConnect(moduleExports);\n if (!isWrapped(unpatchedExports.connect)) {\n this._wrap(unpatchedExports, 'connect', getConnectPatch);\n }\n return unpatchedExports;\n }\n\n private unpatchConnect(moduleExports: any): any {\n if (isWrapped(moduleExports.connect)) {\n this._unwrap(moduleExports, 'connect');\n }\n return moduleExports;\n }\n\n private patchChannelModel(moduleExports: any): any {\n if (!isWrapped(moduleExports.Channel.prototype.publish)) {\n this._wrap(moduleExports.Channel.prototype, 'publish', getPublishPatch);\n }\n if (!isWrapped(moduleExports.Channel.prototype.consume)) {\n this._wrap(moduleExports.Channel.prototype, 'consume', getConsumePatch);\n }\n if (!isWrapped(moduleExports.Channel.prototype.ack)) {\n this._wrap(moduleExports.Channel.prototype, 'ack', getAckPatch(false, EndOperation.Ack));\n }\n if (!isWrapped(moduleExports.Channel.prototype.nack)) {\n this._wrap(moduleExports.Channel.prototype, 'nack', getAckPatch(true, EndOperation.Nack));\n }\n if (!isWrapped(moduleExports.Channel.prototype.reject)) {\n this._wrap(moduleExports.Channel.prototype, 'reject', getAckPatch(true, EndOperation.Reject));\n }\n if (!isWrapped(moduleExports.Channel.prototype.ackAll)) {\n this._wrap(moduleExports.Channel.prototype, 'ackAll', getAckAllPatch(false, EndOperation.AckAll));\n }\n if (!isWrapped(moduleExports.Channel.prototype.nackAll)) {\n this._wrap(moduleExports.Channel.prototype, 'nackAll', getAckAllPatch(true, EndOperation.NackAll));\n }\n if (!isWrapped(moduleExports.Channel.prototype.emit)) {\n this._wrap(moduleExports.Channel.prototype, 'emit', getChannelEmitPatch);\n }\n if (!isWrapped(moduleExports.ConfirmChannel.prototype.publish)) {\n this._wrap(moduleExports.ConfirmChannel.prototype, 'publish', getConfirmedPublishPatch);\n }\n return moduleExports;\n }\n\n private unpatchChannelModel(moduleExports: any): any {\n if (isWrapped(moduleExports.Channel.prototype.publish)) {\n this._unwrap(moduleExports.Channel.prototype, 'publish');\n }\n if (isWrapped(moduleExports.Channel.prototype.consume)) {\n this._unwrap(moduleExports.Channel.prototype, 'consume');\n }\n if (isWrapped(moduleExports.Channel.prototype.ack)) {\n this._unwrap(moduleExports.Channel.prototype, 'ack');\n }\n if (isWrapped(moduleExports.Channel.prototype.nack)) {\n this._unwrap(moduleExports.Channel.prototype, 'nack');\n }\n if (isWrapped(moduleExports.Channel.prototype.reject)) {\n this._unwrap(moduleExports.Channel.prototype, 'reject');\n }\n if (isWrapped(moduleExports.Channel.prototype.ackAll)) {\n this._unwrap(moduleExports.Channel.prototype, 'ackAll');\n }\n if (isWrapped(moduleExports.Channel.prototype.nackAll)) {\n this._unwrap(moduleExports.Channel.prototype, 'nackAll');\n }\n if (isWrapped(moduleExports.Channel.prototype.emit)) {\n this._unwrap(moduleExports.Channel.prototype, 'emit');\n }\n if (isWrapped(moduleExports.ConfirmChannel.prototype.publish)) {\n this._unwrap(moduleExports.ConfirmChannel.prototype, 'publish');\n }\n return moduleExports;\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleFile","InstrumentationNodeModuleDefinition","isWrapped","getConnectPatch","getPublishPatch","getConsumePatch","getAckPatch","EndOperation","getAckAllPatch","getChannelEmitPatch","getConfirmedPublishPatch"],"mappings":";;;;;;;;AA4BA,MAAM,YAAA,GAAe,iCAAA;AACrB,MAAM,iBAAA,GAAoB,CAAC,YAAY,CAAA;AAEhC,MAAM,+BAA+BA,mCAAA,CAA2C;AAAA,EAC9E,WAAA,CAAY,MAAA,GAAgC,EAAC,EAAG;AACrD,IAAA,KAAA,CAAM,YAAA,EAAcC,kBAAa,MAAM,CAAA;AAAA,EACzC;AAAA,EAEU,IAAA,GAA4C;AACpD,IAAA,MAAM,yBAAyB,IAAIC,2DAAA;AAAA,MACjC,8BAAA;AAAA,MACA,iBAAA;AAAA,MACA,IAAA,CAAK,iBAAA,CAAkB,IAAA,CAAK,IAAI,CAAA;AAAA,MAChC,IAAA,CAAK,mBAAA,CAAoB,IAAA,CAAK,IAAI;AAAA,KACpC;AAEA,IAAA,MAAM,0BAA0B,IAAIA,2DAAA;AAAA,MAClC,+BAAA;AAAA,MACA,iBAAA;AAAA,MACA,IAAA,CAAK,iBAAA,CAAkB,IAAA,CAAK,IAAI,CAAA;AAAA,MAChC,IAAA,CAAK,mBAAA,CAAoB,IAAA,CAAK,IAAI;AAAA,KACpC;AAEA,IAAA,MAAM,oBAAoB,IAAIA,2DAAA;AAAA,MAC5B,wBAAA;AAAA,MACA,iBAAA;AAAA,MACA,IAAA,CAAK,YAAA,CAAa,IAAA,CAAK,IAAI,CAAA;AAAA,MAC3B,IAAA,CAAK,cAAA,CAAe,IAAA,CAAK,IAAI;AAAA,KAC/B;AAEA,IAAA,MAAM,SAAS,IAAIC,mDAAA,CAAoC,SAAA,EAAW,iBAAA,EAAmB,QAAW,MAAA,EAAW;AAAA,MACzG,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,OAAA,CAAQ,aAAA,CAAc,OAAA,CAAQ,SAAA,EAAW,QAAQ,CAAA;AAAA,IACxD;AACA,IAAA,IAAIA,yBAAA,CAAU,aAAA,CAAc,OAAA,CAAQ,SAAA,CAAU,OAAO,CAAA,EAAG;AACtD,MAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,OAAA,CAAQ,SAAA,EAAW,SAAS,CAAA;AAAA,IACzD;AACA,IAAA,IAAIA,yBAAA,CAAU,aAAA,CAAc,OAAA,CAAQ,SAAA,CAAU,IAAI,CAAA,EAAG;AACnD,MAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,OAAA,CAAQ,SAAA,EAAW,MAAM,CAAA;AAAA,IACtD;AACA,IAAA,IAAIA,yBAAA,CAAU,aAAA,CAAc,cAAA,CAAe,SAAA,CAAU,OAAO,CAAA,EAAG;AAC7D,MAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,cAAA,CAAe,SAAA,EAAW,SAAS,CAAA;AAAA,IAChE;AACA,IAAA,OAAO,aAAA;AAAA,EACT;AACF;;;;"}
@@ -0,0 +1,185 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const core = require('@sentry/core');
4
+ const types = require('./types.js');
5
+ const utils = require('./utils.js');
6
+
7
+ const CONSUME_TIMEOUT_MS = 1e3 * 60;
8
+ function endConsumerSpan(message, isRejected, operation, requeue) {
9
+ const storedSpan = message[utils.MESSAGE_STORED_SPAN];
10
+ if (!storedSpan) {
11
+ return;
12
+ }
13
+ if (isRejected !== false) {
14
+ storedSpan.setStatus({
15
+ code: core.SPAN_STATUS_ERROR,
16
+ message: operation !== types.EndOperation.ChannelClosed && operation !== types.EndOperation.ChannelError ? `${operation} called on message${requeue === true ? " with requeue" : requeue === false ? " without requeue" : ""}` : operation
17
+ });
18
+ }
19
+ storedSpan.end();
20
+ message[utils.MESSAGE_STORED_SPAN] = void 0;
21
+ }
22
+ function endAllSpansOnChannel(channel, isRejected, operation, requeue) {
23
+ const spansNotEnded = channel[utils.CHANNEL_SPANS_NOT_ENDED] ?? [];
24
+ spansNotEnded.forEach((msgDetails) => {
25
+ endConsumerSpan(msgDetails.msg, isRejected, operation, requeue);
26
+ });
27
+ channel[utils.CHANNEL_SPANS_NOT_ENDED] = [];
28
+ }
29
+ function checkConsumeTimeoutOnChannel(channel) {
30
+ const currentTime = core.timestampInSeconds();
31
+ const spansNotEnded = channel[utils.CHANNEL_SPANS_NOT_ENDED] ?? [];
32
+ let i;
33
+ for (i = 0; i < spansNotEnded.length; i++) {
34
+ const currMessage = spansNotEnded[i];
35
+ const timeFromConsumeMs = (currentTime - currMessage.timeOfConsume) * 1e3;
36
+ if (timeFromConsumeMs < CONSUME_TIMEOUT_MS) {
37
+ break;
38
+ }
39
+ endConsumerSpan(currMessage.msg, null, types.EndOperation.InstrumentationTimeout, true);
40
+ }
41
+ spansNotEnded.splice(0, i);
42
+ }
43
+ function getConnectPatch(original) {
44
+ return function patchedConnect(url, socketOptions, openCallback) {
45
+ return original.call(this, url, socketOptions, function(err, conn) {
46
+ if (err == null) {
47
+ const urlAttributes = utils.getConnectionAttributesFromUrl(url);
48
+ const serverAttributes = utils.getConnectionAttributesFromServer(conn);
49
+ conn[utils.CONNECTION_ATTRIBUTES] = {
50
+ ...urlAttributes,
51
+ ...serverAttributes
52
+ };
53
+ }
54
+ openCallback.apply(this, arguments);
55
+ });
56
+ };
57
+ }
58
+ function getChannelEmitPatch(original) {
59
+ return function emit(eventName) {
60
+ if (eventName === "close") {
61
+ endAllSpansOnChannel(this, true, types.EndOperation.ChannelClosed, void 0);
62
+ const activeTimer = this[utils.CHANNEL_CONSUME_TIMEOUT_TIMER];
63
+ if (activeTimer) {
64
+ clearInterval(activeTimer);
65
+ }
66
+ this[utils.CHANNEL_CONSUME_TIMEOUT_TIMER] = void 0;
67
+ } else if (eventName === "error") {
68
+ endAllSpansOnChannel(this, true, types.EndOperation.ChannelError, void 0);
69
+ }
70
+ return original.apply(this, arguments);
71
+ };
72
+ }
73
+ function getAckAllPatch(isRejected, endOperation) {
74
+ return (original) => function ackAll(requeueOrEmpty) {
75
+ endAllSpansOnChannel(this, isRejected, endOperation, requeueOrEmpty);
76
+ return original.apply(this, arguments);
77
+ };
78
+ }
79
+ function getAckPatch(isRejected, endOperation) {
80
+ return (original) => function ack(message, allUpToOrRequeue, requeue) {
81
+ const channel = this;
82
+ const requeueResolved = endOperation === types.EndOperation.Reject ? allUpToOrRequeue : requeue;
83
+ const spansNotEnded = channel[utils.CHANNEL_SPANS_NOT_ENDED] ?? [];
84
+ const msgIndex = spansNotEnded.findIndex((msgDetails) => msgDetails.msg === message);
85
+ if (msgIndex < 0) {
86
+ endConsumerSpan(message, isRejected, endOperation, requeueResolved);
87
+ } else if (endOperation !== types.EndOperation.Reject && allUpToOrRequeue) {
88
+ for (let i = 0; i <= msgIndex; i++) {
89
+ endConsumerSpan(spansNotEnded[i].msg, isRejected, endOperation, requeueResolved);
90
+ }
91
+ spansNotEnded.splice(0, msgIndex + 1);
92
+ } else {
93
+ endConsumerSpan(message, isRejected, endOperation, requeueResolved);
94
+ spansNotEnded.splice(msgIndex, 1);
95
+ }
96
+ return original.apply(this, arguments);
97
+ };
98
+ }
99
+ function getConsumePatch(original) {
100
+ return function consume(queue, onMessage, options) {
101
+ const channel = this;
102
+ if (!Object.prototype.hasOwnProperty.call(channel, utils.CHANNEL_SPANS_NOT_ENDED)) {
103
+ const timer = setInterval(() => {
104
+ checkConsumeTimeoutOnChannel(channel);
105
+ }, CONSUME_TIMEOUT_MS);
106
+ timer.unref();
107
+ channel[utils.CHANNEL_CONSUME_TIMEOUT_TIMER] = timer;
108
+ channel[utils.CHANNEL_SPANS_NOT_ENDED] = [];
109
+ }
110
+ const patchedOnMessage = function(msg) {
111
+ if (!msg) {
112
+ return onMessage.call(this, msg);
113
+ }
114
+ const headers = msg.properties.headers ?? {};
115
+ const sentryTrace = utils.getHeaderAsString(headers, "sentry-trace");
116
+ const baggage = utils.getHeaderAsString(headers, "baggage");
117
+ core.continueTrace({ sentryTrace, baggage }, () => {
118
+ const span = utils.startConsumeSpan(queue, msg, channel);
119
+ if (!options?.noAck) {
120
+ channel[utils.CHANNEL_SPANS_NOT_ENDED].push({ msg, timeOfConsume: core.timestampInSeconds() });
121
+ msg[utils.MESSAGE_STORED_SPAN] = span;
122
+ }
123
+ core.withActiveSpan(span, () => {
124
+ onMessage.call(this, msg);
125
+ });
126
+ if (options?.noAck) {
127
+ span.end();
128
+ }
129
+ });
130
+ };
131
+ const callArgs = Array.prototype.slice.call(arguments);
132
+ callArgs[1] = patchedOnMessage;
133
+ return original.apply(this, callArgs);
134
+ };
135
+ }
136
+ function getConfirmedPublishPatch(original) {
137
+ return function confirmedPublish(exchange, routingKey, content, options, callback) {
138
+ const channel = this;
139
+ const { span, modifiedOptions } = utils.startPublishSpan(exchange, routingKey, channel, options);
140
+ const patchedOnConfirm = function(err, ok) {
141
+ try {
142
+ core.withActiveSpan(span, () => {
143
+ callback?.call(this, err, ok);
144
+ });
145
+ } finally {
146
+ if (err) {
147
+ span.setStatus({ code: core.SPAN_STATUS_ERROR, message: "message confirmation has been nack'ed" });
148
+ }
149
+ span.end();
150
+ }
151
+ };
152
+ const argumentsCopy = [...arguments];
153
+ argumentsCopy[3] = modifiedOptions;
154
+ argumentsCopy[4] = patchedOnConfirm;
155
+ channel[utils.CHANNEL_IS_CONFIRM_PUBLISHING] = true;
156
+ try {
157
+ return original.apply(this, argumentsCopy);
158
+ } finally {
159
+ channel[utils.CHANNEL_IS_CONFIRM_PUBLISHING] = false;
160
+ }
161
+ };
162
+ }
163
+ function getPublishPatch(original) {
164
+ return function publish(exchange, routingKey, content, options) {
165
+ if (this[utils.CHANNEL_IS_CONFIRM_PUBLISHING]) {
166
+ return original.apply(this, arguments);
167
+ }
168
+ const channel = this;
169
+ const { span, modifiedOptions } = utils.startPublishSpan(exchange, routingKey, channel, options);
170
+ const argumentsCopy = [...arguments];
171
+ argumentsCopy[3] = modifiedOptions;
172
+ const originalRes = original.apply(this, argumentsCopy);
173
+ span.end();
174
+ return originalRes;
175
+ };
176
+ }
177
+
178
+ exports.getAckAllPatch = getAckAllPatch;
179
+ exports.getAckPatch = getAckPatch;
180
+ exports.getChannelEmitPatch = getChannelEmitPatch;
181
+ exports.getConfirmedPublishPatch = getConfirmedPublishPatch;
182
+ exports.getConnectPatch = getConnectPatch;
183
+ exports.getConsumePatch = getConsumePatch;
184
+ exports.getPublishPatch = getPublishPatch;
185
+ //# sourceMappingURL=patches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patches.js","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/patches.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-amqplib\n * - Upstream version: @opentelemetry/instrumentation-amqplib@0.65.0\n * - The channel/connection patches were extracted from the instrumentation class into standalone factories\n * and migrated to Sentry's span APIs; origin is folded into span creation instead of `index.ts` hooks\n * - Cross-service trace propagation uses Sentry's `getTraceData`/`continueTrace` instead of the OTel propagator\n * - Replaced the OTel context-key confirm-channel marker with a synchronous flag on the channel instance\n * - Dropped the instrumentation config and all hooks (publish/publishConfirm/consume/consumeEnd) and the\n * `useLinksForConsume` path; the SDK never used them\n */\n\nimport { continueTrace, SPAN_STATUS_ERROR, timestampInSeconds, withActiveSpan } from '@sentry/core';\nimport type { Connection, Options, Replies } from './amqplib-types';\nimport { EndOperation, type ConsumeMessage, type Message } from './types';\nimport type {\n InstrumentationConnection,\n InstrumentationConsumeChannel,\n InstrumentationConsumeMessage,\n InstrumentationMessage,\n InstrumentationPublishChannel,\n} from './utils';\nimport {\n CHANNEL_CONSUME_TIMEOUT_TIMER,\n CHANNEL_IS_CONFIRM_PUBLISHING,\n CHANNEL_SPANS_NOT_ENDED,\n CONNECTION_ATTRIBUTES,\n getConnectionAttributesFromServer,\n getConnectionAttributesFromUrl,\n getHeaderAsString,\n MESSAGE_STORED_SPAN,\n startConsumeSpan,\n startPublishSpan,\n} from './utils';\n\n// To prevent reference leaks from un-acked messages, their spans are closed after this timeout. The\n// upstream instrumentation exposed this as the `consumeTimeoutMs` option; the SDK always used the default.\nconst CONSUME_TIMEOUT_MS = 1000 * 60; // 1 minute\n\nfunction endConsumerSpan(\n message: InstrumentationMessage,\n isRejected: boolean | null,\n operation: EndOperation,\n requeue: boolean | undefined,\n): void {\n const storedSpan = message[MESSAGE_STORED_SPAN];\n if (!storedSpan) {\n return;\n }\n if (isRejected !== false) {\n storedSpan.setStatus({\n code: SPAN_STATUS_ERROR,\n message:\n operation !== EndOperation.ChannelClosed && operation !== EndOperation.ChannelError\n ? `${operation} called on message${\n requeue === true ? ' with requeue' : requeue === false ? ' without requeue' : ''\n }`\n : operation,\n });\n }\n storedSpan.end();\n message[MESSAGE_STORED_SPAN] = undefined;\n}\n\nfunction endAllSpansOnChannel(\n channel: InstrumentationConsumeChannel,\n isRejected: boolean,\n operation: EndOperation,\n requeue: boolean | undefined,\n): void {\n const spansNotEnded: { msg: Message }[] = channel[CHANNEL_SPANS_NOT_ENDED] ?? [];\n spansNotEnded.forEach(msgDetails => {\n endConsumerSpan(msgDetails.msg, isRejected, operation, requeue);\n });\n channel[CHANNEL_SPANS_NOT_ENDED] = [];\n}\n\nfunction checkConsumeTimeoutOnChannel(channel: InstrumentationConsumeChannel): void {\n const currentTime = timestampInSeconds();\n const spansNotEnded = channel[CHANNEL_SPANS_NOT_ENDED] ?? [];\n let i: number;\n for (i = 0; i < spansNotEnded.length; i++) {\n const currMessage = spansNotEnded[i]!;\n const timeFromConsumeMs = (currentTime - currMessage.timeOfConsume) * 1000;\n if (timeFromConsumeMs < CONSUME_TIMEOUT_MS) {\n break;\n }\n endConsumerSpan(currMessage.msg, null, EndOperation.InstrumentationTimeout, true);\n }\n spansNotEnded.splice(0, i);\n}\n\nexport function getConnectPatch(\n original: (\n url: string | Options.Connect,\n socketOptions: any,\n openCallback: (err: any, connection: Connection) => void,\n ) => Connection,\n) {\n return function patchedConnect(\n this: unknown,\n url: string | Options.Connect,\n socketOptions: any,\n openCallback: Function,\n ): Connection {\n return original.call(this, url, socketOptions, function (this: unknown, err: any, conn: InstrumentationConnection) {\n if (err == null) {\n const urlAttributes = getConnectionAttributesFromUrl(url);\n const serverAttributes = getConnectionAttributesFromServer(conn);\n conn[CONNECTION_ATTRIBUTES] = {\n ...urlAttributes,\n ...serverAttributes,\n };\n }\n openCallback.apply(this, arguments);\n });\n };\n}\n\nexport function getChannelEmitPatch(original: Function) {\n return function emit(this: InstrumentationConsumeChannel, eventName: string): void {\n if (eventName === 'close') {\n endAllSpansOnChannel(this, true, EndOperation.ChannelClosed, undefined);\n const activeTimer = this[CHANNEL_CONSUME_TIMEOUT_TIMER];\n if (activeTimer) {\n clearInterval(activeTimer);\n }\n this[CHANNEL_CONSUME_TIMEOUT_TIMER] = undefined;\n } else if (eventName === 'error') {\n endAllSpansOnChannel(this, true, EndOperation.ChannelError, undefined);\n }\n return original.apply(this, arguments);\n };\n}\n\nexport function getAckAllPatch(isRejected: boolean, endOperation: EndOperation) {\n return (original: Function) =>\n function ackAll(this: InstrumentationConsumeChannel, requeueOrEmpty?: boolean): void {\n endAllSpansOnChannel(this, isRejected, endOperation, requeueOrEmpty);\n return original.apply(this, arguments);\n };\n}\n\nexport function getAckPatch(isRejected: boolean, endOperation: EndOperation) {\n return (original: Function) =>\n function ack(\n this: InstrumentationConsumeChannel,\n message: Message,\n allUpToOrRequeue?: boolean,\n requeue?: boolean,\n ): void {\n const channel = this;\n // we use this patch in the reject function as well, but it has a different signature\n const requeueResolved = endOperation === EndOperation.Reject ? allUpToOrRequeue : requeue;\n\n const spansNotEnded: { msg: Message }[] = channel[CHANNEL_SPANS_NOT_ENDED] ?? [];\n const msgIndex = spansNotEnded.findIndex(msgDetails => msgDetails.msg === message);\n if (msgIndex < 0) {\n // should not happen in the happy flow, but possible if the user calls ack twice with the same message\n endConsumerSpan(message, isRejected, endOperation, requeueResolved);\n } else if (endOperation !== EndOperation.Reject && allUpToOrRequeue) {\n for (let i = 0; i <= msgIndex; i++) {\n endConsumerSpan(spansNotEnded[i]!.msg, isRejected, endOperation, requeueResolved);\n }\n spansNotEnded.splice(0, msgIndex + 1);\n } else {\n endConsumerSpan(message, isRejected, endOperation, requeueResolved);\n spansNotEnded.splice(msgIndex, 1);\n }\n return original.apply(this, arguments);\n };\n}\n\nexport function getConsumePatch(original: Function) {\n return function consume(\n this: InstrumentationConsumeChannel,\n queue: string,\n onMessage: (msg: ConsumeMessage | null) => void,\n options?: Options.Consume,\n ): Promise<Replies.Consume> {\n const channel = this;\n if (!Object.prototype.hasOwnProperty.call(channel, CHANNEL_SPANS_NOT_ENDED)) {\n const timer = setInterval(() => {\n checkConsumeTimeoutOnChannel(channel);\n }, CONSUME_TIMEOUT_MS);\n timer.unref();\n channel[CHANNEL_CONSUME_TIMEOUT_TIMER] = timer;\n channel[CHANNEL_SPANS_NOT_ENDED] = [];\n }\n\n const patchedOnMessage = function (this: unknown, msg: InstrumentationConsumeMessage | null): void {\n // msg is expected to be null for a consumer cancel notification\n // https://www.rabbitmq.com/consumer-cancel.html\n // in this case, we do not start a span, as this is not a real message.\n if (!msg) {\n return onMessage.call(this, msg);\n }\n\n const headers = msg.properties.headers ?? {};\n const sentryTrace = getHeaderAsString(headers, 'sentry-trace');\n const baggage = getHeaderAsString(headers, 'baggage');\n\n // Continue the producer's trace so the consumer span is parented to the message's producer.\n continueTrace({ sentryTrace, baggage }, () => {\n const span = startConsumeSpan(queue, msg, channel);\n\n if (!options?.noAck) {\n // store the message on the channel so we can close the span on ackAll etc\n channel[CHANNEL_SPANS_NOT_ENDED]!.push({ msg, timeOfConsume: timestampInSeconds() });\n // store the span on the message so we can end it when the user calls 'ack' on it\n msg[MESSAGE_STORED_SPAN] = span;\n }\n withActiveSpan(span, () => {\n onMessage.call(this, msg);\n });\n\n if (options?.noAck) {\n span.end();\n }\n });\n };\n\n // Copy `arguments` instead of mutating it: in CJS builds it's aliased to the named parameters,\n // so `arguments[1] = ...` would also reassign `onMessage` to `patchedOnMessage`, making the wrapper\n // call itself and recurse infinitely.\n const callArgs = Array.prototype.slice.call(arguments);\n callArgs[1] = patchedOnMessage;\n return original.apply(this, callArgs);\n };\n}\n\nexport function getConfirmedPublishPatch(original: Function) {\n return function confirmedPublish(\n this: InstrumentationPublishChannel,\n exchange: string,\n routingKey: string,\n content: Buffer,\n options?: Options.Publish,\n callback?: (err: any, ok: Replies.Empty) => void,\n ): boolean {\n const channel = this;\n const { span, modifiedOptions } = startPublishSpan(exchange, routingKey, channel, options);\n\n const patchedOnConfirm = function (this: unknown, err: any, ok: Replies.Empty): void {\n try {\n withActiveSpan(span, () => {\n callback?.call(this, err, ok);\n });\n } finally {\n if (err) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: \"message confirmation has been nack'ed\" });\n }\n span.end();\n }\n };\n\n // The confirm channel publish stores the message and registers a broker-confirm callback; the span\n // ends in that callback. The confirm publish internally delegates to the base channel publish, so we\n // flag the channel to stop the base publish patch from creating a second span. The inner call is\n // synchronous, so a flag on the instance is enough and avoids the OTel context machinery.\n const argumentsCopy = [...arguments];\n argumentsCopy[3] = modifiedOptions;\n argumentsCopy[4] = patchedOnConfirm;\n channel[CHANNEL_IS_CONFIRM_PUBLISHING] = true;\n try {\n return original.apply(this, argumentsCopy);\n } finally {\n channel[CHANNEL_IS_CONFIRM_PUBLISHING] = false;\n }\n };\n}\n\nexport function getPublishPatch(original: Function) {\n return function publish(\n this: InstrumentationPublishChannel,\n exchange: string,\n routingKey: string,\n content: Buffer,\n options?: Options.Publish,\n ): boolean {\n if (this[CHANNEL_IS_CONFIRM_PUBLISHING]) {\n // already instrumented by the confirm-channel publish patch\n return original.apply(this, arguments);\n }\n const channel = this;\n const { span, modifiedOptions } = startPublishSpan(exchange, routingKey, channel, options);\n\n // calling the normal channel publish function only stores the message in the queue; it does not send\n // it and wait for an ack, so the span duration is expected to be very short.\n const argumentsCopy = [...arguments];\n argumentsCopy[3] = modifiedOptions;\n const originalRes = original.apply(this, argumentsCopy);\n span.end();\n return originalRes;\n };\n}\n"],"names":["MESSAGE_STORED_SPAN","SPAN_STATUS_ERROR","EndOperation","CHANNEL_SPANS_NOT_ENDED","timestampInSeconds","getConnectionAttributesFromUrl","getConnectionAttributesFromServer","CONNECTION_ATTRIBUTES","CHANNEL_CONSUME_TIMEOUT_TIMER","getHeaderAsString","continueTrace","startConsumeSpan","withActiveSpan","startPublishSpan","CHANNEL_IS_CONFIRM_PUBLISHING"],"mappings":";;;;;;AAwCA,MAAM,qBAAqB,GAAA,GAAO,EAAA;AAElC,SAAS,eAAA,CACP,OAAA,EACA,UAAA,EACA,SAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,UAAA,GAAa,QAAQA,yBAAmB,CAAA;AAC9C,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA;AAAA,EACF;AACA,EAAA,IAAI,eAAe,KAAA,EAAO;AACxB,IAAA,UAAA,CAAW,SAAA,CAAU;AAAA,MACnB,IAAA,EAAMC,sBAAA;AAAA,MACN,SACE,SAAA,KAAcC,kBAAA,CAAa,aAAA,IAAiB,SAAA,KAAcA,mBAAa,YAAA,GACnE,CAAA,EAAG,SAAS,CAAA,kBAAA,EACV,YAAY,IAAA,GAAO,eAAA,GAAkB,YAAY,KAAA,GAAQ,kBAAA,GAAqB,EAChF,CAAA,CAAA,GACA;AAAA,KACP,CAAA;AAAA,EACH;AACA,EAAA,UAAA,CAAW,GAAA,EAAI;AACf,EAAA,OAAA,CAAQF,yBAAmB,CAAA,GAAI,MAAA;AACjC;AAEA,SAAS,oBAAA,CACP,OAAA,EACA,UAAA,EACA,SAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,aAAA,GAAoC,OAAA,CAAQG,6BAAuB,CAAA,IAAK,EAAC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GAAI,KAAA;AAAA,IAC3C;AAAA,EACF,CAAA;AACF;AAEO,SAAS,gBAAgB,QAAA,EAAoB;AAClD,EAAA,OAAO,SAAS,OAAA,CAEd,QAAA,EACA,UAAA,EACA,SACA,OAAA,EACS;AACT,IAAA,IAAI,IAAA,CAAKA,mCAA6B,CAAA,EAAG;AAEvC,MAAA,OAAO,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,SAAS,CAAA;AAAA,IACvC;AACA,IAAA,MAAM,OAAA,GAAU,IAAA;AAChB,IAAA,MAAM,EAAE,MAAM,eAAA,EAAgB,GAAID,uBAAiB,QAAA,EAAU,UAAA,EAAY,SAAS,OAAO,CAAA;AAIzF,IAAA,MAAM,aAAA,GAAgB,CAAC,GAAG,SAAS,CAAA;AACnC,IAAA,aAAA,CAAc,CAAC,CAAA,GAAI,eAAA;AACnB,IAAA,MAAM,WAAA,GAAc,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,aAAa,CAAA;AACtD,IAAA,IAAA,CAAK,GAAA,EAAI;AACT,IAAA,OAAO,WAAA;AAAA,EACT,CAAA;AACF;;;;;;;;;;"}
@@ -0,0 +1,26 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const ATTR_MESSAGING_OPERATION = "messaging.operation";
4
+ const ATTR_MESSAGING_DESTINATION = "messaging.destination";
5
+ const ATTR_MESSAGING_DESTINATION_KIND = "messaging.destination_kind";
6
+ const ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = "messaging.rabbitmq.routing_key";
7
+ const ATTR_MESSAGING_PROTOCOL = "messaging.protocol";
8
+ const ATTR_MESSAGING_PROTOCOL_VERSION = "messaging.protocol_version";
9
+ const ATTR_MESSAGING_URL = "messaging.url";
10
+ const OLD_ATTR_MESSAGING_MESSAGE_ID = "messaging.message_id";
11
+ const ATTR_MESSAGING_CONVERSATION_ID = "messaging.conversation_id";
12
+ const MESSAGING_DESTINATION_KIND_VALUE_TOPIC = "topic";
13
+ const MESSAGING_OPERATION_VALUE_PROCESS = "process";
14
+
15
+ exports.ATTR_MESSAGING_CONVERSATION_ID = ATTR_MESSAGING_CONVERSATION_ID;
16
+ exports.ATTR_MESSAGING_DESTINATION = ATTR_MESSAGING_DESTINATION;
17
+ exports.ATTR_MESSAGING_DESTINATION_KIND = ATTR_MESSAGING_DESTINATION_KIND;
18
+ exports.ATTR_MESSAGING_OPERATION = ATTR_MESSAGING_OPERATION;
19
+ exports.ATTR_MESSAGING_PROTOCOL = ATTR_MESSAGING_PROTOCOL;
20
+ exports.ATTR_MESSAGING_PROTOCOL_VERSION = ATTR_MESSAGING_PROTOCOL_VERSION;
21
+ exports.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = ATTR_MESSAGING_RABBITMQ_ROUTING_KEY;
22
+ exports.ATTR_MESSAGING_URL = ATTR_MESSAGING_URL;
23
+ exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = MESSAGING_DESTINATION_KIND_VALUE_TOPIC;
24
+ exports.MESSAGING_OPERATION_VALUE_PROCESS = MESSAGING_OPERATION_VALUE_PROCESS;
25
+ exports.OLD_ATTR_MESSAGING_MESSAGE_ID = OLD_ATTR_MESSAGING_MESSAGE_ID;
26
+ //# sourceMappingURL=semconv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-amqplib\n * - Upstream version: @opentelemetry/instrumentation-amqplib@0.65.0\n * - Merged the upstream `semconv.ts` and `semconv-obsolete.ts` into a single file containing only the\n * constants this instrumentation emits. These mirror the (now legacy) messaging semantic conventions\n * that the SDK has always emitted; the `@deprecated` annotations were dropped since these vendored\n * copies are intentionally the chosen output and we don't want to flag every usage site.\n */\n\n/** A string identifying the kind of message consumption. */\nexport const ATTR_MESSAGING_OPERATION = 'messaging.operation' as const;\n\n/** The message destination name (the exchange for amqplib). */\nexport const ATTR_MESSAGING_DESTINATION = 'messaging.destination' as const;\n\n/** The kind of message destination. */\nexport const ATTR_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind' as const;\n\n/** RabbitMQ message routing key. */\nexport const ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key' as const;\n\n/** The name of the transport protocol. */\nexport const ATTR_MESSAGING_PROTOCOL = 'messaging.protocol' as const;\n\n/** The version of the transport protocol. */\nexport const ATTR_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version' as const;\n\n/** Connection string. */\nexport const ATTR_MESSAGING_URL = 'messaging.url' as const;\n\n/** A value used by the messaging system as an identifier for the message, represented as a string. */\nexport const OLD_ATTR_MESSAGING_MESSAGE_ID = 'messaging.message_id' as const;\n\n/** The conversation ID (a.k.a. correlation ID) identifying the conversation the message belongs to. */\nexport const ATTR_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id' as const;\n\n/** Value for `messaging.destination_kind` when the destination is a topic. */\nexport const MESSAGING_DESTINATION_KIND_VALUE_TOPIC = 'topic' as const;\n\n/** Value for `messaging.operation` when the message is being processed by a consumer. */\nexport const MESSAGING_OPERATION_VALUE_PROCESS = 'process' as const;\n"],"names":[],"mappings":";;AAcO,MAAM,wBAAA,GAA2B;AAGjC,MAAM,0BAAA,GAA6B;AAGnC,MAAM,+BAAA,GAAkC;AAGxC,MAAM,mCAAA,GAAsC;AAG5C,MAAM,uBAAA,GAA0B;AAGhC,MAAM,+BAAA,GAAkC;AAGxC,MAAM,kBAAA,GAAqB;AAG3B,MAAM,6BAAA,GAAgC;AAGtC,MAAM,8BAAA,GAAiC;AAGvC,MAAM,sCAAA,GAAyC;AAG/C,MAAM,iCAAA,GAAoC;;;;;;;;;;;;;;"}
@@ -0,0 +1,17 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ var EndOperation = /* @__PURE__ */ ((EndOperation2) => {
4
+ EndOperation2["AutoAck"] = "auto ack";
5
+ EndOperation2["Ack"] = "ack";
6
+ EndOperation2["AckAll"] = "ackAll";
7
+ EndOperation2["Reject"] = "reject";
8
+ EndOperation2["Nack"] = "nack";
9
+ EndOperation2["NackAll"] = "nackAll";
10
+ EndOperation2["ChannelClosed"] = "channel closed";
11
+ EndOperation2["ChannelError"] = "channel error";
12
+ EndOperation2["InstrumentationTimeout"] = "instrumentation timeout";
13
+ return EndOperation2;
14
+ })(EndOperation || {});
15
+
16
+ exports.EndOperation = EndOperation;
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/types.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-amqplib\n * - Upstream version: @opentelemetry/instrumentation-amqplib@0.65.0\n * - Some types vendored from @types/amqplib with simplifications\n * - Dropped the instrumentation config and all hooks; the SDK folds origin into span creation instead\n */\n\nexport enum EndOperation {\n AutoAck = 'auto ack',\n Ack = 'ack',\n AckAll = 'ackAll',\n Reject = 'reject',\n Nack = 'nack',\n NackAll = 'nackAll',\n ChannelClosed = 'channel closed',\n ChannelError = 'channel error',\n InstrumentationTimeout = 'instrumentation timeout',\n}\n\n// The following types are vendored from `@types/amqplib@0.10.1` - commit SHA: 4205e03127692a40b4871709a7134fe4e2ed5510\n\n// Vendored from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/4205e03127692a40b4871709a7134fe4e2ed5510/types/amqplib/properties.d.ts#L142\nexport interface Message {\n content: Buffer;\n fields: MessageFields;\n properties: MessageProperties;\n}\n\nexport interface ConsumeMessage extends Message {\n fields: ConsumeMessageFields;\n}\n\nexport interface CommonMessageFields {\n deliveryTag: number;\n redelivered: boolean;\n exchange: string;\n routingKey: string;\n}\n\nexport interface MessageFields extends CommonMessageFields {\n messageCount?: number;\n consumerTag?: string;\n}\n\nexport interface ConsumeMessageFields extends CommonMessageFields {\n deliveryTag: number;\n}\n\nexport interface MessageProperties {\n contentType: any | undefined;\n contentEncoding: any | undefined;\n headers: any;\n deliveryMode: any | undefined;\n priority: any | undefined;\n correlationId: any | undefined;\n replyTo: any | undefined;\n expiration: any | undefined;\n messageId: any | undefined;\n timestamp: any | undefined;\n type: any | undefined;\n userId: any | undefined;\n appId: any | undefined;\n clusterId: any | undefined;\n}\n"],"names":["EndOperation"],"mappings":";;AAWO,IAAK,YAAA,qBAAAA,aAAAA,KAAL;AACL,EAAAA,cAAA,SAAA,CAAA,GAAU,UAAA;AACV,EAAAA,cAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,cAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,cAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,cAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,cAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,cAAA,eAAA,CAAA,GAAgB,gBAAA;AAChB,EAAAA,cAAA,cAAA,CAAA,GAAe,eAAA;AACf,EAAAA,cAAA,wBAAA,CAAA,GAAyB,yBAAA;AATf,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;;;;"}
@@ -0,0 +1,129 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const api = require('@opentelemetry/api');
4
+ const core = require('@sentry/core');
5
+ const attributes = require('@sentry/conventions/attributes');
6
+ const semconv = require('./semconv.js');
7
+
8
+ const PUBLISHER_ORIGIN = "auto.amqplib.otel.publisher";
9
+ const CONSUMER_ORIGIN = "auto.amqplib.otel.consumer";
10
+ const MESSAGE_STORED_SPAN = /* @__PURE__ */ Symbol("opentelemetry.amqplib.message.stored-span");
11
+ const CHANNEL_SPANS_NOT_ENDED = /* @__PURE__ */ Symbol("opentelemetry.amqplib.channel.spans-not-ended");
12
+ const CHANNEL_CONSUME_TIMEOUT_TIMER = /* @__PURE__ */ Symbol(
13
+ "opentelemetry.amqplib.channel.consumer-timeout-timer"
14
+ );
15
+ const CONNECTION_ATTRIBUTES = /* @__PURE__ */ Symbol("opentelemetry.amqplib.connection.attributes");
16
+ const CHANNEL_IS_CONFIRM_PUBLISHING = /* @__PURE__ */ Symbol("sentry.amqplib.channel.is-confirm-publishing");
17
+ const normalizeExchange = (exchangeName) => exchangeName !== "" ? exchangeName : "<default>";
18
+ const censorPassword = (url) => {
19
+ return url.replace(/:[^:@/]*@/, ":***@");
20
+ };
21
+ const getPort = (portFromUrl, resolvedProtocol) => {
22
+ return portFromUrl || (resolvedProtocol === "AMQP" ? 5672 : 5671);
23
+ };
24
+ const getProtocol = (protocolFromUrl) => {
25
+ const resolvedProtocol = protocolFromUrl || "amqp";
26
+ const noEndingColon = resolvedProtocol.endsWith(":") ? resolvedProtocol.substring(0, resolvedProtocol.length - 1) : resolvedProtocol;
27
+ return noEndingColon.toUpperCase();
28
+ };
29
+ const getHostname = (hostnameFromUrl) => {
30
+ return hostnameFromUrl || "localhost";
31
+ };
32
+ const getConnectionAttributesFromServer = (conn) => {
33
+ const product = conn.serverProperties.product?.toLowerCase?.();
34
+ if (product) {
35
+ return {
36
+ [attributes.MESSAGING_SYSTEM]: product
37
+ };
38
+ } else {
39
+ return {};
40
+ }
41
+ };
42
+ const getConnectionAttributesFromUrl = (url) => {
43
+ const attributes$1 = {
44
+ [semconv.ATTR_MESSAGING_PROTOCOL_VERSION]: "0.9.1"
45
+ // this is the only protocol supported by the instrumented library
46
+ };
47
+ const resolvedUrl = url || "amqp://localhost";
48
+ if (typeof resolvedUrl === "object") {
49
+ const connectOptions = resolvedUrl;
50
+ const protocol = getProtocol(connectOptions?.protocol);
51
+ attributes$1[semconv.ATTR_MESSAGING_PROTOCOL] = protocol;
52
+ attributes$1[attributes.NET_PEER_NAME] = getHostname(connectOptions?.hostname);
53
+ attributes$1[attributes.NET_PEER_PORT] = getPort(connectOptions.port, protocol);
54
+ } else {
55
+ const censoredUrl = censorPassword(resolvedUrl);
56
+ attributes$1[semconv.ATTR_MESSAGING_URL] = censoredUrl;
57
+ try {
58
+ const urlParts = new URL(censoredUrl);
59
+ const protocol = getProtocol(urlParts.protocol);
60
+ attributes$1[semconv.ATTR_MESSAGING_PROTOCOL] = protocol;
61
+ attributes$1[attributes.NET_PEER_NAME] = getHostname(urlParts.hostname);
62
+ attributes$1[attributes.NET_PEER_PORT] = getPort(urlParts.port ? parseInt(urlParts.port) : void 0, protocol);
63
+ } catch {
64
+ }
65
+ }
66
+ return attributes$1;
67
+ };
68
+ function getHeaderAsString(headers, key) {
69
+ const value = headers?.[key];
70
+ if (value == null) {
71
+ return void 0;
72
+ }
73
+ return Array.isArray(value) ? String(value[0]) : String(value);
74
+ }
75
+ function startPublishSpan(exchange, routingKey, channel, options) {
76
+ const normalizedExchange = normalizeExchange(exchange);
77
+ const span = core.startInactiveSpan({
78
+ name: `publish ${normalizedExchange}`,
79
+ kind: api.SpanKind.PRODUCER,
80
+ attributes: {
81
+ ...channel.connection[CONNECTION_ATTRIBUTES],
82
+ [semconv.ATTR_MESSAGING_DESTINATION]: exchange,
83
+ [semconv.ATTR_MESSAGING_DESTINATION_KIND]: semconv.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,
84
+ [semconv.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]: routingKey,
85
+ [semconv.OLD_ATTR_MESSAGING_MESSAGE_ID]: options?.messageId,
86
+ [semconv.ATTR_MESSAGING_CONVERSATION_ID]: options?.correlationId,
87
+ [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: PUBLISHER_ORIGIN
88
+ }
89
+ });
90
+ const modifiedOptions = options ?? {};
91
+ modifiedOptions.headers = modifiedOptions.headers ?? {};
92
+ const traceData = core.getTraceData({ span });
93
+ if (traceData["sentry-trace"]) {
94
+ modifiedOptions.headers["sentry-trace"] = traceData["sentry-trace"];
95
+ }
96
+ if (traceData.baggage) {
97
+ modifiedOptions.headers["baggage"] = traceData.baggage;
98
+ }
99
+ return { span, modifiedOptions };
100
+ }
101
+ function startConsumeSpan(queue, msg, channel) {
102
+ return core.startInactiveSpan({
103
+ name: `${queue} process`,
104
+ kind: api.SpanKind.CONSUMER,
105
+ attributes: {
106
+ ...channel?.connection?.[CONNECTION_ATTRIBUTES],
107
+ [semconv.ATTR_MESSAGING_DESTINATION]: msg.fields?.exchange,
108
+ [semconv.ATTR_MESSAGING_DESTINATION_KIND]: semconv.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,
109
+ [semconv.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]: msg.fields?.routingKey,
110
+ [semconv.ATTR_MESSAGING_OPERATION]: semconv.MESSAGING_OPERATION_VALUE_PROCESS,
111
+ [semconv.OLD_ATTR_MESSAGING_MESSAGE_ID]: msg?.properties.messageId,
112
+ [semconv.ATTR_MESSAGING_CONVERSATION_ID]: msg?.properties.correlationId,
113
+ [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: CONSUMER_ORIGIN
114
+ }
115
+ });
116
+ }
117
+
118
+ exports.CHANNEL_CONSUME_TIMEOUT_TIMER = CHANNEL_CONSUME_TIMEOUT_TIMER;
119
+ exports.CHANNEL_IS_CONFIRM_PUBLISHING = CHANNEL_IS_CONFIRM_PUBLISHING;
120
+ exports.CHANNEL_SPANS_NOT_ENDED = CHANNEL_SPANS_NOT_ENDED;
121
+ exports.CONNECTION_ATTRIBUTES = CONNECTION_ATTRIBUTES;
122
+ exports.MESSAGE_STORED_SPAN = MESSAGE_STORED_SPAN;
123
+ exports.getConnectionAttributesFromServer = getConnectionAttributesFromServer;
124
+ exports.getConnectionAttributesFromUrl = getConnectionAttributesFromUrl;
125
+ exports.getHeaderAsString = getHeaderAsString;
126
+ exports.normalizeExchange = normalizeExchange;
127
+ exports.startConsumeSpan = startConsumeSpan;
128
+ exports.startPublishSpan = startPublishSpan;
129
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/utils.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-amqplib\n * - Upstream version: @opentelemetry/instrumentation-amqplib@0.65.0\n * - Some types vendored from @types/amqplib with simplifications\n * - Span creation extracted here and migrated to the @sentry/core API; origin folded into span creation\n * - Cross-service trace propagation uses Sentry's `getTraceData` instead of the OTel propagator\n * - Dropped the env-gated stable-semconv dual emission; only the (default) old semantic conventions are emitted\n * - Replaced the OTel context-key confirm-channel marker with a synchronous flag on the channel instance\n */\n\nimport { SpanKind } from '@opentelemetry/api';\nimport type { Span, SpanAttributes } from '@sentry/core';\nimport { getTraceData, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, startInactiveSpan } from '@sentry/core';\nimport { MESSAGING_SYSTEM, NET_PEER_NAME, NET_PEER_PORT } from '@sentry/conventions/attributes';\nimport type { Channel, ConfirmChannel, Connection, Options } from './amqplib-types';\nimport {\n ATTR_MESSAGING_CONVERSATION_ID,\n ATTR_MESSAGING_DESTINATION,\n ATTR_MESSAGING_DESTINATION_KIND,\n ATTR_MESSAGING_OPERATION,\n ATTR_MESSAGING_PROTOCOL,\n ATTR_MESSAGING_PROTOCOL_VERSION,\n ATTR_MESSAGING_RABBITMQ_ROUTING_KEY,\n ATTR_MESSAGING_URL,\n MESSAGING_DESTINATION_KIND_VALUE_TOPIC,\n MESSAGING_OPERATION_VALUE_PROCESS,\n OLD_ATTR_MESSAGING_MESSAGE_ID,\n} from './semconv';\nimport type { ConsumeMessage, Message } from './types';\n\nconst PUBLISHER_ORIGIN = 'auto.amqplib.otel.publisher';\nconst CONSUMER_ORIGIN = 'auto.amqplib.otel.consumer';\n\nexport const MESSAGE_STORED_SPAN: unique symbol = Symbol('opentelemetry.amqplib.message.stored-span');\nexport const CHANNEL_SPANS_NOT_ENDED: unique symbol = Symbol('opentelemetry.amqplib.channel.spans-not-ended');\nexport const CHANNEL_CONSUME_TIMEOUT_TIMER: unique symbol = Symbol(\n 'opentelemetry.amqplib.channel.consumer-timeout-timer',\n);\nexport const CONNECTION_ATTRIBUTES: unique symbol = Symbol('opentelemetry.amqplib.connection.attributes');\nexport const CHANNEL_IS_CONFIRM_PUBLISHING: unique symbol = Symbol('sentry.amqplib.channel.is-confirm-publishing');\n\nexport type InstrumentationConnection = Connection & {\n [CONNECTION_ATTRIBUTES]?: SpanAttributes;\n};\nexport type InstrumentationPublishChannel = (Channel | ConfirmChannel) & {\n connection: InstrumentationConnection;\n [CHANNEL_IS_CONFIRM_PUBLISHING]?: boolean;\n};\nexport type InstrumentationConsumeChannel = Channel & {\n connection: InstrumentationConnection;\n [CHANNEL_SPANS_NOT_ENDED]?: {\n msg: ConsumeMessage;\n timeOfConsume: number;\n }[];\n [CHANNEL_CONSUME_TIMEOUT_TIMER]?: NodeJS.Timeout;\n};\nexport type InstrumentationMessage = Message & {\n [MESSAGE_STORED_SPAN]?: Span;\n};\nexport type InstrumentationConsumeMessage = ConsumeMessage & {\n [MESSAGE_STORED_SPAN]?: Span;\n};\n\nexport const normalizeExchange = (exchangeName: string): string => (exchangeName !== '' ? exchangeName : '<default>');\n\nconst censorPassword = (url: string): string => {\n return url.replace(/:[^:@/]*@/, ':***@');\n};\n\nconst getPort = (portFromUrl: number | undefined, resolvedProtocol: string): number => {\n // we are using the resolved protocol which is upper case\n // this code mimics the behavior of amqplib which is used to set connection params\n return portFromUrl || (resolvedProtocol === 'AMQP' ? 5672 : 5671);\n};\n\nconst getProtocol = (protocolFromUrl: string | undefined): string => {\n const resolvedProtocol = protocolFromUrl || 'amqp';\n // the substring removes the ':' part of the protocol ('amqp:' -> 'amqp')\n const noEndingColon = resolvedProtocol.endsWith(':')\n ? resolvedProtocol.substring(0, resolvedProtocol.length - 1)\n : resolvedProtocol;\n // upper case to match spec\n return noEndingColon.toUpperCase();\n};\n\nconst getHostname = (hostnameFromUrl: string | undefined): string => {\n // if user supplies empty hostname, it gets forwarded to 'net' package which defaults it to localhost.\n // https://nodejs.org/docs/latest-v12.x/api/net.html#net_socket_connect_options_connectlistener\n return hostnameFromUrl || 'localhost';\n};\n\nexport const getConnectionAttributesFromServer = (conn: Connection): SpanAttributes => {\n const product = conn.serverProperties.product?.toLowerCase?.();\n if (product) {\n return {\n [MESSAGING_SYSTEM]: product,\n };\n } else {\n return {};\n }\n};\n\nexport const getConnectionAttributesFromUrl = (url: string | Options.Connect): SpanAttributes => {\n const attributes: SpanAttributes = {\n [ATTR_MESSAGING_PROTOCOL_VERSION]: '0.9.1', // this is the only protocol supported by the instrumented library\n };\n\n const resolvedUrl = url || 'amqp://localhost';\n if (typeof resolvedUrl === 'object') {\n const connectOptions = resolvedUrl;\n\n const protocol = getProtocol(connectOptions?.protocol);\n attributes[ATTR_MESSAGING_PROTOCOL] = protocol;\n // oxlint-disable-next-line typescript/no-deprecated\n attributes[NET_PEER_NAME] = getHostname(connectOptions?.hostname);\n // oxlint-disable-next-line typescript/no-deprecated\n attributes[NET_PEER_PORT] = getPort(connectOptions.port, protocol);\n } else {\n const censoredUrl = censorPassword(resolvedUrl);\n attributes[ATTR_MESSAGING_URL] = censoredUrl;\n try {\n const urlParts = new URL(censoredUrl);\n\n const protocol = getProtocol(urlParts.protocol);\n attributes[ATTR_MESSAGING_PROTOCOL] = protocol;\n // oxlint-disable-next-line typescript/no-deprecated\n attributes[NET_PEER_NAME] = getHostname(urlParts.hostname);\n // oxlint-disable-next-line typescript/no-deprecated\n attributes[NET_PEER_PORT] = getPort(urlParts.port ? parseInt(urlParts.port) : undefined, protocol);\n } catch {\n // best-effort: a malformed url simply yields fewer connection attributes\n }\n }\n return attributes;\n};\n\n/** Reads a propagation header value off an amqplib message as a string. */\nexport function getHeaderAsString(headers: Record<string, unknown> | undefined, key: string): string | undefined {\n const value = headers?.[key];\n if (value == null) {\n return undefined;\n }\n return Array.isArray(value) ? String(value[0]) : String(value);\n}\n\n/** Starts an inactive producer span and propagates its trace into the publish `options.headers`. */\nexport function startPublishSpan(\n exchange: string,\n routingKey: string,\n channel: InstrumentationPublishChannel,\n options?: Options.Publish,\n): { span: Span; modifiedOptions: Options.Publish } {\n const normalizedExchange = normalizeExchange(exchange);\n\n const span = startInactiveSpan({\n name: `publish ${normalizedExchange}`,\n kind: SpanKind.PRODUCER,\n attributes: {\n ...channel.connection[CONNECTION_ATTRIBUTES],\n [ATTR_MESSAGING_DESTINATION]: exchange,\n [ATTR_MESSAGING_DESTINATION_KIND]: MESSAGING_DESTINATION_KIND_VALUE_TOPIC,\n [ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]: routingKey,\n [OLD_ATTR_MESSAGING_MESSAGE_ID]: options?.messageId,\n [ATTR_MESSAGING_CONVERSATION_ID]: options?.correlationId,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: PUBLISHER_ORIGIN,\n },\n });\n\n const modifiedOptions = options ?? {};\n modifiedOptions.headers = modifiedOptions.headers ?? {};\n\n const traceData = getTraceData({ span });\n if (traceData['sentry-trace']) {\n modifiedOptions.headers['sentry-trace'] = traceData['sentry-trace'];\n }\n if (traceData.baggage) {\n modifiedOptions.headers['baggage'] = traceData.baggage;\n }\n\n return { span, modifiedOptions };\n}\n\n/** Starts an inactive consumer (process) span carrying the amqplib messaging attributes. */\nexport function startConsumeSpan(\n queue: string,\n msg: InstrumentationConsumeMessage,\n channel: InstrumentationConsumeChannel,\n): Span {\n return startInactiveSpan({\n name: `${queue} process`,\n kind: SpanKind.CONSUMER,\n attributes: {\n ...channel?.connection?.[CONNECTION_ATTRIBUTES],\n [ATTR_MESSAGING_DESTINATION]: msg.fields?.exchange,\n [ATTR_MESSAGING_DESTINATION_KIND]: MESSAGING_DESTINATION_KIND_VALUE_TOPIC,\n [ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]: msg.fields?.routingKey,\n [ATTR_MESSAGING_OPERATION]: MESSAGING_OPERATION_VALUE_PROCESS,\n [OLD_ATTR_MESSAGING_MESSAGE_ID]: msg?.properties.messageId,\n [ATTR_MESSAGING_CONVERSATION_ID]: msg?.properties.correlationId,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: CONSUMER_ORIGIN,\n },\n });\n}\n"],"names":["MESSAGING_SYSTEM","attributes","ATTR_MESSAGING_PROTOCOL_VERSION","ATTR_MESSAGING_PROTOCOL","NET_PEER_NAME","NET_PEER_PORT","ATTR_MESSAGING_URL","startInactiveSpan","SpanKind","ATTR_MESSAGING_DESTINATION","ATTR_MESSAGING_DESTINATION_KIND","MESSAGING_DESTINATION_KIND_VALUE_TOPIC","ATTR_MESSAGING_RABBITMQ_ROUTING_KEY","OLD_ATTR_MESSAGING_MESSAGE_ID","ATTR_MESSAGING_CONVERSATION_ID","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","getTraceData","ATTR_MESSAGING_OPERATION","MESSAGING_OPERATION_VALUE_PROCESS"],"mappings":";;;;;;;AAkCA,MAAM,gBAAA,GAAmB,6BAAA;AACzB,MAAM,eAAA,GAAkB,4BAAA;AAEjB,MAAM,mBAAA,0BAA4C,2CAA2C;AAC7F,MAAM,uBAAA,0BAAgD,+CAA+C;AACrG,MAAM,6BAAA,mBAA+C,MAAA;AAAA,EAC1D;AACF;AACO,MAAM,qBAAA,0BAA8C,6CAA6C;AACjG,MAAM,6BAAA,0BAAsD,8CAA8C;AAwB1G,MAAM,iBAAA,GAAoB,CAAC,YAAA,KAAkC,YAAA,KAAiB,KAAK,YAAA,GAAe;AAEzG,MAAM,cAAA,GAAiB,CAAC,GAAA,KA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AAS,QAAA;AAAA,IACf,UAAA,EAAY;AAAA,MACV,GAAG,OAAA,EAAS,UAAA,GAAa,qBAAqB,CAAA;AAAA,MAC9C,CAACC,kCAA0B,GAAG,GAAA,CAAI,MAAA,EAAQ,QAAA;AAAA,MAC1C,CAACC,uCAA+B,GAAGC,8CAAA;AAAA,MACnC,CAACC,2CAAmC,GAAG,GAAA,CAAI,MAAA,EAAQ,UAAA;AAAA,MACnD,CAACK,gCAAwB,GAAGC,yCAAA;AAAA,MAC5B,CAACL,qCAA6B,GAAG,GAAA,EAAK,UAAA,CAAW,SAAA;AAAA,MACjD,CAACC,sCAA8B,GAAG,GAAA,EAAK,UAAA,CAAW,aAAA;AAAA,MAClD,CAACC,qCAAgC,GAAG;AAAA;AACtC,GACD,CAAA;AACH;;;;;;;;;;;;;;"}
@@ -6,72 +6,17 @@ const instrumentation = require('./instrumentation.js');
6
6
 
7
7
  const instrumentAnthropicAi = nodeCore.generateInstrumentOnce(
8
8
  core.ANTHROPIC_AI_INTEGRATION_NAME,
9
- options => new instrumentation.SentryAnthropicAiInstrumentation(options),
9
+ (options) => new instrumentation.SentryAnthropicAiInstrumentation(options)
10
10
  );
11
-
12
11
  const _anthropicAIIntegration = ((options = {}) => {
13
12
  return {
14
13
  name: core.ANTHROPIC_AI_INTEGRATION_NAME,
15
14
  options,
16
15
  setupOnce() {
17
16
  instrumentAnthropicAi(options);
18
- },
17
+ }
19
18
  };
20
- }) ;
21
-
22
- /**
23
- * Adds Sentry tracing instrumentation for the Anthropic AI SDK.
24
- *
25
- * This integration is enabled by default.
26
- *
27
- * When configured, this integration automatically instruments Anthropic AI SDK client instances
28
- * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
29
- *
30
- * @example
31
- * ```javascript
32
- * import * as Sentry from '@sentry/node';
33
- *
34
- * Sentry.init({
35
- * integrations: [Sentry.anthropicAIIntegration()],
36
- * });
37
- * ```
38
- *
39
- * ## Options
40
- *
41
- * - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)
42
- * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
43
- *
44
- * ### Default Behavior
45
- *
46
- * By default, the integration will:
47
- * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
48
- * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
49
- *
50
- * @example
51
- * ```javascript
52
- * // Record inputs and outputs when sendDefaultPii is false
53
- * Sentry.init({
54
- * integrations: [
55
- * Sentry.anthropicAIIntegration({
56
- * recordInputs: true,
57
- * recordOutputs: true
58
- * })
59
- * ],
60
- * });
61
- *
62
- * // Never record inputs/outputs regardless of sendDefaultPii
63
- * Sentry.init({
64
- * sendDefaultPii: true,
65
- * integrations: [
66
- * Sentry.anthropicAIIntegration({
67
- * recordInputs: false,
68
- * recordOutputs: false
69
- * })
70
- * ],
71
- * });
72
- * ```
73
- *
74
- */
19
+ });
75
20
  const anthropicAIIntegration = core.defineIntegration(_anthropicAIIntegration);
76
21
 
77
22
  exports.anthropicAIIntegration = anthropicAIIntegration;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/anthropic-ai/index.ts"],"sourcesContent":["import type { AnthropicAiOptions, IntegrationFn } from '@sentry/core';\nimport { ANTHROPIC_AI_INTEGRATION_NAME, defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryAnthropicAiInstrumentation } from './instrumentation';\n\nexport const instrumentAnthropicAi = generateInstrumentOnce<AnthropicAiOptions>(\n ANTHROPIC_AI_INTEGRATION_NAME,\n options => new SentryAnthropicAiInstrumentation(options),\n);\n\nconst _anthropicAIIntegration = ((options: AnthropicAiOptions = {}) => {\n return {\n name: ANTHROPIC_AI_INTEGRATION_NAME,\n options,\n setupOnce() {\n instrumentAnthropicAi(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the Anthropic AI SDK.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments Anthropic AI SDK client instances\n * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.anthropicAIIntegration()],\n * });\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)\n * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options\n * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled\n *\n * @example\n * ```javascript\n * // Record inputs and outputs when sendDefaultPii is false\n * Sentry.init({\n * integrations: [\n * Sentry.anthropicAIIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of sendDefaultPii\n * Sentry.init({\n * sendDefaultPii: true,\n * integrations: [\n * Sentry.anthropicAIIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n */\nexport const anthropicAIIntegration = defineIntegration(_anthropicAIIntegration);\n"],"names":["generateInstrumentOnce","ANTHROPIC_AI_INTEGRATION_NAME","SentryAnthropicAiInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,qBAAA,GAAwBA,+BAAsB;AAC3D,EAAEC,kCAA6B;AAC/B,EAAE,WAAW,IAAIC,gDAAgC,CAAC,OAAO,CAAC;AAC1D;;AAEA,MAAM,uBAAA,IAA2B,CAAC,OAAO,GAAuB,EAAE,KAAK;AACvE,EAAE,OAAO;AACT,IAAI,IAAI,EAAED,kCAA6B;AACvC,IAAI,OAAO;AACX,IAAI,SAAS,GAAG;AAChB,MAAM,qBAAqB,CAAC,OAAO,CAAC;AACpC,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,sBAAA,GAAyBE,sBAAiB,CAAC,uBAAuB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/anthropic-ai/index.ts"],"sourcesContent":["import type { AnthropicAiOptions, IntegrationFn } from '@sentry/core';\nimport { ANTHROPIC_AI_INTEGRATION_NAME, defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryAnthropicAiInstrumentation } from './instrumentation';\n\nexport const instrumentAnthropicAi = generateInstrumentOnce<AnthropicAiOptions>(\n ANTHROPIC_AI_INTEGRATION_NAME,\n options => new SentryAnthropicAiInstrumentation(options),\n);\n\nconst _anthropicAIIntegration = ((options: AnthropicAiOptions = {}) => {\n return {\n name: ANTHROPIC_AI_INTEGRATION_NAME,\n options,\n setupOnce() {\n instrumentAnthropicAi(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the Anthropic AI SDK.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments Anthropic AI SDK client instances\n * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.anthropicAIIntegration()],\n * });\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record prompt messages (default: follows `dataCollection.genAI.inputs`, or the deprecated `sendDefaultPii` option)\n * - `recordOutputs`: Whether to record response text (default: follows `dataCollection.genAI.outputs`, or the deprecated `sendDefaultPii` option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs based on `dataCollection.genAI` in your Sentry client options\n * (or the deprecated `sendDefaultPii` option, for backwards compatibility)\n * - Integration-level `recordInputs`/`recordOutputs` options take precedence over global config\n *\n * @example\n * ```javascript\n * // Always record inputs and outputs regardless of global dataCollection config\n * Sentry.init({\n * integrations: [\n * Sentry.anthropicAIIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of global dataCollection config\n * Sentry.init({\n * dataCollection: { genAI: { inputs: true, outputs: true } },\n * integrations: [\n * Sentry.anthropicAIIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n */\nexport const anthropicAIIntegration = defineIntegration(_anthropicAIIntegration);\n"],"names":["generateInstrumentOnce","ANTHROPIC_AI_INTEGRATION_NAME","SentryAnthropicAiInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,qBAAA,GAAwBA,+BAAA;AAAA,EACnCC,kCAAA;AAAA,EACA,CAAA,OAAA,KAAW,IAAIC,gDAAA,CAAiC,OAAO;AACzD;AAEA,MAAM,uBAAA,IAA2B,CAAC,OAAA,GAA8B,EAAC,KAAM;AACrE,EAAA,OAAO;AAAA,IACL,IAAA,EAAMD,kCAAA;AAAA,IACN,OAAA;AAAA,IACA,SAAA,GAAY;AACV,MAAA,qBAAA,CAAsB,OAAO,CAAA;AAAA,IAC/B;AAAA,GACF;AACF,CAAA,CAAA;AAwDO,MAAM,sBAAA,GAAyBE,uBAAkB,uBAAuB;;;;;"}