@sentry/node 9.34.0 → 9.36.0-alpha.1

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 (505) hide show
  1. package/build/cjs/index.js +48 -56
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/featureFlagShims/launchDarkly.js +43 -0
  4. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -0
  5. package/build/cjs/integrations/featureFlagShims/openFeature.js +55 -0
  6. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -0
  7. package/build/cjs/integrations/featureFlagShims/statsig.js +23 -0
  8. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -0
  9. package/build/cjs/integrations/featureFlagShims/unleash.js +23 -0
  10. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -0
  11. package/build/cjs/integrations/fs.js +2 -2
  12. package/build/cjs/integrations/fs.js.map +1 -1
  13. package/build/cjs/integrations/http/index.js +7 -11
  14. package/build/cjs/integrations/http/index.js.map +1 -1
  15. package/build/cjs/integrations/node-fetch/index.js +4 -5
  16. package/build/cjs/integrations/node-fetch/index.js.map +1 -1
  17. package/build/cjs/integrations/tracing/amqplib.js +4 -5
  18. package/build/cjs/integrations/tracing/amqplib.js.map +1 -1
  19. package/build/cjs/integrations/tracing/connect.js +3 -4
  20. package/build/cjs/integrations/tracing/connect.js.map +1 -1
  21. package/build/cjs/integrations/tracing/dataloader.js +3 -3
  22. package/build/cjs/integrations/tracing/dataloader.js.map +1 -1
  23. package/build/cjs/integrations/tracing/express.js +5 -7
  24. package/build/cjs/integrations/tracing/express.js.map +1 -1
  25. package/build/cjs/integrations/tracing/fastify/fastify-otel/index.js +5 -10
  26. package/build/cjs/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
  27. package/build/cjs/integrations/tracing/fastify/index.js +6 -6
  28. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  29. package/build/cjs/integrations/tracing/genericPool.js +3 -3
  30. package/build/cjs/integrations/tracing/genericPool.js.map +1 -1
  31. package/build/cjs/integrations/tracing/graphql.js +3 -4
  32. package/build/cjs/integrations/tracing/graphql.js.map +1 -1
  33. package/build/cjs/integrations/tracing/hapi/index.js +3 -4
  34. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  35. package/build/cjs/integrations/tracing/kafka.js +4 -5
  36. package/build/cjs/integrations/tracing/kafka.js.map +1 -1
  37. package/build/cjs/integrations/tracing/knex.js +3 -3
  38. package/build/cjs/integrations/tracing/knex.js.map +1 -1
  39. package/build/cjs/integrations/tracing/koa.js +4 -6
  40. package/build/cjs/integrations/tracing/koa.js.map +1 -1
  41. package/build/cjs/integrations/tracing/lrumemoizer.js +2 -2
  42. package/build/cjs/integrations/tracing/lrumemoizer.js.map +1 -1
  43. package/build/cjs/integrations/tracing/mongo.js +3 -4
  44. package/build/cjs/integrations/tracing/mongo.js.map +1 -1
  45. package/build/cjs/integrations/tracing/mongoose.js +3 -4
  46. package/build/cjs/integrations/tracing/mongoose.js.map +1 -1
  47. package/build/cjs/integrations/tracing/mysql.js +2 -2
  48. package/build/cjs/integrations/tracing/mysql.js.map +1 -1
  49. package/build/cjs/integrations/tracing/mysql2.js +3 -4
  50. package/build/cjs/integrations/tracing/mysql2.js.map +1 -1
  51. package/build/cjs/integrations/tracing/postgres.js +3 -4
  52. package/build/cjs/integrations/tracing/postgres.js.map +1 -1
  53. package/build/cjs/integrations/tracing/postgresjs.js +3 -4
  54. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  55. package/build/cjs/integrations/tracing/prisma.js +2 -2
  56. package/build/cjs/integrations/tracing/prisma.js.map +1 -1
  57. package/build/cjs/integrations/tracing/redis.js +3 -3
  58. package/build/cjs/integrations/tracing/redis.js.map +1 -1
  59. package/build/cjs/integrations/tracing/tedious.js +3 -3
  60. package/build/cjs/integrations/tracing/tedious.js.map +1 -1
  61. package/build/cjs/integrations/tracing/vercelai/index.js +2 -2
  62. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  63. package/build/cjs/preload.js +2 -2
  64. package/build/cjs/preload.js.map +1 -1
  65. package/build/cjs/sdk/index.js +22 -203
  66. package/build/cjs/sdk/index.js.map +1 -1
  67. package/build/cjs/sdk/initOtel.js +4 -22
  68. package/build/cjs/sdk/initOtel.js.map +1 -1
  69. package/build/esm/index.js +6 -21
  70. package/build/esm/index.js.map +1 -1
  71. package/build/esm/integrations/featureFlagShims/launchDarkly.js +40 -0
  72. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -0
  73. package/build/esm/integrations/featureFlagShims/openFeature.js +52 -0
  74. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -0
  75. package/build/esm/integrations/featureFlagShims/statsig.js +21 -0
  76. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -0
  77. package/build/esm/integrations/featureFlagShims/unleash.js +21 -0
  78. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -0
  79. package/build/esm/integrations/fs.js +1 -1
  80. package/build/esm/integrations/fs.js.map +1 -1
  81. package/build/esm/integrations/http/index.js +1 -5
  82. package/build/esm/integrations/http/index.js.map +1 -1
  83. package/build/esm/integrations/node-fetch/index.js +2 -3
  84. package/build/esm/integrations/node-fetch/index.js.map +1 -1
  85. package/build/esm/integrations/tracing/amqplib.js +1 -2
  86. package/build/esm/integrations/tracing/amqplib.js.map +1 -1
  87. package/build/esm/integrations/tracing/connect.js +1 -2
  88. package/build/esm/integrations/tracing/connect.js.map +1 -1
  89. package/build/esm/integrations/tracing/dataloader.js +1 -1
  90. package/build/esm/integrations/tracing/dataloader.js.map +1 -1
  91. package/build/esm/integrations/tracing/express.js +2 -4
  92. package/build/esm/integrations/tracing/express.js.map +1 -1
  93. package/build/esm/integrations/tracing/fastify/fastify-otel/index.js +5 -10
  94. package/build/esm/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
  95. package/build/esm/integrations/tracing/fastify/index.js +5 -5
  96. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  97. package/build/esm/integrations/tracing/genericPool.js +1 -1
  98. package/build/esm/integrations/tracing/genericPool.js.map +1 -1
  99. package/build/esm/integrations/tracing/graphql.js +2 -3
  100. package/build/esm/integrations/tracing/graphql.js.map +1 -1
  101. package/build/esm/integrations/tracing/hapi/index.js +1 -2
  102. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  103. package/build/esm/integrations/tracing/kafka.js +1 -2
  104. package/build/esm/integrations/tracing/kafka.js.map +1 -1
  105. package/build/esm/integrations/tracing/knex.js +1 -1
  106. package/build/esm/integrations/tracing/knex.js.map +1 -1
  107. package/build/esm/integrations/tracing/koa.js +2 -4
  108. package/build/esm/integrations/tracing/koa.js.map +1 -1
  109. package/build/esm/integrations/tracing/lrumemoizer.js +1 -1
  110. package/build/esm/integrations/tracing/lrumemoizer.js.map +1 -1
  111. package/build/esm/integrations/tracing/mongo.js +1 -2
  112. package/build/esm/integrations/tracing/mongo.js.map +1 -1
  113. package/build/esm/integrations/tracing/mongoose.js +1 -2
  114. package/build/esm/integrations/tracing/mongoose.js.map +1 -1
  115. package/build/esm/integrations/tracing/mysql.js +1 -1
  116. package/build/esm/integrations/tracing/mysql.js.map +1 -1
  117. package/build/esm/integrations/tracing/mysql2.js +1 -2
  118. package/build/esm/integrations/tracing/mysql2.js.map +1 -1
  119. package/build/esm/integrations/tracing/postgres.js +1 -2
  120. package/build/esm/integrations/tracing/postgres.js.map +1 -1
  121. package/build/esm/integrations/tracing/postgresjs.js +2 -3
  122. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  123. package/build/esm/integrations/tracing/prisma.js +1 -1
  124. package/build/esm/integrations/tracing/prisma.js.map +1 -1
  125. package/build/esm/integrations/tracing/redis.js +1 -1
  126. package/build/esm/integrations/tracing/redis.js.map +1 -1
  127. package/build/esm/integrations/tracing/tedious.js +1 -1
  128. package/build/esm/integrations/tracing/tedious.js.map +1 -1
  129. package/build/esm/integrations/tracing/vercelai/index.js +1 -1
  130. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  131. package/build/esm/package.json +1 -1
  132. package/build/esm/preload.js +1 -1
  133. package/build/esm/preload.js.map +1 -1
  134. package/build/esm/sdk/index.js +22 -202
  135. package/build/esm/sdk/index.js.map +1 -1
  136. package/build/esm/sdk/initOtel.js +3 -21
  137. package/build/esm/sdk/initOtel.js.map +1 -1
  138. package/build/types/index.d.ts +3 -21
  139. package/build/types/index.d.ts.map +1 -1
  140. package/build/types/integrations/featureFlagShims/index.d.ts +5 -0
  141. package/build/types/integrations/featureFlagShims/index.d.ts.map +1 -0
  142. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
  143. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -0
  144. package/build/types/integrations/featureFlagShims/openFeature.d.ts +23 -0
  145. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -0
  146. package/build/types/integrations/featureFlagShims/statsig.d.ts +6 -0
  147. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -0
  148. package/build/types/integrations/featureFlagShims/unleash.d.ts +6 -0
  149. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -0
  150. package/build/types/integrations/http/index.d.ts +1 -1
  151. package/build/types/integrations/http/index.d.ts.map +1 -1
  152. package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
  153. package/build/types/integrations/tracing/amqplib.d.ts.map +1 -1
  154. package/build/types/integrations/tracing/connect.d.ts.map +1 -1
  155. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  156. package/build/types/integrations/tracing/graphql.d.ts.map +1 -1
  157. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  158. package/build/types/integrations/tracing/kafka.d.ts.map +1 -1
  159. package/build/types/integrations/tracing/koa.d.ts.map +1 -1
  160. package/build/types/integrations/tracing/mongo.d.ts.map +1 -1
  161. package/build/types/integrations/tracing/mongoose.d.ts.map +1 -1
  162. package/build/types/integrations/tracing/mysql2.d.ts.map +1 -1
  163. package/build/types/integrations/tracing/postgres.d.ts.map +1 -1
  164. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  165. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  166. package/build/types/sdk/index.d.ts +2 -6
  167. package/build/types/sdk/index.d.ts.map +1 -1
  168. package/build/types/sdk/initOtel.d.ts +1 -1
  169. package/build/types/sdk/initOtel.d.ts.map +1 -1
  170. package/build/types/types.d.ts +1 -1
  171. package/build/types/types.d.ts.map +1 -1
  172. package/build/types-ts3.8/index.d.ts +3 -21
  173. package/build/types-ts3.8/integrations/featureFlagShims/index.d.ts +5 -0
  174. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
  175. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +23 -0
  176. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +6 -0
  177. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +6 -0
  178. package/build/types-ts3.8/integrations/http/index.d.ts +1 -1
  179. package/build/types-ts3.8/sdk/index.d.ts +2 -6
  180. package/build/types-ts3.8/sdk/initOtel.d.ts +1 -1
  181. package/build/types-ts3.8/types.d.ts +1 -1
  182. package/package.json +4 -3
  183. package/build/cjs/cron/common.js +0 -56
  184. package/build/cjs/cron/common.js.map +0 -1
  185. package/build/cjs/cron/cron.js +0 -112
  186. package/build/cjs/cron/cron.js.map +0 -1
  187. package/build/cjs/cron/index.js +0 -15
  188. package/build/cjs/cron/index.js.map +0 -1
  189. package/build/cjs/cron/node-cron.js +0 -71
  190. package/build/cjs/cron/node-cron.js.map +0 -1
  191. package/build/cjs/cron/node-schedule.js +0 -65
  192. package/build/cjs/cron/node-schedule.js.map +0 -1
  193. package/build/cjs/integrations/anr/index.js +0 -238
  194. package/build/cjs/integrations/anr/index.js.map +0 -1
  195. package/build/cjs/integrations/childProcess.js +0 -100
  196. package/build/cjs/integrations/childProcess.js.map +0 -1
  197. package/build/cjs/integrations/context.js +0 -457
  198. package/build/cjs/integrations/context.js.map +0 -1
  199. package/build/cjs/integrations/contextlines.js +0 -405
  200. package/build/cjs/integrations/contextlines.js.map +0 -1
  201. package/build/cjs/integrations/http/SentryHttpInstrumentation.js +0 -558
  202. package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +0 -1
  203. package/build/cjs/integrations/local-variables/common.js +0 -69
  204. package/build/cjs/integrations/local-variables/common.js.map +0 -1
  205. package/build/cjs/integrations/local-variables/index.js +0 -12
  206. package/build/cjs/integrations/local-variables/index.js.map +0 -1
  207. package/build/cjs/integrations/local-variables/local-variables-async.js +0 -143
  208. package/build/cjs/integrations/local-variables/local-variables-async.js.map +0 -1
  209. package/build/cjs/integrations/local-variables/local-variables-sync.js +0 -410
  210. package/build/cjs/integrations/local-variables/local-variables-sync.js.map +0 -1
  211. package/build/cjs/integrations/modules.js +0 -135
  212. package/build/cjs/integrations/modules.js.map +0 -1
  213. package/build/cjs/integrations/node-fetch/SentryNodeFetchInstrumentation.js +0 -291
  214. package/build/cjs/integrations/node-fetch/SentryNodeFetchInstrumentation.js.map +0 -1
  215. package/build/cjs/integrations/onuncaughtexception.js +0 -134
  216. package/build/cjs/integrations/onuncaughtexception.js.map +0 -1
  217. package/build/cjs/integrations/onunhandledrejection.js +0 -89
  218. package/build/cjs/integrations/onunhandledrejection.js.map +0 -1
  219. package/build/cjs/integrations/processSession.js +0 -36
  220. package/build/cjs/integrations/processSession.js.map +0 -1
  221. package/build/cjs/integrations/spotlight.js +0 -101
  222. package/build/cjs/integrations/spotlight.js.map +0 -1
  223. package/build/cjs/integrations/winston.js +0 -151
  224. package/build/cjs/integrations/winston.js.map +0 -1
  225. package/build/cjs/logs/capture.js +0 -29
  226. package/build/cjs/logs/capture.js.map +0 -1
  227. package/build/cjs/logs/exports.js +0 -178
  228. package/build/cjs/logs/exports.js.map +0 -1
  229. package/build/cjs/nodeVersion.js +0 -12
  230. package/build/cjs/nodeVersion.js.map +0 -1
  231. package/build/cjs/otel/contextManager.js +0 -16
  232. package/build/cjs/otel/contextManager.js.map +0 -1
  233. package/build/cjs/otel/instrument.js +0 -139
  234. package/build/cjs/otel/instrument.js.map +0 -1
  235. package/build/cjs/proxy/base.js +0 -122
  236. package/build/cjs/proxy/base.js.map +0 -1
  237. package/build/cjs/proxy/index.js +0 -173
  238. package/build/cjs/proxy/index.js.map +0 -1
  239. package/build/cjs/proxy/parse-proxy-response.js +0 -104
  240. package/build/cjs/proxy/parse-proxy-response.js.map +0 -1
  241. package/build/cjs/sdk/api.js +0 -117
  242. package/build/cjs/sdk/api.js.map +0 -1
  243. package/build/cjs/sdk/client.js +0 -156
  244. package/build/cjs/sdk/client.js.map +0 -1
  245. package/build/cjs/transports/http.js +0 -158
  246. package/build/cjs/transports/http.js.map +0 -1
  247. package/build/cjs/utils/addOriginToSpan.js +0 -11
  248. package/build/cjs/utils/addOriginToSpan.js.map +0 -1
  249. package/build/cjs/utils/baggage.js +0 -36
  250. package/build/cjs/utils/baggage.js.map +0 -1
  251. package/build/cjs/utils/commonjs.js +0 -13
  252. package/build/cjs/utils/commonjs.js.map +0 -1
  253. package/build/cjs/utils/createMissingInstrumentationContext.js +0 -11
  254. package/build/cjs/utils/createMissingInstrumentationContext.js.map +0 -1
  255. package/build/cjs/utils/debug.js +0 -23
  256. package/build/cjs/utils/debug.js.map +0 -1
  257. package/build/cjs/utils/ensureIsWrapped.js +0 -41
  258. package/build/cjs/utils/ensureIsWrapped.js.map +0 -1
  259. package/build/cjs/utils/envToBool.js +0 -32
  260. package/build/cjs/utils/envToBool.js.map +0 -1
  261. package/build/cjs/utils/errorhandling.js +0 -42
  262. package/build/cjs/utils/errorhandling.js.map +0 -1
  263. package/build/cjs/utils/getRequestUrl.js +0 -18
  264. package/build/cjs/utils/getRequestUrl.js.map +0 -1
  265. package/build/cjs/utils/module.js +0 -60
  266. package/build/cjs/utils/module.js.map +0 -1
  267. package/build/esm/cron/common.js +0 -54
  268. package/build/esm/cron/common.js.map +0 -1
  269. package/build/esm/cron/cron.js +0 -110
  270. package/build/esm/cron/cron.js.map +0 -1
  271. package/build/esm/cron/index.js +0 -13
  272. package/build/esm/cron/index.js.map +0 -1
  273. package/build/esm/cron/node-cron.js +0 -69
  274. package/build/esm/cron/node-cron.js.map +0 -1
  275. package/build/esm/cron/node-schedule.js +0 -63
  276. package/build/esm/cron/node-schedule.js.map +0 -1
  277. package/build/esm/integrations/anr/index.js +0 -234
  278. package/build/esm/integrations/anr/index.js.map +0 -1
  279. package/build/esm/integrations/anr/worker-script.js +0 -2
  280. package/build/esm/integrations/childProcess.js +0 -98
  281. package/build/esm/integrations/childProcess.js.map +0 -1
  282. package/build/esm/integrations/context.js +0 -451
  283. package/build/esm/integrations/context.js.map +0 -1
  284. package/build/esm/integrations/contextlines.js +0 -399
  285. package/build/esm/integrations/contextlines.js.map +0 -1
  286. package/build/esm/integrations/http/SentryHttpInstrumentation.js +0 -555
  287. package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +0 -1
  288. package/build/esm/integrations/local-variables/common.js +0 -64
  289. package/build/esm/integrations/local-variables/common.js.map +0 -1
  290. package/build/esm/integrations/local-variables/index.js +0 -10
  291. package/build/esm/integrations/local-variables/index.js.map +0 -1
  292. package/build/esm/integrations/local-variables/local-variables-async.js +0 -140
  293. package/build/esm/integrations/local-variables/local-variables-async.js.map +0 -1
  294. package/build/esm/integrations/local-variables/local-variables-sync.js +0 -405
  295. package/build/esm/integrations/local-variables/local-variables-sync.js.map +0 -1
  296. package/build/esm/integrations/local-variables/worker-script.js +0 -2
  297. package/build/esm/integrations/modules.js +0 -133
  298. package/build/esm/integrations/modules.js.map +0 -1
  299. package/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js +0 -289
  300. package/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js.map +0 -1
  301. package/build/esm/integrations/onuncaughtexception.js +0 -131
  302. package/build/esm/integrations/onuncaughtexception.js.map +0 -1
  303. package/build/esm/integrations/onunhandledrejection.js +0 -86
  304. package/build/esm/integrations/onunhandledrejection.js.map +0 -1
  305. package/build/esm/integrations/processSession.js +0 -34
  306. package/build/esm/integrations/processSession.js.map +0 -1
  307. package/build/esm/integrations/spotlight.js +0 -98
  308. package/build/esm/integrations/spotlight.js.map +0 -1
  309. package/build/esm/integrations/winston.js +0 -149
  310. package/build/esm/integrations/winston.js.map +0 -1
  311. package/build/esm/logs/capture.js +0 -27
  312. package/build/esm/logs/capture.js.map +0 -1
  313. package/build/esm/logs/exports.js +0 -170
  314. package/build/esm/logs/exports.js.map +0 -1
  315. package/build/esm/nodeVersion.js +0 -8
  316. package/build/esm/nodeVersion.js.map +0 -1
  317. package/build/esm/otel/contextManager.js +0 -14
  318. package/build/esm/otel/contextManager.js.map +0 -1
  319. package/build/esm/otel/instrument.js +0 -135
  320. package/build/esm/otel/instrument.js.map +0 -1
  321. package/build/esm/proxy/base.js +0 -120
  322. package/build/esm/proxy/base.js.map +0 -1
  323. package/build/esm/proxy/index.js +0 -171
  324. package/build/esm/proxy/index.js.map +0 -1
  325. package/build/esm/proxy/parse-proxy-response.js +0 -102
  326. package/build/esm/proxy/parse-proxy-response.js.map +0 -1
  327. package/build/esm/sdk/api.js +0 -114
  328. package/build/esm/sdk/api.js.map +0 -1
  329. package/build/esm/sdk/client.js +0 -154
  330. package/build/esm/sdk/client.js.map +0 -1
  331. package/build/esm/transports/http.js +0 -156
  332. package/build/esm/transports/http.js.map +0 -1
  333. package/build/esm/utils/addOriginToSpan.js +0 -9
  334. package/build/esm/utils/addOriginToSpan.js.map +0 -1
  335. package/build/esm/utils/baggage.js +0 -34
  336. package/build/esm/utils/baggage.js.map +0 -1
  337. package/build/esm/utils/commonjs.js +0 -11
  338. package/build/esm/utils/commonjs.js.map +0 -1
  339. package/build/esm/utils/createMissingInstrumentationContext.js +0 -9
  340. package/build/esm/utils/createMissingInstrumentationContext.js.map +0 -1
  341. package/build/esm/utils/debug.js +0 -21
  342. package/build/esm/utils/debug.js.map +0 -1
  343. package/build/esm/utils/ensureIsWrapped.js +0 -39
  344. package/build/esm/utils/ensureIsWrapped.js.map +0 -1
  345. package/build/esm/utils/envToBool.js +0 -28
  346. package/build/esm/utils/envToBool.js.map +0 -1
  347. package/build/esm/utils/errorhandling.js +0 -40
  348. package/build/esm/utils/errorhandling.js.map +0 -1
  349. package/build/esm/utils/getRequestUrl.js +0 -16
  350. package/build/esm/utils/getRequestUrl.js.map +0 -1
  351. package/build/esm/utils/module.js +0 -58
  352. package/build/esm/utils/module.js.map +0 -1
  353. package/build/types/cron/common.d.ts +0 -5
  354. package/build/types/cron/common.d.ts.map +0 -1
  355. package/build/types/cron/cron.d.ts +0 -43
  356. package/build/types/cron/cron.d.ts.map +0 -1
  357. package/build/types/cron/index.d.ts +0 -10
  358. package/build/types/cron/index.d.ts.map +0 -1
  359. package/build/types/cron/node-cron.d.ts +0 -27
  360. package/build/types/cron/node-cron.d.ts.map +0 -1
  361. package/build/types/cron/node-schedule.d.ts +0 -19
  362. package/build/types/cron/node-schedule.d.ts.map +0 -1
  363. package/build/types/integrations/anr/common.d.ts +0 -52
  364. package/build/types/integrations/anr/common.d.ts.map +0 -1
  365. package/build/types/integrations/anr/index.d.ts +0 -13
  366. package/build/types/integrations/anr/index.d.ts.map +0 -1
  367. package/build/types/integrations/anr/worker.d.ts +0 -2
  368. package/build/types/integrations/anr/worker.d.ts.map +0 -1
  369. package/build/types/integrations/childProcess.d.ts +0 -20
  370. package/build/types/integrations/childProcess.d.ts.map +0 -1
  371. package/build/types/integrations/context.d.ts +0 -30
  372. package/build/types/integrations/context.d.ts.map +0 -1
  373. package/build/types/integrations/contextlines.d.ts +0 -31
  374. package/build/types/integrations/contextlines.d.ts.map +0 -1
  375. package/build/types/integrations/http/SentryHttpInstrumentation.d.ts +0 -131
  376. package/build/types/integrations/http/SentryHttpInstrumentation.d.ts.map +0 -1
  377. package/build/types/integrations/local-variables/common.d.ts +0 -66
  378. package/build/types/integrations/local-variables/common.d.ts.map +0 -1
  379. package/build/types/integrations/local-variables/index.d.ts +0 -4
  380. package/build/types/integrations/local-variables/index.d.ts.map +0 -1
  381. package/build/types/integrations/local-variables/local-variables-async.d.ts +0 -7
  382. package/build/types/integrations/local-variables/local-variables-async.d.ts.map +0 -1
  383. package/build/types/integrations/local-variables/local-variables-sync.d.ts +0 -34
  384. package/build/types/integrations/local-variables/local-variables-sync.d.ts.map +0 -1
  385. package/build/types/integrations/local-variables/worker.d.ts +0 -2
  386. package/build/types/integrations/local-variables/worker.d.ts.map +0 -1
  387. package/build/types/integrations/modules.d.ts +0 -17
  388. package/build/types/integrations/modules.d.ts.map +0 -1
  389. package/build/types/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts +0 -56
  390. package/build/types/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts.map +0 -1
  391. package/build/types/integrations/onuncaughtexception.d.ts +0 -31
  392. package/build/types/integrations/onuncaughtexception.d.ts.map +0 -1
  393. package/build/types/integrations/onunhandledrejection.d.ts +0 -23
  394. package/build/types/integrations/onunhandledrejection.d.ts.map +0 -1
  395. package/build/types/integrations/processSession.d.ts +0 -5
  396. package/build/types/integrations/processSession.d.ts.map +0 -1
  397. package/build/types/integrations/spotlight.d.ts +0 -18
  398. package/build/types/integrations/spotlight.d.ts.map +0 -1
  399. package/build/types/integrations/winston.d.ts +0 -44
  400. package/build/types/integrations/winston.d.ts.map +0 -1
  401. package/build/types/logs/capture.d.ts +0 -11
  402. package/build/types/logs/capture.d.ts.map +0 -1
  403. package/build/types/logs/exports.d.ts +0 -150
  404. package/build/types/logs/exports.d.ts.map +0 -1
  405. package/build/types/nodeVersion.d.ts +0 -8
  406. package/build/types/nodeVersion.d.ts.map +0 -1
  407. package/build/types/otel/contextManager.d.ts +0 -10
  408. package/build/types/otel/contextManager.d.ts.map +0 -1
  409. package/build/types/otel/instrument.d.ts +0 -23
  410. package/build/types/otel/instrument.d.ts.map +0 -1
  411. package/build/types/proxy/base.d.ts +0 -65
  412. package/build/types/proxy/base.d.ts.map +0 -1
  413. package/build/types/proxy/helpers.d.ts +0 -42
  414. package/build/types/proxy/helpers.d.ts.map +0 -1
  415. package/build/types/proxy/index.d.ts +0 -73
  416. package/build/types/proxy/index.d.ts.map +0 -1
  417. package/build/types/proxy/parse-proxy-response.d.ts +0 -43
  418. package/build/types/proxy/parse-proxy-response.d.ts.map +0 -1
  419. package/build/types/sdk/api.d.ts +0 -8
  420. package/build/types/sdk/api.d.ts.map +0 -1
  421. package/build/types/sdk/client.d.ts +0 -29
  422. package/build/types/sdk/client.d.ts.map +0 -1
  423. package/build/types/sdk/scope.d.ts +0 -7
  424. package/build/types/sdk/scope.d.ts.map +0 -1
  425. package/build/types/transports/http-module.d.ts +0 -31
  426. package/build/types/transports/http-module.d.ts.map +0 -1
  427. package/build/types/transports/http.d.ts +0 -21
  428. package/build/types/transports/http.d.ts.map +0 -1
  429. package/build/types/transports/index.d.ts +0 -3
  430. package/build/types/transports/index.d.ts.map +0 -1
  431. package/build/types/utils/addOriginToSpan.d.ts +0 -5
  432. package/build/types/utils/addOriginToSpan.d.ts.map +0 -1
  433. package/build/types/utils/baggage.d.ts +0 -6
  434. package/build/types/utils/baggage.d.ts.map +0 -1
  435. package/build/types/utils/commonjs.d.ts +0 -3
  436. package/build/types/utils/commonjs.d.ts.map +0 -1
  437. package/build/types/utils/createMissingInstrumentationContext.d.ts +0 -3
  438. package/build/types/utils/createMissingInstrumentationContext.d.ts.map +0 -1
  439. package/build/types/utils/debug.d.ts +0 -5
  440. package/build/types/utils/debug.d.ts.map +0 -1
  441. package/build/types/utils/ensureIsWrapped.d.ts +0 -5
  442. package/build/types/utils/ensureIsWrapped.d.ts.map +0 -1
  443. package/build/types/utils/entry-point.d.ts +0 -24
  444. package/build/types/utils/entry-point.d.ts.map +0 -1
  445. package/build/types/utils/envToBool.d.ts +0 -13
  446. package/build/types/utils/envToBool.d.ts.map +0 -1
  447. package/build/types/utils/errorhandling.d.ts +0 -5
  448. package/build/types/utils/errorhandling.d.ts.map +0 -1
  449. package/build/types/utils/getRequestUrl.d.ts +0 -5
  450. package/build/types/utils/getRequestUrl.d.ts.map +0 -1
  451. package/build/types/utils/module.d.ts +0 -3
  452. package/build/types/utils/module.d.ts.map +0 -1
  453. package/build/types/utils/prepareEvent.d.ts +0 -17
  454. package/build/types/utils/prepareEvent.d.ts.map +0 -1
  455. package/build/types-ts3.8/cron/common.d.ts +0 -5
  456. package/build/types-ts3.8/cron/cron.d.ts +0 -43
  457. package/build/types-ts3.8/cron/index.d.ts +0 -10
  458. package/build/types-ts3.8/cron/node-cron.d.ts +0 -27
  459. package/build/types-ts3.8/cron/node-schedule.d.ts +0 -19
  460. package/build/types-ts3.8/integrations/anr/common.d.ts +0 -52
  461. package/build/types-ts3.8/integrations/anr/index.d.ts +0 -13
  462. package/build/types-ts3.8/integrations/anr/worker.d.ts +0 -2
  463. package/build/types-ts3.8/integrations/childProcess.d.ts +0 -20
  464. package/build/types-ts3.8/integrations/context.d.ts +0 -30
  465. package/build/types-ts3.8/integrations/contextlines.d.ts +0 -31
  466. package/build/types-ts3.8/integrations/http/SentryHttpInstrumentation.d.ts +0 -133
  467. package/build/types-ts3.8/integrations/local-variables/common.d.ts +0 -66
  468. package/build/types-ts3.8/integrations/local-variables/index.d.ts +0 -4
  469. package/build/types-ts3.8/integrations/local-variables/local-variables-async.d.ts +0 -7
  470. package/build/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +0 -34
  471. package/build/types-ts3.8/integrations/local-variables/worker.d.ts +0 -2
  472. package/build/types-ts3.8/integrations/modules.d.ts +0 -17
  473. package/build/types-ts3.8/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts +0 -56
  474. package/build/types-ts3.8/integrations/onuncaughtexception.d.ts +0 -31
  475. package/build/types-ts3.8/integrations/onunhandledrejection.d.ts +0 -23
  476. package/build/types-ts3.8/integrations/processSession.d.ts +0 -5
  477. package/build/types-ts3.8/integrations/spotlight.d.ts +0 -18
  478. package/build/types-ts3.8/integrations/winston.d.ts +0 -44
  479. package/build/types-ts3.8/logs/capture.d.ts +0 -18
  480. package/build/types-ts3.8/logs/exports.d.ts +0 -150
  481. package/build/types-ts3.8/nodeVersion.d.ts +0 -8
  482. package/build/types-ts3.8/otel/contextManager.d.ts +0 -10
  483. package/build/types-ts3.8/otel/instrument.d.ts +0 -23
  484. package/build/types-ts3.8/proxy/base.d.ts +0 -60
  485. package/build/types-ts3.8/proxy/helpers.d.ts +0 -38
  486. package/build/types-ts3.8/proxy/index.d.ts +0 -74
  487. package/build/types-ts3.8/proxy/parse-proxy-response.d.ts +0 -40
  488. package/build/types-ts3.8/sdk/api.d.ts +0 -8
  489. package/build/types-ts3.8/sdk/client.d.ts +0 -32
  490. package/build/types-ts3.8/sdk/scope.d.ts +0 -7
  491. package/build/types-ts3.8/transports/http-module.d.ts +0 -28
  492. package/build/types-ts3.8/transports/http.d.ts +0 -20
  493. package/build/types-ts3.8/transports/index.d.ts +0 -3
  494. package/build/types-ts3.8/utils/addOriginToSpan.d.ts +0 -5
  495. package/build/types-ts3.8/utils/baggage.d.ts +0 -6
  496. package/build/types-ts3.8/utils/commonjs.d.ts +0 -3
  497. package/build/types-ts3.8/utils/createMissingInstrumentationContext.d.ts +0 -3
  498. package/build/types-ts3.8/utils/debug.d.ts +0 -5
  499. package/build/types-ts3.8/utils/ensureIsWrapped.d.ts +0 -5
  500. package/build/types-ts3.8/utils/entry-point.d.ts +0 -24
  501. package/build/types-ts3.8/utils/envToBool.d.ts +0 -13
  502. package/build/types-ts3.8/utils/errorhandling.d.ts +0 -5
  503. package/build/types-ts3.8/utils/getRequestUrl.d.ts +0 -5
  504. package/build/types-ts3.8/utils/module.d.ts +0 -3
  505. package/build/types-ts3.8/utils/prepareEvent.d.ts +0 -17
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-variables-sync.js","sources":["../../../../src/integrations/local-variables/local-variables-sync.ts"],"sourcesContent":["import type { Debugger, InspectorNotification, Runtime, Session } from 'node:inspector';\nimport type { Event, Exception, IntegrationFn, StackFrame, StackParser } from '@sentry/core';\nimport { defineIntegration, getClient, logger, LRUMap } from '@sentry/core';\nimport { NODE_MAJOR } from '../../nodeVersion';\nimport type { NodeClient } from '../../sdk/client';\nimport { isDebuggerEnabled } from '../../utils/debug';\nimport type {\n FrameVariables,\n LocalVariablesIntegrationOptions,\n PausedExceptionEvent,\n RateLimitIncrement,\n Variables,\n} from './common';\nimport { createRateLimiter, functionNamesMatch } from './common';\n\n/** Creates a unique hash from stack frames */\nexport function hashFrames(frames: StackFrame[] | undefined): string | undefined {\n if (frames === undefined) {\n return;\n }\n\n // Only hash the 10 most recent frames (ie. the last 10)\n return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, '');\n}\n\n/**\n * We use the stack parser to create a unique hash from the exception stack trace\n * This is used to lookup vars when the exception passes through the event processor\n */\nexport function hashFromStack(stackParser: StackParser, stack: string | undefined): string | undefined {\n if (stack === undefined) {\n return undefined;\n }\n\n return hashFrames(stackParser(stack, 1));\n}\n\ntype OnPauseEvent = InspectorNotification<Debugger.PausedEventDataType>;\nexport interface DebugSession {\n /** Configures and connects to the debug session */\n configureAndConnect(onPause: (message: OnPauseEvent, complete: () => void) => void, captureAll: boolean): void;\n /** Updates which kind of exceptions to capture */\n setPauseOnExceptions(captureAll: boolean): void;\n /** Gets local variables for an objectId */\n getLocalVariables(objectId: string, callback: (vars: Variables) => void): void;\n}\n\ntype Next<T> = (result: T) => void;\ntype Add<T> = (fn: Next<T>) => void;\ntype CallbackWrapper<T> = { add: Add<T>; next: Next<T> };\n\n/** Creates a container for callbacks to be called sequentially */\nexport function createCallbackList<T>(complete: Next<T>): CallbackWrapper<T> {\n // A collection of callbacks to be executed last to first\n let callbacks: Next<T>[] = [];\n\n let completedCalled = false;\n function checkedComplete(result: T): void {\n callbacks = [];\n if (completedCalled) {\n return;\n }\n completedCalled = true;\n complete(result);\n }\n\n // complete should be called last\n callbacks.push(checkedComplete);\n\n function add(fn: Next<T>): void {\n callbacks.push(fn);\n }\n\n function next(result: T): void {\n const popped = callbacks.pop() || checkedComplete;\n\n try {\n popped(result);\n } catch (_) {\n // If there is an error, we still want to call the complete callback\n checkedComplete(result);\n }\n }\n\n return { add, next };\n}\n\n/**\n * Promise API is available as `Experimental` and in Node 19 only.\n *\n * Callback-based API is `Stable` since v14 and `Experimental` since v8.\n * Because of that, we are creating our own `AsyncSession` class.\n *\n * https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api\n * https://nodejs.org/docs/latest-v14.x/api/inspector.html\n */\nclass AsyncSession implements DebugSession {\n /** Throws if inspector API is not available */\n private constructor(private readonly _session: Session) {\n //\n }\n\n public static async create(orDefault?: DebugSession | undefined): Promise<DebugSession> {\n if (orDefault) {\n return orDefault;\n }\n\n const inspector = await import('node:inspector');\n return new AsyncSession(new inspector.Session());\n }\n\n /** @inheritdoc */\n public configureAndConnect(onPause: (event: OnPauseEvent, complete: () => void) => void, captureAll: boolean): void {\n this._session.connect();\n\n this._session.on('Debugger.paused', event => {\n onPause(event, () => {\n // After the pause work is complete, resume execution or the exception context memory is leaked\n this._session.post('Debugger.resume');\n });\n });\n\n this._session.post('Debugger.enable');\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n public setPauseOnExceptions(captureAll: boolean): void {\n this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });\n }\n\n /** @inheritdoc */\n public getLocalVariables(objectId: string, complete: (vars: Variables) => void): void {\n this._getProperties(objectId, props => {\n const { add, next } = createCallbackList<Variables>(complete);\n\n for (const prop of props) {\n if (prop.value?.objectId && prop.value.className === 'Array') {\n const id = prop.value.objectId;\n add(vars => this._unrollArray(id, prop.name, vars, next));\n } else if (prop.value?.objectId && prop.value.className === 'Object') {\n const id = prop.value.objectId;\n add(vars => this._unrollObject(id, prop.name, vars, next));\n } else if (prop.value) {\n add(vars => this._unrollOther(prop, vars, next));\n }\n }\n\n next({});\n });\n }\n\n /**\n * Gets all the PropertyDescriptors of an object\n */\n private _getProperties(objectId: string, next: (result: Runtime.PropertyDescriptor[]) => void): void {\n this._session.post(\n 'Runtime.getProperties',\n {\n objectId,\n ownProperties: true,\n },\n (err, params) => {\n if (err) {\n next([]);\n } else {\n next(params.result);\n }\n },\n );\n }\n\n /**\n * Unrolls an array property\n */\n private _unrollArray(objectId: string, name: string, vars: Variables, next: (vars: Variables) => void): void {\n this._getProperties(objectId, props => {\n vars[name] = props\n .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10)))\n .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10))\n .map(v => v.value?.value);\n\n next(vars);\n });\n }\n\n /**\n * Unrolls an object property\n */\n private _unrollObject(objectId: string, name: string, vars: Variables, next: (obj: Variables) => void): void {\n this._getProperties(objectId, props => {\n vars[name] = props\n .map<[string, unknown]>(v => [v.name, v.value?.value])\n .reduce((obj, [key, val]) => {\n obj[key] = val;\n return obj;\n }, {} as Variables);\n\n next(vars);\n });\n }\n\n /**\n * Unrolls other properties\n */\n private _unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables, next: (vars: Variables) => void): void {\n if (prop.value) {\n if ('value' in prop.value) {\n if (prop.value.value === undefined || prop.value.value === null) {\n vars[prop.name] = `<${prop.value.value}>`;\n } else {\n vars[prop.name] = prop.value.value;\n }\n } else if ('description' in prop.value && prop.value.type !== 'function') {\n vars[prop.name] = `<${prop.value.description}>`;\n } else if (prop.value.type === 'undefined') {\n vars[prop.name] = '<undefined>';\n }\n }\n\n next(vars);\n }\n}\n\nconst INTEGRATION_NAME = 'LocalVariables';\n\n/**\n * Adds local variables to exception frames\n */\nconst _localVariablesSyncIntegration = ((\n options: LocalVariablesIntegrationOptions = {},\n sessionOverride?: DebugSession,\n) => {\n const cachedFrames: LRUMap<string, FrameVariables[]> = new LRUMap(20);\n let rateLimiter: RateLimitIncrement | undefined;\n let shouldProcessEvent = false;\n\n function addLocalVariablesToException(exception: Exception): void {\n const hash = hashFrames(exception.stacktrace?.frames);\n\n if (hash === undefined) {\n return;\n }\n\n // Check if we have local variables for an exception that matches the hash\n // remove is identical to get but also removes the entry from the cache\n const cachedFrame = cachedFrames.remove(hash);\n\n if (cachedFrame === undefined) {\n return;\n }\n\n // Filter out frames where the function name is `new Promise` since these are in the error.stack frames\n // but do not appear in the debugger call frames\n const frames = (exception.stacktrace?.frames || []).filter(frame => frame.function !== 'new Promise');\n\n for (let i = 0; i < frames.length; i++) {\n // Sentry frames are in reverse order\n const frameIndex = frames.length - i - 1;\n\n const cachedFrameVariable = cachedFrame[i];\n const frameVariable = frames[frameIndex];\n\n // Drop out if we run out of frames to match up\n if (!frameVariable || !cachedFrameVariable) {\n break;\n }\n\n if (\n // We need to have vars to add\n cachedFrameVariable.vars === undefined ||\n // We're not interested in frames that are not in_app because the vars are not relevant\n frameVariable.in_app === false ||\n // The function names need to match\n !functionNamesMatch(frameVariable.function, cachedFrameVariable.function)\n ) {\n continue;\n }\n\n frameVariable.vars = cachedFrameVariable.vars;\n }\n }\n\n function addLocalVariablesToEvent(event: Event): Event {\n for (const exception of event.exception?.values || []) {\n addLocalVariablesToException(exception);\n }\n\n return event;\n }\n\n return {\n name: INTEGRATION_NAME,\n async setupOnce() {\n const client = getClient<NodeClient>();\n const clientOptions = client?.getOptions();\n\n if (!clientOptions?.includeLocalVariables) {\n return;\n }\n\n // Only setup this integration if the Node version is >= v18\n // https://github.com/getsentry/sentry-javascript/issues/7697\n const unsupportedNodeVersion = NODE_MAJOR < 18;\n\n if (unsupportedNodeVersion) {\n logger.log('The `LocalVariables` integration is only supported on Node >= v18.');\n return;\n }\n\n if (await isDebuggerEnabled()) {\n logger.warn('Local variables capture has been disabled because the debugger was already enabled');\n return;\n }\n\n AsyncSession.create(sessionOverride).then(\n session => {\n function handlePaused(\n stackParser: StackParser,\n { params: { reason, data, callFrames } }: InspectorNotification<PausedExceptionEvent>,\n complete: () => void,\n ): void {\n if (reason !== 'exception' && reason !== 'promiseRejection') {\n complete();\n return;\n }\n\n rateLimiter?.();\n\n // data.description contains the original error.stack\n const exceptionHash = hashFromStack(stackParser, data.description);\n\n if (exceptionHash == undefined) {\n complete();\n return;\n }\n\n const { add, next } = createCallbackList<FrameVariables[]>(frames => {\n cachedFrames.set(exceptionHash, frames);\n complete();\n });\n\n // Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack\n // For this reason we only attempt to get local variables for the first 5 frames\n for (let i = 0; i < Math.min(callFrames.length, 5); i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { scopeChain, functionName, this: obj } = callFrames[i]!;\n\n const localScope = scopeChain.find(scope => scope.type === 'local');\n\n // obj.className is undefined in ESM modules\n const fn =\n obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`;\n\n if (localScope?.object.objectId === undefined) {\n add(frames => {\n frames[i] = { function: fn };\n next(frames);\n });\n } else {\n const id = localScope.object.objectId;\n add(frames =>\n session.getLocalVariables(id, vars => {\n frames[i] = { function: fn, vars };\n next(frames);\n }),\n );\n }\n }\n\n next([]);\n }\n\n const captureAll = options.captureAllExceptions !== false;\n\n session.configureAndConnect(\n (ev, complete) =>\n handlePaused(clientOptions.stackParser, ev as InspectorNotification<PausedExceptionEvent>, complete),\n captureAll,\n );\n\n if (captureAll) {\n const max = options.maxExceptionsPerSecond || 50;\n\n rateLimiter = createRateLimiter(\n max,\n () => {\n logger.log('Local variables rate-limit lifted.');\n session.setPauseOnExceptions(true);\n },\n seconds => {\n logger.log(\n `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`,\n );\n session.setPauseOnExceptions(false);\n },\n );\n }\n\n shouldProcessEvent = true;\n },\n error => {\n logger.log('The `LocalVariables` integration failed to start.', error);\n },\n );\n },\n processEvent(event: Event): Event {\n if (shouldProcessEvent) {\n return addLocalVariablesToEvent(event);\n }\n\n return event;\n },\n // These are entirely for testing\n _getCachedFramesCount(): number {\n return cachedFrames.size;\n },\n _getFirstCachedFrame(): FrameVariables[] | undefined {\n return cachedFrames.values()[0];\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds local variables to exception frames.\n */\nexport const localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration);\n"],"names":["LRUMap","functionNamesMatch","getClient","NODE_MAJOR","logger","isDebuggerEnabled","createRateLimiter","defineIntegration"],"mappings":";;;;;;;AAeA;AACO,SAAS,UAAU,CAAC,MAAM,EAAgD;AACjF,EAAE,IAAI,MAAO,KAAI,SAAS,EAAE;AAC5B,IAAI;AACJ;;AAEA;AACA,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,CAAC,EAAA,GAAA,CAAA,CAAA,EAAA,KAAA,CAAA,QAAA,CAAA,CAAA,EAAA,KAAA,CAAA,MAAA,CAAA,CAAA,EAAA,KAAA,CAAA,KAAA,CAAA,CAAA,EAAA,EAAA,CAAA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAA,aAAA,CAAA,WAAA,EAAA,KAAA,EAAA;AACA,EAAA,IAAA,KAAA,KAAA,SAAA,EAAA;AACA,IAAA,OAAA,SAAA;AACA;;AAEA,EAAA,OAAA,UAAA,CAAA,WAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA;AACA;;AAgBA;AACA,SAAA,kBAAA,CAAA,QAAA,EAAA;AACA;AACA,EAAA,IAAA,SAAA,GAAA,EAAA;;AAEA,EAAA,IAAA,eAAA,GAAA,KAAA;AACA,EAAA,SAAA,eAAA,CAAA,MAAA,EAAA;AACA,IAAA,SAAA,GAAA,EAAA;AACA,IAAA,IAAA,eAAA,EAAA;AACA,MAAA;AACA;AACA,IAAA,eAAA,GAAA,IAAA;AACA,IAAA,QAAA,CAAA,MAAA,CAAA;AACA;;AAEA;AACA,EAAA,SAAA,CAAA,IAAA,CAAA,eAAA,CAAA;;AAEA,EAAA,SAAA,GAAA,CAAA,EAAA,EAAA;AACA,IAAA,SAAA,CAAA,IAAA,CAA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A,KAAA;AACA,IAAA,oBAAA,GAAA;AACA,MAAA,OAAA,YAAA,CAAA,MAAA,EAAA,CAAA,CAAA,CAAA;AACA,KAAA;AACA,GAAA;AACA,CAAA,CAAA;;AAEA;AACA;AACA;AACA,MAAA,6BAAA,GAAAG,sBAAA,CAAA,8BAAA;;;;;;;"}
@@ -1,135 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const node_fs = require('node:fs');
4
- const node_path = require('node:path');
5
- const commonjs = require('../utils/commonjs.js');
6
-
7
- let moduleCache;
8
-
9
- const INTEGRATION_NAME = 'Modules';
10
-
11
- /**
12
- * `__SENTRY_SERVER_MODULES__` can be replaced at build time with the modules loaded by the server.
13
- * Right now, we leverage this in Next.js to circumvent the problem that we do not get access to these things at runtime.
14
- */
15
- const SERVER_MODULES = typeof __SENTRY_SERVER_MODULES__ === 'undefined' ? {} : __SENTRY_SERVER_MODULES__;
16
-
17
- const _modulesIntegration = (() => {
18
- return {
19
- name: INTEGRATION_NAME,
20
- processEvent(event) {
21
- event.modules = {
22
- ...event.modules,
23
- ..._getModules(),
24
- };
25
-
26
- return event;
27
- },
28
- getModules: _getModules,
29
- };
30
- }) ;
31
-
32
- /**
33
- * Add node modules / packages to the event.
34
- * For this, multiple sources are used:
35
- * - They can be injected at build time into the __SENTRY_SERVER_MODULES__ variable (e.g. in Next.js)
36
- * - They are extracted from the dependencies & devDependencies in the package.json file
37
- * - They are extracted from the require.cache (CJS only)
38
- */
39
- const modulesIntegration = _modulesIntegration;
40
-
41
- function getRequireCachePaths() {
42
- try {
43
- return require.cache ? Object.keys(require.cache ) : [];
44
- } catch (e) {
45
- return [];
46
- }
47
- }
48
-
49
- /** Extract information about package.json modules */
50
- function collectModules() {
51
- return {
52
- ...SERVER_MODULES,
53
- ...getModulesFromPackageJson(),
54
- ...(commonjs.isCjs() ? collectRequireModules() : {}),
55
- };
56
- }
57
-
58
- /** Extract information about package.json modules from require.cache */
59
- function collectRequireModules() {
60
- const mainPaths = require.main?.paths || [];
61
- const paths = getRequireCachePaths();
62
-
63
- // We start with the modules from package.json (if possible)
64
- // These may be overwritten by more specific versions from the require.cache
65
- const infos = {};
66
- const seen = new Set();
67
-
68
- paths.forEach(path => {
69
- let dir = path;
70
-
71
- /** Traverse directories upward in the search of package.json file */
72
- const updir = () => {
73
- const orig = dir;
74
- dir = node_path.dirname(orig);
75
-
76
- if (!dir || orig === dir || seen.has(orig)) {
77
- return undefined;
78
- }
79
- if (mainPaths.indexOf(dir) < 0) {
80
- return updir();
81
- }
82
-
83
- const pkgfile = node_path.join(orig, 'package.json');
84
- seen.add(orig);
85
-
86
- if (!node_fs.existsSync(pkgfile)) {
87
- return updir();
88
- }
89
-
90
- try {
91
- const info = JSON.parse(node_fs.readFileSync(pkgfile, 'utf8'))
92
-
93
- ;
94
- infos[info.name] = info.version;
95
- } catch (_oO) {
96
- // no-empty
97
- }
98
- };
99
-
100
- updir();
101
- });
102
-
103
- return infos;
104
- }
105
-
106
- /** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */
107
- function _getModules() {
108
- if (!moduleCache) {
109
- moduleCache = collectModules();
110
- }
111
- return moduleCache;
112
- }
113
-
114
- function getPackageJson() {
115
- try {
116
- const filePath = node_path.join(process.cwd(), 'package.json');
117
- const packageJson = JSON.parse(node_fs.readFileSync(filePath, 'utf8')) ;
118
-
119
- return packageJson;
120
- } catch (e) {
121
- return {};
122
- }
123
- }
124
-
125
- function getModulesFromPackageJson() {
126
- const packageJson = getPackageJson();
127
-
128
- return {
129
- ...packageJson.dependencies,
130
- ...packageJson.devDependencies,
131
- };
132
- }
133
-
134
- exports.modulesIntegration = modulesIntegration;
135
- //# sourceMappingURL=modules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modules.js","sources":["../../../src/integrations/modules.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport type { IntegrationFn } from '@sentry/core';\nimport { isCjs } from '../utils/commonjs';\n\ntype ModuleInfo = Record<string, string>;\n\nlet moduleCache: ModuleInfo | undefined;\n\nconst INTEGRATION_NAME = 'Modules';\n\ndeclare const __SENTRY_SERVER_MODULES__: Record<string, string>;\n\n/**\n * `__SENTRY_SERVER_MODULES__` can be replaced at build time with the modules loaded by the server.\n * Right now, we leverage this in Next.js to circumvent the problem that we do not get access to these things at runtime.\n */\nconst SERVER_MODULES = typeof __SENTRY_SERVER_MODULES__ === 'undefined' ? {} : __SENTRY_SERVER_MODULES__;\n\nconst _modulesIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n processEvent(event) {\n event.modules = {\n ...event.modules,\n ..._getModules(),\n };\n\n return event;\n },\n getModules: _getModules,\n };\n}) satisfies IntegrationFn;\n\n/**\n * Add node modules / packages to the event.\n * For this, multiple sources are used:\n * - They can be injected at build time into the __SENTRY_SERVER_MODULES__ variable (e.g. in Next.js)\n * - They are extracted from the dependencies & devDependencies in the package.json file\n * - They are extracted from the require.cache (CJS only)\n */\nexport const modulesIntegration = _modulesIntegration;\n\nfunction getRequireCachePaths(): string[] {\n try {\n return require.cache ? Object.keys(require.cache as Record<string, unknown>) : [];\n } catch (e) {\n return [];\n }\n}\n\n/** Extract information about package.json modules */\nfunction collectModules(): ModuleInfo {\n return {\n ...SERVER_MODULES,\n ...getModulesFromPackageJson(),\n ...(isCjs() ? collectRequireModules() : {}),\n };\n}\n\n/** Extract information about package.json modules from require.cache */\nfunction collectRequireModules(): ModuleInfo {\n const mainPaths = require.main?.paths || [];\n const paths = getRequireCachePaths();\n\n // We start with the modules from package.json (if possible)\n // These may be overwritten by more specific versions from the require.cache\n const infos: ModuleInfo = {};\n const seen = new Set<string>();\n\n paths.forEach(path => {\n let dir = path;\n\n /** Traverse directories upward in the search of package.json file */\n const updir = (): void | (() => void) => {\n const orig = dir;\n dir = dirname(orig);\n\n if (!dir || orig === dir || seen.has(orig)) {\n return undefined;\n }\n if (mainPaths.indexOf(dir) < 0) {\n return updir();\n }\n\n const pkgfile = join(orig, 'package.json');\n seen.add(orig);\n\n if (!existsSync(pkgfile)) {\n return updir();\n }\n\n try {\n const info = JSON.parse(readFileSync(pkgfile, 'utf8')) as {\n name: string;\n version: string;\n };\n infos[info.name] = info.version;\n } catch (_oO) {\n // no-empty\n }\n };\n\n updir();\n });\n\n return infos;\n}\n\n/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */\nfunction _getModules(): ModuleInfo {\n if (!moduleCache) {\n moduleCache = collectModules();\n }\n return moduleCache;\n}\n\ninterface PackageJson {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n}\n\nfunction getPackageJson(): PackageJson {\n try {\n const filePath = join(process.cwd(), 'package.json');\n const packageJson = JSON.parse(readFileSync(filePath, 'utf8')) as PackageJson;\n\n return packageJson;\n } catch (e) {\n return {};\n }\n}\n\nfunction getModulesFromPackageJson(): ModuleInfo {\n const packageJson = getPackageJson();\n\n return {\n ...packageJson.dependencies,\n ...packageJson.devDependencies,\n };\n}\n"],"names":["isCjs","dirname","join","existsSync","readFileSync"],"mappings":";;;;;;AAOA,IAAI,WAAW;;AAEf,MAAM,gBAAA,GAAmB,SAAS;;AAIlC;AACA;AACA;AACA;AACA,MAAM,cAAA,GAAiB,OAAO,yBAA0B,KAAI,cAAc,EAAG,GAAE,yBAAyB;;AAExG,MAAM,mBAAoB,IAAG,MAAM;AACnC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,YAAY,CAAC,KAAK,EAAE;AACxB,MAAM,KAAK,CAAC,OAAA,GAAU;AACtB,QAAQ,GAAG,KAAK,CAAC,OAAO;AACxB,QAAQ,GAAG,WAAW,EAAE;AACxB,OAAO;;AAEP,MAAM,OAAO,KAAK;AAClB,KAAK;AACL,IAAI,UAAU,EAAE,WAAW;AAC3B,GAAG;AACH,CAAC,CAAE;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAmB,GAAE;;AAElC,SAAS,oBAAoB,GAA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BAAU,CAAC,OAAO,CAAC,EAAE;AAChC,QAAQ,OAAO,KAAK,EAAE;AACtB;;AAEA,MAAM,IAAI;AACV,QAAQ,MAAM,IAAA,GAAO,IAAI,CAAC,KAAK,CAACC,oBAAY,CAAC,OAAO,EAAE,MAAM,CAAC;;AAGrD;AACR,QAAQ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAE,GAAE,IAAI,CAAC,OAAO;AACvC,OAAQ,CAAA,OAAO,GAAG,EAAE;AACpB;AACA;AACA,KAAK;;AAEL,IAAI,KAAK,EAAE;AACX,GAAG,CAAC;;AAEJ,EAAE,OAAO,KAAK;AACd;;AAEA;AACA,SAAS,WAAW,GAAe;AACnC,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAI,WAAY,GAAE,cAAc,EAAE;AAClC;AACA,EAAE,OAAO,WAAW;AACpB;;AAOA,SAAS,cAAc,GAAgB;AACvC,EAAE,IAAI;AACN,IAAI,MAAM,QAAA,GAAWF,cAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC;AACxD,IAAI,MAAM,WAAA,GAAc,IAAI,CAAC,KAAK,CAACE,oBAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAE;;AAEnE,IAAI,OAAO,WAAW;AACtB,GAAI,CAAA,OAAO,CAAC,EAAE;AACd,IAAI,OAAO,EAAE;AACb;AACA;;AAEA,SAAS,yBAAyB,GAAe;AACjD,EAAE,MAAM,WAAA,GAAc,cAAc,EAAE;;AAEtC,EAAE,OAAO;AACT,IAAI,GAAG,WAAW,CAAC,YAAY;AAC/B,IAAI,GAAG,WAAW,CAAC,eAAe;AAClC,GAAG;AACH;;;;"}
@@ -1,291 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const api = require('@opentelemetry/api');
4
- const core = require('@opentelemetry/core');
5
- const instrumentation = require('@opentelemetry/instrumentation');
6
- const core$1 = require('@sentry/core');
7
- const opentelemetry = require('@sentry/opentelemetry');
8
- const diagch = require('diagnostics_channel');
9
- const nodeVersion = require('../../nodeVersion.js');
10
- const baggage = require('../../utils/baggage.js');
11
-
12
- const SENTRY_TRACE_HEADER = 'sentry-trace';
13
- const SENTRY_BAGGAGE_HEADER = 'baggage';
14
-
15
- // For baggage, we make sure to merge this into a possibly existing header
16
- const BAGGAGE_HEADER_REGEX = /baggage: (.*)\r\n/;
17
-
18
- /**
19
- * This custom node-fetch instrumentation is used to instrument outgoing fetch requests.
20
- * It does not emit any spans.
21
- *
22
- * The reason this is isolated from the OpenTelemetry instrumentation is that users may overwrite this,
23
- * which would lead to Sentry not working as expected.
24
- *
25
- * This is heavily inspired & adapted from:
26
- * https://github.com/open-telemetry/opentelemetry-js-contrib/blob/28e209a9da36bc4e1f8c2b0db7360170ed46cb80/plugins/node/instrumentation-undici/src/undici.ts
27
- */
28
- class SentryNodeFetchInstrumentation extends instrumentation.InstrumentationBase {
29
- // Keep ref to avoid https://github.com/nodejs/node/issues/42170 bug and for
30
- // unsubscribing.
31
-
32
- constructor(config = {}) {
33
- super('@sentry/instrumentation-node-fetch', core.VERSION, config);
34
- this._channelSubs = [];
35
- this._propagationDecisionMap = new core$1.LRUMap(100);
36
- this._ignoreOutgoingRequestsMap = new WeakMap();
37
- }
38
-
39
- /** No need to instrument files/modules. */
40
- init() {
41
- return undefined;
42
- }
43
-
44
- /** Disable the instrumentation. */
45
- disable() {
46
- super.disable();
47
- this._channelSubs.forEach(sub => sub.unsubscribe());
48
- this._channelSubs = [];
49
- }
50
-
51
- /** Enable the instrumentation. */
52
- enable() {
53
- // "enabled" handling is currently a bit messy with InstrumentationBase.
54
- // If constructed with `{enabled: false}`, this `.enable()` is still called,
55
- // and `this.getConfig().enabled !== this.isEnabled()`, creating confusion.
56
- //
57
- // For now, this class will setup for instrumenting if `.enable()` is
58
- // called, but use `this.getConfig().enabled` to determine if
59
- // instrumentation should be generated. This covers the more likely common
60
- // case of config being given a construction time, rather than later via
61
- // `instance.enable()`, `.disable()`, or `.setConfig()` calls.
62
- super.enable();
63
-
64
- // This method is called by the super-class constructor before ours is
65
- // called. So we need to ensure the property is initalized.
66
- this._channelSubs = this._channelSubs || [];
67
-
68
- // Avoid to duplicate subscriptions
69
- if (this._channelSubs.length > 0) {
70
- return;
71
- }
72
-
73
- this._subscribeToChannel('undici:request:create', this._onRequestCreated.bind(this));
74
- this._subscribeToChannel('undici:request:headers', this._onResponseHeaders.bind(this));
75
- }
76
-
77
- /**
78
- * This method is called when a request is created.
79
- * You can still mutate the request here before it is sent.
80
- */
81
- _onRequestCreated({ request }) {
82
- const config = this.getConfig();
83
- const enabled = config.enabled !== false;
84
-
85
- if (!enabled) {
86
- return;
87
- }
88
-
89
- const shouldIgnore = this._shouldIgnoreOutgoingRequest(request);
90
- // We store this decisision for later so we do not need to re-evaluate it
91
- // Additionally, the active context is not correct in _onResponseHeaders, so we need to make sure it is evaluated here
92
- this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);
93
-
94
- if (shouldIgnore) {
95
- return;
96
- }
97
-
98
- const url = getAbsoluteUrl(request.origin, request.path);
99
-
100
- // Manually add the trace headers, if it applies
101
- // Note: We do not use `propagation.inject()` here, because our propagator relies on an active span
102
- // Which we do not have in this case
103
- // The propagator _may_ overwrite this, but this should be fine as it is the same data
104
- const tracePropagationTargets = core$1.getClient()?.getOptions().tracePropagationTargets;
105
- const addedHeaders = opentelemetry.shouldPropagateTraceForUrl(url, tracePropagationTargets, this._propagationDecisionMap)
106
- ? core$1.getTraceData()
107
- : undefined;
108
-
109
- if (!addedHeaders) {
110
- return;
111
- }
112
-
113
- const { 'sentry-trace': sentryTrace, baggage: baggage$1 } = addedHeaders;
114
-
115
- // We do not want to overwrite existing headers here
116
- // If the core UndiciInstrumentation is registered, it will already have set the headers
117
- // We do not want to add any then
118
- if (Array.isArray(request.headers)) {
119
- const requestHeaders = request.headers;
120
-
121
- // We do not want to overwrite existing header here, if it was already set
122
- if (sentryTrace && !requestHeaders.includes(SENTRY_TRACE_HEADER)) {
123
- requestHeaders.push(SENTRY_TRACE_HEADER, sentryTrace);
124
- }
125
-
126
- // For baggage, we make sure to merge this into a possibly existing header
127
- const existingBaggagePos = requestHeaders.findIndex(header => header === SENTRY_BAGGAGE_HEADER);
128
- if (baggage$1 && existingBaggagePos === -1) {
129
- requestHeaders.push(SENTRY_BAGGAGE_HEADER, baggage$1);
130
- } else if (baggage$1) {
131
- const existingBaggage = requestHeaders[existingBaggagePos + 1];
132
- const merged = baggage.mergeBaggageHeaders(existingBaggage, baggage$1);
133
- if (merged) {
134
- requestHeaders[existingBaggagePos + 1] = merged;
135
- }
136
- }
137
- } else {
138
- const requestHeaders = request.headers;
139
- // We do not want to overwrite existing header here, if it was already set
140
- if (sentryTrace && !requestHeaders.includes(`${SENTRY_TRACE_HEADER}:`)) {
141
- request.headers += `${SENTRY_TRACE_HEADER}: ${sentryTrace}\r\n`;
142
- }
143
-
144
- const existingBaggage = request.headers.match(BAGGAGE_HEADER_REGEX)?.[1];
145
- if (baggage$1 && !existingBaggage) {
146
- request.headers += `${SENTRY_BAGGAGE_HEADER}: ${baggage$1}\r\n`;
147
- } else if (baggage$1) {
148
- const merged = baggage.mergeBaggageHeaders(existingBaggage, baggage$1);
149
- if (merged) {
150
- request.headers = request.headers.replace(BAGGAGE_HEADER_REGEX, `baggage: ${merged}\r\n`);
151
- }
152
- }
153
- }
154
- }
155
-
156
- /**
157
- * This method is called when a response is received.
158
- */
159
- _onResponseHeaders({ request, response }) {
160
- const config = this.getConfig();
161
- const enabled = config.enabled !== false;
162
-
163
- if (!enabled) {
164
- return;
165
- }
166
-
167
- const _breadcrumbs = config.breadcrumbs;
168
- const breadCrumbsEnabled = typeof _breadcrumbs === 'undefined' ? true : _breadcrumbs;
169
-
170
- const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request);
171
-
172
- if (breadCrumbsEnabled && !shouldIgnore) {
173
- addRequestBreadcrumb(request, response);
174
- }
175
- }
176
-
177
- /** Subscribe to a diagnostics channel. */
178
- _subscribeToChannel(
179
- diagnosticChannel,
180
- onMessage,
181
- ) {
182
- // `diagnostics_channel` had a ref counting bug until v18.19.0.
183
- // https://github.com/nodejs/node/pull/47520
184
- const useNewSubscribe = nodeVersion.NODE_MAJOR > 18 || (nodeVersion.NODE_MAJOR === 18 && nodeVersion.NODE_MINOR >= 19);
185
-
186
- let unsubscribe;
187
- if (useNewSubscribe) {
188
- diagch.subscribe?.(diagnosticChannel, onMessage);
189
- unsubscribe = () => diagch.unsubscribe?.(diagnosticChannel, onMessage);
190
- } else {
191
- const channel = diagch.channel(diagnosticChannel);
192
- channel.subscribe(onMessage);
193
- unsubscribe = () => channel.unsubscribe(onMessage);
194
- }
195
-
196
- this._channelSubs.push({
197
- name: diagnosticChannel,
198
- unsubscribe,
199
- });
200
- }
201
-
202
- /**
203
- * Check if the given outgoing request should be ignored.
204
- */
205
- _shouldIgnoreOutgoingRequest(request) {
206
- if (core.isTracingSuppressed(api.context.active())) {
207
- return true;
208
- }
209
-
210
- // Add trace propagation headers
211
- const url = getAbsoluteUrl(request.origin, request.path);
212
- const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;
213
-
214
- if (typeof ignoreOutgoingRequests !== 'function' || !url) {
215
- return false;
216
- }
217
-
218
- return ignoreOutgoingRequests(url);
219
- }
220
- }
221
-
222
- /** Add a breadcrumb for outgoing requests. */
223
- function addRequestBreadcrumb(request, response) {
224
- const data = getBreadcrumbData(request);
225
-
226
- const statusCode = response.statusCode;
227
- const level = core$1.getBreadcrumbLogLevelFromHttpStatusCode(statusCode);
228
-
229
- core$1.addBreadcrumb(
230
- {
231
- category: 'http',
232
- data: {
233
- status_code: statusCode,
234
- ...data,
235
- },
236
- type: 'http',
237
- level,
238
- },
239
- {
240
- event: 'response',
241
- request,
242
- response,
243
- },
244
- );
245
- }
246
-
247
- function getBreadcrumbData(request) {
248
- try {
249
- const url = getAbsoluteUrl(request.origin, request.path);
250
- const parsedUrl = core$1.parseUrl(url);
251
-
252
- const data = {
253
- url: core$1.getSanitizedUrlString(parsedUrl),
254
- 'http.method': request.method || 'GET',
255
- };
256
-
257
- if (parsedUrl.search) {
258
- data['http.query'] = parsedUrl.search;
259
- }
260
- if (parsedUrl.hash) {
261
- data['http.fragment'] = parsedUrl.hash;
262
- }
263
-
264
- return data;
265
- } catch {
266
- return {};
267
- }
268
- }
269
-
270
- function getAbsoluteUrl(origin, path = '/') {
271
- try {
272
- const url = new URL(path, origin);
273
- return url.toString();
274
- } catch {
275
- // fallback: Construct it on our own
276
- const url = `${origin}`;
277
-
278
- if (url.endsWith('/') && path.startsWith('/')) {
279
- return `${url}${path.slice(1)}`;
280
- }
281
-
282
- if (!url.endsWith('/') && !path.startsWith('/')) {
283
- return `${url}/${path.slice(1)}`;
284
- }
285
-
286
- return `${url}${path}`;
287
- }
288
- }
289
-
290
- exports.SentryNodeFetchInstrumentation = SentryNodeFetchInstrumentation;
291
- //# sourceMappingURL=SentryNodeFetchInstrumentation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SentryNodeFetchInstrumentation.js","sources":["../../../../src/integrations/node-fetch/SentryNodeFetchInstrumentation.ts"],"sourcesContent":["import { context } from '@opentelemetry/api';\nimport { isTracingSuppressed, VERSION } from '@opentelemetry/core';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase } from '@opentelemetry/instrumentation';\nimport type { SanitizedRequestData } from '@sentry/core';\nimport {\n addBreadcrumb,\n getBreadcrumbLogLevelFromHttpStatusCode,\n getClient,\n getSanitizedUrlString,\n getTraceData,\n LRUMap,\n parseUrl,\n} from '@sentry/core';\nimport { shouldPropagateTraceForUrl } from '@sentry/opentelemetry';\nimport * as diagch from 'diagnostics_channel';\nimport { NODE_MAJOR, NODE_MINOR } from '../../nodeVersion';\nimport { mergeBaggageHeaders } from '../../utils/baggage';\nimport type { UndiciRequest, UndiciResponse } from './types';\n\nconst SENTRY_TRACE_HEADER = 'sentry-trace';\nconst SENTRY_BAGGAGE_HEADER = 'baggage';\n\n// For baggage, we make sure to merge this into a possibly existing header\nconst BAGGAGE_HEADER_REGEX = /baggage: (.*)\\r\\n/;\n\nexport type SentryNodeFetchInstrumentationOptions = InstrumentationConfig & {\n /**\n * Whether breadcrumbs should be recorded for requests.\n *\n * @default `true`\n */\n breadcrumbs?: boolean;\n\n /**\n * Do not capture breadcrumbs or inject headers for outgoing fetch requests to URLs where the given callback returns `true`.\n * The same option can be passed to the top-level httpIntegration where it controls both, breadcrumb and\n * span creation.\n *\n * @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request.\n */\n ignoreOutgoingRequests?: (url: string) => boolean;\n};\n\ninterface ListenerRecord {\n name: string;\n unsubscribe: () => void;\n}\n\n/**\n * This custom node-fetch instrumentation is used to instrument outgoing fetch requests.\n * It does not emit any spans.\n *\n * The reason this is isolated from the OpenTelemetry instrumentation is that users may overwrite this,\n * which would lead to Sentry not working as expected.\n *\n * This is heavily inspired & adapted from:\n * https://github.com/open-telemetry/opentelemetry-js-contrib/blob/28e209a9da36bc4e1f8c2b0db7360170ed46cb80/plugins/node/instrumentation-undici/src/undici.ts\n */\nexport class SentryNodeFetchInstrumentation extends InstrumentationBase<SentryNodeFetchInstrumentationOptions> {\n // Keep ref to avoid https://github.com/nodejs/node/issues/42170 bug and for\n // unsubscribing.\n private _channelSubs: Array<ListenerRecord>;\n private _propagationDecisionMap: LRUMap<string, boolean>;\n private _ignoreOutgoingRequestsMap: WeakMap<UndiciRequest, boolean>;\n\n public constructor(config: SentryNodeFetchInstrumentationOptions = {}) {\n super('@sentry/instrumentation-node-fetch', VERSION, config);\n this._channelSubs = [];\n this._propagationDecisionMap = new LRUMap<string, boolean>(100);\n this._ignoreOutgoingRequestsMap = new WeakMap<UndiciRequest, boolean>();\n }\n\n /** No need to instrument files/modules. */\n public init(): void {\n return undefined;\n }\n\n /** Disable the instrumentation. */\n public disable(): void {\n super.disable();\n this._channelSubs.forEach(sub => sub.unsubscribe());\n this._channelSubs = [];\n }\n\n /** Enable the instrumentation. */\n public enable(): void {\n // \"enabled\" handling is currently a bit messy with InstrumentationBase.\n // If constructed with `{enabled: false}`, this `.enable()` is still called,\n // and `this.getConfig().enabled !== this.isEnabled()`, creating confusion.\n //\n // For now, this class will setup for instrumenting if `.enable()` is\n // called, but use `this.getConfig().enabled` to determine if\n // instrumentation should be generated. This covers the more likely common\n // case of config being given a construction time, rather than later via\n // `instance.enable()`, `.disable()`, or `.setConfig()` calls.\n super.enable();\n\n // This method is called by the super-class constructor before ours is\n // called. So we need to ensure the property is initalized.\n this._channelSubs = this._channelSubs || [];\n\n // Avoid to 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:request:headers', this._onResponseHeaders.bind(this));\n }\n\n /**\n * This method is called when a request is created.\n * You can still mutate the request here before it is sent.\n */\n private _onRequestCreated({ request }: { request: UndiciRequest }): void {\n const config = this.getConfig();\n const enabled = config.enabled !== false;\n\n if (!enabled) {\n return;\n }\n\n const shouldIgnore = this._shouldIgnoreOutgoingRequest(request);\n // We store this decisision for later so we do not need to re-evaluate it\n // Additionally, the active context is not correct in _onResponseHeaders, so we need to make sure it is evaluated here\n this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);\n\n if (shouldIgnore) {\n return;\n }\n\n const url = getAbsoluteUrl(request.origin, request.path);\n\n // Manually add the trace headers, if it applies\n // Note: We do not use `propagation.inject()` here, because our propagator relies on an active span\n // Which we do not have in this case\n // The propagator _may_ overwrite this, but this should be fine as it is the same data\n const tracePropagationTargets = getClient()?.getOptions().tracePropagationTargets;\n const addedHeaders = shouldPropagateTraceForUrl(url, tracePropagationTargets, this._propagationDecisionMap)\n ? getTraceData()\n : undefined;\n\n if (!addedHeaders) {\n return;\n }\n\n const { 'sentry-trace': sentryTrace, baggage } = addedHeaders;\n\n // We do not want to overwrite existing headers here\n // If the core UndiciInstrumentation is registered, it will already have set the headers\n // We do not want to add any then\n if (Array.isArray(request.headers)) {\n const requestHeaders = request.headers;\n\n // We do not want to overwrite existing header here, if it was already set\n if (sentryTrace && !requestHeaders.includes(SENTRY_TRACE_HEADER)) {\n requestHeaders.push(SENTRY_TRACE_HEADER, sentryTrace);\n }\n\n // For baggage, we make sure to merge this into a possibly existing header\n const existingBaggagePos = requestHeaders.findIndex(header => header === SENTRY_BAGGAGE_HEADER);\n if (baggage && existingBaggagePos === -1) {\n requestHeaders.push(SENTRY_BAGGAGE_HEADER, baggage);\n } else if (baggage) {\n const existingBaggage = requestHeaders[existingBaggagePos + 1];\n const merged = mergeBaggageHeaders(existingBaggage, baggage);\n if (merged) {\n requestHeaders[existingBaggagePos + 1] = merged;\n }\n }\n } else {\n const requestHeaders = request.headers;\n // We do not want to overwrite existing header here, if it was already set\n if (sentryTrace && !requestHeaders.includes(`${SENTRY_TRACE_HEADER}:`)) {\n request.headers += `${SENTRY_TRACE_HEADER}: ${sentryTrace}\\r\\n`;\n }\n\n const existingBaggage = request.headers.match(BAGGAGE_HEADER_REGEX)?.[1];\n if (baggage && !existingBaggage) {\n request.headers += `${SENTRY_BAGGAGE_HEADER}: ${baggage}\\r\\n`;\n } else if (baggage) {\n const merged = mergeBaggageHeaders(existingBaggage, baggage);\n if (merged) {\n request.headers = request.headers.replace(BAGGAGE_HEADER_REGEX, `baggage: ${merged}\\r\\n`);\n }\n }\n }\n }\n\n /**\n * This method is called when a response is received.\n */\n private _onResponseHeaders({ request, response }: { request: UndiciRequest; response: UndiciResponse }): void {\n const config = this.getConfig();\n const enabled = config.enabled !== false;\n\n if (!enabled) {\n return;\n }\n\n const _breadcrumbs = config.breadcrumbs;\n const breadCrumbsEnabled = typeof _breadcrumbs === 'undefined' ? true : _breadcrumbs;\n\n const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request);\n\n if (breadCrumbsEnabled && !shouldIgnore) {\n addRequestBreadcrumb(request, response);\n }\n }\n\n /** Subscribe to a diagnostics channel. */\n private _subscribeToChannel(\n diagnosticChannel: string,\n onMessage: (message: unknown, 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 useNewSubscribe = NODE_MAJOR > 18 || (NODE_MAJOR === 18 && NODE_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 /**\n * Check if the given outgoing request should be ignored.\n */\n private _shouldIgnoreOutgoingRequest(request: UndiciRequest): boolean {\n if (isTracingSuppressed(context.active())) {\n return true;\n }\n\n // Add trace propagation headers\n const url = getAbsoluteUrl(request.origin, request.path);\n const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;\n\n if (typeof ignoreOutgoingRequests !== 'function' || !url) {\n return false;\n }\n\n return ignoreOutgoingRequests(url);\n }\n}\n\n/** Add a breadcrumb for outgoing requests. */\nfunction addRequestBreadcrumb(request: UndiciRequest, response: UndiciResponse): void {\n const data = getBreadcrumbData(request);\n\n const statusCode = response.statusCode;\n const level = getBreadcrumbLogLevelFromHttpStatusCode(statusCode);\n\n addBreadcrumb(\n {\n category: 'http',\n data: {\n status_code: statusCode,\n ...data,\n },\n type: 'http',\n level,\n },\n {\n event: 'response',\n request,\n response,\n },\n );\n}\n\nfunction getBreadcrumbData(request: UndiciRequest): Partial<SanitizedRequestData> {\n try {\n const url = getAbsoluteUrl(request.origin, request.path);\n const parsedUrl = parseUrl(url);\n\n const data: Partial<SanitizedRequestData> = {\n url: getSanitizedUrlString(parsedUrl),\n 'http.method': request.method || 'GET',\n };\n\n if (parsedUrl.search) {\n data['http.query'] = parsedUrl.search;\n }\n if (parsedUrl.hash) {\n data['http.fragment'] = parsedUrl.hash;\n }\n\n return data;\n } catch {\n return {};\n }\n}\n\nfunction getAbsoluteUrl(origin: string, path: string = '/'): string {\n try {\n const url = new URL(path, origin);\n return url.toString();\n } catch {\n // fallback: Construct it on our own\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.slice(1)}`;\n }\n\n return `${url}${path}`;\n }\n}\n"],"names":["InstrumentationBase","VERSION","LRUMap","getClient","shouldPropagateTraceForUrl","getTraceData","baggage","mergeBaggageHeaders","NODE_MAJOR","NODE_MINOR","isTracingSuppressed","context","getBreadcrumbLogLevelFromHttpStatusCode","addBreadcrumb","parseUrl","getSanitizedUrlString"],"mappings":";;;;;;;;;;;AAoBA,MAAM,mBAAA,GAAsB,cAAc;AAC1C,MAAM,qBAAA,GAAwB,SAAS;;AAEvC;AACA,MAAM,oBAAA,GAAuB,mBAAmB;;AAyBhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,8BAAA,SAAuCA,mCAAmB,CAAwC;AAC/G;AACA;;AAKA,GAAS,WAAW,CAAC,MAAM,GAA0C,EAAE,EAAE;AACzE,IAAI,KAAK,CAAC,oCAAoC,EAAEC,YAAO,EAAE,MAAM,CAAC;AAChE,IAAI,IAAI,CAAC,YAAa,GAAE,EAAE;AAC1B,IAAI,IAAI,CAAC,uBAAwB,GAAE,IAAIC,aAAM,CAAkB,GAAG,CAAC;AACnE,IAAI,IAAI,CAAC,0BAAA,GAA6B,IAAI,OAAO,EAA0B;AAC3E;;AAEA;AACA,GAAS,IAAI,GAAS;AACtB,IAAI,OAAO,SAAS;AACpB;;AAEA;AACA,GAAS,OAAO,GAAS;AACzB,IAAI,KAAK,CAAC,OAAO,EAAE;AACnB,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAI,IAAG,GAAG,CAAC,WAAW,EAAE,CAAC;A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