@sentry/node 10.61.0 → 10.63.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 (385) hide show
  1. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  2. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  3. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  4. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  5. package/build/cjs/integrations/fs/index.js.map +1 -1
  6. package/build/cjs/integrations/http.js.map +1 -1
  7. package/build/cjs/integrations/node-fetch/index.js +7 -49
  8. package/build/cjs/integrations/node-fetch/index.js.map +1 -1
  9. package/build/cjs/integrations/node-fetch/undici-instrumentation.js +266 -0
  10. package/build/cjs/integrations/node-fetch/undici-instrumentation.js.map +1 -0
  11. package/build/cjs/integrations/tracing/amqplib/index.js +2 -10
  12. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -1
  13. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
  14. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  15. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
  16. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  17. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +21 -1
  18. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  19. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +0 -6
  20. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -1
  21. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +71 -80
  22. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  23. package/build/cjs/integrations/tracing/connect/index.js.map +1 -1
  24. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -1
  25. package/build/cjs/integrations/tracing/express.js.map +1 -1
  26. package/build/cjs/integrations/tracing/fastify/index.js +7 -103
  27. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  28. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +2 -3
  29. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  30. package/build/cjs/integrations/tracing/firebase/firebase.js +1 -24
  31. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  32. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
  33. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  34. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +33 -72
  35. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  36. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +46 -105
  37. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  38. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -1
  39. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -1
  40. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  41. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  42. package/build/cjs/integrations/tracing/index.js +0 -1
  43. package/build/cjs/integrations/tracing/index.js.map +1 -1
  44. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -1
  45. package/build/cjs/integrations/tracing/knex/index.js.map +1 -1
  46. package/build/cjs/integrations/tracing/koa/index.js.map +1 -1
  47. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -1
  48. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +4 -2
  49. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  50. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -1
  51. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -1
  52. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -1
  53. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +34 -128
  54. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  55. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +0 -2
  56. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  57. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +2 -27
  58. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  59. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -1
  60. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -1
  61. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  62. package/build/cjs/integrations/tracing/prisma/index.js +1 -10
  63. package/build/cjs/integrations/tracing/prisma/index.js.map +1 -1
  64. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
  65. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  66. package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  67. package/build/cjs/integrations/tracing/prisma/vendored/global.js +2 -2
  68. package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -1
  69. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
  70. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  71. package/build/cjs/integrations/tracing/redis/index.js +5 -3
  72. package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
  73. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -1
  74. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
  75. package/build/cjs/integrations/tracing/vercelai/index.js +4 -3
  76. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  77. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -1
  78. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +8 -6
  79. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  80. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  81. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  82. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  83. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  84. package/build/esm/integrations/fs/index.js.map +1 -1
  85. package/build/esm/integrations/http.js.map +1 -1
  86. package/build/esm/integrations/node-fetch/index.js +9 -50
  87. package/build/esm/integrations/node-fetch/index.js.map +1 -1
  88. package/build/esm/integrations/node-fetch/undici-instrumentation.js +264 -0
  89. package/build/esm/integrations/node-fetch/undici-instrumentation.js.map +1 -0
  90. package/build/esm/integrations/tracing/amqplib/index.js +3 -11
  91. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -1
  92. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
  93. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  94. package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
  95. package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  96. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +12 -2
  97. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  98. package/build/esm/integrations/tracing/amqplib/vendored/types.js +1 -6
  99. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -1
  100. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +68 -78
  101. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  102. package/build/esm/integrations/tracing/connect/index.js.map +1 -1
  103. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -1
  104. package/build/esm/integrations/tracing/express.js.map +1 -1
  105. package/build/esm/integrations/tracing/fastify/index.js +8 -103
  106. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  107. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +3 -4
  108. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  109. package/build/esm/integrations/tracing/firebase/firebase.js +3 -26
  110. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  111. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +3 -11
  112. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  113. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +34 -73
  114. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  115. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +47 -106
  116. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  117. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -1
  118. package/build/esm/integrations/tracing/graphql/index.js.map +1 -1
  119. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  120. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  121. package/build/esm/integrations/tracing/index.js +1 -2
  122. package/build/esm/integrations/tracing/index.js.map +1 -1
  123. package/build/esm/integrations/tracing/kafka/index.js.map +1 -1
  124. package/build/esm/integrations/tracing/knex/index.js.map +1 -1
  125. package/build/esm/integrations/tracing/koa/index.js.map +1 -1
  126. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -1
  127. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +5 -3
  128. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  129. package/build/esm/integrations/tracing/mongo/index.js.map +1 -1
  130. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -1
  131. package/build/esm/integrations/tracing/mysql/index.js.map +1 -1
  132. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +37 -131
  133. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  134. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +1 -2
  135. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  136. package/build/esm/integrations/tracing/mysql/vendored/utils.js +3 -25
  137. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  138. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -1
  139. package/build/esm/integrations/tracing/postgres/index.js.map +1 -1
  140. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  141. package/build/esm/integrations/tracing/prisma/index.js +2 -11
  142. package/build/esm/integrations/tracing/prisma/index.js.map +1 -1
  143. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
  144. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  145. package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  146. package/build/esm/integrations/tracing/prisma/vendored/global.js +2 -2
  147. package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -1
  148. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
  149. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  150. package/build/esm/integrations/tracing/redis/index.js +7 -5
  151. package/build/esm/integrations/tracing/redis/index.js.map +1 -1
  152. package/build/esm/integrations/tracing/tedious/index.js.map +1 -1
  153. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
  154. package/build/esm/integrations/tracing/vercelai/index.js +5 -4
  155. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  156. package/build/esm/package.json +1 -1
  157. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -1
  158. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +9 -7
  159. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  160. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  161. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
  162. package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
  163. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  164. package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
  165. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
  166. package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
  167. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
  168. package/build/types/integrations/fs/index.d.ts +3 -1
  169. package/build/types/integrations/fs/index.d.ts.map +1 -1
  170. package/build/types/integrations/http.d.ts +3 -1
  171. package/build/types/integrations/http.d.ts.map +1 -1
  172. package/build/types/integrations/node-fetch/index.d.ts +4 -35
  173. package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
  174. package/build/types/integrations/node-fetch/types.d.ts +96 -0
  175. package/build/types/integrations/node-fetch/types.d.ts.map +1 -0
  176. package/build/types/integrations/node-fetch/undici-instrumentation.d.ts +14 -0
  177. package/build/types/integrations/node-fetch/undici-instrumentation.d.ts.map +1 -0
  178. package/build/types/integrations/tracing/amqplib/index.d.ts +4 -2
  179. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -1
  180. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  181. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
  182. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  183. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
  184. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
  185. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -1
  186. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
  187. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -1
  188. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
  189. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -1
  190. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +3 -1
  191. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
  192. package/build/types/integrations/tracing/connect/index.d.ts +3 -1
  193. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -1
  194. package/build/types/integrations/tracing/dataloader/index.d.ts +3 -1
  195. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -1
  196. package/build/types/integrations/tracing/express.d.ts +3 -1
  197. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  198. package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
  199. package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
  200. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
  201. package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
  202. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  203. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  204. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
  205. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  206. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
  207. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  208. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
  209. package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
  210. package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
  211. package/build/types/integrations/tracing/genericPool/index.d.ts +3 -1
  212. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -1
  213. package/build/types/integrations/tracing/google-genai/index.d.ts +3 -1
  214. package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
  215. package/build/types/integrations/tracing/graphql/index.d.ts +3 -1
  216. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -1
  217. package/build/types/integrations/tracing/hapi/index.d.ts +3 -1
  218. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  219. package/build/types/integrations/tracing/hono/index.d.ts +3 -1
  220. package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
  221. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  222. package/build/types/integrations/tracing/kafka/index.d.ts +3 -1
  223. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -1
  224. package/build/types/integrations/tracing/knex/index.d.ts +3 -1
  225. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -1
  226. package/build/types/integrations/tracing/koa/index.d.ts +3 -1
  227. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -1
  228. package/build/types/integrations/tracing/langchain/index.d.ts +3 -1
  229. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  230. package/build/types/integrations/tracing/langgraph/index.d.ts +3 -1
  231. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  232. package/build/types/integrations/tracing/lrumemoizer/index.d.ts +3 -1
  233. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -1
  234. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -1
  235. package/build/types/integrations/tracing/mongo/index.d.ts +3 -1
  236. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -1
  237. package/build/types/integrations/tracing/mongoose/index.d.ts +3 -1
  238. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -1
  239. package/build/types/integrations/tracing/mysql/index.d.ts +3 -1
  240. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -1
  241. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
  242. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -1
  243. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
  244. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -1
  245. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +0 -8
  246. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -1
  247. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
  248. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -1
  249. package/build/types/integrations/tracing/mysql2/index.d.ts +3 -1
  250. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -1
  251. package/build/types/integrations/tracing/openai/index.d.ts +3 -1
  252. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  253. package/build/types/integrations/tracing/postgres/index.d.ts +3 -1
  254. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -1
  255. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  256. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  257. package/build/types/integrations/tracing/prisma/index.d.ts +5 -21
  258. package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -1
  259. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
  260. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -1
  261. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -1
  262. package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -1
  263. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
  264. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -1
  265. package/build/types/integrations/tracing/prisma/vendored/types.d.ts +5 -23
  266. package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -1
  267. package/build/types/integrations/tracing/redis/index.d.ts +4 -2
  268. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
  269. package/build/types/integrations/tracing/tedious/index.d.ts +3 -1
  270. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -1
  271. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  272. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  273. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
  274. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  275. package/build/types/sdk/diagnosticsChannelInjection.d.ts +1 -1
  276. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -1
  277. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -1
  278. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  279. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  280. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  281. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  282. package/build/types-ts3.8/integrations/fs/index.d.ts +3 -1
  283. package/build/types-ts3.8/integrations/http.d.ts +3 -1
  284. package/build/types-ts3.8/integrations/node-fetch/index.d.ts +4 -35
  285. package/build/types-ts3.8/integrations/node-fetch/types.d.ts +96 -0
  286. package/build/types-ts3.8/integrations/node-fetch/undici-instrumentation.d.ts +14 -0
  287. package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +4 -2
  288. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  289. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  290. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +25 -37
  291. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +0 -81
  292. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +16 -9
  293. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +3 -1
  294. package/build/types-ts3.8/integrations/tracing/connect/index.d.ts +3 -1
  295. package/build/types-ts3.8/integrations/tracing/dataloader/index.d.ts +3 -1
  296. package/build/types-ts3.8/integrations/tracing/express.d.ts +3 -1
  297. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  298. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  299. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  300. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  301. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  302. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
  303. package/build/types-ts3.8/integrations/tracing/genericPool/index.d.ts +3 -1
  304. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +3 -1
  305. package/build/types-ts3.8/integrations/tracing/graphql/index.d.ts +3 -1
  306. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +3 -1
  307. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +3 -1
  308. package/build/types-ts3.8/integrations/tracing/kafka/index.d.ts +3 -1
  309. package/build/types-ts3.8/integrations/tracing/knex/index.d.ts +3 -1
  310. package/build/types-ts3.8/integrations/tracing/koa/index.d.ts +3 -1
  311. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +3 -1
  312. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +3 -1
  313. package/build/types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts +3 -1
  314. package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +3 -1
  315. package/build/types-ts3.8/integrations/tracing/mongoose/index.d.ts +3 -1
  316. package/build/types-ts3.8/integrations/tracing/mysql/index.d.ts +3 -1
  317. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
  318. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
  319. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +0 -8
  320. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
  321. package/build/types-ts3.8/integrations/tracing/mysql2/index.d.ts +3 -1
  322. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +3 -1
  323. package/build/types-ts3.8/integrations/tracing/postgres/index.d.ts +3 -1
  324. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  325. package/build/types-ts3.8/integrations/tracing/prisma/index.d.ts +5 -21
  326. package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
  327. package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
  328. package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +5 -23
  329. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +4 -2
  330. package/build/types-ts3.8/integrations/tracing/tedious/index.d.ts +3 -1
  331. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  332. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
  333. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +1 -1
  334. package/package.json +6 -5
  335. package/build/cjs/integrations/node-fetch/vendored/semconv.js +0 -28
  336. package/build/cjs/integrations/node-fetch/vendored/semconv.js.map +0 -1
  337. package/build/cjs/integrations/node-fetch/vendored/undici.js +0 -302
  338. package/build/cjs/integrations/node-fetch/vendored/undici.js.map +0 -1
  339. package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +0 -452
  340. package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
  341. package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -24
  342. package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
  343. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js +0 -387
  344. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
  345. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js +0 -9
  346. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
  347. package/build/esm/integrations/node-fetch/vendored/semconv.js +0 -15
  348. package/build/esm/integrations/node-fetch/vendored/semconv.js.map +0 -1
  349. package/build/esm/integrations/node-fetch/vendored/undici.js +0 -300
  350. package/build/esm/integrations/node-fetch/vendored/undici.js.map +0 -1
  351. package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +0 -450
  352. package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +0 -1
  353. package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +0 -13
  354. package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +0 -1
  355. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js +0 -385
  356. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
  357. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js +0 -7
  358. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
  359. package/build/types/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
  360. package/build/types/integrations/node-fetch/vendored/internal-types.d.ts.map +0 -1
  361. package/build/types/integrations/node-fetch/vendored/semconv.d.ts +0 -13
  362. package/build/types/integrations/node-fetch/vendored/semconv.d.ts.map +0 -1
  363. package/build/types/integrations/node-fetch/vendored/types.d.ts +0 -60
  364. package/build/types/integrations/node-fetch/vendored/types.d.ts.map +0 -1
  365. package/build/types/integrations/node-fetch/vendored/undici.d.ts +0 -21
  366. package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +0 -1
  367. package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
  368. package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +0 -1
  369. package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +0 -63
  370. package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +0 -1
  371. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
  372. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +0 -1
  373. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
  374. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +0 -1
  375. package/build/types/integrations/tracing/mysql/vendored/types.d.ts +0 -9
  376. package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +0 -1
  377. package/build/types-ts3.8/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
  378. package/build/types-ts3.8/integrations/node-fetch/vendored/semconv.d.ts +0 -13
  379. package/build/types-ts3.8/integrations/node-fetch/vendored/types.d.ts +0 -60
  380. package/build/types-ts3.8/integrations/node-fetch/vendored/undici.d.ts +0 -21
  381. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +0 -26
  382. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +0 -63
  383. package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
  384. package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
  385. package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +0 -9
