@sentry/node 10.62.0 → 10.64.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 (497) hide show
  1. package/build/cjs/index.js +15 -14
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  4. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  5. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  6. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  7. package/build/cjs/integrations/fs/index.js.map +1 -1
  8. package/build/cjs/integrations/http.js.map +1 -1
  9. package/build/cjs/integrations/node-fetch.js +24 -0
  10. package/build/cjs/integrations/node-fetch.js.map +1 -0
  11. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -1
  12. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +0 -6
  13. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  14. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +11 -10
  15. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  16. package/build/cjs/integrations/tracing/connect/index.js.map +1 -1
  17. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +2 -2
  18. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -1
  19. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -1
  20. package/build/cjs/integrations/tracing/express.js.map +1 -1
  21. package/build/cjs/integrations/tracing/fastify/index.js +7 -103
  22. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  23. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +4 -5
  24. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  25. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  26. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +9 -9
  27. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  28. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -1
  29. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -1
  30. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  31. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +8 -9
  32. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -1
  33. package/build/cjs/integrations/tracing/hono/index.js +7 -7
  34. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  35. package/build/cjs/integrations/tracing/index.js +0 -1
  36. package/build/cjs/integrations/tracing/index.js.map +1 -1
  37. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -1
  38. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +2 -1
  39. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -1
  40. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +0 -12
  41. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -1
  42. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +12 -11
  43. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -1
  44. package/build/cjs/integrations/tracing/knex/index.js.map +1 -1
  45. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +11 -10
  46. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
  47. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +0 -16
  48. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -1
  49. package/build/cjs/integrations/tracing/koa/index.js.map +1 -1
  50. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +2 -2
  51. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -1
  52. package/build/cjs/integrations/tracing/koa/vendored/utils.js +2 -2
  53. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -1
  54. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -1
  55. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +4 -2
  56. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  57. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -1
  58. package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +0 -12
  59. package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +1 -1
  60. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +12 -11
  61. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -1
  62. package/build/cjs/integrations/tracing/mongoose/index.js +3 -2
  63. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -1
  64. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +11 -8
  65. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
  66. package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +0 -12
  67. package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +1 -1
  68. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +9 -9
  69. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
  70. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -1
  71. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +36 -129
  72. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  73. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +0 -14
  74. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  75. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +2 -27
  76. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  77. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -1
  78. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +7 -4
  79. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
  80. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +0 -12
  81. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -1
  82. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +7 -4
  83. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -1
  84. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -1
  85. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +0 -12
  86. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -1
  87. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +12 -11
  88. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -1
  89. package/build/cjs/integrations/tracing/postgresjs.js +8 -7
  90. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  91. package/build/cjs/integrations/tracing/prisma/index.js +48 -62
  92. package/build/cjs/integrations/tracing/prisma/index.js.map +1 -1
  93. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
  94. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  95. package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  96. package/build/cjs/integrations/tracing/prisma/vendored/global.js +2 -2
  97. package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -1
  98. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
  99. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  100. package/build/cjs/integrations/tracing/redis/cache.js +41 -0
  101. package/build/cjs/integrations/tracing/redis/cache.js.map +1 -0
  102. package/build/cjs/integrations/tracing/redis/index.js +16 -38
  103. package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
  104. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +22 -13
  105. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  106. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +21 -15
  107. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  108. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +0 -8
  109. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -1
  110. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -1
  111. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +9 -8
  112. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
  113. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +0 -12
  114. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -1
  115. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
  116. package/build/cjs/integrations/tracing/vercelai/index.js +2 -4
  117. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  118. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -1
  119. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +18 -6
  120. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  121. package/build/cjs/sdk/index.js +2 -2
  122. package/build/cjs/sdk/index.js.map +1 -1
  123. package/build/cjs/sdk/initOtel.js +36 -0
  124. package/build/cjs/sdk/initOtel.js.map +1 -1
  125. package/build/esm/index.js +2 -2
  126. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  127. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  128. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  129. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  130. package/build/esm/integrations/fs/index.js.map +1 -1
  131. package/build/esm/integrations/http.js.map +1 -1
  132. package/build/esm/integrations/node-fetch.js +22 -0
  133. package/build/esm/integrations/node-fetch.js.map +1 -0
  134. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -1
  135. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +1 -4
  136. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  137. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +7 -6
  138. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  139. package/build/esm/integrations/tracing/connect/index.js.map +1 -1
  140. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +2 -2
  141. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -1
  142. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -1
  143. package/build/esm/integrations/tracing/express.js.map +1 -1
  144. package/build/esm/integrations/tracing/fastify/index.js +8 -103
  145. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  146. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +5 -6
  147. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  148. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  149. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +7 -7
  150. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  151. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -1
  152. package/build/esm/integrations/tracing/graphql/index.js.map +1 -1
  153. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  154. package/build/esm/integrations/tracing/hapi/vendored/utils.js +3 -4
  155. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -1
  156. package/build/esm/integrations/tracing/hono/index.js +3 -3
  157. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  158. package/build/esm/integrations/tracing/index.js +1 -2
  159. package/build/esm/integrations/tracing/index.js.map +1 -1
  160. package/build/esm/integrations/tracing/kafka/index.js.map +1 -1
  161. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +3 -2
  162. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -1
  163. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +1 -7
  164. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -1
  165. package/build/esm/integrations/tracing/kafka/vendored/utils.js +11 -10
  166. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -1
  167. package/build/esm/integrations/tracing/knex/index.js.map +1 -1
  168. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +10 -9
  169. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
  170. package/build/esm/integrations/tracing/knex/vendored/semconv.js +1 -9
  171. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -1
  172. package/build/esm/integrations/tracing/koa/index.js.map +1 -1
  173. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +2 -2
  174. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -1
  175. package/build/esm/integrations/tracing/koa/vendored/utils.js +2 -2
  176. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -1
  177. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -1
  178. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +5 -3
  179. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  180. package/build/esm/integrations/tracing/mongo/index.js.map +1 -1
  181. package/build/esm/integrations/tracing/mongo/vendored/semconv.js +1 -7
  182. package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +1 -1
  183. package/build/esm/integrations/tracing/mongo/vendored/utils.js +9 -8
  184. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -1
  185. package/build/esm/integrations/tracing/mongoose/index.js +4 -3
  186. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -1
  187. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +9 -6
  188. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
  189. package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +1 -7
  190. package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +1 -1
  191. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +10 -10
  192. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
  193. package/build/esm/integrations/tracing/mysql/index.js.map +1 -1
  194. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +38 -131
  195. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  196. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +1 -8
  197. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  198. package/build/esm/integrations/tracing/mysql/vendored/utils.js +3 -25
  199. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  200. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -1
  201. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +6 -3
  202. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
  203. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +1 -7
  204. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -1
  205. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +8 -5
  206. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -1
  207. package/build/esm/integrations/tracing/postgres/index.js.map +1 -1
  208. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +1 -7
  209. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -1
  210. package/build/esm/integrations/tracing/postgres/vendored/utils.js +13 -12
  211. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -1
  212. package/build/esm/integrations/tracing/postgresjs.js +7 -6
  213. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  214. package/build/esm/integrations/tracing/prisma/index.js +49 -63
  215. package/build/esm/integrations/tracing/prisma/index.js.map +1 -1
  216. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
  217. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  218. package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  219. package/build/esm/integrations/tracing/prisma/vendored/global.js +2 -2
  220. package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -1
  221. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
  222. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  223. package/build/esm/integrations/tracing/redis/cache.js +38 -0
  224. package/build/esm/integrations/tracing/redis/cache.js.map +1 -0
  225. package/build/esm/integrations/tracing/redis/index.js +12 -37
  226. package/build/esm/integrations/tracing/redis/index.js.map +1 -1
  227. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +19 -10
  228. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  229. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +16 -10
  230. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  231. package/build/esm/integrations/tracing/redis/vendored/semconv.js +1 -5
  232. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -1
  233. package/build/esm/integrations/tracing/tedious/index.js.map +1 -1
  234. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +8 -7
  235. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
  236. package/build/esm/integrations/tracing/tedious/vendored/semconv.js +1 -7
  237. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -1
  238. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
  239. package/build/esm/integrations/tracing/vercelai/index.js +3 -5
  240. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  241. package/build/esm/package.json +1 -1
  242. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -1
  243. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +19 -8
  244. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  245. package/build/esm/sdk/index.js +1 -1
  246. package/build/esm/sdk/initOtel.js +38 -2
  247. package/build/esm/sdk/initOtel.js.map +1 -1
  248. package/build/types/index.d.ts +1 -1
  249. package/build/types/index.d.ts.map +1 -1
  250. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  251. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
  252. package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
  253. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  254. package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
  255. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
  256. package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
  257. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
  258. package/build/types/integrations/fs/index.d.ts +3 -1
  259. package/build/types/integrations/fs/index.d.ts.map +1 -1
  260. package/build/types/integrations/http.d.ts +3 -1
  261. package/build/types/integrations/http.d.ts.map +1 -1
  262. package/build/types/integrations/node-fetch.d.ts +9 -0
  263. package/build/types/integrations/node-fetch.d.ts.map +1 -0
  264. package/build/types/integrations/tracing/amqplib/index.d.ts +3 -1
  265. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -1
  266. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +0 -6
  267. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -1
  268. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -1
  269. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +3 -1
  270. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
  271. package/build/types/integrations/tracing/connect/index.d.ts +3 -1
  272. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -1
  273. package/build/types/integrations/tracing/dataloader/index.d.ts +3 -1
  274. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -1
  275. package/build/types/integrations/tracing/express.d.ts +3 -1
  276. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  277. package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
  278. package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
  279. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
  280. package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
  281. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  282. package/build/types/integrations/tracing/genericPool/index.d.ts +3 -1
  283. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -1
  284. package/build/types/integrations/tracing/google-genai/index.d.ts +3 -1
  285. package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
  286. package/build/types/integrations/tracing/graphql/index.d.ts +3 -1
  287. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -1
  288. package/build/types/integrations/tracing/hapi/index.d.ts +3 -1
  289. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  290. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -1
  291. package/build/types/integrations/tracing/hono/index.d.ts +3 -1
  292. package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
  293. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  294. package/build/types/integrations/tracing/kafka/index.d.ts +3 -1
  295. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -1
  296. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +5 -63
  297. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -1
  298. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -1
  299. package/build/types/integrations/tracing/knex/index.d.ts +3 -1
  300. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -1
  301. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +0 -32
  302. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -1
  303. package/build/types/integrations/tracing/koa/index.d.ts +3 -1
  304. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -1
  305. package/build/types/integrations/tracing/langchain/index.d.ts +3 -1
  306. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  307. package/build/types/integrations/tracing/langgraph/index.d.ts +3 -1
  308. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  309. package/build/types/integrations/tracing/lrumemoizer/index.d.ts +3 -1
  310. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -1
  311. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -1
  312. package/build/types/integrations/tracing/mongo/index.d.ts +3 -1
  313. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -1
  314. package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +1 -37
  315. package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +1 -1
  316. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -1
  317. package/build/types/integrations/tracing/mongoose/index.d.ts +3 -1
  318. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -1
  319. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -1
  320. package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -48
  321. package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +1 -1
  322. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -1
  323. package/build/types/integrations/tracing/mysql/index.d.ts +3 -1
  324. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -1
  325. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
  326. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -1
  327. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
  328. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -1
  329. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +1 -70
  330. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -1
  331. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
  332. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -1
  333. package/build/types/integrations/tracing/mysql2/index.d.ts +3 -1
  334. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -1
  335. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -1
  336. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +0 -6
  337. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -1
  338. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -1
  339. package/build/types/integrations/tracing/openai/index.d.ts +3 -1
  340. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  341. package/build/types/integrations/tracing/postgres/index.d.ts +3 -1
  342. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -1
  343. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +1 -50
  344. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -1
  345. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -1
  346. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  347. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  348. package/build/types/integrations/tracing/prisma/index.d.ts +5 -21
  349. package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -1
  350. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
  351. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -1
  352. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -1
  353. package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -1
  354. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
  355. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -1
  356. package/build/types/integrations/tracing/prisma/vendored/types.d.ts +5 -23
  357. package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -1
  358. package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
  359. package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
  360. package/build/types/integrations/tracing/redis/index.d.ts +6 -22
  361. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
  362. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -1
  363. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -1
  364. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +0 -4
  365. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -1
  366. package/build/types/integrations/tracing/tedious/index.d.ts +3 -1
  367. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -1
  368. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -1
  369. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +1 -62
  370. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -1
  371. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  372. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  373. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -1
  374. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  375. package/build/types/sdk/diagnosticsChannelInjection.d.ts +1 -1
  376. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -1
  377. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +2 -0
  378. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -1
  379. package/build/types/sdk/initOtel.d.ts +2 -3
  380. package/build/types/sdk/initOtel.d.ts.map +1 -1
  381. package/build/types-ts3.8/index.d.ts +1 -1
  382. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  383. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  384. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  385. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  386. package/build/types-ts3.8/integrations/fs/index.d.ts +3 -1
  387. package/build/types-ts3.8/integrations/http.d.ts +3 -1
  388. package/build/types-ts3.8/integrations/node-fetch.d.ts +9 -0
  389. package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +3 -1
  390. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +0 -6
  391. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +3 -1
  392. package/build/types-ts3.8/integrations/tracing/connect/index.d.ts +3 -1
  393. package/build/types-ts3.8/integrations/tracing/dataloader/index.d.ts +3 -1
  394. package/build/types-ts3.8/integrations/tracing/express.d.ts +3 -1
  395. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  396. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  397. package/build/types-ts3.8/integrations/tracing/genericPool/index.d.ts +3 -1
  398. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +3 -1
  399. package/build/types-ts3.8/integrations/tracing/graphql/index.d.ts +3 -1
  400. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +3 -1
  401. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +3 -1
  402. package/build/types-ts3.8/integrations/tracing/kafka/index.d.ts +3 -1
  403. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +5 -63
  404. package/build/types-ts3.8/integrations/tracing/knex/index.d.ts +3 -1
  405. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +0 -32
  406. package/build/types-ts3.8/integrations/tracing/koa/index.d.ts +3 -1
  407. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +3 -1
  408. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +3 -1
  409. package/build/types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts +3 -1
  410. package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +3 -1
  411. package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +1 -37
  412. package/build/types-ts3.8/integrations/tracing/mongoose/index.d.ts +3 -1
  413. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -48
  414. package/build/types-ts3.8/integrations/tracing/mysql/index.d.ts +3 -1
  415. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
  416. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
  417. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +1 -70
  418. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
  419. package/build/types-ts3.8/integrations/tracing/mysql2/index.d.ts +3 -1
  420. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +0 -6
  421. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +3 -1
  422. package/build/types-ts3.8/integrations/tracing/postgres/index.d.ts +3 -1
  423. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +1 -50
  424. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  425. package/build/types-ts3.8/integrations/tracing/prisma/index.d.ts +5 -21
  426. package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
  427. package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
  428. package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +5 -23
  429. package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
  430. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +6 -22
  431. package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +0 -4
  432. package/build/types-ts3.8/integrations/tracing/tedious/index.d.ts +3 -1
  433. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +1 -62
  434. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  435. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -1
  436. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +1 -1
  437. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +2 -0
  438. package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
  439. package/package.json +8 -8
  440. package/build/cjs/integrations/node-fetch/index.js +0 -80
  441. package/build/cjs/integrations/node-fetch/index.js.map +0 -1
  442. package/build/cjs/integrations/node-fetch/vendored/semconv.js +0 -28
  443. package/build/cjs/integrations/node-fetch/vendored/semconv.js.map +0 -1
  444. package/build/cjs/integrations/node-fetch/vendored/undici.js +0 -302
  445. package/build/cjs/integrations/node-fetch/vendored/undici.js.map +0 -1
  446. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js +0 -387
  447. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
  448. package/build/cjs/integrations/tracing/hapi/vendored/semconv.js +0 -6
  449. package/build/cjs/integrations/tracing/hapi/vendored/semconv.js.map +0 -1
  450. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js +0 -9
  451. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
  452. package/build/cjs/integrations/tracing/redis/vendored/redis-common.js +0 -34
  453. package/build/cjs/integrations/tracing/redis/vendored/redis-common.js.map +0 -1
  454. package/build/esm/integrations/node-fetch/index.js +0 -77
  455. package/build/esm/integrations/node-fetch/index.js.map +0 -1
  456. package/build/esm/integrations/node-fetch/vendored/semconv.js +0 -15
  457. package/build/esm/integrations/node-fetch/vendored/semconv.js.map +0 -1
  458. package/build/esm/integrations/node-fetch/vendored/undici.js +0 -300
  459. package/build/esm/integrations/node-fetch/vendored/undici.js.map +0 -1
  460. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js +0 -385
  461. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
  462. package/build/esm/integrations/tracing/hapi/vendored/semconv.js +0 -4
  463. package/build/esm/integrations/tracing/hapi/vendored/semconv.js.map +0 -1
  464. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js +0 -7
  465. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
  466. package/build/esm/integrations/tracing/redis/vendored/redis-common.js +0 -32
  467. package/build/esm/integrations/tracing/redis/vendored/redis-common.js.map +0 -1
  468. package/build/types/integrations/node-fetch/index.d.ts +0 -36
  469. package/build/types/integrations/node-fetch/index.d.ts.map +0 -1
  470. package/build/types/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
  471. package/build/types/integrations/node-fetch/vendored/internal-types.d.ts.map +0 -1
  472. package/build/types/integrations/node-fetch/vendored/semconv.d.ts +0 -13
  473. package/build/types/integrations/node-fetch/vendored/semconv.d.ts.map +0 -1
  474. package/build/types/integrations/node-fetch/vendored/types.d.ts +0 -60
  475. package/build/types/integrations/node-fetch/vendored/types.d.ts.map +0 -1
  476. package/build/types/integrations/node-fetch/vendored/undici.d.ts +0 -21
  477. package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +0 -1
  478. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
  479. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +0 -1
  480. package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts +0 -13
  481. package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts.map +0 -1
  482. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
  483. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +0 -1
  484. package/build/types/integrations/tracing/mysql/vendored/types.d.ts +0 -9
  485. package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +0 -1
  486. package/build/types/integrations/tracing/redis/vendored/redis-common.d.ts +0 -6
  487. package/build/types/integrations/tracing/redis/vendored/redis-common.d.ts.map +0 -1
  488. package/build/types-ts3.8/integrations/node-fetch/index.d.ts +0 -36
  489. package/build/types-ts3.8/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
  490. package/build/types-ts3.8/integrations/node-fetch/vendored/semconv.d.ts +0 -13
  491. package/build/types-ts3.8/integrations/node-fetch/vendored/types.d.ts +0 -60
  492. package/build/types-ts3.8/integrations/node-fetch/vendored/undici.d.ts +0 -21
  493. package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
  494. package/build/types-ts3.8/integrations/tracing/hapi/vendored/semconv.d.ts +0 -13
  495. package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
  496. package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +0 -9
  497. package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-common.d.ts +0 -6
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const http = require('./integrations/http.js');
4
- const index$n = require('./integrations/node-fetch/index.js');
4
+ const nodeFetch = require('./integrations/node-fetch.js');
5
5
  const index$5 = require('./integrations/fs/index.js');
