@sentry/node 10.62.0 → 10.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  2. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  3. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  4. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  5. package/build/cjs/integrations/fs/index.js.map +1 -1
  6. package/build/cjs/integrations/http.js.map +1 -1
  7. package/build/cjs/integrations/node-fetch/index.js +7 -49
  8. package/build/cjs/integrations/node-fetch/index.js.map +1 -1
  9. package/build/cjs/integrations/node-fetch/undici-instrumentation.js +266 -0
  10. package/build/cjs/integrations/node-fetch/undici-instrumentation.js.map +1 -0
  11. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -1
  12. package/build/cjs/integrations/tracing/connect/index.js.map +1 -1
  13. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -1
  14. package/build/cjs/integrations/tracing/express.js.map +1 -1
  15. package/build/cjs/integrations/tracing/fastify/index.js +7 -103
  16. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  17. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +2 -3
  18. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  19. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  20. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -1
  21. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -1
  22. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  23. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  24. package/build/cjs/integrations/tracing/index.js +0 -1
  25. package/build/cjs/integrations/tracing/index.js.map +1 -1
  26. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -1
  27. package/build/cjs/integrations/tracing/knex/index.js.map +1 -1
  28. package/build/cjs/integrations/tracing/koa/index.js.map +1 -1
  29. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -1
  30. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +4 -2
  31. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  32. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -1
  33. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -1
  34. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -1
  35. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +34 -128
  36. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  37. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +0 -2
  38. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  39. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +2 -27
  40. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  41. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -1
  42. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -1
  43. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  44. package/build/cjs/integrations/tracing/prisma/index.js +1 -10
  45. package/build/cjs/integrations/tracing/prisma/index.js.map +1 -1
  46. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
  47. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  48. package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  49. package/build/cjs/integrations/tracing/prisma/vendored/global.js +2 -2
  50. package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -1
  51. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
  52. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  53. package/build/cjs/integrations/tracing/redis/index.js +3 -3
  54. package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
  55. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -1
  56. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
  57. package/build/cjs/integrations/tracing/vercelai/index.js +2 -4
  58. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  59. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -1
  60. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +8 -6
  61. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  62. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  63. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  64. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  65. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  66. package/build/esm/integrations/fs/index.js.map +1 -1
  67. package/build/esm/integrations/http.js.map +1 -1
  68. package/build/esm/integrations/node-fetch/index.js +9 -50
  69. package/build/esm/integrations/node-fetch/index.js.map +1 -1
  70. package/build/esm/integrations/node-fetch/undici-instrumentation.js +264 -0
  71. package/build/esm/integrations/node-fetch/undici-instrumentation.js.map +1 -0
  72. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -1
  73. package/build/esm/integrations/tracing/connect/index.js.map +1 -1
  74. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -1
  75. package/build/esm/integrations/tracing/express.js.map +1 -1
  76. package/build/esm/integrations/tracing/fastify/index.js +8 -103
  77. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  78. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +3 -4
  79. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  80. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  81. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -1
  82. package/build/esm/integrations/tracing/graphql/index.js.map +1 -1
  83. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  84. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  85. package/build/esm/integrations/tracing/index.js +1 -2
  86. package/build/esm/integrations/tracing/index.js.map +1 -1
  87. package/build/esm/integrations/tracing/kafka/index.js.map +1 -1
  88. package/build/esm/integrations/tracing/knex/index.js.map +1 -1
  89. package/build/esm/integrations/tracing/koa/index.js.map +1 -1
  90. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -1
  91. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +5 -3
  92. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  93. package/build/esm/integrations/tracing/mongo/index.js.map +1 -1
  94. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -1
  95. package/build/esm/integrations/tracing/mysql/index.js.map +1 -1
  96. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +37 -131
  97. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  98. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +1 -2
  99. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  100. package/build/esm/integrations/tracing/mysql/vendored/utils.js +3 -25
  101. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  102. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -1
  103. package/build/esm/integrations/tracing/postgres/index.js.map +1 -1
  104. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  105. package/build/esm/integrations/tracing/prisma/index.js +2 -11
  106. package/build/esm/integrations/tracing/prisma/index.js.map +1 -1
  107. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +83 -57
  108. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  109. package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  110. package/build/esm/integrations/tracing/prisma/vendored/global.js +2 -2
  111. package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -1
  112. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +1 -6
  113. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  114. package/build/esm/integrations/tracing/redis/index.js +4 -4
  115. package/build/esm/integrations/tracing/redis/index.js.map +1 -1
  116. package/build/esm/integrations/tracing/tedious/index.js.map +1 -1
  117. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
  118. package/build/esm/integrations/tracing/vercelai/index.js +3 -5
  119. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  120. package/build/esm/package.json +1 -1
  121. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -1
  122. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +9 -7
  123. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  124. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  125. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
  126. package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
  127. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  128. package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
  129. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
  130. package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
  131. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
  132. package/build/types/integrations/fs/index.d.ts +3 -1
  133. package/build/types/integrations/fs/index.d.ts.map +1 -1
  134. package/build/types/integrations/http.d.ts +3 -1
  135. package/build/types/integrations/http.d.ts.map +1 -1
  136. package/build/types/integrations/node-fetch/index.d.ts +4 -35
  137. package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
  138. package/build/types/integrations/node-fetch/types.d.ts +96 -0
  139. package/build/types/integrations/node-fetch/types.d.ts.map +1 -0
  140. package/build/types/integrations/node-fetch/undici-instrumentation.d.ts +14 -0
  141. package/build/types/integrations/node-fetch/undici-instrumentation.d.ts.map +1 -0
  142. package/build/types/integrations/tracing/amqplib/index.d.ts +3 -1
  143. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -1
  144. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +3 -1
  145. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
  146. package/build/types/integrations/tracing/connect/index.d.ts +3 -1
  147. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -1
  148. package/build/types/integrations/tracing/dataloader/index.d.ts +3 -1
  149. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -1
  150. package/build/types/integrations/tracing/express.d.ts +3 -1
  151. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  152. package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
  153. package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
  154. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
  155. package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
  156. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  157. package/build/types/integrations/tracing/genericPool/index.d.ts +3 -1
  158. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -1
  159. package/build/types/integrations/tracing/google-genai/index.d.ts +3 -1
  160. package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
  161. package/build/types/integrations/tracing/graphql/index.d.ts +3 -1
  162. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -1
  163. package/build/types/integrations/tracing/hapi/index.d.ts +3 -1
  164. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  165. package/build/types/integrations/tracing/hono/index.d.ts +3 -1
  166. package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
  167. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  168. package/build/types/integrations/tracing/kafka/index.d.ts +3 -1
  169. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -1
  170. package/build/types/integrations/tracing/knex/index.d.ts +3 -1
  171. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -1
  172. package/build/types/integrations/tracing/koa/index.d.ts +3 -1
  173. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -1
  174. package/build/types/integrations/tracing/langchain/index.d.ts +3 -1
  175. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  176. package/build/types/integrations/tracing/langgraph/index.d.ts +3 -1
  177. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  178. package/build/types/integrations/tracing/lrumemoizer/index.d.ts +3 -1
  179. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -1
  180. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -1
  181. package/build/types/integrations/tracing/mongo/index.d.ts +3 -1
  182. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -1
  183. package/build/types/integrations/tracing/mongoose/index.d.ts +3 -1
  184. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -1
  185. package/build/types/integrations/tracing/mysql/index.d.ts +3 -1
  186. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -1
  187. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
  188. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -1
  189. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
  190. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -1
  191. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +0 -8
  192. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -1
  193. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
  194. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -1
  195. package/build/types/integrations/tracing/mysql2/index.d.ts +3 -1
  196. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -1
  197. package/build/types/integrations/tracing/openai/index.d.ts +3 -1
  198. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  199. package/build/types/integrations/tracing/postgres/index.d.ts +3 -1
  200. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -1
  201. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  202. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  203. package/build/types/integrations/tracing/prisma/index.d.ts +5 -21
  204. package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -1
  205. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
  206. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -1
  207. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -1
  208. package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -1
  209. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
  210. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -1
  211. package/build/types/integrations/tracing/prisma/vendored/types.d.ts +5 -23
  212. package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -1
  213. package/build/types/integrations/tracing/redis/index.d.ts +4 -2
  214. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
  215. package/build/types/integrations/tracing/tedious/index.d.ts +3 -1
  216. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -1
  217. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  218. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  219. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -1
  220. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  221. package/build/types/sdk/diagnosticsChannelInjection.d.ts +1 -1
  222. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -1
  223. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -1
  224. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  225. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  226. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  227. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  228. package/build/types-ts3.8/integrations/fs/index.d.ts +3 -1
  229. package/build/types-ts3.8/integrations/http.d.ts +3 -1
  230. package/build/types-ts3.8/integrations/node-fetch/index.d.ts +4 -35
  231. package/build/types-ts3.8/integrations/node-fetch/types.d.ts +96 -0
  232. package/build/types-ts3.8/integrations/node-fetch/undici-instrumentation.d.ts +14 -0
  233. package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +3 -1
  234. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +3 -1
  235. package/build/types-ts3.8/integrations/tracing/connect/index.d.ts +3 -1
  236. package/build/types-ts3.8/integrations/tracing/dataloader/index.d.ts +3 -1
  237. package/build/types-ts3.8/integrations/tracing/express.d.ts +3 -1
  238. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  239. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  240. package/build/types-ts3.8/integrations/tracing/genericPool/index.d.ts +3 -1
  241. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +3 -1
  242. package/build/types-ts3.8/integrations/tracing/graphql/index.d.ts +3 -1
  243. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +3 -1
  244. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +3 -1
  245. package/build/types-ts3.8/integrations/tracing/kafka/index.d.ts +3 -1
  246. package/build/types-ts3.8/integrations/tracing/knex/index.d.ts +3 -1
  247. package/build/types-ts3.8/integrations/tracing/koa/index.d.ts +3 -1
  248. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +3 -1
  249. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +3 -1
  250. package/build/types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts +3 -1
  251. package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +3 -1
  252. package/build/types-ts3.8/integrations/tracing/mongoose/index.d.ts +3 -1
  253. package/build/types-ts3.8/integrations/tracing/mysql/index.d.ts +3 -1
  254. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +3 -17
  255. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +16 -16
  256. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +0 -8
  257. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +6 -9
  258. package/build/types-ts3.8/integrations/tracing/mysql2/index.d.ts +3 -1
  259. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +3 -1
  260. package/build/types-ts3.8/integrations/tracing/postgres/index.d.ts +3 -1
  261. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  262. package/build/types-ts3.8/integrations/tracing/prisma/index.d.ts +5 -21
  263. package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +5 -7
  264. package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +2 -4
  265. package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +5 -23
  266. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +4 -2
  267. package/build/types-ts3.8/integrations/tracing/tedious/index.d.ts +3 -1
  268. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  269. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -1
  270. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +1 -1
  271. package/package.json +6 -5
  272. package/build/cjs/integrations/node-fetch/vendored/semconv.js +0 -28
  273. package/build/cjs/integrations/node-fetch/vendored/semconv.js.map +0 -1
  274. package/build/cjs/integrations/node-fetch/vendored/undici.js +0 -302
  275. package/build/cjs/integrations/node-fetch/vendored/undici.js.map +0 -1
  276. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js +0 -387
  277. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
  278. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js +0 -9
  279. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
  280. package/build/esm/integrations/node-fetch/vendored/semconv.js +0 -15
  281. package/build/esm/integrations/node-fetch/vendored/semconv.js.map +0 -1
  282. package/build/esm/integrations/node-fetch/vendored/undici.js +0 -300
  283. package/build/esm/integrations/node-fetch/vendored/undici.js.map +0 -1
  284. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js +0 -385
  285. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +0 -1
  286. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js +0 -7
  287. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +0 -1
  288. package/build/types/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
  289. package/build/types/integrations/node-fetch/vendored/internal-types.d.ts.map +0 -1
  290. package/build/types/integrations/node-fetch/vendored/semconv.d.ts +0 -13
  291. package/build/types/integrations/node-fetch/vendored/semconv.d.ts.map +0 -1
  292. package/build/types/integrations/node-fetch/vendored/types.d.ts +0 -60
  293. package/build/types/integrations/node-fetch/vendored/types.d.ts.map +0 -1
  294. package/build/types/integrations/node-fetch/vendored/undici.d.ts +0 -21
  295. package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +0 -1
  296. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
  297. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +0 -1
  298. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
  299. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +0 -1
  300. package/build/types/integrations/tracing/mysql/vendored/types.d.ts +0 -9
  301. package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +0 -1
  302. package/build/types-ts3.8/integrations/node-fetch/vendored/internal-types.d.ts +0 -25
  303. package/build/types-ts3.8/integrations/node-fetch/vendored/semconv.d.ts +0 -13
  304. package/build/types-ts3.8/integrations/node-fetch/vendored/types.d.ts +0 -60
  305. package/build/types-ts3.8/integrations/node-fetch/vendored/undici.d.ts +0 -21
  306. package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +0 -27
  307. package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +0 -4
  308. package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +0 -9
