@sentry/node 7.104.0 → 8.0.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 (426) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +114 -38
  3. package/cjs/cron/index.js +15 -0
  4. package/cjs/cron/index.js.map +1 -0
  5. package/cjs/index.js +79 -98
  6. package/cjs/index.js.map +1 -1
  7. package/cjs/integrations/anr/index.js +4 -30
  8. package/cjs/integrations/anr/index.js.map +1 -1
  9. package/cjs/integrations/anr/worker-script.js +2 -2
  10. package/cjs/integrations/console.js +2 -13
  11. package/cjs/integrations/console.js.map +1 -1
  12. package/cjs/integrations/context.js +2 -16
  13. package/cjs/integrations/context.js.map +1 -1
  14. package/cjs/integrations/contextlines.js +6 -23
  15. package/cjs/integrations/contextlines.js.map +1 -1
  16. package/cjs/integrations/http.js +103 -354
  17. package/cjs/integrations/http.js.map +1 -1
  18. package/cjs/integrations/local-variables/index.js +0 -10
  19. package/cjs/integrations/local-variables/index.js.map +1 -1
  20. package/cjs/integrations/local-variables/local-variables-sync.js +29 -24
  21. package/cjs/integrations/local-variables/local-variables-sync.js.map +1 -1
  22. package/cjs/integrations/modules.js +19 -30
  23. package/cjs/integrations/modules.js.map +1 -1
  24. package/cjs/integrations/node-fetch.js +82 -0
  25. package/cjs/integrations/node-fetch.js.map +1 -0
  26. package/cjs/integrations/onuncaughtexception.js +15 -30
  27. package/cjs/integrations/onuncaughtexception.js.map +1 -1
  28. package/cjs/integrations/onunhandledrejection.js +3 -17
  29. package/cjs/integrations/onunhandledrejection.js.map +1 -1
  30. package/cjs/integrations/spotlight.js +4 -22
  31. package/cjs/integrations/spotlight.js.map +1 -1
  32. package/cjs/integrations/tracing/express.js +103 -0
  33. package/cjs/integrations/tracing/express.js.map +1 -0
  34. package/cjs/integrations/tracing/fastify.js +33 -0
  35. package/cjs/integrations/tracing/fastify.js.map +1 -0
  36. package/cjs/integrations/tracing/graphql.js +34 -0
  37. package/cjs/integrations/tracing/graphql.js.map +1 -0
  38. package/cjs/integrations/tracing/hapi/index.js +81 -0
  39. package/cjs/integrations/tracing/hapi/index.js.map +1 -0
  40. package/cjs/integrations/tracing/index.js +37 -0
  41. package/cjs/integrations/tracing/index.js.map +1 -0
  42. package/cjs/integrations/tracing/koa.js +21 -0
  43. package/cjs/integrations/tracing/koa.js.map +1 -0
  44. package/cjs/integrations/tracing/mongo.js +33 -0
  45. package/cjs/integrations/tracing/mongo.js.map +1 -0
  46. package/cjs/integrations/tracing/mongoose.js +33 -0
  47. package/cjs/integrations/tracing/mongoose.js.map +1 -0
  48. package/cjs/integrations/tracing/mysql.js +26 -0
  49. package/cjs/integrations/tracing/mysql.js.map +1 -0
  50. package/cjs/integrations/tracing/mysql2.js +33 -0
  51. package/cjs/integrations/tracing/mysql2.js.map +1 -0
  52. package/cjs/integrations/tracing/nest.js +26 -0
  53. package/cjs/integrations/tracing/nest.js.map +1 -0
  54. package/cjs/integrations/tracing/postgres.js +34 -0
  55. package/cjs/integrations/tracing/postgres.js.map +1 -0
  56. package/cjs/integrations/tracing/prisma.js +33 -0
  57. package/cjs/integrations/tracing/prisma.js.map +1 -0
  58. package/cjs/nodeVersion.js +5 -1
  59. package/cjs/nodeVersion.js.map +1 -1
  60. package/cjs/otel/contextManager.js +16 -0
  61. package/cjs/otel/contextManager.js.map +1 -0
  62. package/cjs/proxy/index.js +1 -2
  63. package/cjs/proxy/index.js.map +1 -1
  64. package/cjs/sdk/api.js +74 -0
  65. package/cjs/sdk/api.js.map +1 -0
  66. package/cjs/sdk/client.js +57 -0
  67. package/cjs/sdk/client.js.map +1 -0
  68. package/cjs/sdk/hub.js +104 -0
  69. package/cjs/sdk/hub.js.map +1 -0
  70. package/cjs/sdk/init.js +224 -0
  71. package/cjs/sdk/init.js.map +1 -0
  72. package/cjs/sdk/initOtel.js +70 -0
  73. package/cjs/sdk/initOtel.js.map +1 -0
  74. package/cjs/sdk/scope.js +18 -0
  75. package/cjs/sdk/scope.js.map +1 -0
  76. package/cjs/transports/http.js +2 -3
  77. package/cjs/transports/http.js.map +1 -1
  78. package/cjs/utils/addOriginToSpan.js +11 -0
  79. package/cjs/utils/addOriginToSpan.js.map +1 -0
  80. package/cjs/{integrations/utils → utils}/errorhandling.js +2 -1
  81. package/cjs/utils/errorhandling.js.map +1 -0
  82. package/cjs/utils/getRequestUrl.js +18 -0
  83. package/cjs/utils/getRequestUrl.js.map +1 -0
  84. package/cjs/utils/module.js.map +1 -0
  85. package/esm/cron/index.js +13 -0
  86. package/esm/cron/index.js.map +1 -0
  87. package/esm/index.js +28 -48
  88. package/esm/index.js.map +1 -1
  89. package/esm/integrations/anr/index.js +7 -32
  90. package/esm/integrations/anr/index.js.map +1 -1
  91. package/esm/integrations/anr/worker-script.js +2 -2
  92. package/esm/integrations/console.js +4 -14
  93. package/esm/integrations/console.js.map +1 -1
  94. package/esm/integrations/context.js +4 -17
  95. package/esm/integrations/context.js.map +1 -1
  96. package/esm/integrations/contextlines.js +8 -25
  97. package/esm/integrations/contextlines.js.map +1 -1
  98. package/esm/integrations/http.js +105 -353
  99. package/esm/integrations/http.js.map +1 -1
  100. package/esm/integrations/local-variables/index.js +2 -11
  101. package/esm/integrations/local-variables/index.js.map +1 -1
  102. package/esm/integrations/local-variables/local-variables-sync.js +31 -25
  103. package/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
  104. package/esm/integrations/modules.js +21 -31
  105. package/esm/integrations/modules.js.map +1 -1
  106. package/esm/integrations/node-fetch.js +80 -0
  107. package/esm/integrations/node-fetch.js.map +1 -0
  108. package/esm/integrations/onuncaughtexception.js +17 -31
  109. package/esm/integrations/onuncaughtexception.js.map +1 -1
  110. package/esm/integrations/onunhandledrejection.js +5 -18
  111. package/esm/integrations/onunhandledrejection.js.map +1 -1
  112. package/esm/integrations/spotlight.js +3 -20
  113. package/esm/integrations/spotlight.js.map +1 -1
  114. package/esm/integrations/tracing/express.js +96 -0
  115. package/esm/integrations/tracing/express.js.map +1 -0
  116. package/esm/integrations/tracing/fastify.js +31 -0
  117. package/esm/integrations/tracing/fastify.js.map +1 -0
  118. package/esm/integrations/tracing/graphql.js +32 -0
  119. package/esm/integrations/tracing/graphql.js.map +1 -0
  120. package/esm/integrations/tracing/hapi/index.js +77 -0
  121. package/esm/integrations/tracing/hapi/index.js.map +1 -0
  122. package/esm/integrations/tracing/index.js +35 -0
  123. package/esm/integrations/tracing/index.js.map +1 -0
  124. package/esm/integrations/tracing/koa.js +19 -0
  125. package/esm/integrations/tracing/koa.js.map +1 -0
  126. package/esm/integrations/tracing/mongo.js +31 -0
  127. package/esm/integrations/tracing/mongo.js.map +1 -0
  128. package/esm/integrations/tracing/mongoose.js +31 -0
  129. package/esm/integrations/tracing/mongoose.js.map +1 -0
  130. package/esm/integrations/tracing/mysql.js +24 -0
  131. package/esm/integrations/tracing/mysql.js.map +1 -0
  132. package/esm/integrations/tracing/mysql2.js +31 -0
  133. package/esm/integrations/tracing/mysql2.js.map +1 -0
  134. package/esm/integrations/tracing/nest.js +24 -0
  135. package/esm/integrations/tracing/nest.js.map +1 -0
  136. package/esm/integrations/tracing/postgres.js +32 -0
  137. package/esm/integrations/tracing/postgres.js.map +1 -0
  138. package/esm/integrations/tracing/prisma.js +31 -0
  139. package/esm/integrations/tracing/prisma.js.map +1 -0
  140. package/esm/nodeVersion.js +5 -2
  141. package/esm/nodeVersion.js.map +1 -1
  142. package/esm/otel/contextManager.js +14 -0
  143. package/esm/otel/contextManager.js.map +1 -0
  144. package/esm/proxy/index.js +0 -1
  145. package/esm/proxy/index.js.map +1 -1
  146. package/esm/sdk/api.js +69 -0
  147. package/esm/sdk/api.js.map +1 -0
  148. package/esm/sdk/client.js +52 -0
  149. package/esm/sdk/client.js.map +1 -0
  150. package/esm/sdk/hub.js +102 -0
  151. package/esm/sdk/hub.js.map +1 -0
  152. package/esm/sdk/init.js +221 -0
  153. package/esm/sdk/init.js.map +1 -0
  154. package/esm/sdk/initOtel.js +67 -0
  155. package/esm/sdk/initOtel.js.map +1 -0
  156. package/esm/sdk/scope.js +16 -0
  157. package/esm/sdk/scope.js.map +1 -0
  158. package/esm/transports/http.js +0 -1
  159. package/esm/transports/http.js.map +1 -1
  160. package/esm/utils/addOriginToSpan.js +9 -0
  161. package/esm/utils/addOriginToSpan.js.map +1 -0
  162. package/esm/{integrations/utils → utils}/errorhandling.js +2 -1
  163. package/esm/utils/errorhandling.js.map +1 -0
  164. package/esm/utils/getRequestUrl.js +16 -0
  165. package/esm/utils/getRequestUrl.js.map +1 -0
  166. package/esm/utils/module.js.map +1 -0
  167. package/package.json +31 -23
  168. package/types/cron/index.d.ts +10 -0
  169. package/types/cron/index.d.ts.map +1 -0
  170. package/types/index.d.ts +30 -142
  171. package/types/index.d.ts.map +1 -1
  172. package/types/integrations/anr/index.d.ts +0 -15
  173. package/types/integrations/anr/index.d.ts.map +1 -1
  174. package/types/integrations/console.d.ts +2 -8
  175. package/types/integrations/console.d.ts.map +1 -1
  176. package/types/integrations/context.d.ts +3 -18
  177. package/types/integrations/context.d.ts.map +1 -1
  178. package/types/integrations/contextlines.d.ts +8 -10
  179. package/types/integrations/contextlines.d.ts.map +1 -1
  180. package/types/integrations/http.d.ts +8 -89
  181. package/types/integrations/http.d.ts.map +1 -1
  182. package/types/integrations/local-variables/index.d.ts +0 -11
  183. package/types/integrations/local-variables/index.d.ts.map +1 -1
  184. package/types/integrations/local-variables/local-variables-async.d.ts +1 -1
  185. package/types/integrations/local-variables/local-variables-async.d.ts.map +1 -1
  186. package/types/integrations/local-variables/local-variables-sync.d.ts +1 -1
  187. package/types/integrations/local-variables/local-variables-sync.d.ts.map +1 -1
  188. package/types/integrations/modules.d.ts +1 -7
  189. package/types/integrations/modules.d.ts.map +1 -1
  190. package/types/integrations/node-fetch.d.ts +15 -0
  191. package/types/integrations/node-fetch.d.ts.map +1 -0
  192. package/types/integrations/onuncaughtexception.d.ts +3 -12
  193. package/types/integrations/onuncaughtexception.d.ts.map +1 -1
  194. package/types/integrations/onunhandledrejection.d.ts +3 -10
  195. package/types/integrations/onunhandledrejection.d.ts.map +1 -1
  196. package/types/integrations/spotlight.d.ts +1 -10
  197. package/types/integrations/spotlight.d.ts.map +1 -1
  198. package/types/integrations/tracing/express.d.ts +37 -0
  199. package/types/integrations/tracing/express.d.ts.map +1 -0
  200. package/types/integrations/tracing/fastify.d.ts +7 -0
  201. package/types/integrations/tracing/fastify.d.ts.map +1 -0
  202. package/types/integrations/tracing/graphql.d.ts +7 -0
  203. package/types/integrations/tracing/graphql.d.ts.map +1 -0
  204. package/types/integrations/tracing/hapi/index.d.ts +18 -0
  205. package/types/integrations/tracing/hapi/index.d.ts.map +1 -0
  206. package/types/integrations/{hapi → tracing/hapi}/types.d.ts +1 -2
  207. package/types/integrations/tracing/hapi/types.d.ts.map +1 -0
  208. package/types/integrations/tracing/index.d.ts +6 -0
  209. package/types/integrations/tracing/index.d.ts.map +1 -0
  210. package/types/integrations/tracing/koa.d.ts +2 -0
  211. package/types/integrations/tracing/koa.d.ts.map +1 -0
  212. package/types/integrations/tracing/mongo.d.ts +7 -0
  213. package/types/integrations/tracing/mongo.d.ts.map +1 -0
  214. package/types/integrations/tracing/mongoose.d.ts +7 -0
  215. package/types/integrations/tracing/mongoose.d.ts.map +1 -0
  216. package/types/integrations/tracing/mysql.d.ts +7 -0
  217. package/types/integrations/tracing/mysql.d.ts.map +1 -0
  218. package/types/integrations/tracing/mysql2.d.ts +7 -0
  219. package/types/integrations/tracing/mysql2.d.ts.map +1 -0
  220. package/types/integrations/tracing/nest.d.ts +7 -0
  221. package/types/integrations/tracing/nest.d.ts.map +1 -0
  222. package/types/integrations/tracing/postgres.d.ts +7 -0
  223. package/types/integrations/tracing/postgres.d.ts.map +1 -0
  224. package/types/integrations/tracing/prisma.d.ts +11 -0
  225. package/types/integrations/tracing/prisma.d.ts.map +1 -0
  226. package/types/nodeVersion.d.ts +3 -3
  227. package/types/nodeVersion.d.ts.map +1 -1
  228. package/types/otel/contextManager.d.ts +10 -0
  229. package/types/otel/contextManager.d.ts.map +1 -0
  230. package/types/proxy/helpers.d.ts +0 -1
  231. package/types/proxy/helpers.d.ts.map +1 -1
  232. package/types/proxy/index.d.ts +0 -1
  233. package/types/proxy/index.d.ts.map +1 -1
  234. package/types/sdk/api.d.ts +18 -0
  235. package/types/sdk/api.d.ts.map +1 -0
  236. package/types/sdk/client.d.ts +17 -0
  237. package/types/sdk/client.d.ts.map +1 -0
  238. package/types/sdk/globals.d.ts +6 -0
  239. package/types/sdk/globals.d.ts.map +1 -0
  240. package/types/sdk/hub.d.ts +7 -0
  241. package/types/sdk/hub.d.ts.map +1 -0
  242. package/types/sdk/init.d.ts +9 -0
  243. package/types/sdk/init.d.ts.map +1 -0
  244. package/types/sdk/initOtel.d.ts +9 -0
  245. package/types/sdk/initOtel.d.ts.map +1 -0
  246. package/types/sdk/scope.d.ts +7 -0
  247. package/types/sdk/scope.d.ts.map +1 -0
  248. package/types/transports/http-module.d.ts +2 -5
  249. package/types/transports/http-module.d.ts.map +1 -1
  250. package/types/transports/http.d.ts.map +1 -1
  251. package/types/types.d.ts +18 -25
  252. package/types/types.d.ts.map +1 -1
  253. package/types/utils/addOriginToSpan.d.ts +5 -0
  254. package/types/utils/addOriginToSpan.d.ts.map +1 -0
  255. package/types/utils/errorhandling.d.ts.map +1 -0
  256. package/types/utils/getRequestUrl.d.ts +5 -0
  257. package/types/utils/getRequestUrl.d.ts.map +1 -0
  258. package/types/utils/module.d.ts.map +1 -0
  259. package/types/utils/prepareEvent.d.ts +17 -0
  260. package/types/utils/prepareEvent.d.ts.map +1 -0
  261. package/types-ts3.8/cron/index.d.ts +10 -0
  262. package/types-ts3.8/index.d.ts +30 -142
  263. package/types-ts3.8/integrations/anr/index.d.ts +0 -15
  264. package/types-ts3.8/integrations/console.d.ts +2 -8
  265. package/types-ts3.8/integrations/context.d.ts +3 -18
  266. package/types-ts3.8/integrations/contextlines.d.ts +8 -10
  267. package/types-ts3.8/integrations/http.d.ts +8 -89
  268. package/types-ts3.8/integrations/local-variables/index.d.ts +0 -11
  269. package/types-ts3.8/integrations/local-variables/local-variables-async.d.ts +1 -1
  270. package/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +1 -1
  271. package/types-ts3.8/integrations/modules.d.ts +1 -7
  272. package/types-ts3.8/integrations/node-fetch.d.ts +15 -0
  273. package/types-ts3.8/integrations/onuncaughtexception.d.ts +3 -12
  274. package/types-ts3.8/integrations/onunhandledrejection.d.ts +3 -10
  275. package/types-ts3.8/integrations/spotlight.d.ts +1 -10
  276. package/types-ts3.8/integrations/tracing/express.d.ts +37 -0
  277. package/types-ts3.8/integrations/tracing/fastify.d.ts +7 -0
  278. package/types-ts3.8/integrations/tracing/graphql.d.ts +7 -0
  279. package/types-ts3.8/integrations/tracing/hapi/index.d.ts +18 -0
  280. package/types-ts3.8/integrations/{hapi → tracing/hapi}/types.d.ts +1 -2
  281. package/types-ts3.8/integrations/tracing/index.d.ts +6 -0
  282. package/types-ts3.8/integrations/tracing/koa.d.ts +2 -0
  283. package/types-ts3.8/integrations/tracing/mongo.d.ts +7 -0
  284. package/types-ts3.8/integrations/tracing/mongoose.d.ts +7 -0
  285. package/types-ts3.8/integrations/tracing/mysql.d.ts +7 -0
  286. package/types-ts3.8/integrations/tracing/mysql2.d.ts +7 -0
  287. package/types-ts3.8/integrations/tracing/nest.d.ts +7 -0
  288. package/types-ts3.8/integrations/tracing/postgres.d.ts +7 -0
  289. package/types-ts3.8/integrations/tracing/prisma.d.ts +11 -0
  290. package/types-ts3.8/nodeVersion.d.ts +3 -3
  291. package/types-ts3.8/otel/contextManager.d.ts +10 -0
  292. package/types-ts3.8/proxy/helpers.d.ts +0 -1
  293. package/types-ts3.8/proxy/index.d.ts +0 -1
  294. package/types-ts3.8/sdk/api.d.ts +18 -0
  295. package/types-ts3.8/sdk/client.d.ts +17 -0
  296. package/types-ts3.8/sdk/globals.d.ts +6 -0
  297. package/types-ts3.8/sdk/hub.d.ts +7 -0
  298. package/types-ts3.8/sdk/init.d.ts +9 -0
  299. package/types-ts3.8/sdk/initOtel.d.ts +9 -0
  300. package/types-ts3.8/sdk/scope.d.ts +7 -0
  301. package/types-ts3.8/transports/http-module.d.ts +2 -4
  302. package/types-ts3.8/types.d.ts +18 -25
  303. package/types-ts3.8/utils/addOriginToSpan.d.ts +5 -0
  304. package/types-ts3.8/utils/getRequestUrl.d.ts +5 -0
  305. package/types-ts3.8/utils/prepareEvent.d.ts +17 -0
  306. package/cjs/async/domain.js +0 -61
  307. package/cjs/async/domain.js.map +0 -1
  308. package/cjs/async/hooks.js +0 -50
  309. package/cjs/async/hooks.js.map +0 -1
  310. package/cjs/async/index.js +0 -22
  311. package/cjs/async/index.js.map +0 -1
  312. package/cjs/client.js +0 -39
  313. package/cjs/client.js.map +0 -1
  314. package/cjs/handlers.js +0 -340
  315. package/cjs/handlers.js.map +0 -1
  316. package/cjs/integrations/anr/legacy.js +0 -29
  317. package/cjs/integrations/anr/legacy.js.map +0 -1
  318. package/cjs/integrations/hapi/index.js +0 -161
  319. package/cjs/integrations/hapi/index.js.map +0 -1
  320. package/cjs/integrations/index.js +0 -32
  321. package/cjs/integrations/index.js.map +0 -1
  322. package/cjs/integrations/undici/index.js +0 -307
  323. package/cjs/integrations/undici/index.js.map +0 -1
  324. package/cjs/integrations/utils/errorhandling.js.map +0 -1
  325. package/cjs/integrations/utils/http.js +0 -225
  326. package/cjs/integrations/utils/http.js.map +0 -1
  327. package/cjs/module.js.map +0 -1
  328. package/cjs/requestDataDeprecated.js +0 -45
  329. package/cjs/requestDataDeprecated.js.map +0 -1
  330. package/cjs/sdk.js +0 -284
  331. package/cjs/sdk.js.map +0 -1
  332. package/cjs/tracing/index.js +0 -29
  333. package/cjs/tracing/index.js.map +0 -1
  334. package/cjs/tracing/integrations.js +0 -14
  335. package/cjs/tracing/integrations.js.map +0 -1
  336. package/cjs/utils.js +0 -45
  337. package/cjs/utils.js.map +0 -1
  338. package/esm/async/domain.js +0 -56
  339. package/esm/async/domain.js.map +0 -1
  340. package/esm/async/hooks.js +0 -45
  341. package/esm/async/hooks.js.map +0 -1
  342. package/esm/async/index.js +0 -20
  343. package/esm/async/index.js.map +0 -1
  344. package/esm/client.js +0 -37
  345. package/esm/client.js.map +0 -1
  346. package/esm/handlers.js +0 -330
  347. package/esm/handlers.js.map +0 -1
  348. package/esm/integrations/anr/legacy.js +0 -27
  349. package/esm/integrations/anr/legacy.js.map +0 -1
  350. package/esm/integrations/hapi/index.js +0 -156
  351. package/esm/integrations/hapi/index.js.map +0 -1
  352. package/esm/integrations/index.js +0 -16
  353. package/esm/integrations/index.js.map +0 -1
  354. package/esm/integrations/undici/index.js +0 -301
  355. package/esm/integrations/undici/index.js.map +0 -1
  356. package/esm/integrations/utils/errorhandling.js.map +0 -1
  357. package/esm/integrations/utils/http.js +0 -216
  358. package/esm/integrations/utils/http.js.map +0 -1
  359. package/esm/module.js.map +0 -1
  360. package/esm/requestDataDeprecated.js +0 -42
  361. package/esm/requestDataDeprecated.js.map +0 -1
  362. package/esm/sdk.js +0 -274
  363. package/esm/sdk.js.map +0 -1
  364. package/esm/tracing/index.js +0 -27
  365. package/esm/tracing/index.js.map +0 -1
  366. package/esm/tracing/integrations.js +0 -2
  367. package/esm/tracing/integrations.js.map +0 -1
  368. package/esm/utils.js +0 -43
  369. package/esm/utils.js.map +0 -1
  370. package/types/async/domain.d.ts +0 -5
  371. package/types/async/domain.d.ts.map +0 -1
  372. package/types/async/hooks.d.ts +0 -5
  373. package/types/async/hooks.d.ts.map +0 -1
  374. package/types/async/index.d.ts +0 -8
  375. package/types/async/index.d.ts.map +0 -1
  376. package/types/client.d.ts +0 -16
  377. package/types/client.d.ts.map +0 -1
  378. package/types/handlers.d.ts +0 -57
  379. package/types/handlers.d.ts.map +0 -1
  380. package/types/integrations/anr/legacy.d.ts +0 -22
  381. package/types/integrations/anr/legacy.d.ts.map +0 -1
  382. package/types/integrations/hapi/index.d.ts +0 -22
  383. package/types/integrations/hapi/index.d.ts.map +0 -1
  384. package/types/integrations/hapi/types.d.ts.map +0 -1
  385. package/types/integrations/index.d.ts +0 -14
  386. package/types/integrations/index.d.ts.map +0 -1
  387. package/types/integrations/undici/index.d.ts +0 -58
  388. package/types/integrations/undici/index.d.ts.map +0 -1
  389. package/types/integrations/undici/types.d.ts +0 -224
  390. package/types/integrations/undici/types.d.ts.map +0 -1
  391. package/types/integrations/utils/errorhandling.d.ts.map +0 -1
  392. package/types/integrations/utils/http.d.ts +0 -70
  393. package/types/integrations/utils/http.d.ts.map +0 -1
  394. package/types/module.d.ts.map +0 -1
  395. package/types/requestDataDeprecated.d.ts +0 -45
  396. package/types/requestDataDeprecated.d.ts.map +0 -1
  397. package/types/sdk.d.ts +0 -74
  398. package/types/sdk.d.ts.map +0 -1
  399. package/types/tracing/index.d.ts +0 -6
  400. package/types/tracing/index.d.ts.map +0 -1
  401. package/types/tracing/integrations.d.ts +0 -2
  402. package/types/tracing/integrations.d.ts.map +0 -1
  403. package/types/utils.d.ts +0 -10
  404. package/types/utils.d.ts.map +0 -1
  405. package/types-ts3.8/async/domain.d.ts +0 -5
  406. package/types-ts3.8/async/hooks.d.ts +0 -5
  407. package/types-ts3.8/async/index.d.ts +0 -8
  408. package/types-ts3.8/client.d.ts +0 -16
  409. package/types-ts3.8/handlers.d.ts +0 -57
  410. package/types-ts3.8/integrations/anr/legacy.d.ts +0 -22
  411. package/types-ts3.8/integrations/hapi/index.d.ts +0 -22
  412. package/types-ts3.8/integrations/index.d.ts +0 -14
  413. package/types-ts3.8/integrations/undici/index.d.ts +0 -58
  414. package/types-ts3.8/integrations/undici/types.d.ts +0 -223
  415. package/types-ts3.8/integrations/utils/http.d.ts +0 -80
  416. package/types-ts3.8/requestDataDeprecated.d.ts +0 -45
  417. package/types-ts3.8/sdk.d.ts +0 -74
  418. package/types-ts3.8/tracing/index.d.ts +0 -6
  419. package/types-ts3.8/tracing/integrations.d.ts +0 -2
  420. package/types-ts3.8/utils.d.ts +0 -10
  421. /package/cjs/{module.js → utils/module.js} +0 -0
  422. /package/esm/{module.js → utils/module.js} +0 -0
  423. /package/types/{integrations/utils → utils}/errorhandling.d.ts +0 -0
  424. /package/types/{module.d.ts → utils/module.d.ts} +0 -0
  425. /package/types-ts3.8/{integrations/utils → utils}/errorhandling.d.ts +0 -0
  426. /package/types-ts3.8/{module.d.ts → utils/module.d.ts} +0 -0