6
6
  const express = require('./integrations/tracing/express.js');
7
7
  const index$4 = require('./integrations/tracing/fastify/index.js');
@@ -12,21 +12,21 @@ const index$j = require('./integrations/tracing/mongo/index.js');
12
12
  const index$k = require('./integrations/tracing/mongoose/index.js');
13
13
  const index$m = require('./integrations/tracing/mysql/index.js');
14
14
  const index$l = require('./integrations/tracing/mysql2/index.js');
15
- const index$r = require('./integrations/tracing/redis/index.js');
16
- const index$p = require('./integrations/tracing/postgres/index.js');
15
+ const index$q = require('./integrations/tracing/redis/index.js');
16
+ const index$o = require('./integrations/tracing/postgres/index.js');
17
17
  const postgresjs = require('./integrations/tracing/postgresjs.js');
18
- const index$q = require('./integrations/tracing/prisma/index.js');
18
+ const index$p = require('./integrations/tracing/prisma/index.js');
19
19
  const index$b = require('./integrations/tracing/hapi/index.js');
20
20
  const index$c = require('./integrations/tracing/hono/index.js');
21
21
  const index$f = require('./integrations/tracing/koa/index.js');
22
22
  const index$2 = require('./integrations/tracing/connect/index.js');
23
23
  const index$e = require('./integrations/tracing/knex/index.js');
24
- const index$s = require('./integrations/tracing/tedious/index.js');
24
+ const index$r = require('./integrations/tracing/tedious/index.js');
25
25
  const index$6 = require('./integrations/tracing/genericPool/index.js');
26
26
  const index$3 = require('./integrations/tracing/dataloader/index.js');
27
27
  const index = require('./integrations/tracing/amqplib/index.js');
28
- const index$t = require('./integrations/tracing/vercelai/index.js');
29
- const index$o = require('./integrations/tracing/openai/index.js');
28
+ const index$s = require('./integrations/tracing/vercelai/index.js');
29
+ const index$n = require('./integrations/tracing/openai/index.js');
30
30
  const index$1 = require('./integrations/tracing/anthropic-ai/index.js');
31
31
  const index$9 = require('./integrations/tracing/google-genai/index.js');
32
32
  const index$g = require('./integrations/tracing/langchain/index.js');
@@ -48,7 +48,7 @@ const nodeCore = require('@sentry/node-core');
48
48
 
49
49
 
50
50
  exports.httpIntegration = http.httpIntegration;
51
- exports.nativeNodeFetchIntegration = index$n.nativeNodeFetchIntegration;
51
+ exports.nativeNodeFetchIntegration = nodeFetch.nativeNodeFetchIntegration;
52
52
  exports.fsIntegration = index$5.fsIntegration;
53
53
  exports.expressIntegration = express.expressIntegration;
54
54
  exports.setupExpressErrorHandler = express.setupExpressErrorHandler;
@@ -61,10 +61,10 @@ exports.mongoIntegration = index$j.mongoIntegration;
61
61
  exports.mongooseIntegration = index$k.mongooseIntegration;
62
62
  exports.mysqlIntegration = index$m.mysqlIntegration;
63
63
  exports.mysql2Integration = index$l.mysql2Integration;
64
- exports.redisIntegration = index$r.redisIntegration;
65
- exports.postgresIntegration = index$p.postgresIntegration;
64
+ exports.redisIntegration = index$q.redisIntegration;
65
+ exports.postgresIntegration = index$o.postgresIntegration;
66
66
  exports.postgresJsIntegration = postgresjs.postgresJsIntegration;
67
- exports.prismaIntegration = index$q.prismaIntegration;
67
+ exports.prismaIntegration = index$p.prismaIntegration;
68
68
  exports.hapiIntegration = index$b.hapiIntegration;
69
69
  exports.setupHapiErrorHandler = index$b.setupHapiErrorHandler;
70
70
  exports.honoIntegration = index$c.honoIntegration;
@@ -74,12 +74,12 @@ exports.setupKoaErrorHandler = index$f.setupKoaErrorHandler;
74
74
  exports.connectIntegration = index$2.connectIntegration;
75
75
  exports.setupConnectErrorHandler = index$2.setupConnectErrorHandler;
76
76
  exports.knexIntegration = index$e.knexIntegration;
77
- exports.tediousIntegration = index$s.tediousIntegration;
77
+ exports.tediousIntegration = index$r.tediousIntegration;
78
78
  exports.genericPoolIntegration = index$6.genericPoolIntegration;
79
79
  exports.dataloaderIntegration = index$3.dataloaderIntegration;
80
80
  exports.amqplibIntegration = index.amqplibIntegration;
81
- exports.vercelAIIntegration = index$t.vercelAIIntegration;
82
- exports.openAIIntegration = index$o.openAIIntegration;
81
+ exports.vercelAIIntegration = index$s.vercelAIIntegration;
82
+ exports.openAIIntegration = index$n.openAIIntegration;
83
83
  exports.anthropicAIIntegration = index$1.anthropicAIIntegration;
84
84
  exports.googleGenAIIntegration = index$9.googleGenAIIntegration;
85
85
  exports.langChainIntegration = index$g.langChainIntegration;
@@ -96,6 +96,7 @@ exports.getDefaultIntegrations = index$8.getDefaultIntegrations;
96
96
  exports.getDefaultIntegrationsWithoutPerformance = index$8.getDefaultIntegrationsWithoutPerformance;
97
97
  exports.init = index$8.init;
98
98
  exports.initWithoutDefaultIntegrations = index$8.initWithoutDefaultIntegrations;
99
+ exports.diagnosticsChannelInjectionIntegrations = experimentalUseDiagnosticsChannelInjection.diagnosticsChannelInjectionIntegrations;
99
100
  exports.experimentalUseDiagnosticsChannelInjection = experimentalUseDiagnosticsChannelInjection.experimentalUseDiagnosticsChannelInjection;
100
101
  exports.initOpenTelemetry = initOtel.initOpenTelemetry;
101
102
  exports.preloadOpenTelemetry = initOtel.preloadOpenTelemetry;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"launchDarkly.js","sources":["../../../../src/integrations/featureFlagShims/launchDarkly.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the LaunchDarkly integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const launchDarklyIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The launchDarklyIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'LaunchDarkly',\n };\n});\n\n/**\n * This is a shim for the LaunchDarkly flag used handler.\n */\nexport function buildLaunchDarklyFlagUsedHandlerShim(): unknown {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The buildLaunchDarklyFlagUsedHandler() can only be used in the browser.');\n });\n }\n\n return {\n name: 'sentry-flag-auditor',\n type: 'flag-used',\n synchronous: true,\n method: () => null,\n };\n}\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,2BAAA,GAA8BA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AACnF,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,gEAAgE,CAAA;AAAA,IAC/E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;AAKM,SAAS,oCAAA,GAAgD;AAC9D,EAAA,IAAI,CAACD,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,yEAAyE,CAAA;AAAA,IACxF,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,qBAAA;AAAA,IACN,IAAA,EAAM,WAAA;AAAA,IACN,WAAA,EAAa,IAAA;AAAA,IACb,QAAQ,MAAM;AAAA,GAChB;AACF;;;;;"}