@@ -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
@@ -1 +0,0 @@
1
- {"version":3,"file":"undici.js","sources":["../../../../../src/integrations/node-fetch/vendored/undici.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 * - Tracking issue: https://github.com/getsentry/sentry-javascript/issues/20165\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n * - Dropped the OTel metrics (no MeterProvider is wired up) and the dead\n * `requireParentforSpans` code path (the SDK always passes `false`)\n * - Dropped the `@opentelemetry/instrumentation` base (undici reports via `diagnostics_channel`,\n * so no module patching was needed) — now a plain class wired up directly by the integration\n */\n\nimport * as diagch from 'diagnostics_channel';\nimport { URL } from 'url';\n\nimport type { Span, SpanAttributes } from '@sentry/core';\nimport {\n debug,\n getClient,\n getTraceData,\n LRUMap,\n shouldPropagateTraceForUrl,\n SPAN_KIND,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n withActiveSpan,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport {\n ATTR_HTTP_REQUEST_METHOD,\n ATTR_HTTP_REQUEST_METHOD_ORIGINAL,\n ATTR_HTTP_RESPONSE_STATUS_CODE,\n ATTR_NETWORK_PEER_ADDRESS,\n ATTR_NETWORK_PEER_PORT,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n ATTR_URL_FULL,\n ATTR_URL_PATH,\n ATTR_URL_QUERY,\n ATTR_URL_SCHEME,\n ATTR_USER_AGENT_ORIGINAL,\n} from './semconv';\n\nimport type {\n ListenerRecord,\n RequestErrorMessage,\n RequestHeadersMessage,\n RequestMessage,\n RequestTrailersMessage,\n ResponseHeadersMessage,\n} from './internal-types';\nimport type { UndiciInstrumentationConfig, UndiciRequest } from './types';\n\n/** Replaces OTel's `safeExecuteInTheMiddle`: run `fn`, route any error to `onError`, and swallow it. */\nfunction safeExecute<T>(fn: () => T, onError: (error: unknown) => void): T | undefined {\n try {\n return fn();\n } catch (error) {\n onError(error);\n return undefined;\n }\n}\n\n// A combination of https://github.com/elastic/apm-agent-nodejs and\n// https://github.com/gadget-inc/opentelemetry-instrumentations/blob/main/packages/opentelemetry-instrumentation-undici/src/index.ts\n//\n// Not an OTel `InstrumentationBase` (undici reports via `diagnostics_channel`, not module patching);\n// the integration wires this up directly via `enable()` / `disable()`.\nexport class UndiciInstrumentation {\n // Keep ref to avoid https://github.com/nodejs/node/issues/42170 bug and for unsubscribing.\n private _channelSubs: Array<ListenerRecord> = [];\n private _spanFromReq = new WeakMap<UndiciRequest, Span>();\n // Caches trace-propagation decisions per URL so we don't recompute the `tracePropagationTargets` regexes per request.\n private _propagationDecisionMap = new LRUMap<string, boolean>(100);\n private _config: UndiciInstrumentationConfig;\n\n constructor(config: UndiciInstrumentationConfig = {}) {\n this._config = config;\n }\n\n public disable(): void {\n this._channelSubs.forEach(sub => sub.unsubscribe());\n this._channelSubs.length = 0;\n }\n\n /** Subscribe to the undici diagnostics channels (idempotent). */\n public enable(): void {\n // Avoid duplicate subscriptions\n if (this._channelSubs.length > 0) {\n return;\n }\n\n this.subscribeToChannel('undici:request:create', this.onRequestCreated.bind(this));\n this.subscribeToChannel('undici:client:sendHeaders', this.onRequestHeaders.bind(this));\n this.subscribeToChannel('undici:request:headers', this.onResponseHeaders.bind(this));\n this.subscribeToChannel('undici:request:trailers', this.onDone.bind(this));\n this.subscribeToChannel('undici:request:error', this.onError.bind(this));\n }\n\n private subscribeToChannel(\n diagnosticChannel: string,\n onMessage: (message: any, name: string | symbol) => void,\n ): void {\n // `diagnostics_channel` had a ref counting bug until v18.19.0.\n // https://github.com/nodejs/node/pull/47520\n const [major = 0, minor = 0] = process.version\n .replace('v', '')\n .split('.')\n .map(n => Number(n));\n const useNewSubscribe = major > 18 || (major === 18 && minor >= 19);\n\n let unsubscribe: () => void;\n if (useNewSubscribe) {\n diagch.subscribe?.(diagnosticChannel, onMessage);\n unsubscribe = () => diagch.unsubscribe?.(diagnosticChannel, onMessage);\n } else {\n const channel = diagch.channel(diagnosticChannel);\n channel.subscribe(onMessage);\n unsubscribe = () => channel.unsubscribe(onMessage);\n }\n\n this._channelSubs.push({\n name: diagnosticChannel,\n unsubscribe,\n });\n }\n\n private parseRequestHeaders(request: UndiciRequest): Map<string, string | string[]> {\n const result = new Map<string, string | string[]>();\n\n if (Array.isArray(request.headers)) {\n // headers are an array [k1, v2, k2, v2] (undici v6+)\n // values could be string or a string[] for multiple values\n for (let i = 0; i < request.headers.length; i += 2) {\n const key = request.headers[i];\n const value = request.headers[i + 1];\n\n // Key should always be a string, but the types don't know that, and let's be safe\n if (typeof key === 'string' && value !== undefined) {\n result.set(key.toLowerCase(), value);\n }\n }\n } else if (typeof request.headers === 'string') {\n // headers are a raw string (undici v5)\n // headers could be repeated in several lines for multiple values\n const headers = request.headers.split('\\r\\n');\n for (const line of headers) {\n if (!line) {\n continue;\n }\n const colonIndex = line.indexOf(':');\n if (colonIndex === -1) {\n // Invalid header? Probably this can't happen, but again let's be safe.\n continue;\n }\n const key = line.substring(0, colonIndex).toLowerCase();\n const value = line.substring(colonIndex + 1).trim();\n const allValues = result.get(key);\n\n if (allValues && Array.isArray(allValues)) {\n allValues.push(value);\n } else if (allValues) {\n result.set(key, [allValues, value]);\n } else {\n result.set(key, value);\n }\n }\n }\n return result;\n }\n\n // This is the 1st message we receive for each request (fired after request creation). Here we will\n // create the span and populate some atttributes, then link the span to the request for further\n // span processing\n private onRequestCreated({ request }: RequestMessage): void {\n // Ignore if:\n // - instrumentation is disabled\n // - ignored by config\n // - method is 'CONNECT'\n const config = this._config;\n const enabled = config.enabled !== false;\n const shouldIgnoreReq = safeExecute(\n () => !enabled || request.method === 'CONNECT' || config.ignoreRequestHook?.(request),\n e => e && DEBUG_BUILD && debug.error('caught ignoreRequestHook error: ', e),\n );\n\n if (shouldIgnoreReq) {\n return;\n }\n\n let requestUrl;\n try {\n requestUrl = new URL(request.path, request.origin);\n } catch (err) {\n DEBUG_BUILD && debug.warn('could not determine url.full:', err);\n // Skip instrumenting this request.\n return;\n }\n const urlScheme = requestUrl.protocol.replace(':', '');\n const requestMethod = this.getRequestMethod(request.method);\n const attributes: SpanAttributes = {\n [ATTR_HTTP_REQUEST_METHOD]: requestMethod,\n [ATTR_HTTP_REQUEST_METHOD_ORIGINAL]: request.method,\n [ATTR_URL_FULL]: requestUrl.toString(),\n [ATTR_URL_PATH]: requestUrl.pathname,\n [ATTR_URL_QUERY]: requestUrl.search,\n [ATTR_URL_SCHEME]: urlScheme,\n };\n\n const schemePorts: Record<string, string> = { https: '443', http: '80' };\n const serverAddress = requestUrl.hostname;\n const serverPort = requestUrl.port || schemePorts[urlScheme];\n\n attributes[ATTR_SERVER_ADDRESS] = serverAddress;\n if (serverPort && !isNaN(Number(serverPort))) {\n attributes[ATTR_SERVER_PORT] = Number(serverPort);\n }\n\n // Get user agent from headers\n const headersMap = this.parseRequestHeaders(request);\n const userAgentValues = headersMap.get('user-agent');\n\n if (userAgentValues) {\n // NOTE: having multiple user agents is not expected so\n // we're going to take last one like `curl` does\n // ref: https://curl.se/docs/manpage.html#-A\n const userAgent = Array.isArray(userAgentValues) ? userAgentValues[userAgentValues.length - 1] : userAgentValues;\n attributes[ATTR_USER_AGENT_ORIGINAL] = userAgent;\n }\n\n // Get attributes from the hook if present\n const hookAttributes = safeExecute(\n () => config.startSpanHook?.(request),\n e => e && DEBUG_BUILD && debug.error('caught startSpanHook error: ', e),\n );\n if (hookAttributes) {\n Object.entries(hookAttributes).forEach(([key, val]) => {\n attributes[key] = val;\n });\n }\n\n const span = startInactiveSpan({\n name: requestMethod === '_OTHER' ? 'HTTP' : requestMethod,\n kind: SPAN_KIND.CLIENT,\n attributes,\n });\n\n // Execute the request hook if defined\n safeExecute(\n () => config.requestHook?.(span, request),\n e => e && DEBUG_BUILD && debug.error('caught requestHook error: ', e),\n );\n\n // Context propagation goes last so no hook can tamper the propagation headers.\n // We propagate the trace data of the freshly created client span (not the active parent span)\n // so downstream services are parented to the http.client span, matching the upstream behavior.\n this.injectTracePropagationHeaders(span, request, requestUrl.toString());\n\n this._spanFromReq.set(request, span);\n }\n\n // This is the 2nd message we receive for each request. It is fired when connection with\n // the remote is established and about to send the first byte. Here we do have info about the\n // remote address and port so we can populate some `network.*` attributes into the span\n private onRequestHeaders({ request, socket }: RequestHeadersMessage): void {\n const span = this._spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n const config = this._config;\n const { remoteAddress, remotePort } = socket;\n const spanAttributes: SpanAttributes = {\n [ATTR_NETWORK_PEER_ADDRESS]: remoteAddress,\n [ATTR_NETWORK_PEER_PORT]: remotePort,\n };\n\n // After hooks have been processed (which may modify request headers)\n // we can collect the headers based on the configuration\n if (config.headersToSpanAttributes?.requestHeaders) {\n const headersToAttribs = new Set(config.headersToSpanAttributes.requestHeaders.map(n => n.toLowerCase()));\n const headersMap = this.parseRequestHeaders(request);\n\n for (const [name, value] of headersMap.entries()) {\n if (headersToAttribs.has(name)) {\n const attrValue = Array.isArray(value) ? value : [value];\n spanAttributes[`http.request.header.${name}`] = attrValue;\n }\n }\n }\n\n span.setAttributes(spanAttributes);\n }\n\n // This is the 3rd message we get for each request and it's fired when the server\n // headers are received, body may not be accessible yet.\n // From the response headers we can set the status and content length\n private onResponseHeaders({ request, response }: ResponseHeadersMessage): void {\n const span = this._spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n const spanAttributes: SpanAttributes = {\n [ATTR_HTTP_RESPONSE_STATUS_CODE]: response.statusCode,\n };\n\n const config = this._config;\n\n // Execute the response hook if defined\n safeExecute(\n () => config.responseHook?.(span, { request, response }),\n e => e && DEBUG_BUILD && debug.error('caught responseHook error: ', e),\n );\n\n if (config.headersToSpanAttributes?.responseHeaders) {\n const headersToAttribs = new Set<string>();\n config.headersToSpanAttributes?.responseHeaders.forEach(name => headersToAttribs.add(name.toLowerCase()));\n\n for (let idx = 0; idx < response.headers.length; idx = idx + 2) {\n const nameBuf = response.headers[idx];\n const valueBuf = response.headers[idx + 1];\n if (nameBuf === undefined || valueBuf === undefined) {\n continue;\n }\n const name = nameBuf.toString().toLowerCase();\n const value = valueBuf;\n\n if (headersToAttribs.has(name)) {\n const attrName = `http.response.header.${name}`;\n if (!Object.prototype.hasOwnProperty.call(spanAttributes, attrName)) {\n spanAttributes[attrName] = [value.toString()];\n } else {\n (spanAttributes[attrName] as string[]).push(value.toString());\n }\n }\n }\n }\n\n span.setAttributes(spanAttributes);\n\n // The Sentry pipeline infers `ok` / `not_found` / etc. from `http.response.status_code` when the\n // status is left unset, so we only need to flag erroneous responses explicitly.\n if (response.statusCode >= 400) {\n span.setStatus({ code: SPAN_STATUS_ERROR });\n }\n }\n\n // This is the last event we receive if the request went without any errors\n private onDone({ request }: RequestTrailersMessage): void {\n const span = this._spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n span.end();\n this._spanFromReq.delete(request);\n }\n\n // This is the event we get when something is wrong in the request like\n // - invalid options when calling `fetch` global API or any undici method for request\n // - connectivity errors such as unreachable host\n // - requests aborted through an `AbortController.signal`\n // NOTE: server errors are considered valid responses and it's the lib consumer\n // who should deal with that.\n private onError({ request, error }: RequestErrorMessage): void {\n const span = this._spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n // NOTE: in `undici@6.3.0` when request aborted the error type changes from\n // a custom error (`RequestAbortedError`) to a built-in `DOMException` carrying\n // some differences:\n // - `code` is from DOMEXception (ABORT_ERR: 20)\n // - `message` changes\n // - stacktrace is smaller and contains node internal frames\n span.setStatus({\n code: SPAN_STATUS_ERROR,\n message: error.message,\n });\n span.end();\n this._spanFromReq.delete(request);\n }\n\n // Propagate the trace data of the given (client) span into the outgoing request headers, gated by\n // `tracePropagationTargets`. Mirrors what `propagation.inject()` did with the SentryPropagator, but\n // via Sentry's `getTraceData()` so we stay off OpenTelemetry's propagation API.\n private injectTracePropagationHeaders(span: Span, request: UndiciRequest, url: string): void {\n const { tracePropagationTargets, propagateTraceparent } = getClient()?.getOptions() ?? {};\n\n if (!shouldPropagateTraceForUrl(url, tracePropagationTargets, this._propagationDecisionMap)) {\n return;\n }\n\n // We make the freshly created client span active so the propagated headers reference it (and not\n // the parent span). Passing `{ span }` to `getTraceData()` is not enough: for an inactive span it\n // resolves to the span's *captured* scope, whose active span is still the parent.\n const addedHeaders = withActiveSpan(span, () => getTraceData({ propagateTraceparent }));\n\n const headerEntries = Object.entries(addedHeaders);\n\n for (let i = 0; i < headerEntries.length; i++) {\n const pair = headerEntries[i];\n if (!pair) {\n continue;\n }\n const [k, v] = pair;\n if (!v) {\n continue;\n }\n\n if (typeof request.addHeader === 'function') {\n request.addHeader(k, v);\n } else if (typeof request.headers === 'string') {\n request.headers += `${k}: ${v}\\r\\n`;\n } else if (Array.isArray(request.headers)) {\n // undici@6.11.0 accidentally, briefly removed `request.addHeader()`.\n request.headers.push(k, v);\n }\n }\n }\n\n private getRequestMethod(original: string): string {\n const knownMethods = {\n CONNECT: true,\n OPTIONS: true,\n HEAD: true,\n GET: true,\n POST: true,\n PUT: true,\n PATCH: true,\n DELETE: true,\n TRACE: true,\n // QUERY from https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/\n QUERY: true,\n };\n\n if (original.toUpperCase() in knownMethods) {\n return original.toUpperCase();\n }\n\n return '_OTHER';\n }\n}\n"],"names":["LRUMap","DEBUG_BUILD","debug","URL","ATTR_HTTP_REQUEST_METHOD","ATTR_HTTP_REQUEST_METHOD_ORIGINAL","ATTR_URL_FULL","ATTR_URL_PATH","ATTR_URL_QUERY","ATTR_URL_SCHEME","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT","ATTR_USER_AGENT_ORIGINAL","startInactiveSpan","SPAN_KIND","ATTR_NETWORK_PEER_ADDRESS","ATTR_NETWORK_PEER_PORT","ATTR_HTTP_RESPONSE_STATUS_CODE","SPAN_STATUS_ERROR","getClient","shouldPropagateTraceForUrl","withActiveSpan","getTraceData"],"mappings":";;;;;;;;AAyDA,SAAS,WAAA,CAAe,IAAa,OAAA,EAAkD;AACrF,EAAA,IAAI;AACF,IAAA,OAAO,EAAA,EAAG;AAAA,EACZ,SAAS,KAAA,EAAO;AACd,IAAA,OAAA,CAAQ,KAAK,CAAA;AACb,IAAA,OAAO,MAAA;AAAA,EACT;AACF;AAOO,MAAM,qBAAA,CAAsB;AAAA,EAQjC,WAAA,CAAY,MAAA,GAAsC,EAAC,EAAG;AANtD;AAAA,IAAA,IAAA,CAAQ,eAAsC,EAAC;AAC/C,IAAA,IAAA,CAAQ,YAAA,uBAAmB,OAAA,EAA6B;AAExD;AAAA,IAAA,IAAA,CAAQ,uBAAA,GAA0B,IAAIA,WAAA,CAAwB,GAAG,CAAA;AAI/D,IAAA,IAAA,CAAK,OAAA,GAAU,MAAA;AAAA,EACjB;AAAA,EAEO,OAAA,GAAgB;AACrB,IAAA,IAAA,CAAK,YAAA,CAAa,OAAA,CAAQ,CAAA,GAAA,KAAO,GAAA,CAAI,aAAa,CAAA;AAClD,IAAA,IAAA,CAAK,aAAa,MAAA,GAAS,CAAA;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