@@ -0,0 +1,18 @@
1
+ import { Server } from './types';
2
+ /**
3
+ * Hapi integration
4
+ *
5
+ * Capture tracing data for Hapi.
6
+ * If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.
7
+ */
8
+ export declare const hapiIntegration: () => import("@sentry/types").IntegrationFnResult;
9
+ export declare const hapiErrorPlugin: {
10
+ name: string;
11
+ version: string;
12
+ register: (serverArg: Record<any, any>) => Promise<void>;
13
+ };
14
+ /**
15
+ * Add a Hapi plugin to capture errors to Sentry.
16
+ */
17
+ export declare function setupHapiErrorHandler(server: Server): Promise<void>;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,5 @@
1
1
  /// <reference types="node" />
2
2
  import * as stream from 'stream';
3
- import * as url from 'url';
4
3
  interface Podium {
5
4
  new (events?: Events[]): Podium;
6
5
  new (events?: Events): Podium;
@@ -150,7 +149,7 @@ interface Request extends Podium {
150
149
  readonly path: string;
151
150
  response: ResponseObject | Boom | null;
152
151
  readonly route: RequestRoute;
153
- readonly url: url.Url;
152
+ readonly url: URL;
154
153
  }
155
154
  interface ResponseObjectHeaderOptions {
156
155
  append?: boolean | undefined;
@@ -0,0 +1,6 @@
1
+ import { Integration } from '@sentry/types';
2
+ /**
3
+ * With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
4
+ */
5
+ export declare function getAutoPerformanceIntegrations(): Integration[];
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const koaIntegration: () => import("@sentry/types").IntegrationFnResult;
2
+ //# sourceMappingURL=koa.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * MongoDB integration
3
+ *
4
+ * Capture tracing data for MongoDB.
5
+ */
6
+ export declare const mongoIntegration: () => import("@sentry/types").IntegrationFnResult;
7
+ //# sourceMappingURL=mongo.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Mongoose integration
3
+ *
4
+ * Capture tracing data for Mongoose.
5
+ */
6
+ export declare const mongooseIntegration: () => import("@sentry/types").IntegrationFnResult;
7
+ //# sourceMappingURL=mongoose.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * MySQL integration
3
+ *
4
+ * Capture tracing data for mysql.
5
+ */
6
+ export declare const mysqlIntegration: () => import("@sentry/types").IntegrationFnResult;
7
+ //# sourceMappingURL=mysql.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * MySQL2 integration
3
+ *
4
+ * Capture tracing data for mysql2
5
+ */
6
+ export declare const mysql2Integration: () => import("@sentry/types").IntegrationFnResult;
7
+ //# sourceMappingURL=mysql2.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Nest framework integration
3
+ *
4
+ * Capture tracing data for nest.
5
+ */
6
+ export declare const nestIntegration: () => import("@sentry/types").IntegrationFnResult;
7
+ //# sourceMappingURL=nest.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Postgres integration
3
+ *
4
+ * Capture tracing data for pg.
5
+ */
6
+ export declare const postgresIntegration: () => import("@sentry/types").IntegrationFnResult;
7
+ //# sourceMappingURL=postgres.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Prisma integration
3
+ *
4
+ * Capture tracing data for prisma.
5
+ * Note: This requieres to set:
6
+ * previewFeatures = ["tracing"]
7
+ * For the prisma client.
8
+ * See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details.
9
+ */
10
+ export declare const prismaIntegration: () => import("@sentry/types").IntegrationFnResult;
11
+ //# sourceMappingURL=prisma.d.ts.map
@@ -1,6 +1,6 @@
1
1
  export declare const NODE_VERSION: {
2
- major: number;
3
- minor: number;
4
- patch: number;
2
+ major: number | undefined;
3
+ minor: number | undefined;
5
4
  };
5
+ export declare const NODE_MAJOR: number;
6
6
  //# sourceMappingURL=nodeVersion.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
2
+ /**
3
+ * This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.
4
+ * It ensures that we create a new hub per context, so that the OTEL Context & the Sentry Hub are always in sync.
5
+ *
6
+ * Note that we currently only support AsyncHooks with this,
7
+ * but since this should work for Node 14+ anyhow that should be good enough.
8
+ */
9
+ export declare const SentryContextManager: new (...args: unknown[]) => AsyncLocalStorageContextManager;
10
+ //# sourceMappingURL=contextManager.d.ts.map
@@ -29,7 +29,6 @@
29
29
  import * as http from 'http';
30
30
  import * as https from 'https';
31
31
  import { Readable } from 'stream';
32
- import { URL } from 'url';
33
32
  export type ThenableRequest = http.ClientRequest & {
34
33
  then: Promise<http.IncomingMessage>['then'];
35
34
  };
@@ -30,7 +30,6 @@ import * as http from 'http';
30
30
  import { OutgoingHttpHeaders } from 'http';
31
31
  import * as net from 'net';
32
32
  import * as tls from 'tls';
33
- import { URL } from 'url';
34
33
  import { Agent } from './base';
35
34
  import { AgentConnectOpts } from './base';
36
35
  type Protocol<T> = T extends string ? Protocol : never;
@@ -0,0 +1,18 @@
1
+ import { Client, StackParser } from '@sentry/types';
2
+ import { Hub } from '@sentry/types';
3
+ /** Get the currently active client. */
4
+ export declare function getClient<C extends Client>(): C;
5
+ /**
6
+ * Returns a release dynamically from environment variables.
7
+ */
8
+ export declare function getSentryRelease(fallback?: string): string | undefined;
9
+ /** Node.js stack parser */
10
+ export declare const defaultStackParser: StackParser;
11
+ /**
12
+ * This method is a noop and only here to ensure vite-plugin v0.6.0 (which is used by Sveltekit) still works,
13
+ * as that uses this.
14
+ *
15
+ * @deprecated This will be removed before v8 is finalized.
16
+ */
17
+ export declare function makeMain(hub: Hub): Hub;
18
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { Tracer } from '@opentelemetry/api';
2
+ import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
3
+ import { ServerRuntimeClient } from '@sentry/core';
4
+ import { NodeClientOptions } from '../types';
5
+ /** A client for using Sentry with Node & OpenTelemetry. */
6
+ export declare class NodeClient extends ServerRuntimeClient<NodeClientOptions> {
7
+ traceProvider: BasicTracerProvider | undefined;
8
+ private _tracer;
9
+ constructor(options: NodeClientOptions);
10
+ /*Get the OTEL tracer. */
11
+ readonly tracer: Tracer;
12
+ /**
13
+ * @inheritDoc
14
+ */
15
+ flush(timeout?: number): Promise<boolean>;
16
+ }
17
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { Hub } from '@sentry/types';
2
+ /**
3
+ * Calls global extension method and binding current instance to the function call
4
+ */
5
+ export declare function callExtensionMethod<T>(hub: Hub, method: string, ...args: any[]): T;
6
+ //# sourceMappingURL=globals.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { Hub } from '@sentry/types';
2
+ /**
3
+ * This is for legacy reasons, and returns a proxy object instead of a hub to be used.
4
+ * @deprecated Use the methods directly.
5
+ */
6
+ export declare function getCurrentHub(): Hub;
7
+ //# sourceMappingURL=hub.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Integration, Options } from '@sentry/types';
2
+ import { NodeOptions } from '../types';
3
+ /** Get the default integrations for the Node Experimental SDK. */
4
+ export declare function getDefaultIntegrations(options: Options): Integration[];
5
+ /**
6
+ * Initialize Sentry for Node.
7
+ */
8
+ export declare function init(options?: NodeOptions | undefined): void;
9
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
2
+ import { NodeClient } from './client';
3
+ /**
4
+ * Initialize OpenTelemetry for Node.
5
+ */
6
+ export declare function initOtel(): void;
7
+ /** Just exported for tests. */
8
+ export declare function setupOtel(client: NodeClient): BasicTracerProvider;
9
+ //# sourceMappingURL=initOtel.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { Scope } from '@sentry/types';
2
+ /**
3
+ * Update the active isolation scope.
4
+ * Should be used with caution!
5
+ */
6
+ export declare function setIsolationScope(isolationScope: Scope): void;
7
+ //# sourceMappingURL=scope.d.ts.map
@@ -1,8 +1,6 @@
1
1
  /// <reference types="node" />
2
- import { IncomingHttpHeaders, RequestOptions as HTTPRequestOptions } from 'http';
2
+ import { ClientRequest, IncomingHttpHeaders, RequestOptions as HTTPRequestOptions } from 'http';
3
3
  import { RequestOptions as HTTPSRequestOptions } from 'https';
4
- import { Writable } from 'stream';
5
- import { URL } from 'url';
6
4
  export type HTTPModuleRequestOptions = HTTPRequestOptions | HTTPSRequestOptions | string | URL;
7
5
  /**
8
6
  * Cut version of http.IncomingMessage.
@@ -24,6 +22,6 @@ export interface HTTPModule {
24
22
  * @param options These are {@see TransportOptions}
25
23
  * @param callback Callback when request is finished
26
24
  */
27
- request(options: HTTPModuleRequestOptions, callback?: (res: HTTPModuleRequestIncomingMessage) => void): Writable;
25
+ request(options: HTTPModuleRequestOptions, callback?: (res: HTTPModuleRequestIncomingMessage) => void): ClientRequest;
28
26
  }
29
27
  //# sourceMappingURL=http-module.d.ts.map
@@ -1,5 +1,6 @@
1
- import { ClientOptions, Options, SamplingContext, TracePropagationTargets } from '@sentry/types';
2
- import { NodeClient } from './client';
1
+ import { Span as WriteableSpan } from '@opentelemetry/api';
2
+ import { ReadableSpan, Span } from '@opentelemetry/sdk-trace-base';
3
+ import { ClientOptions, Options, SamplingContext, Scope, TracePropagationTargets } from '@sentry/types';
3
4
  import { NodeTransportOptions } from './transports';
4
5
  export interface BaseNodeOptions {
5
6
  /**
@@ -44,13 +45,6 @@ export interface BaseNodeOptions {
44
45
  * Requires the `LocalVariables` integration.
45
46
  */
46
47
  includeLocalVariables?: boolean;
47
- /**
48
- * Specify a custom NodeClient to be used. Must extend NodeClient!
49
- * This is not a public, supported API, but used internally only.
50
- *
51
- * @hidden
52
- * */
53
- clientClass?: typeof NodeClient;
54
48
  /**
55
49
  * If you use Spotlight by Sentry during development, use
56
50
  * this option to forward captured Sentry events to Spotlight.
@@ -62,22 +56,6 @@ export interface BaseNodeOptions {
62
56
  * IMPORTANT: Only set this option to `true` while developing, not in production!
63
57
  */
64
58
  spotlight?: boolean | string;
65
- /**
66
- * @deprecated Moved to constructor options of the `Http` and `Undici` integration.
67
- * @example
68
- * ```js
69
- * Sentry.init({
70
- * integrations: [
71
- * new Sentry.Integrations.Http({
72
- * tracing: {
73
- * shouldCreateSpanForRequest: (url: string) => false,
74
- * }
75
- * });
76
- * ],
77
- * });
78
- * ```
79
- */
80
- shouldCreateSpanForRequest?(this: void, url: string): boolean;
81
59
  /** Callback that is executed when a fatal global error occurs. */
82
60
  onFatalError?(this: void, error: Error): void;
83
61
  }
@@ -93,4 +71,19 @@ export interface NodeOptions extends Options<NodeTransportOptions>, BaseNodeOpti
93
71
  */
94
72
  export interface NodeClientOptions extends ClientOptions<NodeTransportOptions>, BaseNodeOptions {
95
73
  }
74
+ export interface CurrentScopes {
75
+ scope: Scope;
76
+ isolationScope: Scope;
77
+ }
78
+ /**
79
+ * The base `Span` type is basically a `WriteableSpan`.
80
+ * There are places where we basically want to allow passing _any_ span,
81
+ * so in these cases we type this as `AbstractSpan` which could be either a regular `Span` or a `ReadableSpan`.
82
+ * You'll have to make sur to check revelant fields before accessing them.
83
+ *
84
+ * Note that technically, the `Span` exported from `@opentelemwetry/sdk-trace-base` matches this,
85
+ * but we cannot be 100% sure that we are actually getting such a span, so this type is more defensive.
86
+ */
87
+ export type AbstractSpan = WriteableSpan | ReadableSpan;
88
+ export { Span };
96
89
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { Span } from '@opentelemetry/api';
2
+ import { SpanOrigin } from '@sentry/types';
3
+ /** Adds an origin to an OTEL Span. */
4
+ export declare function addOriginToSpan(span: Span, origin: SpanOrigin): void;
5
+ //# sourceMappingURL=addOriginToSpan.d.ts.map
@@ -0,0 +1,5 @@
1
+ /// <reference types="node" />
2
+ import { RequestOptions } from 'http';
3
+ /** Build a full URL from request options. */
4
+ export declare function getRequestUrl(requestOptions: RequestOptions): string;
5
+ //# sourceMappingURL=getRequestUrl.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { CaptureContext, EventHint, ScopeContext } from '@sentry/types';
2
+ /**
3
+ * This type makes sure that we get either a CaptureContext, OR an EventHint.
4
+ * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:
5
+ * { user: { id: '123' }, mechanism: { handled: false } }
6
+ */
7
+ export type ExclusiveEventHintOrCaptureContext = (CaptureContext & Partial<{
8
+ [key in keyof EventHint]: never;
9
+ }>) | (EventHint & Partial<{
10
+ [key in keyof ScopeContext]: never;
11
+ }>);
12
+ /**
13
+ * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.
14
+ * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.
15
+ */
16
+ export declare function parseEventHintOrCaptureContext(hint: ExclusiveEventHintOrCaptureContext | undefined): EventHint | undefined;
17
+ //# sourceMappingURL=prepareEvent.d.ts.map
@@ -1,61 +0,0 @@
1
- var {
2
- _optionalChain
3
- } = require('@sentry/utils');
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- const domain = require('domain');
8
- const core = require('@sentry/core');
9
-
10
- function getActiveDomain() {
11
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
12
- return (domain ).active ;
13
- }
14
-
15
- function getCurrentHub() {
16
- const activeDomain = getActiveDomain();
17
-
18
- // If there's no active domain, just return undefined and the global hub will be used
19
- if (!activeDomain) {
20
- return undefined;
21
- }
22
-
23
- core.ensureHubOnCarrier(activeDomain);
24
-
25
- return core.getHubFromCarrier(activeDomain);
26
- }
27
-
28
- function createNewHub(parent) {
29
- const carrier = {};
30
- core.ensureHubOnCarrier(carrier, parent);
31
- return core.getHubFromCarrier(carrier);
32
- }
33
-
34
- function runWithAsyncContext(callback, options) {
35
- const activeDomain = getActiveDomain();
36
-
37
- if (activeDomain && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) {
38
- // We're already in a domain, so we don't need to create a new one, just call the callback with the current hub
39
- return callback();
40
- }
41
-
42
- const local = domain.create() ;
43
-
44
- const parentHub = activeDomain ? core.getHubFromCarrier(activeDomain) : undefined;
45
- const newHub = createNewHub(parentHub);
46
- core.setHubOnCarrier(local, newHub);
47
-
48
- return local.bind(() => {
49
- return callback();
50
- })();
51
- }
52
-
53
- /**
54
- * Sets the async context strategy to use Node.js domains.
55
- */
56
- function setDomainAsyncContextStrategy() {
57
- core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });
58
- }
59
-
60
- exports.setDomainAsyncContextStrategy = setDomainAsyncContextStrategy;
61
- //# sourceMappingURL=domain.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"domain.js","sources":["../../../src/async/domain.ts"],"sourcesContent":["import * as domain from 'domain';\nimport type { Carrier, Hub, RunWithAsyncContextOptions } from '@sentry/core';\nimport { ensureHubOnCarrier, getHubFromCarrier, setAsyncContextStrategy, setHubOnCarrier } from '@sentry/core';\n\nfunction getActiveDomain<T>(): T | undefined {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n return (domain as any).active as T | undefined;\n}\n\nfunction getCurrentHub(): Hub | undefined {\n const activeDomain = getActiveDomain<Carrier>();\n\n // If there's no active domain, just return undefined and the global hub will be used\n if (!activeDomain) {\n return undefined;\n }\n\n ensureHubOnCarrier(activeDomain);\n\n return getHubFromCarrier(activeDomain);\n}\n\nfunction createNewHub(parent: Hub | undefined): Hub {\n const carrier: Carrier = {};\n ensureHubOnCarrier(carrier, parent);\n return getHubFromCarrier(carrier);\n}\n\nfunction runWithAsyncContext<T>(callback: () => T, options: RunWithAsyncContextOptions): T {\n const activeDomain = getActiveDomain<domain.Domain & Carrier>();\n\n if (activeDomain && options?.reuseExisting) {\n // We're already in a domain, so we don't need to create a new one, just call the callback with the current hub\n return callback();\n }\n\n const local = domain.create() as domain.Domain & Carrier;\n\n const parentHub = activeDomain ? getHubFromCarrier(activeDomain) : undefined;\n const newHub = createNewHub(parentHub);\n setHubOnCarrier(local, newHub);\n\n return local.bind(() => {\n return callback();\n })();\n}\n\n/**\n * Sets the async context strategy to use Node.js domains.\n */\nexport function setDomainAsyncContextStrategy(): void {\n setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });\n}\n"],"names":["ensureHubOnCarrier","getHubFromCarrier","setHubOnCarrier","setAsyncContextStrategy"],"mappings":";;;;;;;;;AAIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,eAAe,CAAqB,EAAA;EAC7C,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACE,CAAO,CAAA,CAAA,CAAA,CAAA,EAAA,CAAC,CAAO,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,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AA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAuB,CAAC,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAqB,CAAC;AACjE;;"}
@@ -1,50 +0,0 @@
1
- var {
2
- _optionalChain
3
- } = require('@sentry/utils');
4
-
5
- Object.defineProperty(exports, '__esModule', { value: true });
6
-
7
- const core = require('@sentry/core');
8
- const async_hooks = require('async_hooks');
9
-
10
- let asyncStorage;
11
-
12
- /**
13
- * Sets the async context strategy to use AsyncLocalStorage which requires Node v12.17.0 or v13.10.0.
14
- */
15
- function setHooksAsyncContextStrategy() {
16
- if (!asyncStorage) {
17
- asyncStorage = new (async_hooks ).AsyncLocalStorage();
18
- }
19
-
20
- function getCurrentHub() {
21
- return asyncStorage.getStore();
22
- }
23
-
24
- function createNewHub(parent) {
25
- const carrier = {};
26
- core.ensureHubOnCarrier(carrier, parent);
27
- return core.getHubFromCarrier(carrier);
28
- }
29
-
30
- function runWithAsyncContext(callback, options) {
31
- const existingHub = getCurrentHub();
32
-
33
- if (existingHub && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) {
34
- // We're already in an async context, so we don't need to create a new one
35
- // just call the callback with the current hub
36
- return callback();
37
- }
38
-
39
- const newHub = createNewHub(existingHub);
40
-
41
- return asyncStorage.run(newHub, () => {
42
- return callback();
43
- });
44
- }
45
-
46
- core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });
47
- }
48
-
49
- exports.setHooksAsyncContextStrategy = setHooksAsyncContextStrategy;
50
- //# sourceMappingURL=hooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hooks.js","sources":["../../../src/async/hooks.ts"],"sourcesContent":["import type { Carrier, Hub, RunWithAsyncContextOptions } from '@sentry/core';\nimport { ensureHubOnCarrier, getHubFromCarrier, setAsyncContextStrategy } from '@sentry/core';\nimport * as async_hooks from 'async_hooks';\n\ninterface AsyncLocalStorage<T> {\n getStore(): T | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;\n}\n\ntype AsyncLocalStorageConstructor = { new <T>(): AsyncLocalStorage<T> };\n// AsyncLocalStorage only exists in async_hook after Node v12.17.0 or v13.10.0\ntype NewerAsyncHooks = typeof async_hooks & { AsyncLocalStorage: AsyncLocalStorageConstructor };\n\nlet asyncStorage: AsyncLocalStorage<Hub>;\n\n/**\n * Sets the async context strategy to use AsyncLocalStorage which requires Node v12.17.0 or v13.10.0.\n */\nexport function setHooksAsyncContextStrategy(): void {\n if (!asyncStorage) {\n asyncStorage = new (async_hooks as NewerAsyncHooks).AsyncLocalStorage<Hub>();\n }\n\n function getCurrentHub(): Hub | undefined {\n return asyncStorage.getStore();\n }\n\n function createNewHub(parent: Hub | undefined): Hub {\n const carrier: Carrier = {};\n ensureHubOnCarrier(carrier, parent);\n return getHubFromCarrier(carrier);\n }\n\n function runWithAsyncContext<T>(callback: () => T, options: RunWithAsyncContextOptions): T {\n const existingHub = getCurrentHub();\n\n if (existingHub && options?.reuseExisting) {\n // We're already in an async context, so we don't need to create a new one\n // just call the callback with the current hub\n return callback();\n }\n\n const newHub = createNewHub(existingHub);\n\n return asyncStorage.run(newHub, () => {\n return callback();\n });\n }\n\n setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });\n}\n"],"names":["ensureHubOnCarrier","getHubFromCarrier","setAsyncContextStrategy"],"mappings":";;;;;;;;;AAcA,CAAA,CAAA,EAAI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;;EAEAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAuB,CAAC,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAqB,CAAC;AACjE;;"}
@@ -1,22 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
-
3
- const nodeVersion = require('../nodeVersion.js');
4
- const domain = require('./domain.js');
5
- const hooks = require('./hooks.js');
6
-
7
- /**
8
- * Sets the correct async context strategy for Node.js
9
- *
10
- * Node.js >= 14 uses AsyncLocalStorage
11
- * Node.js < 14 uses domains
12
- */
13
- function setNodeAsyncContextStrategy() {
14
- if (nodeVersion.NODE_VERSION.major >= 14) {
15
- hooks.setHooksAsyncContextStrategy();
16
- } else {
17
- domain.setDomainAsyncContextStrategy();
18
- }
19
- }
20
-
21
- exports.setNodeAsyncContextStrategy = setNodeAsyncContextStrategy;
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/async/index.ts"],"sourcesContent":["import { NODE_VERSION } from '../nodeVersion';\nimport { setDomainAsyncContextStrategy } from './domain';\nimport { setHooksAsyncContextStrategy } from './hooks';\n\n/**\n * Sets the correct async context strategy for Node.js\n *\n * Node.js >= 14 uses AsyncLocalStorage\n * Node.js < 14 uses domains\n */\nexport function setNodeAsyncContextStrategy(): void {\n if (NODE_VERSION.major >= 14) {\n setHooksAsyncContextStrategy();\n } else {\n setDomainAsyncContextStrategy();\n }\n}\n"],"names":["NODE_VERSION","setHooksAsyncContextStrategy","setDomainAsyncContextStrategy"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2BAA2B,GAAS;AACpD,EAAE,IAAIA,wBAAY,CAAC,KAAM,IAAG,EAAE,EAAE;AAChC,IAAIC,kCAA4B,EAAE,CAAA;AAClC,SAAS;AACT,IAAIC,oCAA6B,EAAE,CAAA;AACnC,GAAE;AACF;;;;"}
package/cjs/client.js DELETED
@@ -1,39 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
-
3
- const os = require('os');
4
- const util = require('util');
5
- const core = require('@sentry/core');
6
-
7
- /**
8
- * The Sentry Node SDK Client.
9
- *
10
- * @see NodeClientOptions for documentation on configuration options.
11
- * @see SentryClient for usage documentation.
12
- */
13
- class NodeClient extends core.ServerRuntimeClient {
14
- /**
15
- * Creates a new Node SDK instance.
16
- * @param options Configuration options for this SDK.
17
- */
18
- constructor(options) {
19
- core.applySdkMetadata(options, 'node');
20
-
21
- // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util
22
- options.transportOptions = {
23
- textEncoder: new util.TextEncoder(),
24
- ...options.transportOptions,
25
- };
26
-
27
- const clientOptions = {
28
- ...options,
29
- platform: 'node',
30
- runtime: { name: 'node', version: global.process.version },
31
- serverName: options.serverName || global.process.env.SENTRY_NAME || os.hostname(),
32
- };
33
-
34
- super(clientOptions);
35
- }
36
- }
37
-
38
- exports.NodeClient = NodeClient;
39
- //# sourceMappingURL=client.js.map
package/cjs/client.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sources":["../../src/client.ts"],"sourcesContent":["import * as os from 'os';\nimport { TextEncoder } from 'util';\nimport type { ServerRuntimeClientOptions } from '@sentry/core';\nimport { ServerRuntimeClient, applySdkMetadata } from '@sentry/core';\n\nimport type { NodeClientOptions } from './types';\n\n/**\n * The Sentry Node SDK Client.\n *\n * @see NodeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class NodeClient extends ServerRuntimeClient<NodeClientOptions> {\n /**\n * Creates a new Node SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: NodeClientOptions) {\n applySdkMetadata(options, 'node');\n\n // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util\n options.transportOptions = {\n textEncoder: new TextEncoder(),\n ...options.transportOptions,\n };\n\n const clientOptions: ServerRuntimeClientOptions = {\n ...options,\n platform: 'node',\n runtime: { name: 'node', version: global.process.version },\n serverName: options.serverName || global.process.env.SENTRY_NAME || os.hostname(),\n };\n\n super(clientOptions);\n }\n}\n"],"names":["ServerRuntimeClient","applySdkMetadata","TextEncoder"],"mappings":";;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,UAAA,SAAmBA,wBAAmB,CAAoB;AACvE;AACA;AACA;AACA;AACA,GAAS,WAAW,CAAC,OAAO,EAAqB;AACjD,IAAIC,qBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;AACrC;AACA;AACA,IAAI,OAAO,CAAC,gBAAA,GAAmB;AAC/B,MAAM,WAAW,EAAE,IAAIC,gBAAW,EAAE;AACpC,MAAM,GAAG,OAAO,CAAC,gBAAgB;AACjC,KAAK,CAAA;AACL;AACA,IAAI,MAAM,aAAa,GAA+B;AACtD,MAAM,GAAG,OAAO;AAChB,MAAM,QAAQ,EAAE,MAAM;AACtB,MAAM,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS;AAChE,MAAM,UAAU,EAAE,OAAO,CAAC,UAAW,IAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,WAAY,IAAG,EAAE,CAAC,QAAQ,EAAE;AACvF,KAAK,CAAA;AACL;AACA,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;AACxB,GAAE;AACF;;;;"}