1
+ {"version":3,"file":"launchDarkly.js","sources":["../../../../src/integrations/featureFlagShims/launchDarkly.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the LaunchDarkly integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const launchDarklyIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The launchDarklyIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'LaunchDarkly' as const,\n };\n});\n\n/**\n * This is a shim for the LaunchDarkly flag used handler.\n */\nexport function buildLaunchDarklyFlagUsedHandlerShim(): unknown {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The buildLaunchDarklyFlagUsedHandler() can only be used in the browser.');\n });\n }\n\n return {\n name: 'sentry-flag-auditor',\n type: 'flag-used',\n synchronous: true,\n method: () => null,\n };\n}\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,2BAAA,GAA8BA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AACnF,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,gEAAgE,CAAA;AAAA,IAC/E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;AAKM,SAAS,oCAAA,GAAgD;AAC9D,EAAA,IAAI,CAACD,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,yEAAyE,CAAA;AAAA,IACxF,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,qBAAA;AAAA,IACN,IAAA,EAAM,WAAA;AAAA,IACN,WAAA,EAAa,IAAA;AAAA,IACb,QAAQ,MAAM;AAAA,GAChB;AACF;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"openFeature.js","sources":["../../../../src/integrations/featureFlagShims/openFeature.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the OpenFeature integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const openFeatureIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The openFeatureIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'OpenFeature',\n };\n});\n\n/**\n * This is a shim for the OpenFeature integration hook.\n */\nexport class OpenFeatureIntegrationHookShim {\n /**\n *\n */\n public constructor() {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The OpenFeatureIntegrationHook can only be used in the browser.');\n });\n }\n }\n\n /**\n *\n */\n public after(): void {\n // No-op\n }\n\n /**\n *\n */\n public error(): void {\n // No-op\n }\n}\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,0BAAA,GAA6BA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AAClF,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,+DAA+D,CAAA;AAAA,IAC9E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;AAKM,MAAM,8BAAA,CAA+B;AAAA;AAAA;AAAA;AAAA,EAInC,WAAA,GAAc;AACnB,IAAA,IAAI,CAACD,gBAAU,EAAG;AAChB,MAAAC,mBAAA,CAAe,MAAM;AAEnB,QAAA,OAAA,CAAQ,KAAK,iEAAiE,CAAA;AAAA,MAChF,CAAC,CAAA;AAAA,IACH;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKO,KAAA,GAAc;AAAA,EAErB;AAAA;AAAA;AAAA;AAAA,EAKO,KAAA,GAAc;AAAA,EAErB;AACF;;;;;"}
1
+ {"version":3,"file":"openFeature.js","sources":["../../../../src/integrations/featureFlagShims/openFeature.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the OpenFeature integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const openFeatureIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The openFeatureIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'OpenFeature' as const,\n };\n});\n\n/**\n * This is a shim for the OpenFeature integration hook.\n */\nexport class OpenFeatureIntegrationHookShim {\n /**\n *\n */\n public constructor() {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The OpenFeatureIntegrationHook can only be used in the browser.');\n });\n }\n }\n\n /**\n *\n */\n public after(): void {\n // No-op\n }\n\n /**\n *\n */\n public error(): void {\n // No-op\n }\n}\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,0BAAA,GAA6BA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AAClF,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,+DAA+D,CAAA;AAAA,IAC9E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;AAKM,MAAM,8BAAA,CAA+B;AAAA;AAAA;AAAA;AAAA,EAInC,WAAA,GAAc;AACnB,IAAA,IAAI,CAACD,gBAAU,EAAG;AAChB,MAAAC,mBAAA,CAAe,MAAM;AAEnB,QAAA,OAAA,CAAQ,KAAK,iEAAiE,CAAA;AAAA,MAChF,CAAC,CAAA;AAAA,IACH;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKO,KAAA,GAAc;AAAA,EAErB;AAAA;AAAA;AAAA;AAAA,EAKO,KAAA,GAAc;AAAA,EAErB;AACF;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"statsig.js","sources":["../../../../src/integrations/featureFlagShims/statsig.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the Statsig integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const statsigIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The statsigIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'Statsig',\n };\n});\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,sBAAA,GAAyBA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AAC9E,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,2DAA2D,CAAA;AAAA,IAC1E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"statsig.js","sources":["../../../../src/integrations/featureFlagShims/statsig.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the Statsig integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const statsigIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The statsigIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'Statsig' as const,\n };\n});\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,sBAAA,GAAyBA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AAC9E,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,2DAA2D,CAAA;AAAA,IAC1E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"unleash.js","sources":["../../../../src/integrations/featureFlagShims/unleash.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the Unleash integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const unleashIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The unleashIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'Unleash',\n };\n});\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,sBAAA,GAAyBA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AAC9E,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,2DAA2D,CAAA;AAAA,IAC1E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"unleash.js","sources":["../../../../src/integrations/featureFlagShims/unleash.ts"],"sourcesContent":["import { consoleSandbox, defineIntegration, isBrowser } from '@sentry/core';\n\n/**\n * This is a shim for the Unleash integration.\n * We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.\n */\nexport const unleashIntegrationShim = defineIntegration((_options?: unknown) => {\n if (!isBrowser()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('The unleashIntegration() can only be used in the browser.');\n });\n }\n\n return {\n name: 'Unleash' as const,\n };\n});\n"],"names":["defineIntegration","isBrowser","consoleSandbox"],"mappings":";;;;AAMO,MAAM,sBAAA,GAAyBA,sBAAA,CAAkB,CAAC,QAAA,KAAuB;AAC9E,EAAA,IAAI,CAACC,gBAAU,EAAG;AAChB,IAAAC,mBAAA,CAAe,MAAM;AAEnB,MAAA,OAAA,CAAQ,KAAK,2DAA2D,CAAA;AAAA,IAC1E,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/integrations/fs/index.ts"],"sourcesContent":["import { defineIntegration } from '@sentry/core';\nimport { enableFsInstrumentation } from './vendored/instrumentation';\nimport type { FsInstrumentationConfig } from './vendored/types';\n\nconst INTEGRATION_NAME = 'FileSystem';\n\n/**\n * This integration will create spans for `fs` API operations, like reading and writing files.\n *\n * **WARNING:** This integration may add significant overhead to your application. Especially in scenarios with a lot of\n * file I/O, like for example when running a framework dev server, including this integration can massively slow down\n * your application.\n *\n * @param options Configuration for this integration.\n */\nexport const fsIntegration = defineIntegration((options: FsInstrumentationConfig = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n enableFsInstrumentation(options);\n },\n };\n});\n"],"names":["defineIntegration","enableFsInstrumentation"],"mappings":";;;;;AAIA,MAAM,gBAAA,GAAmB,YAAA;AAWlB,MAAM,aAAA,GAAgBA,sBAAA,CAAkB,CAAC,OAAA,GAAmC,EAAC,KAAM;AACxF,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAAC,uCAAA,CAAwB,OAAO,CAAA;AAAA,IACjC;AAAA,GACF;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/integrations/fs/index.ts"],"sourcesContent":["import { defineIntegration } from '@sentry/core';\nimport { enableFsInstrumentation } from './vendored/instrumentation';\nimport type { FsInstrumentationConfig } from './vendored/types';\n\nconst INTEGRATION_NAME = 'FileSystem' as const;\n\n/**\n * This integration will create spans for `fs` API operations, like reading and writing files.\n *\n * **WARNING:** This integration may add significant overhead to your application. Especially in scenarios with a lot of\n * file I/O, like for example when running a framework dev server, including this integration can massively slow down\n * your application.\n *\n * @param options Configuration for this integration.\n */\nexport const fsIntegration = defineIntegration((options: FsInstrumentationConfig = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n enableFsInstrumentation(options);\n },\n };\n});\n"],"names":["defineIntegration","enableFsInstrumentation"],"mappings":";;;;;AAIA,MAAM,gBAAA,GAAmB,YAAA;AAWlB,MAAM,aAAA,GAAgBA,sBAAA,CAAkB,CAAC,OAAA,GAAmC,EAAC,KAAM;AACxF,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAAC,uCAAA,CAAwB,OAAO,CAAA;AAAA,IACjC;AAAA,GACF;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","sources":["../../../src/integrations/http.ts"],"sourcesContent":["import type { RequestOptions } from 'node:http';\nimport type { HttpClientRequest, HttpIncomingMessage, HttpServerResponse, Span } from '@sentry/core';\nimport {\n defineIntegration,\n hasSpansEnabled,\n SEMANTIC_ATTRIBUTE_URL_FULL,\n stripDataUrlContent,\n getRequestUrlFromClientRequest,\n} from '@sentry/core';\nimport type {\n NodeClient,\n SentryHttpInstrumentationOptions,\n HttpServerIntegrationOptions,\n HttpServerSpansIntegrationOptions,\n} from '@sentry/node-core';\nimport {\n generateInstrumentOnce,\n httpServerIntegration,\n httpServerSpansIntegration,\n SentryHttpInstrumentation,\n} from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Http';\n\n// TODO(v11): Consolidate all the various HTTP integration options into one,\n// and deprecate the duplicated and aliased options.\ninterface HttpOptions {\n /**\n * Whether breadcrumbs should be recorded for outgoing requests.\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * If set to false, do not emit any spans.\n * This will ensure that the default HttpInstrumentation from OpenTelemetry is not setup,\n * only the Sentry-specific instrumentation for request isolation is applied.\n *\n * If `skipOpenTelemetrySetup: true` is configured, this defaults to `false`, otherwise it defaults to `true`.\n */\n spans?: boolean;\n\n /**\n * Whether the integration should create [Sessions](https://docs.sentry.io/product/releases/health/#sessions) for incoming requests to track the health and crash-free rate of your releases in Sentry.\n * Read more about Release Health: https://docs.sentry.io/product/releases/health/\n *\n * Defaults to `true`.\n */\n trackIncomingRequestsAsSessions?: boolean;\n\n /**\n * Number of milliseconds until sessions tracked with `trackIncomingRequestsAsSessions` will be flushed as a session aggregate.\n *\n * Defaults to `60000` (60s).\n */\n sessionFlushingDelayMS?: number;\n\n /**\n * Whether to inject trace propagation headers (sentry-trace, baggage, traceparent) into outgoing HTTP requests.\n *\n * When set to `false`, Sentry will not inject any trace propagation headers, but will still create breadcrumbs\n * (if `breadcrumbs` is enabled). This is useful when `skipOpenTelemetrySetup: true` is configured and you want\n * to avoid duplicate trace headers being injected by both Sentry and OpenTelemetry's HttpInstrumentation.\n *\n * @default `true`\n */\n tracePropagation?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing HTTP requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n *\n * The `url` param contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request.\n * For example: `'https://someService.com/users/details?id=123'`\n *\n * The `request` param contains the original {@type RequestOptions} object used to make the outgoing request.\n * You can use it to filter on additional properties like method, headers, etc.\n */\n ignoreOutgoingRequests?: (url: string, request: RequestOptions) => boolean;\n\n /**\n * Do not capture spans for incoming HTTP requests to URLs where the given callback returns `true`.\n * Spans will be non recording if tracing is disabled.\n *\n * The `urlPath` param consists of the URL path and query string (if any) of the incoming request.\n * For example: `'/users/details?id=123'`\n *\n * The `request` param contains the original {@type IncomingMessage} object of the incoming request.\n * You can use it to filter on additional properties like method, headers, etc.\n */\n ignoreIncomingRequests?: (urlPath: string, request: HttpIncomingMessage) => boolean;\n\n /**\n * A hook that can be used to mutate the span for incoming requests.\n * This is triggered after the span is created, but before it is recorded.\n */\n incomingRequestSpanHook?: (span: Span, request: HttpIncomingMessage, response: HttpServerResponse) => void;\n\n /**\n * Whether to automatically ignore common static asset requests like favicon.ico, robots.txt, etc.\n * This helps reduce noise in your transactions.\n *\n * @default `true`\n */\n ignoreStaticAssets?: boolean;\n\n /**\n * Do not capture spans for incoming HTTP requests with the given status codes.\n * By default, spans with some 3xx and 4xx status codes are ignored (see @default).\n * Expects an array of status codes or a range of status codes, e.g. [[300,399], 404] would ignore 3xx and 404 status codes.\n *\n * @default `[[401, 404], [301, 303], [305, 399]]`\n */\n dropSpansForIncomingRequestStatusCodes?: (number | [number, number])[];\n\n /**\n * Do not capture the request body for incoming HTTP requests to URLs where the given callback returns `true`.\n * This can be useful for long running requests where the body is not needed and we want to avoid capturing it.\n *\n * @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the incoming request.\n * @param request Contains the {@type RequestOptions} object used to make the incoming request.\n */\n ignoreIncomingRequestBody?: (url: string, request: RequestOptions) => boolean;\n\n /**\n * Controls the maximum size of incoming HTTP request bodies attached to events.\n *\n * Available options:\n * - 'none': No request bodies will be attached\n * - 'small': Request bodies up to 1,000 bytes will be attached\n * - 'medium': Request bodies up to 10,000 bytes will be attached (default)\n * - 'always': Request bodies will always be attached\n *\n * Note that even with 'always' setting, bodies exceeding 1MB will never be attached\n * for performance and security reasons.\n *\n * @default 'medium'\n */\n maxIncomingRequestBodySize?: 'none' | 'small' | 'medium' | 'always';\n\n /**\n * If true, do not generate spans for incoming requests at all.\n * This is used by Remix to avoid generating spans for incoming requests, as it generates its own spans.\n */\n disableIncomingRequestSpans?: boolean;\n\n /**\n * Additional instrumentation options that are passed to the underlying HttpInstrumentation.\n */\n instrumentation?: {\n requestHook?: (span: Span, req: HttpIncomingMessage | HttpClientRequest) => void;\n responseHook?: (span: Span, response: HttpIncomingMessage | HttpServerResponse) => void;\n applyCustomAttributesOnSpan?: (\n span: Span,\n request: HttpIncomingMessage | HttpClientRequest,\n response: HttpIncomingMessage | HttpServerResponse,\n ) => void;\n };\n}\n\nexport const instrumentSentryHttp = generateInstrumentOnce<SentryHttpInstrumentationOptions>(\n `${INTEGRATION_NAME}.sentry`,\n options => {\n return new SentryHttpInstrumentation(options);\n },\n);\n\n/**\n * The http integration instruments Node's internal http and https modules.\n * It creates breadcrumbs and spans for outgoing HTTP requests which will be attached to the currently active span.\n */\nexport const httpIntegration = defineIntegration((options: HttpOptions = {}) => {\n const spans = options.spans ?? true;\n const disableIncomingRequestSpans = options.disableIncomingRequestSpans;\n const enableServerSpans = spans && !disableIncomingRequestSpans;\n\n const serverOptions = {\n sessions: options.trackIncomingRequestsAsSessions,\n sessionFlushingDelayMS: options.sessionFlushingDelayMS,\n ignoreRequestBody: options.ignoreIncomingRequestBody,\n maxRequestBodySize: options.maxIncomingRequestBodySize,\n } satisfies HttpServerIntegrationOptions;\n\n const serverSpansOptions: HttpServerSpansIntegrationOptions = {\n ignoreIncomingRequests: options.ignoreIncomingRequests,\n ignoreStaticAssets: options.ignoreStaticAssets,\n ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes,\n instrumentation: options.instrumentation,\n onSpanCreated: options.incomingRequestSpanHook,\n };\n\n const server = httpServerIntegration(serverOptions);\n const serverSpans = httpServerSpansIntegration(serverSpansOptions);\n\n return {\n name: INTEGRATION_NAME,\n setup(client: NodeClient) {\n const clientOptions = client.getOptions();\n\n if (enableServerSpans && hasSpansEnabled(clientOptions)) {\n serverSpans.setup(client);\n }\n },\n setupOnce() {\n server.setupOnce();\n\n const sentryHttpInstrumentationOptions: SentryHttpInstrumentationOptions = {\n breadcrumbs: options.breadcrumbs,\n spans,\n propagateTraceInOutgoingRequests: options.tracePropagation ?? true,\n createSpansForOutgoingRequests: spans,\n ignoreOutgoingRequests: options.ignoreOutgoingRequests,\n outgoingRequestHook: (span: Span, request: HttpClientRequest) => {\n // Sanitize data URLs to prevent long base64 strings in span attributes\n const url = getRequestUrlFromClientRequest(request);\n if (url.startsWith('data:')) {\n const sanitizedUrl = stripDataUrlContent(url);\n // TODO(v11): Update these to the Sentry semantic attributes.\n // https://getsentry.github.io/sentry-conventions/attributes/\n span.setAttribute('http.url', sanitizedUrl);\n span.setAttribute(SEMANTIC_ATTRIBUTE_URL_FULL, sanitizedUrl);\n span.updateName(`${request.method || 'GET'} ${sanitizedUrl}`);\n }\n options.instrumentation?.requestHook?.(span, request);\n },\n outgoingResponseHook: options.instrumentation?.responseHook,\n outgoingRequestApplyCustomAttributes: options.instrumentation?.applyCustomAttributesOnSpan,\n };\n\n // This is Sentry-specific instrumentation for outgoing request\n // breadcrumbs & trace propagation. It uses the diagnostic channels on\n // node versions that support it, falling back to monkey-patching when\n // needed.\n instrumentSentryHttp(sentryHttpInstrumentationOptions);\n },\n processEvent(event) {\n // Always run this, even if spans are disabled\n // The reason being that e.g. the remix integration disables span\n // creation here but still wants to use the ignore status codes option\n return serverSpans.processEvent(event);\n },\n };\n});\n"],"names":["generateInstrumentOnce","SentryHttpInstrumentation","defineIntegration","httpServerIntegration","httpServerSpansIntegration","hasSpansEnabled","getRequestUrlFromClientRequest","stripDataUrlContent","SEMANTIC_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RequestOptions } from 'node:http';\nimport type { HttpClientRequest, HttpIncomingMessage, HttpServerResponse, Span } from '@sentry/core';\nimport {\n defineIntegration,\n hasSpansEnabled,\n SEMANTIC_ATTRIBUTE_URL_FULL,\n stripDataUrlContent,\n getRequestUrlFromClientRequest,\n} from '@sentry/core';\nimport type {\n NodeClient,\n SentryHttpInstrumentationOptions,\n HttpServerIntegrationOptions,\n HttpServerSpansIntegrationOptions,\n} from '@sentry/node-core';\nimport {\n generateInstrumentOnce,\n httpServerIntegration,\n httpServerSpansIntegration,\n SentryHttpInstrumentation,\n} from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Http' as const;\n\n// TODO(v11): Consolidate all the various HTTP integration options into one,\n// and deprecate the duplicated and aliased options.\ninterface HttpOptions {\n /**\n * Whether breadcrumbs should be recorded for outgoing requests.\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * If set to false, do not emit any spans.\n * This will ensure that the default HttpInstrumentation from OpenTelemetry is not setup,\n * only the Sentry-specific instrumentation for request isolation is applied.\n *\n * If `skipOpenTelemetrySetup: true` is configured, this defaults to `false`, otherwise it defaults to `true`.\n */\n spans?: boolean;\n\n /**\n * Whether the integration should create [Sessions](https://docs.sentry.io/product/releases/health/#sessions) for incoming requests to track the health and crash-free rate of your releases in Sentry.\n * Read more about Release Health: https://docs.sentry.io/product/releases/health/\n *\n * Defaults to `true`.\n */\n trackIncomingRequestsAsSessions?: boolean;\n\n /**\n * Number of milliseconds until sessions tracked with `trackIncomingRequestsAsSessions` will be flushed as a session aggregate.\n *\n * Defaults to `60000` (60s).\n */\n sessionFlushingDelayMS?: number;\n\n /**\n * Whether to inject trace propagation headers (sentry-trace, baggage, traceparent) into outgoing HTTP requests.\n *\n * When set to `false`, Sentry will not inject any trace propagation headers, but will still create breadcrumbs\n * (if `breadcrumbs` is enabled). This is useful when `skipOpenTelemetrySetup: true` is configured and you want\n * to avoid duplicate trace headers being injected by both Sentry and OpenTelemetry's HttpInstrumentation.\n *\n * @default `true`\n */\n tracePropagation?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing HTTP requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n *\n * The `url` param contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request.\n * For example: `'https://someService.com/users/details?id=123'`\n *\n * The `request` param contains the original {@type RequestOptions} object used to make the outgoing request.\n * You can use it to filter on additional properties like method, headers, etc.\n */\n ignoreOutgoingRequests?: (url: string, request: RequestOptions) => boolean;\n\n /**\n * Do not capture spans for incoming HTTP requests to URLs where the given callback returns `true`.\n * Spans will be non recording if tracing is disabled.\n *\n * The `urlPath` param consists of the URL path and query string (if any) of the incoming request.\n * For example: `'/users/details?id=123'`\n *\n * The `request` param contains the original {@type IncomingMessage} object of the incoming request.\n * You can use it to filter on additional properties like method, headers, etc.\n */\n ignoreIncomingRequests?: (urlPath: string, request: HttpIncomingMessage) => boolean;\n\n /**\n * A hook that can be used to mutate the span for incoming requests.\n * This is triggered after the span is created, but before it is recorded.\n */\n incomingRequestSpanHook?: (span: Span, request: HttpIncomingMessage, response: HttpServerResponse) => void;\n\n /**\n * Whether to automatically ignore common static asset requests like favicon.ico, robots.txt, etc.\n * This helps reduce noise in your transactions.\n *\n * @default `true`\n */\n ignoreStaticAssets?: boolean;\n\n /**\n * Do not capture spans for incoming HTTP requests with the given status codes.\n * By default, spans with some 3xx and 4xx status codes are ignored (see @default).\n * Expects an array of status codes or a range of status codes, e.g. [[300,399], 404] would ignore 3xx and 404 status codes.\n *\n * @default `[[401, 404], [301, 303], [305, 399]]`\n */\n dropSpansForIncomingRequestStatusCodes?: (number | [number, number])[];\n\n /**\n * Do not capture the request body for incoming HTTP requests to URLs where the given callback returns `true`.\n * This can be useful for long running requests where the body is not needed and we want to avoid capturing it.\n *\n * @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the incoming request.\n * @param request Contains the {@type RequestOptions} object used to make the incoming request.\n */\n ignoreIncomingRequestBody?: (url: string, request: RequestOptions) => boolean;\n\n /**\n * Controls the maximum size of incoming HTTP request bodies attached to events.\n *\n * Available options:\n * - 'none': No request bodies will be attached\n * - 'small': Request bodies up to 1,000 bytes will be attached\n * - 'medium': Request bodies up to 10,000 bytes will be attached (default)\n * - 'always': Request bodies will always be attached\n *\n * Note that even with 'always' setting, bodies exceeding 1MB will never be attached\n * for performance and security reasons.\n *\n * @default 'medium'\n */\n maxIncomingRequestBodySize?: 'none' | 'small' | 'medium' | 'always';\n\n /**\n * If true, do not generate spans for incoming requests at all.\n * This is used by Remix to avoid generating spans for incoming requests, as it generates its own spans.\n */\n disableIncomingRequestSpans?: boolean;\n\n /**\n * Additional instrumentation options that are passed to the underlying HttpInstrumentation.\n */\n instrumentation?: {\n requestHook?: (span: Span, req: HttpIncomingMessage | HttpClientRequest) => void;\n responseHook?: (span: Span, response: HttpIncomingMessage | HttpServerResponse) => void;\n applyCustomAttributesOnSpan?: (\n span: Span,\n request: HttpIncomingMessage | HttpClientRequest,\n response: HttpIncomingMessage | HttpServerResponse,\n ) => void;\n };\n}\n\nexport const instrumentSentryHttp = generateInstrumentOnce<SentryHttpInstrumentationOptions>(\n `${INTEGRATION_NAME}.sentry`,\n options => {\n return new SentryHttpInstrumentation(options);\n },\n);\n\n/**\n * The http integration instruments Node's internal http and https modules.\n * It creates breadcrumbs and spans for outgoing HTTP requests which will be attached to the currently active span.\n */\nexport const httpIntegration = defineIntegration((options: HttpOptions = {}) => {\n const spans = options.spans ?? true;\n const disableIncomingRequestSpans = options.disableIncomingRequestSpans;\n const enableServerSpans = spans && !disableIncomingRequestSpans;\n\n const serverOptions = {\n sessions: options.trackIncomingRequestsAsSessions,\n sessionFlushingDelayMS: options.sessionFlushingDelayMS,\n ignoreRequestBody: options.ignoreIncomingRequestBody,\n maxRequestBodySize: options.maxIncomingRequestBodySize,\n } satisfies HttpServerIntegrationOptions;\n\n const serverSpansOptions: HttpServerSpansIntegrationOptions = {\n ignoreIncomingRequests: options.ignoreIncomingRequests,\n ignoreStaticAssets: options.ignoreStaticAssets,\n ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes,\n instrumentation: options.instrumentation,\n onSpanCreated: options.incomingRequestSpanHook,\n };\n\n const server = httpServerIntegration(serverOptions);\n const serverSpans = httpServerSpansIntegration(serverSpansOptions);\n\n return {\n name: INTEGRATION_NAME,\n setup(client: NodeClient) {\n const clientOptions = client.getOptions();\n\n if (enableServerSpans && hasSpansEnabled(clientOptions)) {\n serverSpans.setup(client);\n }\n },\n setupOnce() {\n server.setupOnce();\n\n const sentryHttpInstrumentationOptions: SentryHttpInstrumentationOptions = {\n breadcrumbs: options.breadcrumbs,\n spans,\n propagateTraceInOutgoingRequests: options.tracePropagation ?? true,\n createSpansForOutgoingRequests: spans,\n ignoreOutgoingRequests: options.ignoreOutgoingRequests,\n outgoingRequestHook: (span: Span, request: HttpClientRequest) => {\n // Sanitize data URLs to prevent long base64 strings in span attributes\n const url = getRequestUrlFromClientRequest(request);\n if (url.startsWith('data:')) {\n const sanitizedUrl = stripDataUrlContent(url);\n // TODO(v11): Update these to the Sentry semantic attributes.\n // https://getsentry.github.io/sentry-conventions/attributes/\n span.setAttribute('http.url', sanitizedUrl);\n span.setAttribute(SEMANTIC_ATTRIBUTE_URL_FULL, sanitizedUrl);\n span.updateName(`${request.method || 'GET'} ${sanitizedUrl}`);\n }\n options.instrumentation?.requestHook?.(span, request);\n },\n outgoingResponseHook: options.instrumentation?.responseHook,\n outgoingRequestApplyCustomAttributes: options.instrumentation?.applyCustomAttributesOnSpan,\n };\n\n // This is Sentry-specific instrumentation for outgoing request\n // breadcrumbs & trace propagation. It uses the diagnostic channels on\n // node versions that support it, falling back to monkey-patching when\n // needed.\n instrumentSentryHttp(sentryHttpInstrumentationOptions);\n },\n processEvent(event) {\n // Always run this, even if spans are disabled\n // The reason being that e.g. the remix integration disables span\n // creation here but still wants to use the ignore status codes option\n return serverSpans.processEvent(event);\n },\n };\n});\n"],"names":["generateInstrumentOnce","SentryHttpInstrumentation","defineIntegration","httpServerIntegration","httpServerSpansIntegration","hasSpansEnabled","getRequestUrlFromClientRequest","stripDataUrlContent","SEMANTIC_ATTRIBUTE_URL_FULL"],"mappings":";;;;;AAsBA,MAAM,gBAAA,GAAmB,MAAA;AA0IlB,MAAM,oBAAA,GAAuBA,+BAAA;AAAA,EAClC,GAAG,gBAAgB,CAAA,OAAA,CAAA;AAAA,EACnB,CAAA,OAAA,KAAW;AACT,IAAA,OAAO,IAAIC,mCAA0B,OAAO,CAAA;AAAA,EAC9C;AACF;AAMO,MAAM,eAAA,GAAkBC,sBAAA,CAAkB,CAAC,OAAA,GAAuB,EAAC,KAAM;AAC9E,EAAA,MAAM,KAAA,GAAQ,QAAQ,KAAA,IAAS,IAAA;AAC/B,EAAA,MAAM,8BAA8B,OAAA,CAAQ,2BAAA;AAC5C,EAAA,MAAM,iBAAA,GAAoB,SAAS,CAAC,2BAAA;AAEpC,EAAA,MAAM,aAAA,GAAgB;AAAA,IACpB,UAAU,OAAA,CAAQ,+BAAA;AAAA,IAClB,wBAAwB,OAAA,CAAQ,sBAAA;AAAA,IAChC,mBAAmB,OAAA,CAAQ,yBAAA;AAAA,IAC3B,oBAAoB,OAAA,CAAQ;AAAA,GAC9B;AAEA,EAAA,MAAM,kBAAA,GAAwD;AAAA,IAC5D,wBAAwB,OAAA,CAAQ,sBAAA;AAAA,IAChC,oBAAoB,OAAA,CAAQ,kBAAA;AAAA,IAC5B,mBAAmB,OAAA,CAAQ,sCAAA;AAAA,IAC3B,iBAAiB,OAAA,CAAQ,eAAA;AAAA,IACzB,eAAe,OAAA,CAAQ;AAAA,GACzB;AAEA,EAAA,MAAM,MAAA,GAASC,+BAAsB,aAAa,CAAA;AAClD,EAAA,MAAM,WAAA,GAAcC,oCAA2B,kBAAkB,CAAA;AAEjE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAoB;AACxB,MAAA,MAAM,aAAA,GAAgB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A;AAAA,IACvC;AAAA,GACF;AACF,CAAC;;;;;"}
@@ -0,0 +1,24 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const nodeCore = require('@sentry/node-core');
4
+ const core = require('@sentry/core');
5
+
6
+ const _nativeNodeFetchIntegration = ((options = {}) => {
7
+ return {
8
+ name: "NodeFetch",
9
+ setupOnce() {
10
+ const clientOptions = core.getClient()?.getOptions();
11
+ nodeCore.instrumentUndici({
12
+ ...options,
13
+ spans: _shouldInstrumentSpans(options, clientOptions)
14
+ });
15
+ }
16
+ };
17
+ });
18
+ const nativeNodeFetchIntegration = core.defineIntegration(_nativeNodeFetchIntegration);
19
+ function _shouldInstrumentSpans(options, clientOptions = {}) {
20
+ return options.spans ?? (!clientOptions.skipOpenTelemetrySetup && core.hasSpansEnabled(clientOptions));
21
+ }
22
+
23
+ exports.nativeNodeFetchIntegration = nativeNodeFetchIntegration;
24
+ //# sourceMappingURL=node-fetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-fetch.js","sources":["../../../src/integrations/node-fetch.ts"],"sourcesContent":["import { instrumentUndici, type NodeFetchOptions } from '@sentry/node-core';\nimport type { NodeClientOptions } from '../types';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, getClient, hasSpansEnabled } from '@sentry/core';\n\n/**\n * This is a variant of the node-core integration where the default for spans is different.\n * In v11, this will be the only implementation.\n */\nconst _nativeNodeFetchIntegration = ((options: NodeFetchOptions = {}) => {\n return {\n name: 'NodeFetch' as const,\n setupOnce() {\n const clientOptions = getClient()?.getOptions();\n instrumentUndici({\n ...options,\n spans: _shouldInstrumentSpans(options, clientOptions),\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Instrument outgoing fetch requests made through the native node `fetch` API.\n * This emits (depending on the integration options) spans and breadcrumbs, as well as injecting trace propagation headers into the request.\n */\nexport const nativeNodeFetchIntegration = defineIntegration(_nativeNodeFetchIntegration);\n\nfunction _shouldInstrumentSpans(options: NodeFetchOptions, clientOptions: Partial<NodeClientOptions> = {}): boolean {\n // If `spans` is passed in, it takes precedence\n // Else, we by default emit spans, unless `skipOpenTelemetrySetup` is set to `true` or spans are not enabled\n return options.spans ?? (!clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions));\n}\n"],"names":["getClient","instrumentUndici","defineIntegration","hasSpansEnabled"],"mappings":";;;;;AASA,MAAM,2BAAA,IAA+B,CAAC,OAAA,GAA4B,EAAC,KAAM;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,WAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,MAAM,aAAA,GAAgBA,cAAA,EAAU,EAAG,UAAA,EAAW;AAC9C,MAAAC,yBAAA,CAAiB;AAAA,QACf,GAAG,OAAA;AAAA,QACH,KAAA,EAAO,sBAAA,CAAuB,OAAA,EAAS,aAAa;AAAA,OACrD,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAA,CAAA;AAMO,MAAM,0BAAA,GAA6BC,uBAAkB,2BAA2B;AAEvF,SAAS,sBAAA,CAAuB,OAAA,EAA2B,aAAA,GAA4C,EAAC,EAAY;AAGlH,EAAA,OAAO,QAAQ,KAAA,KAAU,CAAC,aAAA,CAAc,sBAAA,IAA0BC,qBAAgB,aAAa,CAAA,CAAA;AACjG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/amqplib/index.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { AmqplibInstrumentation } from './vendored/instrumentation';\n\nconst INTEGRATION_NAME = 'Amqplib';\n\nexport const instrumentAmqplib = generateInstrumentOnce(INTEGRATION_NAME, () => new AmqplibInstrumentation());\n\nconst _amqplibIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentAmqplib();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library.\n *\n * For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.amqplibIntegration()],\n * });\n * ```\n */\nexport const amqplibIntegration = defineIntegration(_amqplibIntegration);\n"],"names":["generateInstrumentOnce","AmqplibInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,SAAA;AAElB,MAAM,oBAAoBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,wCAAwB;AAE5G,MAAM,uBAAuB,MAAM;AACjC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,iBAAA,EAAkB;AAAA,IACpB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,kBAAA,GAAqBC,uBAAkB,mBAAmB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/amqplib/index.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { AmqplibInstrumentation } from './vendored/instrumentation';\n\nconst INTEGRATION_NAME = 'Amqplib' as const;\n\nexport const instrumentAmqplib = generateInstrumentOnce(INTEGRATION_NAME, () => new AmqplibInstrumentation());\n\nconst _amqplibIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentAmqplib();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library.\n *\n * For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.amqplibIntegration()],\n * });\n * ```\n */\nexport const amqplibIntegration = defineIntegration(_amqplibIntegration);\n"],"names":["generateInstrumentOnce","AmqplibInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,SAAA;AAElB,MAAM,oBAAoBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,wCAAwB;AAE5G,MAAM,uBAAuB,MAAM;AACjC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,iBAAA,EAAkB;AAAA,IACpB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,kBAAA,GAAqBC,uBAAkB,mBAAmB;;;;;"}
@@ -1,9 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
- const ATTR_MESSAGING_SYSTEM = "messaging.system";
4
3
  const ATTR_MESSAGING_OPERATION = "messaging.operation";