@@ -1,452 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const api = require('@opentelemetry/api');
4
- const core = require('@sentry/core');
5
- const instrumentation = require('@opentelemetry/instrumentation');
6
- const InstrumentationNodeModuleFile = require('../../InstrumentationNodeModuleFile.js');
7
- const semconv = require('./semconv.js');
8
- const semconvObsolete = require('./semconv-obsolete.js');
9
- const types = require('./types.js');
10
- const utils = require('./utils.js');
11
-
12
- const PACKAGE_NAME = "@sentry/instrumentation-amqplib";
13
- const supportedVersions = [">=0.5.5 <2"];
14
- class AmqplibInstrumentation extends instrumentation.InstrumentationBase {
15
- constructor(config = {}) {
16
- super(PACKAGE_NAME, core.SDK_VERSION, { ...types.DEFAULT_CONFIG, ...config });
17
- this._setSemconvStabilityFromEnv();
18
- }
19
- // Used for testing.
20
- _setSemconvStabilityFromEnv() {
21
- this._netSemconvStability = instrumentation.semconvStabilityFromStr("http", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
22
- }
23
- setConfig(config = {}) {
24
- super.setConfig({ ...types.DEFAULT_CONFIG, ...config });
25
- }
26
- init() {
27
- const channelModelModuleFile = new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
28
- "amqplib/lib/channel_model.js",
29
- supportedVersions,
30
- this.patchChannelModel.bind(this),
31
- this.unpatchChannelModel.bind(this)
32
- );
33
- const callbackModelModuleFile = new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
34
- "amqplib/lib/callback_model.js",
35
- supportedVersions,
36
- this.patchChannelModel.bind(this),
37
- this.unpatchChannelModel.bind(this)
38
- );
39
- const connectModuleFile = new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
40
- "amqplib/lib/connect.js",
41
- supportedVersions,
42
- this.patchConnect.bind(this),
43
- this.unpatchConnect.bind(this)
44
- );
45
- const module = new instrumentation.InstrumentationNodeModuleDefinition("amqplib", supportedVersions, void 0, void 0, [
46
- channelModelModuleFile,
47
- connectModuleFile,
48
- callbackModelModuleFile
49
- ]);
50
- return module;
51
- }
52
- patchConnect(moduleExports) {
53
- moduleExports = this.unpatchConnect(moduleExports);
54
- if (!instrumentation.isWrapped(moduleExports.connect)) {
55
- this._wrap(moduleExports, "connect", this.getConnectPatch.bind(this));
56
- }
57
- return moduleExports;
58
- }
59
- unpatchConnect(moduleExports) {
60
- if (instrumentation.isWrapped(moduleExports.connect)) {
61
- this._unwrap(moduleExports, "connect");
62
- }
63
- return moduleExports;
64
- }
65
- patchChannelModel(moduleExports, moduleVersion) {
66
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.publish)) {
67
- this._wrap(moduleExports.Channel.prototype, "publish", this.getPublishPatch.bind(this, moduleVersion));
68
- }
69
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.consume)) {
70
- this._wrap(moduleExports.Channel.prototype, "consume", this.getConsumePatch.bind(this, moduleVersion));
71
- }
72
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.ack)) {
73
- this._wrap(moduleExports.Channel.prototype, "ack", this.getAckPatch.bind(this, false, types.EndOperation.Ack));
74
- }
75
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.nack)) {
76
- this._wrap(moduleExports.Channel.prototype, "nack", this.getAckPatch.bind(this, true, types.EndOperation.Nack));
77
- }
78
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.reject)) {
79
- this._wrap(moduleExports.Channel.prototype, "reject", this.getAckPatch.bind(this, true, types.EndOperation.Reject));
80
- }
81
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.ackAll)) {
82
- this._wrap(moduleExports.Channel.prototype, "ackAll", this.getAckAllPatch.bind(this, false, types.EndOperation.AckAll));
83
- }
84
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.nackAll)) {
85
- this._wrap(
86
- moduleExports.Channel.prototype,
87
- "nackAll",
88
- this.getAckAllPatch.bind(this, true, types.EndOperation.NackAll)
89
- );
90
- }
91
- if (!instrumentation.isWrapped(moduleExports.Channel.prototype.emit)) {
92
- this._wrap(moduleExports.Channel.prototype, "emit", this.getChannelEmitPatch.bind(this));
93
- }
94
- if (!instrumentation.isWrapped(moduleExports.ConfirmChannel.prototype.publish)) {
95
- this._wrap(
96
- moduleExports.ConfirmChannel.prototype,
97
- "publish",
98
- this.getConfirmedPublishPatch.bind(this, moduleVersion)
99
- );
100
- }
101
- return moduleExports;
102
- }
103
- unpatchChannelModel(moduleExports) {
104
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.publish)) {
105
- this._unwrap(moduleExports.Channel.prototype, "publish");
106
- }
107
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.consume)) {
108
- this._unwrap(moduleExports.Channel.prototype, "consume");
109
- }
110
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.ack)) {
111
- this._unwrap(moduleExports.Channel.prototype, "ack");
112
- }
113
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.nack)) {
114
- this._unwrap(moduleExports.Channel.prototype, "nack");
115
- }
116
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.reject)) {
117
- this._unwrap(moduleExports.Channel.prototype, "reject");
118
- }
119
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.ackAll)) {
120
- this._unwrap(moduleExports.Channel.prototype, "ackAll");
121
- }
122
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.nackAll)) {
123
- this._unwrap(moduleExports.Channel.prototype, "nackAll");
124
- }
125
- if (instrumentation.isWrapped(moduleExports.Channel.prototype.emit)) {
126
- this._unwrap(moduleExports.Channel.prototype, "emit");
127
- }
128
- if (instrumentation.isWrapped(moduleExports.ConfirmChannel.prototype.publish)) {
129
- this._unwrap(moduleExports.ConfirmChannel.prototype, "publish");
130
- }
131
- return moduleExports;
132
- }
133
- getConnectPatch(original) {
134
- const self = this;
135
- return function patchedConnect(url, socketOptions, openCallback) {
136
- return original.call(
137
- this,
138
- url,
139
- socketOptions,
140
- function(err, conn) {
141
- if (err == null) {
142
- const urlAttributes = utils.getConnectionAttributesFromUrl(url, self._netSemconvStability);
143
- const serverAttributes = utils.getConnectionAttributesFromServer(conn);
144
- conn[utils.CONNECTION_ATTRIBUTES] = {
145
- ...urlAttributes,
146
- ...serverAttributes
147
- };
148
- }
149
- openCallback.apply(this, arguments);
150
- }
151
- );
152
- };
153
- }
154
- getChannelEmitPatch(original) {
155
- const self = this;
156
- return function emit(eventName) {
157
- if (eventName === "close") {
158
- self.endAllSpansOnChannel(this, true, types.EndOperation.ChannelClosed, void 0);
159
- const activeTimer = this[utils.CHANNEL_CONSUME_TIMEOUT_TIMER];
160
- if (activeTimer) {
161
- clearInterval(activeTimer);
162
- }
163
- this[utils.CHANNEL_CONSUME_TIMEOUT_TIMER] = void 0;
164
- } else if (eventName === "error") {
165
- self.endAllSpansOnChannel(this, true, types.EndOperation.ChannelError, void 0);
166
- }
167
- return original.apply(this, arguments);
168
- };
169
- }
170
- getAckAllPatch(isRejected, endOperation, original) {
171
- const self = this;
172
- return function ackAll(requeueOrEmpty) {
173
- self.endAllSpansOnChannel(this, isRejected, endOperation, requeueOrEmpty);
174
- return original.apply(this, arguments);
175
- };
176
- }
177
- getAckPatch(isRejected, endOperation, original) {
178
- const self = this;
179
- return function ack(message, allUpToOrRequeue, requeue) {
180
- const channel = this;
181
- const requeueResolved = endOperation === types.EndOperation.Reject ? allUpToOrRequeue : requeue;
182
- const spansNotEnded = channel[utils.CHANNEL_SPANS_NOT_ENDED] ?? [];
183
- const msgIndex = spansNotEnded.findIndex((msgDetails) => msgDetails.msg === message);
184
- if (msgIndex < 0) {
185
- self.endConsumerSpan(message, isRejected, endOperation, requeueResolved);
186
- } else if (endOperation !== types.EndOperation.Reject && allUpToOrRequeue) {
187
- for (let i = 0; i <= msgIndex; i++) {
188
- self.endConsumerSpan(spansNotEnded[i].msg, isRejected, endOperation, requeueResolved);
189
- }
190
- spansNotEnded.splice(0, msgIndex + 1);
191
- } else {
192
- self.endConsumerSpan(message, isRejected, endOperation, requeueResolved);
193
- spansNotEnded.splice(msgIndex, 1);
194
- }
195
- return original.apply(this, arguments);
196
- };
197
- }
198
- getConsumePatch(moduleVersion, original) {
199
- const self = this;
200
- return function consume(queue, onMessage, options) {
201
- const channel = this;
202
- if (!Object.prototype.hasOwnProperty.call(channel, utils.CHANNEL_SPANS_NOT_ENDED)) {
203
- const { consumeTimeoutMs } = self.getConfig();
204
- if (consumeTimeoutMs) {
205
- const timer = setInterval(() => {
206
- self.checkConsumeTimeoutOnChannel(channel);
207
- }, consumeTimeoutMs);
208
- timer.unref();
209
- channel[utils.CHANNEL_CONSUME_TIMEOUT_TIMER] = timer;
210
- }
211
- channel[utils.CHANNEL_SPANS_NOT_ENDED] = [];
212
- }
213
- const patchedOnMessage = function(msg) {
214
- if (!msg) {
215
- return onMessage.call(this, msg);
216
- }
217
- const headers = msg.properties.headers ?? {};
218
- let parentContext = api.propagation.extract(api.ROOT_CONTEXT, headers);
219
- const exchange = msg.fields?.exchange;
220
- let links;
221
- if (self._config.useLinksForConsume) {
222
- const parentSpanContext = parentContext ? api.trace.getSpan(parentContext)?.spanContext() : void 0;
223
- parentContext = void 0;
224
- if (parentSpanContext) {
225
- links = [
226
- {
227
- context: parentSpanContext
228
- }
229
- ];
230
- }
231
- }
232
- const span = self.tracer.startSpan(
233
- `${queue} process`,
234
- {
235
- kind: api.SpanKind.CONSUMER,
236
- attributes: {
237
- ...channel?.connection?.[utils.CONNECTION_ATTRIBUTES],
238
- [semconvObsolete.ATTR_MESSAGING_DESTINATION]: exchange,
239
- [semconvObsolete.ATTR_MESSAGING_DESTINATION_KIND]: semconvObsolete.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,
240
- [semconvObsolete.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]: msg.fields?.routingKey,
241
- [semconv.ATTR_MESSAGING_OPERATION]: semconvObsolete.MESSAGING_OPERATION_VALUE_PROCESS,
242
- [semconvObsolete.OLD_ATTR_MESSAGING_MESSAGE_ID]: msg?.properties.messageId,
243
- [semconvObsolete.ATTR_MESSAGING_CONVERSATION_ID]: msg?.properties.correlationId
244
- },
245
- links
246
- },
247
- parentContext
248
- );
249
- const { consumeHook } = self.getConfig();
250
- if (consumeHook) {
251
- instrumentation.safeExecuteInTheMiddle(
252
- () => consumeHook(span, { moduleVersion, msg }),
253
- (e) => {
254
- if (e) {
255
- api.diag.error("amqplib instrumentation: consumerHook error", e);
256
- }
257
- },
258
- true
259
- );
260
- }
261
- if (!options?.noAck) {
262
- channel[utils.CHANNEL_SPANS_NOT_ENDED].push({
263
- msg,
264
- timeOfConsume: core.timestampInSeconds()
265
- });
266
- msg[utils.MESSAGE_STORED_SPAN] = span;
267
- }
268
- const setContext = parentContext ? parentContext : api.ROOT_CONTEXT;
269
- api.context.with(api.trace.setSpan(setContext, span), () => {
270
- onMessage.call(this, msg);
271
- });
272
- if (options?.noAck) {
273
- self.callConsumeEndHook(span, msg, false, types.EndOperation.AutoAck);
274
- span.end();
275
- }
276
- };
277
- arguments[1] = patchedOnMessage;
278
- return original.apply(this, arguments);
279
- };
280
- }
281
- getConfirmedPublishPatch(moduleVersion, original) {
282
- const self = this;
283
- return function confirmedPublish(exchange, routingKey, content, options, callback) {
284
- const channel = this;
285
- const { span, modifiedOptions } = self.createPublishSpan(self, exchange, routingKey, channel, options);
286
- const { publishHook } = self.getConfig();
287
- if (publishHook) {
288
- instrumentation.safeExecuteInTheMiddle(
289
- () => publishHook(span, {
290
- moduleVersion,
291
- exchange,
292
- routingKey,
293
- content,
294
- options: modifiedOptions,
295
- isConfirmChannel: true
296
- }),
297
- (e) => {
298
- if (e) {
299
- api.diag.error("amqplib instrumentation: publishHook error", e);
300
- }
301
- },
302
- true
303
- );
304
- }
305
- const patchedOnConfirm = function(err, ok) {
306
- try {
307
- callback?.call(this, err, ok);
308
- } finally {
309
- const { publishConfirmHook } = self.getConfig();
310
- if (publishConfirmHook) {
311
- instrumentation.safeExecuteInTheMiddle(
312
- () => publishConfirmHook(span, {
313
- moduleVersion,
314
- exchange,
315
- routingKey,
316
- content,
317
- options,
318
- isConfirmChannel: true,
319
- confirmError: err
320
- }),
321
- (e) => {
322
- if (e) {
323
- api.diag.error("amqplib instrumentation: publishConfirmHook error", e);
324
- }
325
- },
326
- true
327
- );
328
- }
329
- if (err) {
330
- span.setStatus({
331
- code: api.SpanStatusCode.ERROR,
332
- message: "message confirmation has been nack'ed"
333
- });
334
- }
335
- span.end();
336
- }
337
- };
338
- const markedContext = utils.markConfirmChannelTracing(api.context.active());
339
- const argumentsCopy = [...arguments];
340
- argumentsCopy[3] = modifiedOptions;
341
- argumentsCopy[4] = api.context.bind(
342
- utils.unmarkConfirmChannelTracing(api.trace.setSpan(markedContext, span)),
343
- patchedOnConfirm
344
- );
345
- return api.context.with(markedContext, original.bind(this, ...argumentsCopy));
346
- };
347
- }
348
- getPublishPatch(moduleVersion, original) {
349
- const self = this;
350
- return function publish(exchange, routingKey, content, options) {
351
- if (utils.isConfirmChannelTracing(api.context.active())) {
352
- return original.apply(this, arguments);
353
- } else {
354
- const channel = this;
355
- const { span, modifiedOptions } = self.createPublishSpan(self, exchange, routingKey, channel, options);
356
- const { publishHook } = self.getConfig();
357
- if (publishHook) {
358
- instrumentation.safeExecuteInTheMiddle(
359
- () => publishHook(span, {
360
- moduleVersion,
361
- exchange,
362
- routingKey,
363
- content,
364
- options: modifiedOptions,
365
- isConfirmChannel: false
366
- }),
367
- (e) => {
368
- if (e) {
369
- api.diag.error("amqplib instrumentation: publishHook error", e);
370
- }
371
- },
372
- true
373
- );
374
- }
375
- const argumentsCopy = [...arguments];
376
- argumentsCopy[3] = modifiedOptions;
377
- const originalRes = original.apply(this, argumentsCopy);
378
- span.end();
379
- return originalRes;
380
- }
381
- };
382
- }
383
- createPublishSpan(self, exchange, routingKey, channel, options) {
384
- const normalizedExchange = utils.normalizeExchange(exchange);
385
- const span = self.tracer.startSpan(`publish ${normalizedExchange}`, {
386
- kind: api.SpanKind.PRODUCER,
387
- attributes: {
388
- ...channel.connection[utils.CONNECTION_ATTRIBUTES],
389
- [semconvObsolete.ATTR_MESSAGING_DESTINATION]: exchange,
390
- [semconvObsolete.ATTR_MESSAGING_DESTINATION_KIND]: semconvObsolete.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,
391
- [semconvObsolete.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]: routingKey,
392
- [semconvObsolete.OLD_ATTR_MESSAGING_MESSAGE_ID]: options?.messageId,
393
- [semconvObsolete.ATTR_MESSAGING_CONVERSATION_ID]: options?.correlationId
394
- }
395
- });
396
- const modifiedOptions = options ?? {};
397
- modifiedOptions.headers = modifiedOptions.headers ?? {};
398
- api.propagation.inject(api.trace.setSpan(api.context.active(), span), modifiedOptions.headers);
399
- return { span, modifiedOptions };
400
- }
401
- endConsumerSpan(message, isRejected, operation, requeue) {
402
- const storedSpan = message[utils.MESSAGE_STORED_SPAN];
403
- if (!storedSpan) return;
404
- if (isRejected !== false) {
405
- storedSpan.setStatus({
406
- code: api.SpanStatusCode.ERROR,
407
- message: operation !== types.EndOperation.ChannelClosed && operation !== types.EndOperation.ChannelError ? `${operation} called on message${requeue === true ? " with requeue" : requeue === false ? " without requeue" : ""}` : operation
408
- });
409
- }
410
- this.callConsumeEndHook(storedSpan, message, isRejected, operation);
411
- storedSpan.end();
412
- message[utils.MESSAGE_STORED_SPAN] = void 0;
413
- }
414
- endAllSpansOnChannel(channel, isRejected, operation, requeue) {
415
- const spansNotEnded = channel[utils.CHANNEL_SPANS_NOT_ENDED] ?? [];
416
- spansNotEnded.forEach((msgDetails) => {
417
- this.endConsumerSpan(msgDetails.msg, isRejected, operation, requeue);
418
- });
419
- channel[utils.CHANNEL_SPANS_NOT_ENDED] = [];
420
- }
421
- callConsumeEndHook(span, msg, rejected, endOperation) {
422
- const { consumeEndHook } = this.getConfig();
423
- if (!consumeEndHook) return;
424
- instrumentation.safeExecuteInTheMiddle(
425
- () => consumeEndHook(span, { msg, rejected, endOperation }),
426
- (e) => {
427
- if (e) {
428
- api.diag.error("amqplib instrumentation: consumerEndHook error", e);
429
- }
430
- },
431
- true
432
- );
433
- }
434
- checkConsumeTimeoutOnChannel(channel) {
435
- const currentTime = core.timestampInSeconds();
436
- const spansNotEnded = channel[utils.CHANNEL_SPANS_NOT_ENDED] ?? [];
437
- let i;
438
- const { consumeTimeoutMs } = this.getConfig();
439
- for (i = 0; i < spansNotEnded.length; i++) {
440
- const currMessage = spansNotEnded[i];
441
- const timeFromConsumeMs = (currentTime - currMessage.timeOfConsume) * 1e3;
442
- if (timeFromConsumeMs < consumeTimeoutMs) {
443
- break;
444
- }
445
- this.endConsumerSpan(currMessage.msg, null, types.EndOperation.InstrumentationTimeout, true);
446
- }
447
- spansNotEnded.splice(0, i);
448
- }
449
- }
450
-
451
- exports.AmqplibInstrumentation = AmqplibInstrumentation;
452
- //# sourceMappingURL=amqplib.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"amqplib.js","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/amqplib.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 */\n/* eslint-disable */\n\nimport {\n context,\n diag,\n propagation,\n trace,\n Span,\n SpanKind,\n SpanStatusCode,\n ROOT_CONTEXT,\n Link,\n Context,\n} from '@opentelemetry/api';\nimport { timestampInSeconds } from '@sentry/core';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n isWrapped,\n safeExecuteInTheMiddle,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile';\nimport { ATTR_MESSAGING_OPERATION } from './semconv';\nimport {\n ATTR_MESSAGING_DESTINATION,\n ATTR_MESSAGING_DESTINATION_KIND,\n ATTR_MESSAGING_RABBITMQ_ROUTING_KEY,\n MESSAGING_DESTINATION_KIND_VALUE_TOPIC,\n MESSAGING_OPERATION_VALUE_PROCESS,\n OLD_ATTR_MESSAGING_MESSAGE_ID,\n ATTR_MESSAGING_CONVERSATION_ID,\n} from './semconv-obsolete';\nimport type { Connection, Options, Replies } from './amqplib-types';\nimport { AmqplibInstrumentationConfig, DEFAULT_CONFIG, EndOperation, type ConsumeMessage, type Message } from './types';\nimport {\n CHANNEL_CONSUME_TIMEOUT_TIMER,\n CHANNEL_SPANS_NOT_ENDED,\n CONNECTION_ATTRIBUTES,\n getConnectionAttributesFromServer,\n getConnectionAttributesFromUrl,\n InstrumentationConnection,\n InstrumentationConsumeChannel,\n InstrumentationConsumeMessage,\n InstrumentationMessage,\n InstrumentationPublishChannel,\n isConfirmChannelTracing,\n markConfirmChannelTracing,\n MESSAGE_STORED_SPAN,\n normalizeExchange,\n unmarkConfirmChannelTracing,\n} from './utils';\n\nimport { SDK_VERSION } from '@sentry/core';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-amqplib';\nconst supportedVersions = ['>=0.5.5 <2'];\n\nexport class AmqplibInstrumentation extends InstrumentationBase<AmqplibInstrumentationConfig> {\n private _netSemconvStability!: SemconvStability;\n\n constructor(config: AmqplibInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, { ...DEFAULT_CONFIG, ...config });\n this._setSemconvStabilityFromEnv();\n }\n\n // Used for testing.\n private _setSemconvStabilityFromEnv() {\n this._netSemconvStability = semconvStabilityFromStr('http', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n }\n\n override setConfig(config: AmqplibInstrumentationConfig = {}) {\n super.setConfig({ ...DEFAULT_CONFIG, ...config });\n }\n\n protected init() {\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) {\n moduleExports = this.unpatchConnect(moduleExports);\n if (!isWrapped(moduleExports.connect)) {\n this._wrap(moduleExports, 'connect', this.getConnectPatch.bind(this));\n }\n return moduleExports;\n }\n\n private unpatchConnect(moduleExports: any) {\n if (isWrapped(moduleExports.connect)) {\n this._unwrap(moduleExports, 'connect');\n }\n return moduleExports;\n }\n\n private patchChannelModel(moduleExports: any, moduleVersion: string | undefined) {\n if (!isWrapped(moduleExports.Channel.prototype.publish)) {\n this._wrap(moduleExports.Channel.prototype, 'publish', this.getPublishPatch.bind(this, moduleVersion));\n }\n if (!isWrapped(moduleExports.Channel.prototype.consume)) {\n this._wrap(moduleExports.Channel.prototype, 'consume', this.getConsumePatch.bind(this, moduleVersion));\n }\n if (!isWrapped(moduleExports.Channel.prototype.ack)) {\n this._wrap(moduleExports.Channel.prototype, 'ack', this.getAckPatch.bind(this, false, EndOperation.Ack));\n }\n if (!isWrapped(moduleExports.Channel.prototype.nack)) {\n this._wrap(moduleExports.Channel.prototype, 'nack', this.getAckPatch.bind(this, true, EndOperation.Nack));\n }\n if (!isWrapped(moduleExports.Channel.prototype.reject)) {\n this._wrap(moduleExports.Channel.prototype, 'reject', this.getAckPatch.bind(this, true, EndOperation.Reject));\n }\n if (!isWrapped(moduleExports.Channel.prototype.ackAll)) {\n this._wrap(moduleExports.Channel.prototype, 'ackAll', this.getAckAllPatch.bind(this, false, EndOperation.AckAll));\n }\n if (!isWrapped(moduleExports.Channel.prototype.nackAll)) {\n this._wrap(\n moduleExports.Channel.prototype,\n 'nackAll',\n this.getAckAllPatch.bind(this, true, EndOperation.NackAll),\n );\n }\n if (!isWrapped(moduleExports.Channel.prototype.emit)) {\n this._wrap(moduleExports.Channel.prototype, 'emit', this.getChannelEmitPatch.bind(this));\n }\n if (!isWrapped(moduleExports.ConfirmChannel.prototype.publish)) {\n this._wrap(\n moduleExports.ConfirmChannel.prototype,\n 'publish',\n this.getConfirmedPublishPatch.bind(this, moduleVersion),\n );\n }\n return moduleExports;\n }\n\n private unpatchChannelModel(moduleExports: 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 private getConnectPatch(\n original: (\n url: string | Options.Connect,\n socketOptions: any,\n openCallback: (err: any, connection: Connection) => void,\n ) => Connection,\n ) {\n const self = this;\n return function patchedConnect(\n this: unknown,\n url: string | Options.Connect,\n socketOptions: any,\n openCallback: Function,\n ) {\n return original.call(\n this,\n url,\n socketOptions,\n function (this: unknown, err: any, conn: InstrumentationConnection) {\n if (err == null) {\n const urlAttributes = getConnectionAttributesFromUrl(url, self._netSemconvStability);\n const serverAttributes = getConnectionAttributesFromServer(conn);\n conn[CONNECTION_ATTRIBUTES] = {\n ...urlAttributes,\n ...serverAttributes,\n };\n }\n openCallback.apply(this, arguments);\n },\n );\n };\n }\n\n private getChannelEmitPatch(original: Function) {\n const self = this;\n return function emit(this: InstrumentationConsumeChannel, eventName: string) {\n if (eventName === 'close') {\n self.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 self.endAllSpansOnChannel(this, true, EndOperation.ChannelError, undefined);\n }\n return original.apply(this, arguments);\n };\n }\n\n private getAckAllPatch(isRejected: boolean, endOperation: EndOperation, original: Function) {\n const self = this;\n return function ackAll(this: InstrumentationConsumeChannel, requeueOrEmpty?: boolean): void {\n self.endAllSpansOnChannel(this, isRejected, endOperation, requeueOrEmpty);\n return original.apply(this, arguments);\n };\n }\n\n private getAckPatch(isRejected: boolean, endOperation: EndOperation, original: Function) {\n const self = this;\n return 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 reject function as well, but it has 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 happy flow\n // but possible if user is calling the api function ack twice with same message\n self.endConsumerSpan(message, isRejected, endOperation, requeueResolved);\n } else if (endOperation !== EndOperation.Reject && allUpToOrRequeue) {\n for (let i = 0; i <= msgIndex; i++) {\n self.endConsumerSpan(spansNotEnded[i]!.msg, isRejected, endOperation, requeueResolved);\n }\n spansNotEnded.splice(0, msgIndex + 1);\n } else {\n self.endConsumerSpan(message, isRejected, endOperation, requeueResolved);\n spansNotEnded.splice(msgIndex, 1);\n }\n return original.apply(this, arguments);\n };\n }\n\n private getConsumePatch(moduleVersion: string | undefined, original: Function) {\n const self = this;\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 { consumeTimeoutMs } = self.getConfig();\n if (consumeTimeoutMs) {\n const timer = setInterval(() => {\n self.checkConsumeTimeoutOnChannel(channel);\n }, consumeTimeoutMs);\n timer.unref();\n channel[CHANNEL_CONSUME_TIMEOUT_TIMER] = timer;\n }\n channel[CHANNEL_SPANS_NOT_ENDED] = [];\n }\n\n const patchedOnMessage = function (this: unknown, msg: InstrumentationConsumeMessage | null) {\n // msg is expected to be null for signaling 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 let parentContext: Context | undefined = propagation.extract(ROOT_CONTEXT, headers);\n const exchange = msg.fields?.exchange;\n let links: Link[] | undefined;\n if (self._config.useLinksForConsume) {\n const parentSpanContext = parentContext ? trace.getSpan(parentContext)?.spanContext() : undefined;\n parentContext = undefined;\n if (parentSpanContext) {\n links = [\n {\n context: parentSpanContext,\n },\n ];\n }\n }\n const span = self.tracer.startSpan(\n `${queue} process`,\n {\n kind: SpanKind.CONSUMER,\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]: 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 },\n links,\n },\n parentContext,\n );\n\n const { consumeHook } = self.getConfig();\n if (consumeHook) {\n safeExecuteInTheMiddle(\n () => consumeHook(span, { moduleVersion, msg }),\n e => {\n if (e) {\n diag.error('amqplib instrumentation: consumerHook error', e);\n }\n },\n true,\n );\n }\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({\n msg,\n timeOfConsume: timestampInSeconds(),\n });\n\n // store the span on the message, so we can end it when user call 'ack' on it\n msg[MESSAGE_STORED_SPAN] = span;\n }\n const setContext: Context = parentContext ? parentContext : ROOT_CONTEXT;\n context.with(trace.setSpan(setContext, span), () => {\n onMessage.call(this, msg);\n });\n\n if (options?.noAck) {\n self.callConsumeEndHook(span, msg, false, EndOperation.AutoAck);\n span.end();\n }\n };\n arguments[1] = patchedOnMessage;\n return original.apply(this, arguments);\n };\n }\n\n private getConfirmedPublishPatch(moduleVersion: string | undefined, original: Function) {\n const self = this;\n return function confirmedPublish(\n this: InstrumentationConsumeChannel,\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 } = self.createPublishSpan(self, exchange, routingKey, channel, options);\n\n const { publishHook } = self.getConfig();\n if (publishHook) {\n safeExecuteInTheMiddle(\n () =>\n publishHook(span, {\n moduleVersion,\n exchange,\n routingKey,\n content,\n options: modifiedOptions,\n isConfirmChannel: true,\n }),\n e => {\n if (e) {\n diag.error('amqplib instrumentation: publishHook error', e);\n }\n },\n true,\n );\n }\n\n const patchedOnConfirm = function (this: unknown, err: any, ok: Replies.Empty) {\n try {\n callback?.call(this, err, ok);\n } finally {\n const { publishConfirmHook } = self.getConfig();\n if (publishConfirmHook) {\n safeExecuteInTheMiddle(\n () =>\n publishConfirmHook(span, {\n moduleVersion,\n exchange,\n routingKey,\n content,\n options,\n isConfirmChannel: true,\n confirmError: err,\n }),\n e => {\n if (e) {\n diag.error('amqplib instrumentation: publishConfirmHook error', e);\n }\n },\n true,\n );\n }\n\n if (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"message confirmation has been nack'ed\",\n });\n }\n span.end();\n }\n };\n\n // calling confirm channel publish function is storing the message in queue and registering the callback for broker confirm.\n // span ends in the patched callback.\n const markedContext = markConfirmChannelTracing(context.active());\n const argumentsCopy = [...arguments];\n argumentsCopy[3] = modifiedOptions;\n argumentsCopy[4] = context.bind(\n unmarkConfirmChannelTracing(trace.setSpan(markedContext, span)),\n patchedOnConfirm,\n );\n return context.with(markedContext, original.bind(this, ...argumentsCopy));\n };\n }\n\n private getPublishPatch(moduleVersion: string | undefined, original: Function) {\n const self = this;\n return function publish(\n this: InstrumentationPublishChannel,\n exchange: string,\n routingKey: string,\n content: Buffer,\n options?: Options.Publish,\n ): boolean {\n if (isConfirmChannelTracing(context.active())) {\n // work already done\n return original.apply(this, arguments);\n } else {\n const channel = this;\n const { span, modifiedOptions } = self.createPublishSpan(self, exchange, routingKey, channel, options);\n\n const { publishHook } = self.getConfig();\n if (publishHook) {\n safeExecuteInTheMiddle(\n () =>\n publishHook(span, {\n moduleVersion,\n exchange,\n routingKey,\n content,\n options: modifiedOptions,\n isConfirmChannel: false,\n }),\n e => {\n if (e) {\n diag.error('amqplib instrumentation: publishHook error', e);\n }\n },\n true,\n );\n }\n\n // calling normal channel publish function is only storing the message in queue.\n // it does not send it and waits 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 as any);\n span.end();\n return originalRes;\n }\n };\n }\n\n private createPublishSpan(\n self: this,\n exchange: string,\n routingKey: string,\n channel: InstrumentationPublishChannel,\n options?: Options.Publish,\n ) {\n const normalizedExchange = normalizeExchange(exchange);\n\n const span = self.tracer.startSpan(`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\n [ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]: routingKey,\n [OLD_ATTR_MESSAGING_MESSAGE_ID]: options?.messageId,\n [ATTR_MESSAGING_CONVERSATION_ID]: options?.correlationId,\n },\n });\n const modifiedOptions = options ?? {};\n modifiedOptions.headers = modifiedOptions.headers ?? {};\n\n propagation.inject(trace.setSpan(context.active(), span), modifiedOptions.headers);\n\n return { span, modifiedOptions };\n }\n\n private endConsumerSpan(\n message: InstrumentationMessage,\n isRejected: boolean | null,\n operation: EndOperation,\n requeue: boolean | undefined,\n ) {\n const storedSpan: Span | undefined = message[MESSAGE_STORED_SPAN];\n if (!storedSpan) return;\n if (isRejected !== false) {\n storedSpan.setStatus({\n code: SpanStatusCode.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 this.callConsumeEndHook(storedSpan, message, isRejected, operation);\n storedSpan.end();\n message[MESSAGE_STORED_SPAN] = undefined;\n }\n\n private endAllSpansOnChannel(\n channel: InstrumentationConsumeChannel,\n isRejected: boolean,\n operation: EndOperation,\n requeue: boolean | undefined,\n ) {\n const spansNotEnded: { msg: Message }[] = channel[CHANNEL_SPANS_NOT_ENDED] ?? [];\n spansNotEnded.forEach(msgDetails => {\n this.endConsumerSpan(msgDetails.msg, isRejected, operation, requeue);\n });\n channel[CHANNEL_SPANS_NOT_ENDED] = [];\n }\n\n private callConsumeEndHook(\n span: Span,\n msg: InstrumentationMessage,\n rejected: boolean | null,\n endOperation: EndOperation,\n ) {\n const { consumeEndHook } = this.getConfig();\n if (!consumeEndHook) return;\n\n safeExecuteInTheMiddle(\n () => consumeEndHook(span, { msg, rejected, endOperation }),\n e => {\n if (e) {\n diag.error('amqplib instrumentation: consumerEndHook error', e);\n }\n },\n true,\n );\n }\n\n private checkConsumeTimeoutOnChannel(channel: InstrumentationConsumeChannel) {\n const currentTime = timestampInSeconds();\n const spansNotEnded = channel[CHANNEL_SPANS_NOT_ENDED] ?? [];\n let i: number;\n const { consumeTimeoutMs } = this.getConfig();\n for (i = 0; i < spansNotEnded.length; i++) {\n const currMessage = spansNotEnded[i]!;\n const timeFromConsumeMs = (currentTime - currMessage.timeOfConsume) * 1000;\n if (timeFromConsumeMs < consumeTimeoutMs!) {\n break;\n }\n this.endConsumerSpan(currMessage.msg, null, EndOperation.InstrumentationTimeout, true);\n }\n spansNotEnded.splice(0, i);\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","DEFAULT_CONFIG","semconvStabilityFromStr","InstrumentationNodeModuleFile","InstrumentationNodeModuleDefinition","isWrapped","EndOperation","getConnectionAttributesFromUrl","getConnectionAttributesFromServer","CONNECTION_ATTRIBUTES","CHANNEL_CONSUME_TIMEOUT_TIMER","CHANNEL_SPANS_NOT_ENDED","propagation","ROOT_CONTEXT","trace","SpanKind","ATTR_MESSAGING_DESTINATION","ATTR_MESSAGING_DESTINATION_KIND","MESSAGING_DESTINATION_KIND_VALUE_TOPIC","ATTR_MESSAGING_RABBITMQ_ROUTING_KEY","ATTR_MESSAGING_OPERATION","MESSAGING_OPERATION_VALUE_PROCESS","OLD_ATTR_MESSAGING_MESSAGE_ID","ATTR_MESSAGING_CONVERSATION_ID","safeExecuteInTheMiddle","diag","timestampInSeconds","MESSAGE_STORED_SPAN","context","SpanStatusCode","markConfirmChannelTracing","unmarkConfirmChannelTracing","isConfirmChannelTracing","normalizeExchange"],"mappings":";;;;;;;;;;;AAgEA,MAAM,YAAA,GAAe,iCAAA;AACrB,MAAM,iBAAA,GAAoB,CAAC,YAAY,CAAA;AAEhC,MAAM,+BAA+BA,mCAAA,CAAkD;AAAA,EAG5F,WAAA,CAAY,MAAA,GAAuC,EAAC,EAAG;AACrD,IAAA,KAAA,CAAM,cAAcC,gBAAA,EAAa,EAAE,GAAGC,oBAAA,EAAgB,GAAG,QAAQ,CAAA;AACjE,IAAA,IAAA,CAAK,2BAAA,EAA4B;AAAA,EACnC;AAAA;AAAA,EAGQ,2BAAA,GAA8B;AACpC,IAAA,IAAA,CAAK,oBAAA,GAAuBC,uCAAA,CAAwB,MAAA,EAAQ,OAAA,CAAQ,IAAI,6BAA6B,CAAA;AAAA,EACvG;AAAA,EAES,SAAA,CAAU,MAAA,GAAuC,EAAC,EAAG;AAC5D,IAAA,KAAA,CAAM,UAAU,EAAE,GAAGD,oBAAA,EAAgB,GAAG,QAAQ,CAAA;AAAA,EAClD;AAAA,EAEU,IAAA,GAAO;AACf,IAAA,MAAM,yBAAyB,IAAIE,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,I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EAAiB,GAAI,IAAA,CAAK,SAAA,EAAU;AAC5C,IAAA,KAAK,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,aAAA,CAAc,QAAQ,CAAA,EAAA,EAAK;AACzC,MAAA,MAAM,WAAA,GAAc,cAAc,CAAC,CAAA;AACnC,MAAA,MAAM,iBAAA,GAAA,CAAqB,WAAA,GAAc,WAAA,CAAY,aAAA,IAAiB,GAAA;AACtE,MAAA,IAAI,oBAAoB,gBAAA,EAAmB;AACzC,QAAA;AAAA,MACF;AACA,MAAA,IAAA,CAAK,gBAAgB,WAAA,CAAY,GAAA,EAAK,IAAA,EAAML,kBAAA,CAAa,wBAAwB,IAAI,CAAA;AAAA,IACvF;AACA,IAAA,aAAA,CAAc,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,EAC3B;AACF;;;;"}
@@ -1,24 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const ATTR_MESSAGING_DESTINATION = "messaging.destination";
4
- const ATTR_MESSAGING_DESTINATION_KIND = "messaging.destination_kind";
5
- const ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = "messaging.rabbitmq.routing_key";
6
- const MESSAGING_OPERATION_VALUE_PROCESS = "process";
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 MESSAGING_DESTINATION_KIND_VALUE_TOPIC = "topic";
11
- const OLD_ATTR_MESSAGING_MESSAGE_ID = "messaging.message_id";
12
- const ATTR_MESSAGING_CONVERSATION_ID = "messaging.conversation_id";
13
-
14
- exports.ATTR_MESSAGING_CONVERSATION_ID = ATTR_MESSAGING_CONVERSATION_ID;
15
- exports.ATTR_MESSAGING_DESTINATION = ATTR_MESSAGING_DESTINATION;
16
- exports.ATTR_MESSAGING_DESTINATION_KIND = ATTR_MESSAGING_DESTINATION_KIND;
17
- exports.ATTR_MESSAGING_PROTOCOL = ATTR_MESSAGING_PROTOCOL;
18
- exports.ATTR_MESSAGING_PROTOCOL_VERSION = ATTR_MESSAGING_PROTOCOL_VERSION;
19
- exports.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = ATTR_MESSAGING_RABBITMQ_ROUTING_KEY;
20
- exports.ATTR_MESSAGING_URL = ATTR_MESSAGING_URL;
21
- exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = MESSAGING_DESTINATION_KIND_VALUE_TOPIC;
22
- exports.MESSAGING_OPERATION_VALUE_PROCESS = MESSAGING_OPERATION_VALUE_PROCESS;
23
- exports.OLD_ATTR_MESSAGING_MESSAGE_ID = OLD_ATTR_MESSAGING_MESSAGE_ID;
24
- //# sourceMappingURL=semconv-obsolete.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semconv-obsolete.js","sources":["../../../../../../src/integrations/tracing/amqplib/vendored/semconv-obsolete.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 */\n/* eslint-disable */\n\n/*\n * This file contains constants for values that where replaced/removed from\n * Semantic Conventions long enough ago that they do not have `ATTR_*`\n * constants in the `@opentelemetry/semantic-conventions` package. Eventually\n * it is expected that this instrumention will be updated to emit telemetry\n * using modern Semantic Conventions, dropping the need for the constants in\n * this file.\n */\n\n/**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n *\n * @deprecated Use ATTR_MESSAGING_DESTINATION_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const ATTR_MESSAGING_DESTINATION = 'messaging.destination' as const;\n\n/**\n * The kind of message destination.\n *\n * @deprecated Removed in semconv v1.20.0.\n */\nexport const ATTR_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind' as const;\n\n/**\n * RabbitMQ message routing key.\n *\n * @deprecated Use ATTR_MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key' as const;\n\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is &#34;send&#34;, this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_TYPE_VALUE_PROCESS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const MESSAGING_OPERATION_VALUE_PROCESS = 'process' as const;\n\n/**\n * The name of the transport protocol.\n *\n * @deprecated Use ATTR_NETWORK_PROTOCOL_NAME.\n */\nexport const ATTR_MESSAGING_PROTOCOL = 'messaging.protocol' as const;\n\n/**\n * The version of the transport protocol.\n *\n * @deprecated Use ATTR_NETWORK_PROTOCOL_VERSION.\n */\nexport const ATTR_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version' as const;\n\n/**\n * Connection string.\n *\n * @deprecated Removed in semconv v1.17.0.\n */\nexport const ATTR_MESSAGING_URL = 'messaging.url' as const;\n\n/**\n * The kind of message destination.\n *\n * @deprecated Removed in semconv v1.20.0.\n */\nexport const MESSAGING_DESTINATION_KIND_VALUE_TOPIC = 'topic' as const;\n\n/**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n *\n * @deprecated Use ATTR_MESSAGING_MESSAGE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n *\n * Note: changing to `ATTR_MESSAGING_MESSAGE_ID` means a change in value from `messaging.message_id` to `messaging.message.id`.\n */\nexport const OLD_ATTR_MESSAGING_MESSAGE_ID = 'messaging.message_id' as const;\n\n/**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called &#34;Correlation ID&#34;.\n *\n * @deprecated Use ATTR_MESSAGING_MESSAGE_CONVERSATION_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const ATTR_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id' as const;\n"],"names":[],"mappings":";;AAwBO,MAAM,0BAAA,GAA6B;AAOnC,MAAM,+BAAA,GAAkC;AAOxC,MAAM,mCAAA,GAAsC;AAO5C,MAAM,iCAAA,GAAoC;AAO1C,MAAM,uBAAA,GAA0B;AAOhC,MAAM,+BAAA,GAAkC;AAOxC,MAAM,kBAAA,GAAqB;AAO3B,MAAM,sCAAA,GAAyC;AAS/C,MAAM,6BAAA,GAAgC;AAOtC,MAAM,8BAAA,GAAiC;;;;;;;;;;;;;"}