@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,8 +1,4 @@
1
1
  export declare const ATTR_DB_CONNECTION_STRING = "db.connection_string";
2
- export declare const ATTR_DB_STATEMENT = "db.statement";
3
- export declare const ATTR_DB_SYSTEM = "db.system";
4
- export declare const ATTR_NET_PEER_NAME = "net.peer.name";
5
- export declare const ATTR_NET_PEER_PORT = "net.peer.port";
6
2
  export declare const DB_SYSTEM_NAME_VALUE_REDIS = "redis";
7
3
  export declare const DB_SYSTEM_VALUE_REDIS = "redis";
8
4
  //# sourceMappingURL=semconv.d.ts.map
@@ -16,5 +16,7 @@ export declare const instrumentTedious: ((options?: unknown) => TediousInstrumen
16
16
  * });
17
17
  * ```
18
18
  */
19
- export declare const tediousIntegration: () => import("@sentry/core").Integration;
19
+ export declare const tediousIntegration: () => import("@sentry/core").Integration & {
20
+ name: "Tedious";
21
+ };
20
22
  //# sourceMappingURL=index.d.ts.map
@@ -1,14 +1,3 @@
1
- /**
2
- * Deprecated, use `db.namespace` instead.
3
- *
4
- * @example customers
5
- * @example main
6
- *
7
- * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
8
- *
9
- * @deprecated Replaced by `db.namespace`.
10
- */
11
- export declare const ATTR_DB_NAME: "db.name";
12
1
  /**
13
2
  * Deprecated, use `db.collection.name` instead.
14
3
  *
@@ -20,57 +9,7 @@ export declare const ATTR_DB_NAME: "db.name";
20
9
  */
21
10
  export declare const ATTR_DB_SQL_TABLE: "db.sql.table";
22
11
  /**
23
- * The database statement being executed.
24
- *
25
- * @example SELECT * FROM wuser_table
26
- * @example SET mykey "WuValue"
27
- *
28
- * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
29
- *
30
- * @deprecated Replaced by `db.query.text`.
31
- */
32
- export declare const ATTR_DB_STATEMENT: "db.statement";
33
- /**
34
- * Deprecated, use `db.system.name` instead.
35
- *
36
- * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
37
- *
38
- * @deprecated Replaced by `db.system.name`.
39
- */
40
- export declare const ATTR_DB_SYSTEM: "db.system";
41
- /**
42
- * Deprecated, no replacement at this time.
43
- *
44
- * @example readonly_user
45
- * @example reporting_user
46
- *
47
- * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
48
- *
49
- * @deprecated Removed, no replacement at this time.
50
- */
51
- export declare const ATTR_DB_USER: "db.user";
52
- /**
53
- * Deprecated, use `server.address` on client spans and `client.address` on server spans.
54
- *
55
- * @example example.com
56
- *
57
- * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
58
- *
59
- * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
60
- */
61
- export declare const ATTR_NET_PEER_NAME: "net.peer.name";
62
- /**
63
- * Deprecated, use `server.port` on client spans and `client.port` on server spans.
64
- *
65
- * @example 8080
66
- *
67
- * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
68
- *
69
- * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
70
- */
71
- export declare const ATTR_NET_PEER_PORT: "net.peer.port";
72
- /**
73
- * Enum value "mssql" for attribute {@link ATTR_DB_SYSTEM}.
12
+ * Enum value "mssql" for attribute `db.system`.
74
13
  *
75
14
  * Microsoft SQL Server
76
15
  *
@@ -1,2 +1,2 @@
1
- export declare const INTEGRATION_NAME = "VercelAI";
1
+ export declare const INTEGRATION_NAME: "VercelAI";
2
2
  //# sourceMappingURL=constants.d.ts.map
@@ -38,5 +38,7 @@ export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiI
38
38
  * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
39
39
  * });
40
40
  */
41
- export declare const vercelAIIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration;
41
+ export declare const vercelAIIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration & {
42
+ name: "VercelAI";
43
+ };
42
44
  //# sourceMappingURL=index.d.ts.map
@@ -13,7 +13,7 @@ import { Integration } from '@sentry/core';
13
13
  */
14
14
  export interface DiagnosticsChannelInjection {
15
15
  /** Channel-based integrations to register, replacing their OTel equivalents. */
16
- integrations: Integration[];
16
+ integrations: Integration[] | readonly Integration[];
17
17
  /** OTel integration names these replace; filtered out of the default set. */
18
18
  replacedOtelIntegrationNames: string[];
19
19
  /** Installs the module hooks that inject the diagnostics channels. */
@@ -1,3 +1,5 @@
1
+ import { channelIntegrations } from '@sentry/server-utils/orchestrion';
2
+ export declare function diagnosticsChannelInjectionIntegrations(): typeof channelIntegrations;
1
3
  /**
2
4
  * EXPERIMENTAL: opt into diagnostics-channel-based auto-instrumentation.
3
5
  *
@@ -1,7 +1,6 @@
1
1
  import { SpanProcessor } from '@opentelemetry/sdk-trace-base';
2
- import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
3
2
  import { NodeClient } from '@sentry/node-core';
4
- import { AsyncLocalStorageLookup } from '@sentry/opentelemetry';
3
+ import { AsyncLocalStorageLookup, OpenTelemetryTracerProvider } from '@sentry/opentelemetry';
5
4
  interface AdditionalOpenTelemetryOptions {
6
5
  /** Additional SpanProcessor instances that should be used. */
7
6
  spanProcessors?: SpanProcessor[];
@@ -22,8 +21,8 @@ interface NodePreloadOptions {
22
21
  export declare function preloadOpenTelemetry(options?: NodePreloadOptions): void;
23
22
  /** Just exported for tests. */
24
23
  export declare function setupOtel(client: NodeClient, options?: AdditionalOpenTelemetryOptions): [
25
- BasicTracerProvider,
26
- AsyncLocalStorageLookup
24
+ OpenTelemetryTracerProvider | undefined,
25
+ AsyncLocalStorageLookup | undefined
27
26
  ];
28
27
  /** Just exported for tests. */
29
28
  export declare function _clampSpanProcessorTimeout(maxSpanWaitDuration: number | undefined): number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/node",
3
- "version": "10.62.0",
3
+ "version": "10.64.0",
4
4
  "description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
@@ -66,13 +66,13 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@opentelemetry/api": "^1.9.1",
69
- "@opentelemetry/instrumentation": "^0.214.0",
70
- "@opentelemetry/sdk-trace-base": "^2.6.1",
71
- "@opentelemetry/semantic-conventions": "^1.40.0",
72
- "@sentry/core": "10.62.0",
73
- "@sentry/node-core": "10.62.0",
74
- "@sentry/opentelemetry": "10.62.0",
75
- "@sentry/server-utils": "10.62.0",
69
+ "@opentelemetry/instrumentation": "^0.220.0",
70
+ "@opentelemetry/sdk-trace-base": "^2.9.0",
71
+ "@sentry/conventions": "^0.15.1",
72
+ "@sentry/core": "10.64.0",
73
+ "@sentry/node-core": "10.64.0",
74
+ "@sentry/opentelemetry": "10.64.0",
75
+ "@sentry/server-utils": "10.64.0",
76
76
  "import-in-the-middle": "^3.0.0"
77
77
  },
78
78
  "devDependencies": {
@@ -1,80 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const undici = require('./vendored/undici.js');
4
- const core = require('@sentry/core');
5
- const nodeCore = require('@sentry/node-core');
6
-
7
- const INTEGRATION_NAME = "NodeFetch";
8
- let _undiciInstrumentation;
9
- function instrumentNodeFetchSpans(options) {
10
- if (!_undiciInstrumentation) {
11
- _undiciInstrumentation = new undici.UndiciInstrumentation(_getConfigWithDefaults(options));
12
- }
13
- _undiciInstrumentation.enable();
14
- }
15
- const instrumentSentryNodeFetch = nodeCore.generateInstrumentOnce(
16
- `${INTEGRATION_NAME}.sentry`,
17
- nodeCore.SentryNodeFetchInstrumentation,
18
- (options) => {
19
- return options;
20
- }
21
- );
22
- const _nativeNodeFetchIntegration = ((options = {}) => {
23
- return {
24
- name: "NodeFetch",
25
- setupOnce() {
26
- const instrumentSpans = _shouldInstrumentSpans(options, core.getClient()?.getOptions());
27
- if (instrumentSpans) {
28
- instrumentNodeFetchSpans(options);
29
- }
30
- instrumentSentryNodeFetch(options);
31
- }
32
- };
33
- });
34
- const nativeNodeFetchIntegration = core.defineIntegration(_nativeNodeFetchIntegration);
35
- function getAbsoluteUrl(origin, path = "/") {
36
- const url = `${origin}`;
37
- if (url.endsWith("/") && path.startsWith("/")) {
38
- return `${url}${path.slice(1)}`;
39
- }
40
- if (!url.endsWith("/") && !path.startsWith("/")) {
41
- return `${url}/${path}`;
42
- }
43
- return `${url}${path}`;
44
- }
45
- function _shouldInstrumentSpans(options, clientOptions = {}) {
46
- return typeof options.spans === "boolean" ? options.spans : !clientOptions.skipOpenTelemetrySetup && core.hasSpansEnabled(clientOptions);
47
- }
48
- function _getConfigWithDefaults(options = {}) {
49
- const instrumentationConfig = {
50
- ignoreRequestHook: (request) => {
51
- const url = getAbsoluteUrl(request.origin, request.path);
52
- const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;
53
- const shouldIgnore = _ignoreOutgoingRequests && url && _ignoreOutgoingRequests(url);
54
- return !!shouldIgnore;
55
- },
56
- startSpanHook: (request) => {
57
- const url = getAbsoluteUrl(request.origin, request.path);
58
- if (url.startsWith("data:")) {
59
- const sanitizedUrl = core.stripDataUrlContent(url);
60
- return {
61
- [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.node_fetch",
62
- "http.url": sanitizedUrl,
63
- [core.SEMANTIC_ATTRIBUTE_URL_FULL]: sanitizedUrl,
64
- [core.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: `${request.method || "GET"} ${sanitizedUrl}`
65
- };
66
- }
67
- return {
68
- [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.node_fetch"
69
- };
70
- },
71
- requestHook: options.requestHook,
72
- responseHook: options.responseHook,
73
- headersToSpanAttributes: options.headersToSpanAttributes
74
- };
75
- return instrumentationConfig;
76
- }
77
-
78
- exports._getConfigWithDefaults = _getConfigWithDefaults;
79
- exports.nativeNodeFetchIntegration = nativeNodeFetchIntegration;
80
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/integrations/node-fetch/index.ts"],"sourcesContent":["import type { UndiciInstrumentationConfig } from './vendored/types';\nimport { UndiciInstrumentation } from './vendored/undici';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n defineIntegration,\n getClient,\n hasSpansEnabled,\n SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_URL_FULL,\n stripDataUrlContent,\n} from '@sentry/core';\nimport type { NodeClient } from '@sentry/node-core';\nimport { generateInstrumentOnce, SentryNodeFetchInstrumentation } from '@sentry/node-core';\nimport type { NodeClientOptions } from '../../types';\n\nconst INTEGRATION_NAME = 'NodeFetch';\n\ninterface NodeFetchOptions extends Pick<\n UndiciInstrumentationConfig,\n 'requestHook' | 'responseHook' | 'headersToSpanAttributes'\n> {\n /**\n * Whether breadcrumbs should be recorded for 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 UndiciInstrumentation from OpenTelemetry is not setup,\n * only the Sentry-specific instrumentation for breadcrumbs & trace propagation 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 to inject trace propagation headers (sentry-trace, baggage, traceparent) into outgoing fetch 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 UndiciInstrumentation.\n *\n * @default `true`\n */\n tracePropagation?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing fetch 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 ignoreOutgoingRequests?: (url: string) => boolean;\n}\n\nlet _undiciInstrumentation: UndiciInstrumentation | undefined;\n\n// Sets up the vendored undici instrumentation (emits `http.client` spans & propagates traces).\n// The module-level singleton mirrors `generateInstrumentOnce`'s \"instrument once per process\" behavior.\nfunction instrumentNodeFetchSpans(options: NodeFetchOptions): void {\n if (!_undiciInstrumentation) {\n _undiciInstrumentation = new UndiciInstrumentation(_getConfigWithDefaults(options));\n }\n _undiciInstrumentation.enable();\n}\n\nconst instrumentSentryNodeFetch = generateInstrumentOnce(\n `${INTEGRATION_NAME}.sentry`,\n SentryNodeFetchInstrumentation,\n (options: NodeFetchOptions) => {\n return options;\n },\n);\n\nconst _nativeNodeFetchIntegration = ((options: NodeFetchOptions = {}) => {\n return {\n name: 'NodeFetch',\n setupOnce() {\n const instrumentSpans = _shouldInstrumentSpans(options, getClient<NodeClient>()?.getOptions());\n\n // This is the instrumentation that emits spans & propagates traces for outgoing fetch requests\n if (instrumentSpans) {\n instrumentNodeFetchSpans(options);\n }\n\n // This is the Sentry-specific instrumentation that creates breadcrumbs & propagates traces.\n // It must subscribe to the diagnostics channels after the span instrumentation above, so the core\n // trace propagation logic takes precedence. Otherwise, the sentry-trace header may be set multiple times.\n instrumentSentryNodeFetch(options);\n },\n };\n}) satisfies IntegrationFn;\n\nexport const nativeNodeFetchIntegration = defineIntegration(_nativeNodeFetchIntegration);\n\n// Matching the behavior of the base instrumentation\nfunction getAbsoluteUrl(origin: string, path: string = '/'): string {\n const url = `${origin}`;\n\n if (url.endsWith('/') && path.startsWith('/')) {\n return `${url}${path.slice(1)}`;\n }\n\n if (!url.endsWith('/') && !path.startsWith('/')) {\n return `${url}/${path}`;\n }\n\n return `${url}${path}`;\n}\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 typeof options.spans === 'boolean'\n ? options.spans\n : !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);\n}\n\n/** Exported only for tests. */\nexport function _getConfigWithDefaults(options: Partial<NodeFetchOptions> = {}): UndiciInstrumentationConfig {\n const instrumentationConfig = {\n ignoreRequestHook: request => {\n const url = getAbsoluteUrl(request.origin, request.path);\n const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;\n const shouldIgnore = _ignoreOutgoingRequests && url && _ignoreOutgoingRequests(url);\n\n return !!shouldIgnore;\n },\n startSpanHook: request => {\n const url = getAbsoluteUrl(request.origin, request.path);\n\n // Sanitize data URLs to prevent long base64 strings in span attributes\n if (url.startsWith('data:')) {\n const sanitizedUrl = stripDataUrlContent(url);\n return {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.node_fetch',\n 'http.url': sanitizedUrl,\n [SEMANTIC_ATTRIBUTE_URL_FULL]: sanitizedUrl,\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: `${request.method || 'GET'} ${sanitizedUrl}`,\n };\n }\n\n return {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.node_fetch',\n };\n },\n requestHook: options.requestHook,\n responseHook: options.responseHook,\n headersToSpanAttributes: options.headersToSpanAttributes,\n } satisfies UndiciInstrumentationConfig;\n\n return instrumentationConfig;\n}\n"],"names":["UndiciInstrumentation","generateInstrumentOnce","SentryNodeFetchInstrumentation","getClient","defineIntegration","hasSpansEnabled","stripDataUrlContent","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_URL_FULL","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME"],"mappings":";;;;;;AAgBA,MAAM,gBAAA,GAAmB,WAAA;AAuCzB,IAAI,sBAAA;AAIJ,SAAS,yBAAyB,OAAA,EAAiC;AACjE,EAAA,IAAI,CAAC,sBAAA,EAAwB;AAC3B,IAAA,sBAAA,GAAyB,IAAIA,4BAAA,CAAsB,sBAAA,CAAuB,OAAO,CAAC,CAAA;AAAA,EACpF;AACA,EAAA,sBAAA,CAAuB,MAAA,EAAO;AAChC;AAEA,MAAM,yBAAA,GAA4BC,+BAAA;AAAA,EAChC,GAAG,gBAAgB,CAAA,OAAA,CAAA;AAAA,EACnBC,uCAAA;AAAA,EACA,CAAC,OAAA,KAA8B;AAC7B,IAAA,OAAO,OAAA;AAAA,EACT;AACF,CAAA;AAEA,MAAM,2BAAA,IAA+B,CAAC,OAAA,GAA4B,EAAC,KAAM;AACvE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,WAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,MAAM,kBAAkB,sBAAA,CAAuB,OAAA,EAASC,cAAA,EAAsB,EAAG,YAAY,CAAA;AAG7F,MAAA,IAAI,eAAA,EAAiB;AACnB,QAAA,wBAAA,CAAyB,OAAO,CAAA;AAAA,MAClC;AAKA,MAAA,yBAAA,CAA0B,OAAO,CAAA;AAAA,IACnC;AAAA,GACF;AACF,CAAA,CAAA;AAEO,MAAM,0BAAA,GAA6BC,uBAAkB,2BAA2B;AAGvF,SAAS,cAAA,CAAe,MAAA,EAAgB,IAAA,GAAe,GAAA,EAAa;AAClE,EAAA,MAAM,GAAA,GAAM,GAAG,MAAM,CAAA,CAAA;AAErB,EAAA,IAAI,IAAI,QAAA,CAAS,GAAG,KAAK,IAAA,CAAK,UAAA,CAAW,GAAG,CAAA,EAAG;AAC7C,IAAA,OAAO,GAAG,GAAG,CAAA,EAAG,IAAA,CAAK,KAAA,CAAM,CAAC,CAAC,CAAA,CAAA;AAAA,EAC/B;AAEA,EAAA,IAAI,CAAC,IAAI,QAAA,CAAS,GAAG,KAAK,CAAC,IAAA,CAAK,UAAA,CAAW,GAAG,CAAA,EAAG;AAC/C,IAAA,OAAO,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA;AAAA,EACvB;AAEA,EAAA,OAAO,CAAA,EAAG,GAAG,CAAA,EAAG,IAAI,CAAA,CAAA;AACtB;AAEA,SAAS,sBAAA,CAAuB,OAAA,EAA2B,aAAA,GAA4C,EAAC,EAAY;AAGlH,EAAA,OAAO,OAAO,OAAA,CAAQ,KAAA,KAAU,SAAA,GAC5B,OAAA,CAAQ,QACR,CAAC,aAAA,CAAc,sBAAA,IAA0BC,oBAAA,CAAgB,aAAa,CAAA;AAC5E;AAGO,SAAS,sBAAA,CAAuB,OAAA,GAAqC,EAAC,EAAgC;AAC3G,EAAA,MAAM,qBAAA,GAAwB;AAAA,IAC5B,mBAAmB,CAAA,OAAA,KAAW;AAC5B,MAAA,MAAM,GAAA,GAAM,cAAA,CAAe,OAAA,CAAQ,MAAA,EAAQ,QAAQ,IAAI,CAAA;AACvD,MAAA,MAAM,0BAA0B,OAAA,CAAQ,sBAAA;AACxC,MAAA,MAAM,YAAA,GAAe,uBAAA,IAA2B,GAAA,IAAO,uBAAA,CAAwB,GAAG,CAAA;AAElF,MAAA,OAAO,CAAC,CAAC,YAAA;AAAA,IACX,CAAA;AAAA,IACA,eAAe,CAAA,OAAA,KAAW;AACxB,MAAA,MAAM,GAAA,GAAM,cAAA,CAAe,OAAA,CAAQ,MAAA,EAAQ,QAAQ,IAAI,CAAA;AAGvD,MAAA,IAAI,GAAA,CAAI,UAAA,CAAW,OAAO,CAAA,EAAG;AAC3B,QAAA,MAAM,YAAA,GAAeC,yBAAoB,GAAG,CAAA;AAC5C,QAAA,OAAO;AAAA,UACL,CAACC,qCAAgC,GAAG,2BAAA;AAAA,UACpC,UAAA,EAAY,YAAA;AAAA,UACZ,CAACC,gCAA2B,GAAG,YAAA;AAAA,UAC/B,CAACC,+CAA0C,GAAG,CAAA,EAAG,QAAQ,MAAA,IAAU,KAAK,IAAI,YAAY,CAAA;AAAA,SAC1F;AAAA,MACF;AAEA,MAAA,OAAO;AAAA,QACL,CAACF,qCAAgC,GAAG;AAAA,OACtC;AAAA,IACF,CAAA;AAAA,IACA,aAAa,OAAA,CAAQ,WAAA;AAAA,IACrB,cAAc,OAAA,CAAQ,YAAA;AAAA,IACtB,yBAAyB,OAAA,CAAQ;AAAA,GACnC;AAEA,EAAA,OAAO,qBAAA;AACT;;;;;"}
@@ -1,28 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const ATTR_HTTP_REQUEST_METHOD = "http.request.method";
4
- const ATTR_HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original";
5
- const ATTR_HTTP_RESPONSE_STATUS_CODE = "http.response.status_code";
6
- const ATTR_NETWORK_PEER_ADDRESS = "network.peer.address";
7
- const ATTR_NETWORK_PEER_PORT = "network.peer.port";
8
- const ATTR_SERVER_ADDRESS = "server.address";
9
- const ATTR_SERVER_PORT = "server.port";
10
- const ATTR_URL_FULL = "url.full";
11
- const ATTR_URL_PATH = "url.path";
12
- const ATTR_URL_QUERY = "url.query";
13
- const ATTR_URL_SCHEME = "url.scheme";
14
- const ATTR_USER_AGENT_ORIGINAL = "user_agent.original";
15
-
16
- exports.ATTR_HTTP_REQUEST_METHOD = ATTR_HTTP_REQUEST_METHOD;
17
- exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = ATTR_HTTP_REQUEST_METHOD_ORIGINAL;
18
- exports.ATTR_HTTP_RESPONSE_STATUS_CODE = ATTR_HTTP_RESPONSE_STATUS_CODE;
19
- exports.ATTR_NETWORK_PEER_ADDRESS = ATTR_NETWORK_PEER_ADDRESS;
20
- exports.ATTR_NETWORK_PEER_PORT = ATTR_NETWORK_PEER_PORT;
21
- exports.ATTR_SERVER_ADDRESS = ATTR_SERVER_ADDRESS;
22
- exports.ATTR_SERVER_PORT = ATTR_SERVER_PORT;
23
- exports.ATTR_URL_FULL = ATTR_URL_FULL;
24
- exports.ATTR_URL_PATH = ATTR_URL_PATH;
25
- exports.ATTR_URL_QUERY = ATTR_URL_QUERY;
26
- exports.ATTR_URL_SCHEME = ATTR_URL_SCHEME;
27
- exports.ATTR_USER_AGENT_ORIGINAL = ATTR_USER_AGENT_ORIGINAL;
28
- //# sourceMappingURL=semconv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semconv.js","sources":["../../../../../src/integrations/node-fetch/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/ed97091c9890dd18e52759f2ea98e9d7593b3ae4/packages/instrumentation-undici\n * - Upstream version: @opentelemetry/instrumentation-undici@0.24.0\n * - The semantic-convention constants this package emits, inlined from\n * `@opentelemetry/semantic-conventions` (matching the sibling vendored dirs).\n */\n\nexport const ATTR_HTTP_REQUEST_METHOD = 'http.request.method' as const;\nexport const ATTR_HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original' as const;\nexport const ATTR_HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code' as const;\nexport const ATTR_NETWORK_PEER_ADDRESS = 'network.peer.address' as const;\nexport const ATTR_NETWORK_PEER_PORT = 'network.peer.port' as const;\nexport const ATTR_SERVER_ADDRESS = 'server.address' as const;\nexport const ATTR_SERVER_PORT = 'server.port' as const;\nexport const ATTR_URL_FULL = 'url.full' as const;\nexport const ATTR_URL_PATH = 'url.path' as const;\nexport const ATTR_URL_QUERY = 'url.query' as const;\nexport const ATTR_URL_SCHEME = 'url.scheme' as const;\nexport const ATTR_USER_AGENT_ORIGINAL = 'user_agent.original' as const;\n"],"names":[],"mappings":";;AAWO,MAAM,wBAAA,GAA2B;AACjC,MAAM,iCAAA,GAAoC;AAC1C,MAAM,8BAAA,GAAiC;AACvC,MAAM,yBAAA,GAA4B;AAClC,MAAM,sBAAA,GAAyB;AAC/B,MAAM,mBAAA,GAAsB;AAC5B,MAAM,gBAAA,GAAmB;AACzB,MAAM,aAAA,GAAgB;AACtB,MAAM,aAAA,GAAgB;AACtB,MAAM,cAAA,GAAiB;AACvB,MAAM,eAAA,GAAkB;AACxB,MAAM,wBAAA,GAA2B;;;;;;;;;;;;;;;"}
@@ -1,302 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const diagch = require('diagnostics_channel');
4
- const url = require('url');
5
- const core = require('@sentry/core');
6
- const debugBuild = require('../../../debug-build.js');
7
- const semconv = require('./semconv.js');
8
-
9
- function safeExecute(fn, onError) {
10
- try {
11
- return fn();
12
- } catch (error) {
13
- onError(error);
14
- return void 0;
15
- }
16
- }
17
- class UndiciInstrumentation {
18
- constructor(config = {}) {
19
- // Keep ref to avoid https://github.com/nodejs/node/issues/42170 bug and for unsubscribing.
20
- this._channelSubs = [];
21
- this._spanFromReq = /* @__PURE__ */ new WeakMap();
22
- // Caches trace-propagation decisions per URL so we don't recompute the `tracePropagationTargets` regexes per request.
23
- this._propagationDecisionMap = new core.LRUMap(100);
24
- this._config = config;
25
- }
26
- disable() {
27
- this._channelSubs.forEach((sub) => sub.unsubscribe());
28
- this._channelSubs.length = 0;
29
- }
30
- /** Subscribe to the undici diagnostics channels (idempotent). */
31
- enable() {
32
- if (this._channelSubs.length > 0) {
33
- return;
34
- }
35
- this.subscribeToChannel("undici:request:create", this.onRequestCreated.bind(this));
36
- this.subscribeToChannel("undici:client:sendHeaders", this.onRequestHeaders.bind(this));
37
- this.subscribeToChannel("undici:request:headers", this.onResponseHeaders.bind(this));
38
- this.subscribeToChannel("undici:request:trailers", this.onDone.bind(this));
39
- this.subscribeToChannel("undici:request:error", this.onError.bind(this));
40
- }
41
- subscribeToChannel(diagnosticChannel, onMessage) {
42
- const [major = 0, minor = 0] = process.version.replace("v", "").split(".").map((n) => Number(n));
43
- const useNewSubscribe = major > 18 || major === 18 && minor >= 19;
44
- let unsubscribe;
45
- if (useNewSubscribe) {
46
- diagch.subscribe?.(diagnosticChannel, onMessage);
47
- unsubscribe = () => diagch.unsubscribe?.(diagnosticChannel, onMessage);
48
- } else {
49
- const channel = diagch.channel(diagnosticChannel);
50
- channel.subscribe(onMessage);
51
- unsubscribe = () => channel.unsubscribe(onMessage);
52
- }
53
- this._channelSubs.push({
54
- name: diagnosticChannel,
55
- unsubscribe
56
- });
57
- }
58
- parseRequestHeaders(request) {
59
- const result = /* @__PURE__ */ new Map();
60
- if (Array.isArray(request.headers)) {
61
- for (let i = 0; i < request.headers.length; i += 2) {
62
- const key = request.headers[i];
63
- const value = request.headers[i + 1];
64
- if (typeof key === "string" && value !== void 0) {
65
- result.set(key.toLowerCase(), value);
66
- }
67
- }
68
- } else if (typeof request.headers === "string") {
69
- const headers = request.headers.split("\r\n");
70
- for (const line of headers) {
71
- if (!line) {
72
- continue;
73
- }
74
- const colonIndex = line.indexOf(":");
75
- if (colonIndex === -1) {
76
- continue;
77
- }
78
- const key = line.substring(0, colonIndex).toLowerCase();
79
- const value = line.substring(colonIndex + 1).trim();
80
- const allValues = result.get(key);
81
- if (allValues && Array.isArray(allValues)) {
82
- allValues.push(value);
83
- } else if (allValues) {
84
- result.set(key, [allValues, value]);
85
- } else {
86
- result.set(key, value);
87
- }
88
- }
89
- }
90
- return result;
91
- }
92
- // This is the 1st message we receive for each request (fired after request creation). Here we will
93
- // create the span and populate some atttributes, then link the span to the request for further
94
- // span processing
95
- onRequestCreated({ request }) {
96
- const config = this._config;
97
- const enabled = config.enabled !== false;
98
- const shouldIgnoreReq = safeExecute(
99
- () => !enabled || request.method === "CONNECT" || config.ignoreRequestHook?.(request),
100
- (e) => e && debugBuild.DEBUG_BUILD && core.debug.error("caught ignoreRequestHook error: ", e)
101
- );
102
- if (shouldIgnoreReq) {
103
- return;
104
- }
105
- let requestUrl;
106
- try {
107
- requestUrl = new url.URL(request.path, request.origin);
108
- } catch (err) {
109
- debugBuild.DEBUG_BUILD && core.debug.warn("could not determine url.full:", err);
110
- return;
111
- }
112
- const urlScheme = requestUrl.protocol.replace(":", "");
113
- const requestMethod = this.getRequestMethod(request.method);
114
- const attributes = {
115
- [semconv.ATTR_HTTP_REQUEST_METHOD]: requestMethod,
116
- [semconv.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]: request.method,
117
- [semconv.ATTR_URL_FULL]: requestUrl.toString(),
118
- [semconv.ATTR_URL_PATH]: requestUrl.pathname,
119
- [semconv.ATTR_URL_QUERY]: requestUrl.search,
120
- [semconv.ATTR_URL_SCHEME]: urlScheme
121
- };
122
- const schemePorts = { https: "443", http: "80" };
123
- const serverAddress = requestUrl.hostname;
124
- const serverPort = requestUrl.port || schemePorts[urlScheme];
125
- attributes[semconv.ATTR_SERVER_ADDRESS] = serverAddress;
126
- if (serverPort && !isNaN(Number(serverPort))) {
127
- attributes[semconv.ATTR_SERVER_PORT] = Number(serverPort);
128
- }
129
- const headersMap = this.parseRequestHeaders(request);
130
- const userAgentValues = headersMap.get("user-agent");
131
- if (userAgentValues) {
132
- const userAgent = Array.isArray(userAgentValues) ? userAgentValues[userAgentValues.length - 1] : userAgentValues;
133
- attributes[semconv.ATTR_USER_AGENT_ORIGINAL] = userAgent;
134
- }
135
- const hookAttributes = safeExecute(
136
- () => config.startSpanHook?.(request),
137
- (e) => e && debugBuild.DEBUG_BUILD && core.debug.error("caught startSpanHook error: ", e)
138
- );
139
- if (hookAttributes) {
140
- Object.entries(hookAttributes).forEach(([key, val]) => {
141
- attributes[key] = val;
142
- });
143
- }
144
- const span = core.startInactiveSpan({
145
- name: requestMethod === "_OTHER" ? "HTTP" : requestMethod,
146
- kind: core.SPAN_KIND.CLIENT,
147
- attributes
148
- });
149
- safeExecute(
150
- () => config.requestHook?.(span, request),
151
- (e) => e && debugBuild.DEBUG_BUILD && core.debug.error("caught requestHook error: ", e)
152
- );
153
- this.injectTracePropagationHeaders(span, request, requestUrl.toString());
154
- this._spanFromReq.set(request, span);
155
- }
156
- // This is the 2nd message we receive for each request. It is fired when connection with
157
- // the remote is established and about to send the first byte. Here we do have info about the
158
- // remote address and port so we can populate some `network.*` attributes into the span
159
- onRequestHeaders({ request, socket }) {
160
- const span = this._spanFromReq.get(request);
161
- if (!span) {
162
- return;
163
- }
164
- const config = this._config;
165
- const { remoteAddress, remotePort } = socket;
166
- const spanAttributes = {
167
- [semconv.ATTR_NETWORK_PEER_ADDRESS]: remoteAddress,
168
- [semconv.ATTR_NETWORK_PEER_PORT]: remotePort
169
- };
170
- if (config.headersToSpanAttributes?.requestHeaders) {
171
- const headersToAttribs = new Set(config.headersToSpanAttributes.requestHeaders.map((n) => n.toLowerCase()));
172
- const headersMap = this.parseRequestHeaders(request);
173
- for (const [name, value] of headersMap.entries()) {
174
- if (headersToAttribs.has(name)) {
175
- const attrValue = Array.isArray(value) ? value : [value];
176
- spanAttributes[`http.request.header.${name}`] = attrValue;
177
- }
178
- }
179
- }
180
- span.setAttributes(spanAttributes);
181
- }
182
- // This is the 3rd message we get for each request and it's fired when the server
183
- // headers are received, body may not be accessible yet.
184
- // From the response headers we can set the status and content length
185
- onResponseHeaders({ request, response }) {
186
- const span = this._spanFromReq.get(request);
187
- if (!span) {
188
- return;
189
- }
190
- const spanAttributes = {
191
- [semconv.ATTR_HTTP_RESPONSE_STATUS_CODE]: response.statusCode
192
- };
193
- const config = this._config;
194
- safeExecute(
195
- () => config.responseHook?.(span, { request, response }),
196
- (e) => e && debugBuild.DEBUG_BUILD && core.debug.error("caught responseHook error: ", e)
197
- );
198
- if (config.headersToSpanAttributes?.responseHeaders) {
199
- const headersToAttribs = /* @__PURE__ */ new Set();
200
- config.headersToSpanAttributes?.responseHeaders.forEach((name) => headersToAttribs.add(name.toLowerCase()));
201
- for (let idx = 0; idx < response.headers.length; idx = idx + 2) {
202
- const nameBuf = response.headers[idx];
203
- const valueBuf = response.headers[idx + 1];
204
- if (nameBuf === void 0 || valueBuf === void 0) {
205
- continue;
206
- }
207
- const name = nameBuf.toString().toLowerCase();
208
- const value = valueBuf;
209
- if (headersToAttribs.has(name)) {
210
- const attrName = `http.response.header.${name}`;
211
- if (!Object.prototype.hasOwnProperty.call(spanAttributes, attrName)) {
212
- spanAttributes[attrName] = [value.toString()];
213
- } else {
214
- spanAttributes[attrName].push(value.toString());
215
- }
216
- }
217
- }
218
- }
219
- span.setAttributes(spanAttributes);
220
- if (response.statusCode >= 400) {
221
- span.setStatus({ code: core.SPAN_STATUS_ERROR });
222
- }
223
- }
224
- // This is the last event we receive if the request went without any errors
225
- onDone({ request }) {
226
- const span = this._spanFromReq.get(request);
227
- if (!span) {
228
- return;
229
- }
230
- span.end();
231
- this._spanFromReq.delete(request);
232
- }
233
- // This is the event we get when something is wrong in the request like
234
- // - invalid options when calling `fetch` global API or any undici method for request
235
- // - connectivity errors such as unreachable host
236
- // - requests aborted through an `AbortController.signal`
237
- // NOTE: server errors are considered valid responses and it's the lib consumer
238
- // who should deal with that.
239
- onError({ request, error }) {
240
- const span = this._spanFromReq.get(request);
241
- if (!span) {
242
- return;
243
- }
244
- span.setStatus({
245
- code: core.SPAN_STATUS_ERROR,
246
- message: error.message
247
- });
248
- span.end();
249
- this._spanFromReq.delete(request);
250
- }
251
- // Propagate the trace data of the given (client) span into the outgoing request headers, gated by
252
- // `tracePropagationTargets`. Mirrors what `propagation.inject()` did with the SentryPropagator, but
253
- // via Sentry's `getTraceData()` so we stay off OpenTelemetry's propagation API.
254
- injectTracePropagationHeaders(span, request, url) {
255
- const { tracePropagationTargets, propagateTraceparent } = core.getClient()?.getOptions() ?? {};
256
- if (!core.shouldPropagateTraceForUrl(url, tracePropagationTargets, this._propagationDecisionMap)) {
257
- return;
258
- }
259
- const addedHeaders = core.withActiveSpan(span, () => core.getTraceData({ propagateTraceparent }));
260
- const headerEntries = Object.entries(addedHeaders);
261
- for (let i = 0; i < headerEntries.length; i++) {
262
- const pair = headerEntries[i];
263
- if (!pair) {
264
- continue;
265
- }
266
- const [k, v] = pair;
267
- if (!v) {
268
- continue;
269
- }
270
- if (typeof request.addHeader === "function") {
271
- request.addHeader(k, v);
272
- } else if (typeof request.headers === "string") {
273
- request.headers += `${k}: ${v}\r
274
- `;
275
- } else if (Array.isArray(request.headers)) {
276
- request.headers.push(k, v);
277
- }
278
- }
279
- }
280
- getRequestMethod(original) {
281
- const knownMethods = {
282
- CONNECT: true,
283
- OPTIONS: true,
284
- HEAD: true,
285
- GET: true,
286
- POST: true,
287
- PUT: true,
288
- PATCH: true,
289
- DELETE: true,
290
- TRACE: true,
291
- // QUERY from https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/
292
- QUERY: true
293
- };
294
- if (original.toUpperCase() in knownMethods) {
295
- return original.toUpperCase();
296
- }
297
- return "_OTHER";
298
- }
299
- }
300
-
301
- exports.UndiciInstrumentation = UndiciInstrumentation;
302
- //# sourceMappingURL=undici.js.map