5
- const ATTR_NET_PEER_NAME = "net.peer.name";
6
- const ATTR_NET_PEER_PORT = "net.peer.port";
7
4
  const ATTR_MESSAGING_DESTINATION = "messaging.destination";
8
5
  const ATTR_MESSAGING_DESTINATION_KIND = "messaging.destination_kind";
9
6
  const ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = "messaging.rabbitmq.routing_key";
@@ -22,10 +19,7 @@ exports.ATTR_MESSAGING_OPERATION = ATTR_MESSAGING_OPERATION;
22
19
  exports.ATTR_MESSAGING_PROTOCOL = ATTR_MESSAGING_PROTOCOL;
23
20
  exports.ATTR_MESSAGING_PROTOCOL_VERSION = ATTR_MESSAGING_PROTOCOL_VERSION;
24
21
  exports.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY = ATTR_MESSAGING_RABBITMQ_ROUTING_KEY;
25
- exports.ATTR_MESSAGING_SYSTEM = ATTR_MESSAGING_SYSTEM;
26
22
  exports.ATTR_MESSAGING_URL = ATTR_MESSAGING_URL;
27
- exports.ATTR_NET_PEER_NAME = ATTR_NET_PEER_NAME;
28
- exports.ATTR_NET_PEER_PORT = ATTR_NET_PEER_PORT;
29
23
  exports.MESSAGING_DESTINATION_KIND_VALUE_TOPIC = MESSAGING_DESTINATION_KIND_VALUE_TOPIC;
30
24
  exports.MESSAGING_OPERATION_VALUE_PROCESS = MESSAGING_OPERATION_VALUE_PROCESS;
31
25
  exports.OLD_ATTR_MESSAGING_MESSAGE_ID = OLD_ATTR_MESSAGING_MESSAGE_ID;
@@ -1 +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/** The messaging system as identified by the client instrumentation, e.g. `rabbitmq`. */\nexport const ATTR_MESSAGING_SYSTEM = 'messaging.system' as const;\n\n/** A string identifying the kind of message consumption. */\nexport const ATTR_MESSAGING_OPERATION = 'messaging.operation' as const;\n\n/** Host name of the message broker. */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/** Port of the message broker. */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' 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,qBAAA,GAAwB;AAG9B,MAAM,wBAAA,GAA2B;AAGjC,MAAM,kBAAA,GAAqB;AAG3B,MAAM,kBAAA,GAAqB;AAG3B,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;;;;;;;;;;;;;;;;;"}
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;;;;;;;;;;;;;;"}
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const api = require('@opentelemetry/api');
4
4
  const core = require('@sentry/core');
5
+ const attributes = require('@sentry/conventions/attributes');
5
6
  const semconv = require('./semconv.js');
6
7
 
7
8
  const PUBLISHER_ORIGIN = "auto.amqplib.otel.publisher";
@@ -32,14 +33,14 @@ const getConnectionAttributesFromServer = (conn) => {
32
33
  const product = conn.serverProperties.product?.toLowerCase?.();
33
34
  if (product) {
34
35
  return {
35
- [semconv.ATTR_MESSAGING_SYSTEM]: product
36
+ [attributes.MESSAGING_SYSTEM]: product
36
37
  };
37
38
  } else {
38
39
  return {};
39
40
  }
40
41
  };
41
42
  const getConnectionAttributesFromUrl = (url) => {
42
- const attributes = {
43
+ const attributes$1 = {
43
44
  [semconv.ATTR_MESSAGING_PROTOCOL_VERSION]: "0.9.1"
44
45
  // this is the only protocol supported by the instrumented library
45
46
  };
@@ -47,22 +48,22 @@ const getConnectionAttributesFromUrl = (url) => {
47
48
  if (typeof resolvedUrl === "object") {
48
49
  const connectOptions = resolvedUrl;
49
50
  const protocol = getProtocol(connectOptions?.protocol);
50
- attributes[semconv.ATTR_MESSAGING_PROTOCOL] = protocol;
51
- attributes[semconv.ATTR_NET_PEER_NAME] = getHostname(connectOptions?.hostname);
52
- attributes[semconv.ATTR_NET_PEER_PORT] = getPort(connectOptions.port, 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);
53
54
  } else {
54
55
  const censoredUrl = censorPassword(resolvedUrl);
55
- attributes[semconv.ATTR_MESSAGING_URL] = censoredUrl;
56
+ attributes$1[semconv.ATTR_MESSAGING_URL] = censoredUrl;
56
57
  try {
57
58
  const urlParts = new URL(censoredUrl);
58
59
  const protocol = getProtocol(urlParts.protocol);
59
- attributes[semconv.ATTR_MESSAGING_PROTOCOL] = protocol;
60
- attributes[semconv.ATTR_NET_PEER_NAME] = getHostname(urlParts.hostname);
61
- attributes[semconv.ATTR_NET_PEER_PORT] = getPort(urlParts.port ? parseInt(urlParts.port) : void 0, 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);
62
63
  } catch {
63
64
  }
64
65
  }
65
- return attributes;
66
+ return attributes$1;
66
67
  };
67
68
  function getHeaderAsString(headers, key) {
68
69
  const value = headers?.[key];
@@ -1 +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 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_SYSTEM,\n ATTR_MESSAGING_URL,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\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 [ATTR_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 attributes[ATTR_NET_PEER_NAME] = getHostname(connectOptions?.hostname);\n attributes[ATTR_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 attributes[ATTR_NET_PEER_NAME] = getHostname(urlParts.hostname);\n attributes[ATTR_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":["ATTR_MESSAGING_SYSTEM","ATTR_MESSAGING_PROTOCOL_VERSION","ATTR_MESSAGING_PROTOCOL","ATTR_NET_PEER_NAME","ATTR_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_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B,OAAA,CAAQ,cAAc,CAAA,GAAI,SAAA,CAAU,cAAc,CAAA;AAAA,EACpE;AACA,EAAA,IAAI,UAAU,OAAA,EAAS;AACrB,IAAA,eAAA,CAAgB,OAAA,CAAQ,SAAS,CAAA,GAAI,SAAA,CAAU,OAAA;AAAA,EACjD;AAEA,EAAA,OAAO,EAAE,MAAM,eAAA,EAAgB;AACjC;AAGO,SAAS,gBAAA,CACd,KAAA,EACA,GAAA,EACA,OAAA,EACM;AACN,EAAA,OAAOT,sBAAA,CAAkB;AAAA,IACvB,IAAA,EAAM,GAAG,KAAK,CAAA,QAAA,CAAA;AAAA,IACd,MAAMC,YAAA,CAAS,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;;;;;;;;;;;;;;"}
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,KAAwB;AAC9C,EAAA,OAAO,GAAA,CAAI,OAAA,CAAQ,WAAA,EAAa,OAAO,CAAA;AACzC,CAAA;AAEA,MAAM,OAAA,GAAU,CAAC,WAAA,EAAiC,gBAAA,KAAqC;AAGrF,EAAA,OAAO,WAAA,KAAgB,gBAAA,KAAqB,MAAA,GAAS,IAAA,GAAO,IAAA,CAAA;AAC9D,CAAA;AAEA,MAAM,WAAA,GAAc,CAAC,eAAA,KAAgD;AACnE,EAAA,MAAM,mBAAmB,eAAA,IAAmB,MAAA;AAE5C,EAAA,MAAM,aAAA,GAAgB,gBAAA,CAAiB,QAAA,CAAS,GAAG,CAAA,GAC/C,gBAAA,CAAiB,SAAA,CAAU,CAAA,EAAG,gBAAA,CAAiB,MAAA,GAAS,CAAC,CAAA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AACH;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/connect/index.ts"],"sourcesContent":["import { ConnectInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { captureException, defineIntegration } from '@sentry/core';\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\n\ntype ConnectApp = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n use: (middleware: any) => void;\n};\n\nconst INTEGRATION_NAME = 'Connect';\n\nexport const instrumentConnect = generateInstrumentOnce(INTEGRATION_NAME, () => new ConnectInstrumentation());\n\nconst _connectIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentConnect();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Connect](https://github.com/senchalabs/connect/).\n *\n * If you also want to capture errors, you need to call `setupConnectErrorHandler(app)` after you initialize your connect app.\n *\n * For more information, see the [connect documentation](https://docs.sentry.io/platforms/javascript/guides/connect/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.connectIntegration()],\n * })\n * ```\n */\nexport const connectIntegration = defineIntegration(_connectIntegration);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction connectErrorMiddleware(err: any, req: any, res: any, next: any): void {\n captureException(err, {\n mechanism: {\n handled: false,\n type: 'auto.middleware.connect',\n },\n });\n next(err);\n}\n\n/**\n * Add a Connect middleware to capture errors to Sentry.\n *\n * @param app The Connect app to attach the error handler to\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const connect = require(\"connect\");\n *\n * const app = connect();\n *\n * Sentry.setupConnectErrorHandler(app);\n *\n * // Add you connect routes here\n *\n * app.listen(3000);\n * ```\n */\nexport const setupConnectErrorHandler = (app: ConnectApp): void => {\n app.use(connectErrorMiddleware);\n ensureIsWrapped(app.use, 'connect');\n};\n"],"names":["generateInstrumentOnce","ConnectInstrumentation","defineIntegration","captureException","ensureIsWrapped"],"mappings":";;;;;;AAUA,MAAM,gBAAA,GAAmB,SAAA;AAElB,MAAM,oBAAoBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,wCAAwB;AAE5G,MAAM,uBAAuB,MAAM;AACjC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,iBAAA,EAAkB;AAAA,IACpB;AAAA,GACF;AACF,CAAA,CAAA;AAkBO,MAAM,kBAAA,GAAqBC,uBAAkB,mBAAmB;AAGvE,SAAS,sBAAA,CAAuB,GAAA,EAAU,GAAA,EAAU,GAAA,EAAU,IAAA,EAAiB;AAC7E,EAAAC,qBAAA,CAAiB,GAAA,EAAK;AAAA,IACpB,SAAA,EAAW;AAAA,MACT,OAAA,EAAS,KAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACD,CAAA;AACD,EAAA,IAAA,CAAK,GAAG,CAAA;AACV;AAqBO,MAAM,wBAAA,GAA2B,CAAC,GAAA,KAA0B;AACjE,EAAA,GAAA,CAAI,IAAI,sBAAsB,CAAA;AAC9B,EAAAC,wBAAA,CAAgB,GAAA,CAAI,KAAK,SAAS,CAAA;AACpC;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/connect/index.ts"],"sourcesContent":["import { ConnectInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { captureException, defineIntegration } from '@sentry/core';\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\n\ntype ConnectApp = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n use: (middleware: any) => void;\n};\n\nconst INTEGRATION_NAME = 'Connect' as const;\n\nexport const instrumentConnect = generateInstrumentOnce(INTEGRATION_NAME, () => new ConnectInstrumentation());\n\nconst _connectIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentConnect();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Connect](https://github.com/senchalabs/connect/).\n *\n * If you also want to capture errors, you need to call `setupConnectErrorHandler(app)` after you initialize your connect app.\n *\n * For more information, see the [connect documentation](https://docs.sentry.io/platforms/javascript/guides/connect/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.connectIntegration()],\n * })\n * ```\n */\nexport const connectIntegration = defineIntegration(_connectIntegration);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction connectErrorMiddleware(err: any, req: any, res: any, next: any): void {\n captureException(err, {\n mechanism: {\n handled: false,\n type: 'auto.middleware.connect',\n },\n });\n next(err);\n}\n\n/**\n * Add a Connect middleware to capture errors to Sentry.\n *\n * @param app The Connect app to attach the error handler to\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const connect = require(\"connect\");\n *\n * const app = connect();\n *\n * Sentry.setupConnectErrorHandler(app);\n *\n * // Add you connect routes here\n *\n * app.listen(3000);\n * ```\n */\nexport const setupConnectErrorHandler = (app: ConnectApp): void => {\n app.use(connectErrorMiddleware);\n ensureIsWrapped(app.use, 'connect');\n};\n"],"names":["generateInstrumentOnce","ConnectInstrumentation","defineIntegration","captureException","ensureIsWrapped"],"mappings":";;;;;;AAUA,MAAM,gBAAA,GAAmB,SAAA;AAElB,MAAM,oBAAoBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,wCAAwB;AAE5G,MAAM,uBAAuB,MAAM;AACjC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,iBAAA,EAAkB;AAAA,IACpB;AAAA,GACF;AACF,CAAA,CAAA;AAkBO,MAAM,kBAAA,GAAqBC,uBAAkB,mBAAmB;AAGvE,SAAS,sBAAA,CAAuB,GAAA,EAAU,GAAA,EAAU,GAAA,EAAU,IAAA,EAAiB;AAC7E,EAAAC,qBAAA,CAAiB,GAAA,EAAK;AAAA,IACpB,SAAA,EAAW;AAAA,MACT,OAAA,EAAS,KAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACD,CAAA;AACD,EAAA,IAAA,CAAK,GAAG,CAAA;AACV;AAqBO,MAAM,wBAAA,GAA2B,CAAC,GAAA,KAA0B;AACjE,EAAA,GAAA,CAAI,IAAI,sBAAsB,CAAA;AAC9B,EAAAC,wBAAA,CAAgB,GAAA,CAAI,KAAK,SAAS,CAAA;AACpC;;;;;;"}
@@ -4,7 +4,7 @@ const AttributeNames = require('./enums/AttributeNames.js');
4
4
  const core = require('@sentry/core');
5
5
  const setHttpServerSpanRouteAttribute = require('../../../../utils/setHttpServerSpanRouteAttribute.js');
6
6
  const instrumentation = require('@opentelemetry/instrumentation');
7
- const semanticConventions = require('@opentelemetry/semantic-conventions');
7
+ const attributes = require('@sentry/conventions/attributes');
8
8
  const utils = require('./utils.js');
9
9
 
10
10
  const PACKAGE_NAME = "@sentry/instrumentation-connect";
@@ -54,7 +54,7 @@ class ConnectInstrumentation extends instrumentation.InstrumentationBase {
54
54
  op: `${connectType}.connect`,
55
55
  attributes: {
56
56
  [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.connect",
57
- [semanticConventions.ATTR_HTTP_ROUTE]: routeName.length > 0 ? routeName : "/",
57
+ [attributes.HTTP_ROUTE]: routeName.length > 0 ? routeName : "/",
58
58
  [AttributeNames.AttributeNames.CONNECT_TYPE]: connectType,
59
59
  [AttributeNames.AttributeNames.CONNECT_NAME]: connectName
60
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/connect/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-connect\n * - Upstream version: @opentelemetry/instrumentation-connect@0.61.0\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n */\n\nimport type { ServerResponse } from 'http';\nimport { AttributeNames, ConnectTypes } from './enums/AttributeNames';\nimport type { HandleFunction, NextFunction, PatchedRequest, Server, Use, UseArgs, UseArgs2 } from './internal-types';\nimport type { Span } from '@sentry/core';\nimport {\n isError,\n SDK_VERSION,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n} from '@sentry/core';\nimport { setHttpServerSpanRouteAttribute } from '../../../../utils/setHttpServerSpanRouteAttribute';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport { replaceCurrentStackRoute, addNewStackLayer, generateRoute } from './utils';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-connect';\n\nconst ANONYMOUS_NAME = 'anonymous';\n\n/** Connect instrumentation for OpenTelemetry */\nexport class ConnectInstrumentation extends InstrumentationBase {\n constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n init() {\n return [\n new InstrumentationNodeModuleDefinition('connect', ['>=3.0.0 <4'], moduleExports => {\n return this._patchConstructor(moduleExports);\n }),\n ];\n }\n\n private _patchApp(patchedApp: Server) {\n // oxlint-disable-next-line typescript/unbound-method\n if (!isWrapped(patchedApp.use)) {\n this._wrap(patchedApp, 'use', this._patchUse.bind(this));\n }\n // oxlint-disable-next-line typescript/unbound-method\n if (!isWrapped(patchedApp.handle)) {\n this._wrap(patchedApp, 'handle', this._patchHandle.bind(this));\n }\n }\n\n private _patchConstructor(original: () => Server): () => Server {\n const patchApp = this._patchApp.bind(this);\n return function (this: Server, ...args: unknown[]) {\n const app = Reflect.apply(original, this, args) as Server;\n patchApp(app);\n return app;\n };\n }\n\n public _patchNext(next: NextFunction, span: Span, finishSpan: () => void): NextFunction {\n return function nextFunction(this: NextFunction, err?: unknown): void {\n if (isError(err)) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n const result = next.apply(this, [err]);\n finishSpan();\n return result;\n };\n }\n\n public _startSpan(routeName: string, middleWare: HandleFunction): Span {\n const connectType = routeName ? ConnectTypes.REQUEST_HANDLER : ConnectTypes.MIDDLEWARE;\n const connectName = routeName || middleWare.name || ANONYMOUS_NAME;\n return startInactiveSpan({\n name: connectName,\n op: `${connectType}.connect`,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.connect',\n [ATTR_HTTP_ROUTE]: routeName.length > 0 ? routeName : '/',\n [AttributeNames.CONNECT_TYPE]: connectType,\n [AttributeNames.CONNECT_NAME]: connectName,\n },\n });\n }\n\n public _patchMiddleware(routeName: string, middleWare: HandleFunction): HandleFunction {\n const isEnabled = this.isEnabled.bind(this);\n const startSpan: (routeName: string, middleWare: HandleFunction) => Span = this._startSpan.bind(this);\n const patchNext = this._patchNext.bind(this);\n const isErrorMiddleware = middleWare.length === 4;\n\n function patchedMiddleware(this: Use): void {\n if (!isEnabled()) {\n return Reflect.apply(middleWare, this, arguments);\n }\n const [reqArgIdx, resArgIdx, nextArgIdx] = isErrorMiddleware ? [1, 2, 3] : [0, 1, 2];\n const req = arguments[reqArgIdx] as PatchedRequest;\n const res = arguments[resArgIdx] as ServerResponse;\n const next = arguments[nextArgIdx] as NextFunction;\n\n replaceCurrentStackRoute(req, routeName);\n\n if (routeName) {\n setHttpServerSpanRouteAttribute(generateRoute(req));\n }\n\n const span = startSpan(routeName, middleWare);\n let spanFinished = false;\n\n function finishSpan() {\n if (!spanFinished) {\n spanFinished = true;\n span.end();\n }\n res.removeListener('close', finishSpan);\n }\n\n res.addListener('close', finishSpan);\n arguments[nextArgIdx] = patchNext(next, span, finishSpan);\n\n try {\n return Reflect.apply(middleWare, this, arguments);\n } catch (e) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n finishSpan();\n throw e;\n }\n }\n\n Object.defineProperty(patchedMiddleware, 'length', {\n value: middleWare.length,\n writable: false,\n configurable: true,\n });\n\n return patchedMiddleware;\n }\n\n public _patchUse(original: Server['use']): Use {\n const patchMiddleware = this._patchMiddleware.bind(this);\n return function (this: Server, ...args: UseArgs): Server {\n const middleWare = args[args.length - 1] as HandleFunction;\n const routeName = (args[args.length - 2] || '') as string;\n\n args[args.length - 1] = patchMiddleware(routeName, middleWare);\n\n return original.apply(this, args as UseArgs2);\n };\n }\n\n public _patchHandle(original: Server['handle']): Server['handle'] {\n const patchOut = this._patchOut.bind(this);\n return function (this: Server): ReturnType<Server['handle']> {\n const [reqIdx, outIdx] = [0, 2];\n const req = arguments[reqIdx] as PatchedRequest;\n const out = arguments[outIdx];\n const completeStack = addNewStackLayer(req);\n\n if (typeof out === 'function') {\n arguments[outIdx] = patchOut(out as NextFunction, completeStack);\n }\n\n return Reflect.apply(original, this, arguments);\n };\n }\n\n public _patchOut(out: NextFunction, completeStack: () => void): NextFunction {\n return function nextFunction(this: NextFunction, ...args: unknown[]): void {\n completeStack();\n return Reflect.apply(out, this, args);\n };\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","isWrapped","isError","SPAN_STATUS_ERROR","ConnectTypes","startInactiveSpan","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","ATTR_HTTP_ROUTE","AttributeNames","replaceCurrentStackRoute","setHttpServerSpanRouteAttribute","generateRoute","addNewStackLayer"],"mappings":";;;;;;;;;AA2BA,MAAM,YAAA,GAAe,iCAAA;AAErB,MAAM,cAAA,GAAiB,WAAA;AAGhB,MAAM,+BAA+BA,mCAAA,CAAoB;AAAA,EAC9D,WAAA,CAAY,MAAA,GAAgC,EAAC,EAAG;AAC9C,IAAA,KAAA,CAAM,YAAA,EAA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A,CAAQ,KAAA,CAAM,QAAA,EAAU,IAAA,EAAM,SAAS,CAAA;AAAA,IAChD,CAAA;AAAA,EACF;AAAA,EAEO,SAAA,CAAU,KAAmB,aAAA,EAAyC;AAC3E,IAAA,OAAO,SAAS,gBAAoC,IAAA,EAAuB;AACzE,MAAA,aAAA,EAAc;AACd,MAAA,OAAO,OAAA,CAAQ,KAAA,CAAM,GAAA,EAAK,IAAA,EAAM,IAAI,CAAA;AAAA,IACtC,CAAA;AAAA,EACF;AACF;;;;"}
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/connect/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-connect\n * - Upstream version: @opentelemetry/instrumentation-connect@0.61.0\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n */\n\nimport type { ServerResponse } from 'http';\nimport { AttributeNames, ConnectTypes } from './enums/AttributeNames';\nimport type { HandleFunction, NextFunction, PatchedRequest, Server, Use, UseArgs, UseArgs2 } from './internal-types';\nimport type { Span } from '@sentry/core';\nimport {\n isError,\n SDK_VERSION,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n} from '@sentry/core';\nimport { setHttpServerSpanRouteAttribute } from '../../../../utils/setHttpServerSpanRouteAttribute';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport { HTTP_ROUTE } from '@sentry/conventions/attributes';\nimport { replaceCurrentStackRoute, addNewStackLayer, generateRoute } from './utils';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-connect';\n\nconst ANONYMOUS_NAME = 'anonymous';\n\n/** Connect instrumentation for OpenTelemetry */\nexport class ConnectInstrumentation extends InstrumentationBase {\n constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n init() {\n return [\n new InstrumentationNodeModuleDefinition('connect', ['>=3.0.0 <4'], moduleExports => {\n return this._patchConstructor(moduleExports);\n }),\n ];\n }\n\n private _patchApp(patchedApp: Server) {\n // oxlint-disable-next-line typescript/unbound-method\n if (!isWrapped(patchedApp.use)) {\n this._wrap(patchedApp, 'use', this._patchUse.bind(this));\n }\n // oxlint-disable-next-line typescript/unbound-method\n if (!isWrapped(patchedApp.handle)) {\n this._wrap(patchedApp, 'handle', this._patchHandle.bind(this));\n }\n }\n\n private _patchConstructor(original: () => Server): () => Server {\n const patchApp = this._patchApp.bind(this);\n return function (this: Server, ...args: unknown[]) {\n const app = Reflect.apply(original, this, args) as Server;\n patchApp(app);\n return app;\n };\n }\n\n public _patchNext(next: NextFunction, span: Span, finishSpan: () => void): NextFunction {\n return function nextFunction(this: NextFunction, err?: unknown): void {\n if (isError(err)) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n const result = next.apply(this, [err]);\n finishSpan();\n return result;\n };\n }\n\n public _startSpan(routeName: string, middleWare: HandleFunction): Span {\n const connectType = routeName ? ConnectTypes.REQUEST_HANDLER : ConnectTypes.MIDDLEWARE;\n const connectName = routeName || middleWare.name || ANONYMOUS_NAME;\n return startInactiveSpan({\n name: connectName,\n op: `${connectType}.connect`,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.connect',\n [HTTP_ROUTE]: routeName.length > 0 ? routeName : '/',\n [AttributeNames.CONNECT_TYPE]: connectType,\n [AttributeNames.CONNECT_NAME]: connectName,\n },\n });\n }\n\n public _patchMiddleware(routeName: string, middleWare: HandleFunction): HandleFunction {\n const isEnabled = this.isEnabled.bind(this);\n const startSpan: (routeName: string, middleWare: HandleFunction) => Span = this._startSpan.bind(this);\n const patchNext = this._patchNext.bind(this);\n const isErrorMiddleware = middleWare.length === 4;\n\n function patchedMiddleware(this: Use): void {\n if (!isEnabled()) {\n return Reflect.apply(middleWare, this, arguments);\n }\n const [reqArgIdx, resArgIdx, nextArgIdx] = isErrorMiddleware ? [1, 2, 3] : [0, 1, 2];\n const req = arguments[reqArgIdx] as PatchedRequest;\n const res = arguments[resArgIdx] as ServerResponse;\n const next = arguments[nextArgIdx] as NextFunction;\n\n replaceCurrentStackRoute(req, routeName);\n\n if (routeName) {\n setHttpServerSpanRouteAttribute(generateRoute(req));\n }\n\n const span = startSpan(routeName, middleWare);\n let spanFinished = false;\n\n function finishSpan() {\n if (!spanFinished) {\n spanFinished = true;\n span.end();\n }\n res.removeListener('close', finishSpan);\n }\n\n res.addListener('close', finishSpan);\n arguments[nextArgIdx] = patchNext(next, span, finishSpan);\n\n try {\n return Reflect.apply(middleWare, this, arguments);\n } catch (e) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n finishSpan();\n throw e;\n }\n }\n\n Object.defineProperty(patchedMiddleware, 'length', {\n value: middleWare.length,\n writable: false,\n configurable: true,\n });\n\n return patchedMiddleware;\n }\n\n public _patchUse(original: Server['use']): Use {\n const patchMiddleware = this._patchMiddleware.bind(this);\n return function (this: Server, ...args: UseArgs): Server {\n const middleWare = args[args.length - 1] as HandleFunction;\n const routeName = (args[args.length - 2] || '') as string;\n\n args[args.length - 1] = patchMiddleware(routeName, middleWare);\n\n return original.apply(this, args as UseArgs2);\n };\n }\n\n public _patchHandle(original: Server['handle']): Server['handle'] {\n const patchOut = this._patchOut.bind(this);\n return function (this: Server): ReturnType<Server['handle']> {\n const [reqIdx, outIdx] = [0, 2];\n const req = arguments[reqIdx] as PatchedRequest;\n const out = arguments[outIdx];\n const completeStack = addNewStackLayer(req);\n\n if (typeof out === 'function') {\n arguments[outIdx] = patchOut(out as NextFunction, completeStack);\n }\n\n return Reflect.apply(original, this, arguments);\n };\n }\n\n public _patchOut(out: NextFunction, completeStack: () => void): NextFunction {\n return function nextFunction(this: NextFunction, ...args: unknown[]): void {\n completeStack();\n return Reflect.apply(out, this, args);\n };\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","isWrapped","isError","SPAN_STATUS_ERROR","ConnectTypes","startInactiveSpan","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","HTTP_ROUTE","AttributeNames","replaceCurrentStackRoute","setHttpServerSpanRouteAttribute","generateRoute","addNewStackLayer"],"mappings":";;;;;;;;;AA2BA,MAAM,YAAA,GAAe,iCAAA;AAErB,MAAM,cAAA,GAAiB,WAAA;AAGhB,MAAM,+BAA+BA,mCAAA,CAAoB;AAAA,EAC9D,WAAA,CAAY,MAAA,GAAgC,EAAC,EAAG;AAC9C,IAAA,KAAA,CAAM,YAAA,EAAcC,kBAAa,MAAM,CAAA;AAAA,EACzC;AAAA,EAEA,IAAA,GAAO;AACL,IAAA,OAAO;AAAA,MACL,IAAIC,mDAAA,CAAoC,SAAA,EAAW,CAAC,YAAY,GAAG,CAAA,aAAA,KAAiB;AAClF,QAAA,OAAO,IAAA,CAAK,kBAAkB,aAAa,CAAA;AAAA,MAC7C,CAAC;AAAA,KACH;AAAA,EACF;AAAA,EAEQ,UAAU,UAAA,EAAoB;AAEpC,IAAA,IAAI,CAACC,yBAAA,CAAU,UAAA,CAAW,GAAG,CAAA,EAAG;AAC9B,MAAA,IAAA,CAAK,MAAM,UAAA,EAAY,KAAA,EAAO,KAAK,SAAA,CAAU,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,IACzD;AAEA,IAAA,IAAI,CAACA,yBAAA,CAAU,UAAA,CAAW,MAAM,CAAA,EAAG;AACjC,MAAA,IAAA,CAAK,MAAM,UAAA,EAAY,QAAA,EAAU,KAAK,YAAA,CAAa,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,IAC/D;AAAA,EACF;AAAA,EAEQ,kBAAkB,QAAA,EAAsC;AAC9D,IAAA,MAAM,QA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,aAAa,QAAA,EAA8C;AAChE,IAAA,MAAM,QAAA,GAAW,IAAA,CAAK,SAAA,CAAU,IAAA,CAAK,IAAI,CAAA;AACzC,IAAA,OAAO,WAAsD;AAC3D,MAAA,MAAM,CAAC,MAAA,EAAQ,MAAM,CAAA,GAAI,CAAC,GAAG,CAAC,CAAA;AAC9B,MAAA,MAAM,GAAA,GAAM,UAAU,MAAM,CAAA;AAC5B,MAAA,MAAM,GAAA,GAAM,UAAU,MAAM,CAAA;AAC5B,MAAA,MAAM,aAAA,GAAgBS,uBAAiB,GAAG,CAAA;AAE1C,MAAA,IAAI,OAAO,QAAQ,UAAA,EAAY;AAC7B,QAAA,SAAA,CAAU,MAAM,CAAA,GAAI,QAAA,CAAS,GAAA,EAAqB,aAAa,CAAA;AAAA,MACjE;AAEA,MAAA,OAAO,OAAA,CAAQ,KAAA,CAAM,QAAA,EAAU,IAAA,EAAM,SAAS,CAAA;AAAA,IAChD,CAAA;AAAA,EACF;AAAA,EAEO,SAAA,CAAU,KAAmB,aAAA,EAAyC;AAC3E,IAAA,OAAO,SAAS,gBAAoC,IAAA,EAAuB;AACzE,MAAA,aAAA,EAAc;AACd,MAAA,OAAO,OAAA,CAAQ,KAAA,CAAM,GAAA,EAAK,IAAA,EAAM,IAAI,CAAA;AAAA,IACtC,CAAA;AAAA,EACF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/dataloader/index.ts"],"sourcesContent":["import { DataloaderInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Dataloader';\n\nexport const instrumentDataloader = generateInstrumentOnce(INTEGRATION_NAME, () => new DataloaderInstrumentation());\n\nconst _dataloaderIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentDataloader();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library.\n *\n * For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.dataloaderIntegration()],\n * });\n * ```\n */\nexport const dataloaderIntegration = defineIntegration(_dataloaderIntegration);\n"],"names":["generateInstrumentOnce","DataloaderInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,YAAA;AAElB,MAAM,uBAAuBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,2CAA2B;AAElH,MAAM,0BAA0B,MAAM;AACpC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,oBAAA,EAAqB;AAAA,IACvB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,qBAAA,GAAwBC,uBAAkB,sBAAsB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/dataloader/index.ts"],"sourcesContent":["import { DataloaderInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Dataloader' as const;\n\nexport const instrumentDataloader = generateInstrumentOnce(INTEGRATION_NAME, () => new DataloaderInstrumentation());\n\nconst _dataloaderIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentDataloader();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library.\n *\n * For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.dataloaderIntegration()],\n * });\n * ```\n */\nexport const dataloaderIntegration = defineIntegration(_dataloaderIntegration);\n"],"names":["generateInstrumentOnce","DataloaderInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,YAAA;AAElB,MAAM,uBAAuBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,2CAA2B;AAElH,MAAM,0BAA0B,MAAM;AACpC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,oBAAA,EAAqB;AAAA,IACvB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,qBAAA,GAAwBC,uBAAkB,sBAAsB;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"express.js","sources":["../../../../src/integrations/tracing/express.ts"],"sourcesContent":["// Automatic istrumentation for Express using OTel\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\n\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\nimport {\n type ExpressIntegrationOptions,\n type IntegrationFn,\n debug,\n patchExpressModule,\n SDK_VERSION,\n defineIntegration,\n setupExpressErrorHandler as coreSetupExpressErrorHandler,\n type ExpressHandlerOptions,\n} from '@sentry/core';\nexport { expressErrorHandler } from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { setHttpServerSpanRouteAttribute } from '../../utils/setHttpServerSpanRouteAttribute';\n\nconst INTEGRATION_NAME = 'Express';\nconst SUPPORTED_VERSIONS = ['>=4.0.0 <6'];\n\nexport function setupExpressErrorHandler(\n //oxlint-disable-next-line no-explicit-any\n app: { use: (middleware: any) => unknown },\n options?: ExpressHandlerOptions,\n): void {\n coreSetupExpressErrorHandler(app, options);\n ensureIsWrapped(app.use, 'express');\n}\n\nexport type ExpressInstrumentationConfig = InstrumentationConfig &\n Omit<ExpressIntegrationOptions, 'express' | 'onRouteResolved'>;\n\nexport const instrumentExpress = generateInstrumentOnce(\n INTEGRATION_NAME,\n (options?: ExpressInstrumentationConfig) => new ExpressInstrumentation(options),\n);\n\nexport class ExpressInstrumentation extends InstrumentationBase<ExpressInstrumentationConfig> {\n public constructor(config: ExpressInstrumentationConfig = {}) {\n super('sentry-express', SDK_VERSION, config);\n }\n public init(): InstrumentationNodeModuleDefinition {\n const module = new InstrumentationNodeModuleDefinition(\n 'express',\n SUPPORTED_VERSIONS,\n express => {\n try {\n patchExpressModule(express, () => ({\n ...this.getConfig(),\n onRouteResolved(route) {\n if (route) {\n setHttpServerSpanRouteAttribute(route);\n }\n },\n }));\n } catch (e) {\n DEBUG_BUILD && debug.error('Failed to patch express module:', e);\n }\n return express;\n },\n // we do not ever actually unpatch in our SDKs\n express => express,\n );\n return module;\n }\n}\nconst _expressIntegration = ((options?: ExpressInstrumentationConfig) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentExpress(options);\n },\n };\n}) satisfies IntegrationFn;\n\nexport const expressIntegration = defineIntegration(_expressIntegration);\n"],"names":["coreSetupExpressErrorHandler","ensureIsWrapped","generateInstrumentOnce","InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","patchExpressModule","setHttpServerSpanRouteAttribute","DEBUG_BUILD","debug","defineIntegration"],"mappings":";;;;;;;;AAmBA,MAAM,gBAAA,GAAmB,SAAA;AACzB,MAAM,kBAAA,GAAqB,CAAC,YAAY,CAAA;AAEjC,SAAS,wBAAA,CAEd,KACA,OAAA,EACM;AACN,EAAAA,6BAAA,CAA6B,KAAK,OAAO,CAAA;AACzC,EAAAC,wBAAA,CAAgB,GAAA,CAAI,KAAK,SAAS,CAAA;AACpC;AAKO,MAAM,iBAAA,GAAoBC,+BAAA;AAAA,EAC/B,gBAAA;AAAA,EACA,CAAC,OAAA,KAA2C,IAAI,sBAAA,CAAuB,OAAO;AAChF;AAEO,MAAM,+BAA+BC,mCAAA,CAAkD;AAAA,EACrF,WAAA,CAAY,MAAA,GAAuC,EAAC,EAAG;AAC5D,IAAA,KAAA,CAAM,gBAAA,EAAkBC,kBAAa,MAAM,CAAA;AAAA,EAC7C;AAAA,EACO,IAAA,GAA4C;AACjD,IAAA,MAAM,SAAS,IAAIC,mDAAA;AAAA,MACjB,SAAA;AAAA,MACA,kBAAA;AAAA,MACA,CAAA,OAAA,KAAW;AACT,QAAA,IAAI;AACF,UAAAC,uBAAA,CAAmB,SAAS,OAAO;AAAA,YACjC,GAAG,KAAK,SAAA,EAAU;AAAA,YAClB,gBAAgB,KAAA,EAAO;AACrB,cAAA,IAAI,KAAA,EAAO;AACT,gBAAAC,+DAAA,CAAgC,KAAK,CAAA;AAAA,cACvC;AAAA,YACF;AAAA,WACF,CAAE,CAAA;AAAA,QACJ,SAAS,CAAA,EAAG;AACV,UAAAC,sBAAA,IAAeC,UAAA,CAAM,KAAA,CAAM,iCAAA,EAAmC,CAAC,CAAA;AAAA,QACjE;AACA,QAAA,OAAO,OAAA;AAAA,MACT,CAAA;AAAA;AAAA,MAEA,CAAA,OAAA,KAAW;AAAA,KACb;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AACF;AACA,MAAM,mBAAA,IAAuB,CAAC,OAAA,KAA2C;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,iBAAA,CAAkB,OAAO,CAAA;AAAA,IAC3B;AAAA,GACF;AACF,CAAA,CAAA;AAEO,MAAM,kBAAA,GAAqBC,uBAAkB,mBAAmB;;;;;;;;"}
1
+ {"version":3,"file":"express.js","sources":["../../../../src/integrations/tracing/express.ts"],"sourcesContent":["// Automatic istrumentation for Express using OTel\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\n\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\nimport {\n type ExpressIntegrationOptions,\n type IntegrationFn,\n debug,\n patchExpressModule,\n SDK_VERSION,\n defineIntegration,\n setupExpressErrorHandler as coreSetupExpressErrorHandler,\n type ExpressHandlerOptions,\n} from '@sentry/core';\nexport { expressErrorHandler } from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { setHttpServerSpanRouteAttribute } from '../../utils/setHttpServerSpanRouteAttribute';\n\nconst INTEGRATION_NAME = 'Express' as const;\nconst SUPPORTED_VERSIONS = ['>=4.0.0 <6'];\n\nexport function setupExpressErrorHandler(\n //oxlint-disable-next-line no-explicit-any\n app: { use: (middleware: any) => unknown },\n options?: ExpressHandlerOptions,\n): void {\n coreSetupExpressErrorHandler(app, options);\n ensureIsWrapped(app.use, 'express');\n}\n\nexport type ExpressInstrumentationConfig = InstrumentationConfig &\n Omit<ExpressIntegrationOptions, 'express' | 'onRouteResolved'>;\n\nexport const instrumentExpress = generateInstrumentOnce(\n INTEGRATION_NAME,\n (options?: ExpressInstrumentationConfig) => new ExpressInstrumentation(options),\n);\n\nexport class ExpressInstrumentation extends InstrumentationBase<ExpressInstrumentationConfig> {\n public constructor(config: ExpressInstrumentationConfig = {}) {\n super('sentry-express', SDK_VERSION, config);\n }\n public init(): InstrumentationNodeModuleDefinition {\n const module = new InstrumentationNodeModuleDefinition(\n 'express',\n SUPPORTED_VERSIONS,\n express => {\n try {\n patchExpressModule(express, () => ({\n ...this.getConfig(),\n onRouteResolved(route) {\n if (route) {\n setHttpServerSpanRouteAttribute(route);\n }\n },\n }));\n } catch (e) {\n DEBUG_BUILD && debug.error('Failed to patch express module:', e);\n }\n return express;\n },\n // we do not ever actually unpatch in our SDKs\n express => express,\n );\n return module;\n }\n}\nconst _expressIntegration = ((options?: ExpressInstrumentationConfig) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentExpress(options);\n },\n };\n}) satisfies IntegrationFn;\n\nexport const expressIntegration = defineIntegration(_expressIntegration);\n"],"names":["coreSetupExpressErrorHandler","ensureIsWrapped","generateInstrumentOnce","InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","patchExpressModule","setHttpServerSpanRouteAttribute","DEBUG_BUILD","debug","defineIntegration"],"mappings":";;;;;;;;AAmBA,MAAM,gBAAA,GAAmB,SAAA;AACzB,MAAM,kBAAA,GAAqB,CAAC,YAAY,CAAA;AAEjC,SAAS,wBAAA,CAEd,KACA,OAAA,EACM;AACN,EAAAA,6BAAA,CAA6B,KAAK,OAAO,CAAA;AACzC,EAAAC,wBAAA,CAAgB,GAAA,CAAI,KAAK,SAAS,CAAA;AACpC;AAKO,MAAM,iBAAA,GAAoBC,+BAAA;AAAA,EAC/B,gBAAA;AAAA,EACA,CAAC,OAAA,KAA2C,IAAI,sBAAA,CAAuB,OAAO;AAChF;AAEO,MAAM,+BAA+BC,mCAAA,CAAkD;AAAA,EACrF,WAAA,CAAY,MAAA,GAAuC,EAAC,EAAG;AAC5D,IAAA,KAAA,CAAM,gBAAA,EAAkBC,kBAAa,MAAM,CAAA;AAAA,EAC7C;AAAA,EACO,IAAA,GAA4C;AACjD,IAAA,MAAM,SAAS,IAAIC,mDAAA;AAAA,MACjB,SAAA;AAAA,MACA,kBAAA;AAAA,MACA,CAAA,OAAA,KAAW;AACT,QAAA,IAAI;AACF,UAAAC,uBAAA,CAAmB,SAAS,OAAO;AAAA,YACjC,GAAG,KAAK,SAAA,EAAU;AAAA,YAClB,gBAAgB,KAAA,EAAO;AACrB,cAAA,IAAI,KAAA,EAAO;AACT,gBAAAC,+DAAA,CAAgC,KAAK,CAAA;AAAA,cACvC;AAAA,YACF;AAAA,WACF,CAAE,CAAA;AAAA,QACJ,SAAS,CAAA,EAAG;AACV,UAAAC,sBAAA,IAAeC,UAAA,CAAM,KAAA,CAAM,iCAAA,EAAmC,CAAC,CAAA;AAAA,QACjE;AACA,QAAA,OAAO,OAAA;AAAA,MACT,CAAA;AAAA;AAAA,MAEA,CAAA,OAAA,KAAW;AAAA,KACb;AACA,IAAA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