@depup/sentry__node 10.75.2-depup.0 → 11.0.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1237) hide show
  1. package/README.md +4 -7
  2. package/build/cjs/bundler-plugin/esbuild.js +19 -0
  3. package/build/cjs/bundler-plugin/esbuild.js.map +1 -0
  4. package/build/cjs/bundler-plugin/rollup.js +12 -0
  5. package/build/cjs/bundler-plugin/rollup.js.map +1 -0
  6. package/build/cjs/bundler-plugin/vite.js +12 -0
  7. package/build/cjs/bundler-plugin/vite.js.map +1 -0
  8. package/build/cjs/bundler-plugin/webpack.js +18 -0
  9. package/build/cjs/bundler-plugin/webpack.js.map +1 -0
  10. package/build/cjs/cron/common.js +52 -0
  11. package/build/cjs/cron/common.js.map +1 -0
  12. package/build/cjs/cron/cron.js +88 -0
  13. package/build/cjs/cron/cron.js.map +1 -0
  14. package/build/cjs/cron/index.js +14 -0
  15. package/build/cjs/cron/index.js.map +1 -0
  16. package/build/cjs/cron/node-cron.js +52 -0
  17. package/build/cjs/cron/node-cron.js.map +1 -0
  18. package/build/cjs/cron/node-schedule.js +41 -0
  19. package/build/cjs/cron/node-schedule.js.map +1 -0
  20. package/build/cjs/eve.js +31 -0
  21. package/build/cjs/eve.js.map +1 -0
  22. package/build/cjs/index.js +128 -129
  23. package/build/cjs/index.js.map +1 -1
  24. package/build/cjs/integrations/anr/index.js +167 -0
  25. package/build/cjs/integrations/anr/index.js.map +1 -0
  26. package/build/cjs/integrations/childProcess.js +57 -0
  27. package/build/cjs/integrations/childProcess.js.map +1 -0
  28. package/build/cjs/integrations/console.js +95 -0
  29. package/build/cjs/integrations/console.js.map +1 -0
  30. package/build/cjs/integrations/context.js +391 -0
  31. package/build/cjs/integrations/context.js.map +1 -0
  32. package/build/cjs/integrations/contextlines.js +251 -0
  33. package/build/cjs/integrations/contextlines.js.map +1 -0
  34. package/build/cjs/integrations/fs/index.js +1 -1
  35. package/build/cjs/integrations/fs/index.js.map +1 -1
  36. package/build/cjs/integrations/fs/vendored/constants.js.map +1 -1
  37. package/build/cjs/integrations/fs/vendored/instrumentation.js +4 -2
  38. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -1
  39. package/build/cjs/integrations/http/SentryHttpInstrumentation.js +62 -0
  40. package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +1 -0
  41. package/build/cjs/integrations/http/httpServerIntegration.js +78 -0
  42. package/build/cjs/integrations/http/httpServerIntegration.js.map +1 -0
  43. package/build/cjs/integrations/http/httpServerSpansIntegration.js +187 -0
  44. package/build/cjs/integrations/http/httpServerSpansIntegration.js.map +1 -0
  45. package/build/cjs/integrations/http/index.js +57 -0
  46. package/build/cjs/integrations/http/index.js.map +1 -0
  47. package/build/cjs/integrations/local-variables/common.js +20 -0
  48. package/build/cjs/integrations/local-variables/common.js.map +1 -0
  49. package/build/cjs/integrations/local-variables/index.js +10 -0
  50. package/build/cjs/integrations/local-variables/index.js.map +1 -0
  51. package/build/cjs/integrations/local-variables/local-variables-async.js +106 -0
  52. package/build/cjs/integrations/local-variables/local-variables-async.js.map +1 -0
  53. package/build/cjs/integrations/modules.js +98 -0
  54. package/build/cjs/integrations/modules.js.map +1 -0
  55. package/build/cjs/integrations/node-fetch/index.js +24 -0
  56. package/build/cjs/integrations/node-fetch/index.js.map +1 -0
  57. package/build/cjs/integrations/node-fetch/undici-instrumentation.js +268 -0
  58. package/build/cjs/integrations/node-fetch/undici-instrumentation.js.map +1 -0
  59. package/build/cjs/integrations/nodeRuntimeMetrics.js +182 -0
  60. package/build/cjs/integrations/nodeRuntimeMetrics.js.map +1 -0
  61. package/build/cjs/integrations/onuncaughtexception.js +92 -0
  62. package/build/cjs/integrations/onuncaughtexception.js.map +1 -0
  63. package/build/cjs/integrations/onunhandledrejection.js +94 -0
  64. package/build/cjs/integrations/onunhandledrejection.js.map +1 -0
  65. package/build/cjs/integrations/pino.js +115 -0
  66. package/build/cjs/integrations/pino.js.map +1 -0
  67. package/build/cjs/integrations/processSession.js +22 -0
  68. package/build/cjs/integrations/processSession.js.map +1 -0
  69. package/build/cjs/integrations/spotlight.js +79 -0
  70. package/build/cjs/integrations/spotlight.js.map +1 -0
  71. package/build/cjs/integrations/systemError.js +54 -0
  72. package/build/cjs/integrations/systemError.js.map +1 -0
  73. package/build/cjs/integrations/tracing/hapi.js +10 -0
  74. package/build/cjs/integrations/tracing/hapi.js.map +1 -0
  75. package/build/cjs/integrations/tracing/index.js +1 -92
  76. package/build/cjs/integrations/tracing/index.js.map +1 -1
  77. package/build/cjs/integrations/tracing/koa.js +10 -0
  78. package/build/cjs/integrations/tracing/koa.js.map +1 -0
  79. package/build/cjs/integrations/winston.js +84 -0
  80. package/build/cjs/integrations/winston.js.map +1 -0
  81. package/build/cjs/integrations/workerThreads.js +35 -0
  82. package/build/cjs/integrations/workerThreads.js.map +1 -0
  83. package/build/cjs/logs/capture.js +26 -0
  84. package/build/cjs/logs/capture.js.map +1 -0
  85. package/build/cjs/logs/exports.js +32 -0
  86. package/build/cjs/logs/exports.js.map +1 -0
  87. package/build/cjs/nodeVersion.js +10 -0
  88. package/build/cjs/nodeVersion.js.map +1 -0
  89. package/build/cjs/otel/logger.js +21 -0
  90. package/build/cjs/otel/logger.js.map +1 -0
  91. package/build/cjs/proxy/base.js +69 -0
  92. package/build/cjs/proxy/base.js.map +1 -0
  93. package/build/cjs/proxy/index.js +112 -0
  94. package/build/cjs/proxy/index.js.map +1 -0
  95. package/build/cjs/proxy/parse-proxy-response.js +88 -0
  96. package/build/cjs/proxy/parse-proxy-response.js.map +1 -0
  97. package/build/cjs/sdk/api.js +62 -0
  98. package/build/cjs/sdk/api.js.map +1 -0
  99. package/build/cjs/sdk/client.js +128 -0
  100. package/build/cjs/sdk/client.js.map +1 -0
  101. package/build/cjs/sdk/index.js +170 -45
  102. package/build/cjs/sdk/index.js.map +1 -1
  103. package/build/cjs/sdk/initOtel.js +9 -95
  104. package/build/cjs/sdk/initOtel.js.map +1 -1
  105. package/build/cjs/transports/http.js +109 -0
  106. package/build/cjs/transports/http.js.map +1 -0
  107. package/build/cjs/utils/debug.js +17 -0
  108. package/build/cjs/utils/debug.js.map +1 -0
  109. package/build/cjs/utils/entry-point.js +36 -0
  110. package/build/cjs/utils/entry-point.js.map +1 -0
  111. package/build/cjs/utils/errorhandling.js +39 -0
  112. package/build/cjs/utils/errorhandling.js.map +1 -0
  113. package/build/cjs/utils/module.js +37 -0
  114. package/build/cjs/utils/module.js.map +1 -0
  115. package/build/cjs/utils/outgoingFetchRequest.js +178 -0
  116. package/build/cjs/utils/outgoingFetchRequest.js.map +1 -0
  117. package/build/cjs/utils/spotlight.js +18 -0
  118. package/build/cjs/utils/spotlight.js.map +1 -0
  119. package/build/esm/bundler-plugin/esbuild.js +17 -0
  120. package/build/esm/bundler-plugin/esbuild.js.map +1 -0
  121. package/build/esm/bundler-plugin/rollup.js +10 -0
  122. package/build/esm/bundler-plugin/rollup.js.map +1 -0
  123. package/build/esm/bundler-plugin/vite.js +10 -0
  124. package/build/esm/bundler-plugin/vite.js.map +1 -0
  125. package/build/esm/bundler-plugin/webpack.js +16 -0
  126. package/build/esm/bundler-plugin/webpack.js.map +1 -0
  127. package/build/esm/cron/common.js +50 -0
  128. package/build/esm/cron/common.js.map +1 -0
  129. package/build/esm/cron/cron.js +86 -0
  130. package/build/esm/cron/cron.js.map +1 -0
  131. package/build/esm/cron/index.js +12 -0
  132. package/build/esm/cron/index.js.map +1 -0
  133. package/build/esm/cron/node-cron.js +50 -0
  134. package/build/esm/cron/node-cron.js.map +1 -0
  135. package/build/esm/cron/node-schedule.js +39 -0
  136. package/build/esm/cron/node-schedule.js.map +1 -0
  137. package/build/esm/eve.js +29 -0
  138. package/build/esm/eve.js.map +1 -0
  139. package/build/esm/index.js +37 -38
  140. package/build/esm/index.js.map +1 -1
  141. package/build/esm/integrations/anr/index.js +163 -0
  142. package/build/esm/integrations/anr/index.js.map +1 -0
  143. package/build/esm/integrations/anr/worker-script.js +2 -0
  144. package/build/esm/integrations/childProcess.js +55 -0
  145. package/build/esm/integrations/childProcess.js.map +1 -0
  146. package/build/esm/integrations/console.js +93 -0
  147. package/build/esm/integrations/console.js.map +1 -0
  148. package/build/esm/integrations/context.js +383 -0
  149. package/build/esm/integrations/context.js.map +1 -0
  150. package/build/esm/integrations/contextlines.js +245 -0
  151. package/build/esm/integrations/contextlines.js.map +1 -0
  152. package/build/esm/integrations/fs/index.js +1 -1
  153. package/build/esm/integrations/fs/index.js.map +1 -1
  154. package/build/esm/integrations/fs/vendored/constants.js.map +1 -1
  155. package/build/esm/integrations/fs/vendored/instrumentation.js +4 -2
  156. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -1
  157. package/build/esm/integrations/http/SentryHttpInstrumentation.js +60 -0
  158. package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +1 -0
  159. package/build/esm/integrations/http/httpServerIntegration.js +75 -0
  160. package/build/esm/integrations/http/httpServerIntegration.js.map +1 -0
  161. package/build/esm/integrations/http/httpServerSpansIntegration.js +184 -0
  162. package/build/esm/integrations/http/httpServerSpansIntegration.js.map +1 -0
  163. package/build/esm/integrations/http/index.js +55 -0
  164. package/build/esm/integrations/http/index.js.map +1 -0
  165. package/build/esm/integrations/local-variables/common.js +15 -0
  166. package/build/esm/integrations/local-variables/common.js.map +1 -0
  167. package/build/esm/integrations/local-variables/index.js +8 -0
  168. package/build/esm/integrations/local-variables/index.js.map +1 -0
  169. package/build/esm/integrations/local-variables/local-variables-async.js +103 -0
  170. package/build/esm/integrations/local-variables/local-variables-async.js.map +1 -0
  171. package/build/esm/integrations/local-variables/worker-script.js +2 -0
  172. package/build/esm/integrations/modules.js +57 -0
  173. package/build/esm/integrations/modules.js.map +1 -0
  174. package/build/esm/integrations/node-fetch/index.js +22 -0
  175. package/build/esm/integrations/node-fetch/index.js.map +1 -0
  176. package/build/esm/integrations/node-fetch/undici-instrumentation.js +266 -0
  177. package/build/esm/integrations/node-fetch/undici-instrumentation.js.map +1 -0
  178. package/build/esm/integrations/nodeRuntimeMetrics.js +179 -0
  179. package/build/esm/integrations/nodeRuntimeMetrics.js.map +1 -0
  180. package/build/esm/integrations/onuncaughtexception.js +89 -0
  181. package/build/esm/integrations/onuncaughtexception.js.map +1 -0
  182. package/build/esm/integrations/onunhandledrejection.js +91 -0
  183. package/build/esm/integrations/onunhandledrejection.js.map +1 -0
  184. package/build/esm/integrations/pino.js +113 -0
  185. package/build/esm/integrations/pino.js.map +1 -0
  186. package/build/esm/integrations/processSession.js +20 -0
  187. package/build/esm/integrations/processSession.js.map +1 -0
  188. package/build/esm/integrations/spotlight.js +76 -0
  189. package/build/esm/integrations/spotlight.js.map +1 -0
  190. package/build/esm/integrations/systemError.js +52 -0
  191. package/build/esm/integrations/systemError.js.map +1 -0
  192. package/build/esm/integrations/tracing/hapi.js +8 -0
  193. package/build/esm/integrations/tracing/hapi.js.map +1 -0
  194. package/build/esm/integrations/tracing/index.js +3 -93
  195. package/build/esm/integrations/tracing/index.js.map +1 -1
  196. package/build/esm/integrations/tracing/koa.js +8 -0
  197. package/build/esm/integrations/tracing/koa.js.map +1 -0
  198. package/build/esm/integrations/winston.js +82 -0
  199. package/build/esm/integrations/winston.js.map +1 -0
  200. package/build/esm/integrations/workerThreads.js +33 -0
  201. package/build/esm/integrations/workerThreads.js.map +1 -0
  202. package/build/esm/logs/capture.js +24 -0
  203. package/build/esm/logs/capture.js.map +1 -0
  204. package/build/esm/logs/exports.js +24 -0
  205. package/build/esm/logs/exports.js.map +1 -0
  206. package/build/esm/nodeVersion.js +8 -0
  207. package/build/esm/nodeVersion.js.map +1 -0
  208. package/build/esm/otel/logger.js +19 -0
  209. package/build/esm/otel/logger.js.map +1 -0
  210. package/build/esm/package.json +1 -1
  211. package/build/esm/proxy/base.js +67 -0
  212. package/build/esm/proxy/base.js.map +1 -0
  213. package/build/esm/proxy/index.js +110 -0
  214. package/build/esm/proxy/index.js.map +1 -0
  215. package/build/esm/proxy/parse-proxy-response.js +86 -0
  216. package/build/esm/proxy/parse-proxy-response.js.map +1 -0
  217. package/build/esm/sdk/api.js +59 -0
  218. package/build/esm/sdk/api.js.map +1 -0
  219. package/build/esm/sdk/client.js +126 -0
  220. package/build/esm/sdk/client.js.map +1 -0
  221. package/build/esm/sdk/index.js +172 -46
  222. package/build/esm/sdk/index.js.map +1 -1
  223. package/build/esm/sdk/initOtel.js +12 -96
  224. package/build/esm/sdk/initOtel.js.map +1 -1
  225. package/build/esm/transports/http.js +107 -0
  226. package/build/esm/transports/http.js.map +1 -0
  227. package/build/esm/utils/debug.js +15 -0
  228. package/build/esm/utils/debug.js.map +1 -0
  229. package/build/esm/utils/entry-point.js +33 -0
  230. package/build/esm/utils/entry-point.js.map +1 -0
  231. package/build/esm/utils/errorhandling.js +37 -0
  232. package/build/esm/utils/errorhandling.js.map +1 -0
  233. package/build/esm/utils/module.js +35 -0
  234. package/build/esm/utils/module.js.map +1 -0
  235. package/build/esm/utils/outgoingFetchRequest.js +174 -0
  236. package/build/esm/utils/outgoingFetchRequest.js.map +1 -0
  237. package/build/esm/utils/spotlight.js +16 -0
  238. package/build/esm/utils/spotlight.js.map +1 -0
  239. package/build/import-hook.mjs +1 -11
  240. package/build/types/bundler-plugin/esbuild.d.ts +33 -0
  241. package/build/types/bundler-plugin/esbuild.d.ts.map +1 -0
  242. package/build/types/bundler-plugin/rollup.d.ts +34 -0
  243. package/build/types/bundler-plugin/rollup.d.ts.map +1 -0
  244. package/build/types/bundler-plugin/vite.d.ts +35 -0
  245. package/build/types/bundler-plugin/vite.d.ts.map +1 -0
  246. package/build/types/bundler-plugin/webpack.d.ts +37 -0
  247. package/build/types/bundler-plugin/webpack.d.ts.map +1 -0
  248. package/build/types/cron/common.d.ts +5 -0
  249. package/build/types/cron/common.d.ts.map +1 -0
  250. package/build/types/cron/cron.d.ts +43 -0
  251. package/build/types/cron/cron.d.ts.map +1 -0
  252. package/build/types/cron/index.d.ts +10 -0
  253. package/build/types/cron/index.d.ts.map +1 -0
  254. package/build/types/cron/node-cron.d.ts +28 -0
  255. package/build/types/cron/node-cron.d.ts.map +1 -0
  256. package/build/types/cron/node-schedule.d.ts +19 -0
  257. package/build/types/cron/node-schedule.d.ts.map +1 -0
  258. package/build/types/eve.d.ts +60 -0
  259. package/build/types/eve.d.ts.map +1 -0
  260. package/build/types/index.d.ts +38 -36
  261. package/build/types/index.d.ts.map +1 -1
  262. package/build/types/integrations/anr/common.d.ts +79 -0
  263. package/build/types/integrations/anr/common.d.ts.map +1 -0
  264. package/build/types/integrations/anr/index.d.ts +60 -0
  265. package/build/types/integrations/anr/index.d.ts.map +1 -0
  266. package/build/types/integrations/anr/worker.d.ts +2 -0
  267. package/build/types/integrations/anr/worker.d.ts.map +1 -0
  268. package/build/types/integrations/childProcess.d.ts +17 -0
  269. package/build/types/integrations/childProcess.d.ts.map +1 -0
  270. package/build/types/integrations/console.d.ts +23 -0
  271. package/build/types/integrations/console.d.ts.map +1 -0
  272. package/build/types/integrations/context.d.ts +33 -0
  273. package/build/types/integrations/context.d.ts.map +1 -0
  274. package/build/types/integrations/contextlines.d.ts +35 -0
  275. package/build/types/integrations/contextlines.d.ts.map +1 -0
  276. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  277. package/build/types/integrations/fs/index.d.ts.map +1 -1
  278. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -1
  279. package/build/types/integrations/http/SentryHttpInstrumentation.d.ts +48 -0
  280. package/build/types/integrations/http/SentryHttpInstrumentation.d.ts.map +1 -0
  281. package/build/types/integrations/http/httpServerIntegration.d.ts +68 -0
  282. package/build/types/integrations/http/httpServerIntegration.d.ts.map +1 -0
  283. package/build/types/integrations/http/httpServerSpansIntegration.d.ts +59 -0
  284. package/build/types/integrations/http/httpServerSpansIntegration.d.ts.map +1 -0
  285. package/build/types/integrations/http/index.d.ts +69 -0
  286. package/build/types/integrations/http/index.d.ts.map +1 -0
  287. package/build/types/integrations/local-variables/common.d.ts +79 -0
  288. package/build/types/integrations/local-variables/common.d.ts.map +1 -0
  289. package/build/types/integrations/local-variables/index.d.ts +4 -0
  290. package/build/types/integrations/local-variables/index.d.ts.map +1 -0
  291. package/build/types/integrations/local-variables/local-variables-async.d.ts +9 -0
  292. package/build/types/integrations/local-variables/local-variables-async.d.ts.map +1 -0
  293. package/build/types/integrations/local-variables/worker.d.ts +2 -0
  294. package/build/types/integrations/local-variables/worker.d.ts.map +1 -0
  295. package/build/types/integrations/modules.d.ts +17 -0
  296. package/build/types/integrations/modules.d.ts.map +1 -0
  297. package/build/types/integrations/node-fetch/index.d.ts +9 -0
  298. package/build/types/integrations/node-fetch/index.d.ts.map +1 -0
  299. package/build/types/integrations/node-fetch/types.d.ts +104 -0
  300. package/build/types/integrations/node-fetch/types.d.ts.map +1 -0
  301. package/build/types/integrations/node-fetch/undici-instrumentation.d.ts +17 -0
  302. package/build/types/integrations/node-fetch/undici-instrumentation.d.ts.map +1 -0
  303. package/build/types/integrations/nodeRuntimeMetrics.d.ts +66 -0
  304. package/build/types/integrations/nodeRuntimeMetrics.d.ts.map +1 -0
  305. package/build/types/integrations/onuncaughtexception.d.ts +33 -0
  306. package/build/types/integrations/onuncaughtexception.d.ts.map +1 -0
  307. package/build/types/integrations/onunhandledrejection.d.ts +22 -0
  308. package/build/types/integrations/onunhandledrejection.d.ts.map +1 -0
  309. package/build/types/integrations/pino.d.ts +61 -0
  310. package/build/types/integrations/pino.d.ts.map +1 -0
  311. package/build/types/integrations/processSession.d.ts +7 -0
  312. package/build/types/integrations/processSession.d.ts.map +1 -0
  313. package/build/types/integrations/spotlight.d.ts +18 -0
  314. package/build/types/integrations/spotlight.d.ts.map +1 -0
  315. package/build/types/integrations/systemError.d.ts +14 -0
  316. package/build/types/integrations/systemError.d.ts.map +1 -0
  317. package/build/types/integrations/tracing/hapi.d.ts +13 -0
  318. package/build/types/integrations/tracing/hapi.d.ts.map +1 -0
  319. package/build/types/integrations/tracing/index.d.ts +0 -9
  320. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  321. package/build/types/integrations/tracing/koa.d.ts +27 -0
  322. package/build/types/integrations/tracing/koa.d.ts.map +1 -0
  323. package/build/types/integrations/winston.d.ts +55 -0
  324. package/build/types/integrations/winston.d.ts.map +1 -0
  325. package/build/types/integrations/workerThreads.d.ts +8 -0
  326. package/build/types/integrations/workerThreads.d.ts.map +1 -0
  327. package/build/types/logs/capture.d.ts +29 -0
  328. package/build/types/logs/capture.d.ts.map +1 -0
  329. package/build/types/logs/exports.d.ts +150 -0
  330. package/build/types/logs/exports.d.ts.map +1 -0
  331. package/build/types/nodeVersion.d.ts +8 -0
  332. package/build/types/nodeVersion.d.ts.map +1 -0
  333. package/build/types/otel/logger.d.ts +5 -0
  334. package/build/types/otel/logger.d.ts.map +1 -0
  335. package/build/types/proxy/base.d.ts +61 -0
  336. package/build/types/proxy/base.d.ts.map +1 -0
  337. package/build/types/proxy/helpers.d.ts +37 -0
  338. package/build/types/proxy/helpers.d.ts.map +1 -0
  339. package/build/types/proxy/index.d.ts +70 -0
  340. package/build/types/proxy/index.d.ts.map +1 -0
  341. package/build/types/proxy/parse-proxy-response.d.ts +39 -0
  342. package/build/types/proxy/parse-proxy-response.d.ts.map +1 -0
  343. package/build/types/sdk/api.d.ts +8 -0
  344. package/build/types/sdk/api.d.ts.map +1 -0
  345. package/build/types/sdk/client.d.ts +33 -0
  346. package/build/types/sdk/client.d.ts.map +1 -0
  347. package/build/types/sdk/index.d.ts +1 -19
  348. package/build/types/sdk/index.d.ts.map +1 -1
  349. package/build/types/sdk/initOtel.d.ts +4 -22
  350. package/build/types/sdk/initOtel.d.ts.map +1 -1
  351. package/build/types/sdk/scope.d.ts +7 -0
  352. package/build/types/sdk/scope.d.ts.map +1 -0
  353. package/build/types/transports/http-module.d.ts +27 -0
  354. package/build/types/transports/http-module.d.ts.map +1 -0
  355. package/build/types/transports/http.d.ts +17 -0
  356. package/build/types/transports/http.d.ts.map +1 -0
  357. package/build/types/transports/index.d.ts +3 -0
  358. package/build/types/transports/index.d.ts.map +1 -0
  359. package/build/types/types.d.ts +33 -37
  360. package/build/types/types.d.ts.map +1 -1
  361. package/build/types/utils/addOriginToSpan.d.ts +5 -0
  362. package/build/types/utils/addOriginToSpan.d.ts.map +1 -0
  363. package/build/types/utils/debug.d.ts +5 -0
  364. package/build/types/utils/debug.d.ts.map +1 -0
  365. package/build/types/utils/entry-point.d.ts +24 -0
  366. package/build/types/utils/entry-point.d.ts.map +1 -0
  367. package/build/types/utils/errorhandling.d.ts +5 -0
  368. package/build/types/utils/errorhandling.d.ts.map +1 -0
  369. package/build/types/utils/module.d.ts +3 -0
  370. package/build/types/utils/module.d.ts.map +1 -0
  371. package/build/types/utils/outgoingFetchRequest.d.ts +20 -0
  372. package/build/types/utils/outgoingFetchRequest.d.ts.map +1 -0
  373. package/build/types/utils/prepareEvent.d.ts +17 -0
  374. package/build/types/utils/prepareEvent.d.ts.map +1 -0
  375. package/build/types/utils/spotlight.d.ts +8 -0
  376. package/build/types/utils/spotlight.d.ts.map +1 -0
  377. package/changes.json +4 -16
  378. package/package.json +45 -49
  379. package/build/cjs/init.js +0 -4
  380. package/build/cjs/init.js.map +0 -1
  381. package/build/cjs/integrations/http.js +0 -69
  382. package/build/cjs/integrations/http.js.map +0 -1
  383. package/build/cjs/integrations/node-fetch.js +0 -24
  384. package/build/cjs/integrations/node-fetch.js.map +0 -1
  385. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +0 -15
  386. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +0 -1
  387. package/build/cjs/integrations/tracing/amqplib/index.js +0 -21
  388. package/build/cjs/integrations/tracing/amqplib/index.js.map +0 -1
  389. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +0 -117
  390. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +0 -1
  391. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +0 -185
  392. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +0 -1
  393. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +0 -26
  394. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +0 -1
  395. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +0 -17
  396. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +0 -1
  397. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +0 -129
  398. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +0 -1
  399. package/build/cjs/integrations/tracing/anthropic-ai/index.js +0 -24
  400. package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +0 -1
  401. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +0 -72
  402. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +0 -1
  403. package/build/cjs/integrations/tracing/connect/index.js +0 -35
  404. package/build/cjs/integrations/tracing/connect/index.js.map +0 -1
  405. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +0 -16
  406. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +0 -1
  407. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +0 -137
  408. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +0 -1
  409. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +0 -8
  410. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +0 -1
  411. package/build/cjs/integrations/tracing/connect/vendored/utils.js +0 -36
  412. package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +0 -1
  413. package/build/cjs/integrations/tracing/dataloader/index.js +0 -26
  414. package/build/cjs/integrations/tracing/dataloader/index.js.map +0 -1
  415. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +0 -227
  416. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +0 -1
  417. package/build/cjs/integrations/tracing/express.js +0 -67
  418. package/build/cjs/integrations/tracing/express.js.map +0 -1
  419. package/build/cjs/integrations/tracing/fastify/index.js +0 -55
  420. package/build/cjs/integrations/tracing/fastify/index.js.map +0 -1
  421. package/build/cjs/integrations/tracing/fastify/v3/constants.js +0 -6
  422. package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +0 -1
  423. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +0 -24
  424. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +0 -1
  425. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +0 -220
  426. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +0 -1
  427. package/build/cjs/integrations/tracing/fastify/v3/utils.js +0 -64
  428. package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +0 -1
  429. package/build/cjs/integrations/tracing/firebase/firebase.js +0 -21
  430. package/build/cjs/integrations/tracing/firebase/firebase.js.map +0 -1
  431. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +0 -28
  432. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +0 -1
  433. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +0 -155
  434. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +0 -1
  435. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +0 -141
  436. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +0 -1
  437. package/build/cjs/integrations/tracing/genericPool/index.js +0 -21
  438. package/build/cjs/integrations/tracing/genericPool/index.js.map +0 -1
  439. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +0 -122
  440. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +0 -1
  441. package/build/cjs/integrations/tracing/google-genai/index.js +0 -23
  442. package/build/cjs/integrations/tracing/google-genai/index.js.map +0 -1
  443. package/build/cjs/integrations/tracing/google-genai/instrumentation.js +0 -68
  444. package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +0 -1
  445. package/build/cjs/integrations/tracing/graphql/index.js +0 -34
  446. package/build/cjs/integrations/tracing/graphql/index.js.map +0 -1
  447. package/build/cjs/integrations/tracing/graphql/vendored/enum.js +0 -47
  448. package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +0 -1
  449. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -15
  450. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +0 -1
  451. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +0 -329
  452. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +0 -1
  453. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +0 -6
  454. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +0 -1
  455. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +0 -8
  456. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +0 -1
  457. package/build/cjs/integrations/tracing/graphql/vendored/utils.js +0 -265
  458. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +0 -1
  459. package/build/cjs/integrations/tracing/hapi/index.js +0 -60
  460. package/build/cjs/integrations/tracing/hapi/index.js.map +0 -1
  461. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +0 -11
  462. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +0 -1
  463. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +0 -255
  464. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +0 -1
  465. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +0 -24
  466. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +0 -1
  467. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +0 -85
  468. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +0 -1
  469. package/build/cjs/integrations/tracing/hono/constants.js +0 -14
  470. package/build/cjs/integrations/tracing/hono/constants.js.map +0 -1
  471. package/build/cjs/integrations/tracing/hono/index.js +0 -86
  472. package/build/cjs/integrations/tracing/hono/index.js.map +0 -1
  473. package/build/cjs/integrations/tracing/hono/instrumentation.js +0 -201
  474. package/build/cjs/integrations/tracing/hono/instrumentation.js.map +0 -1
  475. package/build/cjs/integrations/tracing/kafka/index.js +0 -21
  476. package/build/cjs/integrations/tracing/kafka/index.js.map +0 -1
  477. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +0 -237
  478. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +0 -1
  479. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +0 -22
  480. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +0 -1
  481. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +0 -114
  482. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +0 -1
  483. package/build/cjs/integrations/tracing/knex/index.js +0 -26
  484. package/build/cjs/integrations/tracing/knex/index.js.map +0 -1
  485. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +0 -135
  486. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +0 -1
  487. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +0 -10
  488. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +0 -1
  489. package/build/cjs/integrations/tracing/knex/vendored/utils.js +0 -84
  490. package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +0 -1
  491. package/build/cjs/integrations/tracing/koa/index.js +0 -46
  492. package/build/cjs/integrations/tracing/koa/index.js.map +0 -1
  493. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +0 -10
  494. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +0 -1
  495. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +0 -127
  496. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +0 -1
  497. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +0 -6
  498. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +0 -1
  499. package/build/cjs/integrations/tracing/koa/vendored/types.js +0 -10
  500. package/build/cjs/integrations/tracing/koa/vendored/types.js.map +0 -1
  501. package/build/cjs/integrations/tracing/koa/vendored/utils.js +0 -36
  502. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +0 -1
  503. package/build/cjs/integrations/tracing/langchain/index.js +0 -23
  504. package/build/cjs/integrations/tracing/langchain/index.js.map +0 -1
  505. package/build/cjs/integrations/tracing/langchain/instrumentation.js +0 -160
  506. package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +0 -1
  507. package/build/cjs/integrations/tracing/langgraph/index.js +0 -23
  508. package/build/cjs/integrations/tracing/langgraph/index.js.map +0 -1
  509. package/build/cjs/integrations/tracing/langgraph/instrumentation.js +0 -96
  510. package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +0 -1
  511. package/build/cjs/integrations/tracing/lrumemoizer/index.js +0 -21
  512. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +0 -1
  513. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +0 -38
  514. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +0 -1
  515. package/build/cjs/integrations/tracing/mongo/index.js +0 -21
  516. package/build/cjs/integrations/tracing/mongo/index.js.map +0 -1
  517. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +0 -129
  518. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +0 -1
  519. package/build/cjs/integrations/tracing/mongo/vendored/patches.js +0 -150
  520. package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +0 -1
  521. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +0 -40
  522. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +0 -1
  523. package/build/cjs/integrations/tracing/mongoose/index.js +0 -22
  524. package/build/cjs/integrations/tracing/mongoose/index.js.map +0 -1
  525. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +0 -240
  526. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +0 -1
  527. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +0 -41
  528. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +0 -1
  529. package/build/cjs/integrations/tracing/mysql/index.js +0 -21
  530. package/build/cjs/integrations/tracing/mysql/index.js.map +0 -1
  531. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +0 -185
  532. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +0 -1
  533. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +0 -8
  534. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +0 -1
  535. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +0 -38
  536. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +0 -1
  537. package/build/cjs/integrations/tracing/mysql2/index.js +0 -22
  538. package/build/cjs/integrations/tracing/mysql2/index.js.map +0 -1
  539. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +0 -138
  540. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +0 -1
  541. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +0 -8
  542. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +0 -1
  543. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +0 -81
  544. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +0 -1
  545. package/build/cjs/integrations/tracing/openai/index.js +0 -23
  546. package/build/cjs/integrations/tracing/openai/index.js.map +0 -1
  547. package/build/cjs/integrations/tracing/openai/instrumentation.js +0 -80
  548. package/build/cjs/integrations/tracing/openai/instrumentation.js.map +0 -1
  549. package/build/cjs/integrations/tracing/postgres/index.js +0 -27
  550. package/build/cjs/integrations/tracing/postgres/index.js.map +0 -1
  551. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -11
  552. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +0 -1
  553. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +0 -11
  554. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +0 -1
  555. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +0 -225
  556. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +0 -1
  557. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +0 -8
  558. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +0 -1
  559. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +0 -151
  560. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +0 -1
  561. package/build/cjs/integrations/tracing/postgresjs.js +0 -265
  562. package/build/cjs/integrations/tracing/postgresjs.js.map +0 -1
  563. package/build/cjs/integrations/tracing/redis/cache.js +0 -41
  564. package/build/cjs/integrations/tracing/redis/cache.js.map +0 -1
  565. package/build/cjs/integrations/tracing/redis/index.js +0 -50
  566. package/build/cjs/integrations/tracing/redis/index.js.map +0 -1
  567. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +0 -147
  568. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +0 -1
  569. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +0 -445
  570. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +0 -1
  571. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +0 -8
  572. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +0 -1
  573. package/build/cjs/integrations/tracing/tedious/index.js +0 -21
  574. package/build/cjs/integrations/tracing/tedious/index.js.map +0 -1
  575. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +0 -154
  576. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +0 -1
  577. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +0 -8
  578. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +0 -1
  579. package/build/cjs/integrations/tracing/tedious/vendored/utils.js +0 -29
  580. package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +0 -1
  581. package/build/cjs/integrations/tracing/vercelai/constants.js +0 -6
  582. package/build/cjs/integrations/tracing/vercelai/constants.js.map +0 -1
  583. package/build/cjs/integrations/tracing/vercelai/index.js +0 -36
  584. package/build/cjs/integrations/tracing/vercelai/index.js.map +0 -1
  585. package/build/cjs/integrations/tracing/vercelai/instrumentation.js +0 -179
  586. package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +0 -1
  587. package/build/cjs/preload.js +0 -8
  588. package/build/cjs/preload.js.map +0 -1
  589. package/build/cjs/sdk/diagnosticsChannelInjection.js +0 -21
  590. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +0 -1
  591. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +0 -33
  592. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +0 -1
  593. package/build/cjs/utils/redisCache.js +0 -98
  594. package/build/cjs/utils/redisCache.js.map +0 -1
  595. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +0 -21
  596. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +0 -1
  597. package/build/esm/init.js +0 -4
  598. package/build/esm/init.js.map +0 -1
  599. package/build/esm/integrations/http.js +0 -66
  600. package/build/esm/integrations/http.js.map +0 -1
  601. package/build/esm/integrations/node-fetch.js +0 -22
  602. package/build/esm/integrations/node-fetch.js.map +0 -1
  603. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +0 -13
  604. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +0 -1
  605. package/build/esm/integrations/tracing/amqplib/index.js +0 -18
  606. package/build/esm/integrations/tracing/amqplib/index.js.map +0 -1
  607. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +0 -115
  608. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +0 -1
  609. package/build/esm/integrations/tracing/amqplib/vendored/patches.js +0 -177
  610. package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +0 -1
  611. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +0 -14
  612. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +0 -1
  613. package/build/esm/integrations/tracing/amqplib/vendored/types.js +0 -15
  614. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +0 -1
  615. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +0 -117
  616. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +0 -1
  617. package/build/esm/integrations/tracing/anthropic-ai/index.js +0 -21
  618. package/build/esm/integrations/tracing/anthropic-ai/index.js.map +0 -1
  619. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +0 -70
  620. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +0 -1
  621. package/build/esm/integrations/tracing/connect/index.js +0 -31
  622. package/build/esm/integrations/tracing/connect/index.js.map +0 -1
  623. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +0 -13
  624. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +0 -1
  625. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +0 -135
  626. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +0 -1
  627. package/build/esm/integrations/tracing/connect/vendored/internal-types.js +0 -6
  628. package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +0 -1
  629. package/build/esm/integrations/tracing/connect/vendored/utils.js +0 -32
  630. package/build/esm/integrations/tracing/connect/vendored/utils.js.map +0 -1
  631. package/build/esm/integrations/tracing/dataloader/index.js +0 -23
  632. package/build/esm/integrations/tracing/dataloader/index.js.map +0 -1
  633. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +0 -225
  634. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +0 -1
  635. package/build/esm/integrations/tracing/express.js +0 -62
  636. package/build/esm/integrations/tracing/express.js.map +0 -1
  637. package/build/esm/integrations/tracing/fastify/index.js +0 -51
  638. package/build/esm/integrations/tracing/fastify/index.js.map +0 -1
  639. package/build/esm/integrations/tracing/fastify/v3/constants.js +0 -4
  640. package/build/esm/integrations/tracing/fastify/v3/constants.js.map +0 -1
  641. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +0 -20
  642. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +0 -1
  643. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +0 -218
  644. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +0 -1
  645. package/build/esm/integrations/tracing/fastify/v3/utils.js +0 -60
  646. package/build/esm/integrations/tracing/fastify/v3/utils.js.map +0 -1
  647. package/build/esm/integrations/tracing/firebase/firebase.js +0 -18
  648. package/build/esm/integrations/tracing/firebase/firebase.js.map +0 -1
  649. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +0 -26
  650. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +0 -1
  651. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +0 -152
  652. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +0 -1
  653. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +0 -138
  654. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +0 -1
  655. package/build/esm/integrations/tracing/genericPool/index.js +0 -18
  656. package/build/esm/integrations/tracing/genericPool/index.js.map +0 -1
  657. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +0 -120
  658. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +0 -1
  659. package/build/esm/integrations/tracing/google-genai/index.js +0 -20
  660. package/build/esm/integrations/tracing/google-genai/index.js.map +0 -1
  661. package/build/esm/integrations/tracing/google-genai/instrumentation.js +0 -66
  662. package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +0 -1
  663. package/build/esm/integrations/tracing/graphql/index.js +0 -31
  664. package/build/esm/integrations/tracing/graphql/index.js.map +0 -1
  665. package/build/esm/integrations/tracing/graphql/vendored/enum.js +0 -43
  666. package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +0 -1
  667. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -13
  668. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +0 -1
  669. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +0 -327
  670. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +0 -1
  671. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +0 -4
  672. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +0 -1
  673. package/build/esm/integrations/tracing/graphql/vendored/symbols.js +0 -5
  674. package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +0 -1
  675. package/build/esm/integrations/tracing/graphql/vendored/utils.js +0 -257
  676. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +0 -1
  677. package/build/esm/integrations/tracing/hapi/index.js +0 -55
  678. package/build/esm/integrations/tracing/hapi/index.js.map +0 -1
  679. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +0 -9
  680. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +0 -1
  681. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +0 -253
  682. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +0 -1
  683. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +0 -19
  684. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +0 -1
  685. package/build/esm/integrations/tracing/hapi/vendored/utils.js +0 -76
  686. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +0 -1
  687. package/build/esm/integrations/tracing/hono/constants.js +0 -11
  688. package/build/esm/integrations/tracing/hono/constants.js.map +0 -1
  689. package/build/esm/integrations/tracing/hono/index.js +0 -82
  690. package/build/esm/integrations/tracing/hono/index.js.map +0 -1
  691. package/build/esm/integrations/tracing/hono/instrumentation.js +0 -199
  692. package/build/esm/integrations/tracing/hono/instrumentation.js.map +0 -1
  693. package/build/esm/integrations/tracing/kafka/index.js +0 -18
  694. package/build/esm/integrations/tracing/kafka/index.js.map +0 -1
  695. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +0 -235
  696. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +0 -1
  697. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +0 -12
  698. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +0 -1
  699. package/build/esm/integrations/tracing/kafka/vendored/utils.js +0 -108
  700. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +0 -1
  701. package/build/esm/integrations/tracing/knex/index.js +0 -23
  702. package/build/esm/integrations/tracing/knex/index.js.map +0 -1
  703. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +0 -133
  704. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +0 -1
  705. package/build/esm/integrations/tracing/knex/vendored/semconv.js +0 -6
  706. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +0 -1
  707. package/build/esm/integrations/tracing/knex/vendored/utils.js +0 -75
  708. package/build/esm/integrations/tracing/knex/vendored/utils.js.map +0 -1
  709. package/build/esm/integrations/tracing/koa/index.js +0 -42
  710. package/build/esm/integrations/tracing/koa/index.js.map +0 -1
  711. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +0 -8
  712. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +0 -1
  713. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +0 -125
  714. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +0 -1
  715. package/build/esm/integrations/tracing/koa/vendored/internal-types.js +0 -4
  716. package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +0 -1
  717. package/build/esm/integrations/tracing/koa/vendored/types.js +0 -8
  718. package/build/esm/integrations/tracing/koa/vendored/types.js.map +0 -1
  719. package/build/esm/integrations/tracing/koa/vendored/utils.js +0 -33
  720. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +0 -1
  721. package/build/esm/integrations/tracing/langchain/index.js +0 -20
  722. package/build/esm/integrations/tracing/langchain/index.js.map +0 -1
  723. package/build/esm/integrations/tracing/langchain/instrumentation.js +0 -158
  724. package/build/esm/integrations/tracing/langchain/instrumentation.js.map +0 -1
  725. package/build/esm/integrations/tracing/langgraph/index.js +0 -20
  726. package/build/esm/integrations/tracing/langgraph/index.js.map +0 -1
  727. package/build/esm/integrations/tracing/langgraph/instrumentation.js +0 -94
  728. package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +0 -1
  729. package/build/esm/integrations/tracing/lrumemoizer/index.js +0 -18
  730. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +0 -1
  731. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +0 -36
  732. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +0 -1
  733. package/build/esm/integrations/tracing/mongo/index.js +0 -18
  734. package/build/esm/integrations/tracing/mongo/index.js.map +0 -1
  735. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +0 -127
  736. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +0 -1
  737. package/build/esm/integrations/tracing/mongo/vendored/patches.js +0 -142
  738. package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +0 -1
  739. package/build/esm/integrations/tracing/mongo/vendored/utils.js +0 -34
  740. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +0 -1
  741. package/build/esm/integrations/tracing/mongoose/index.js +0 -19
  742. package/build/esm/integrations/tracing/mongoose/index.js.map +0 -1
  743. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +0 -236
  744. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +0 -1
  745. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +0 -38
  746. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +0 -1
  747. package/build/esm/integrations/tracing/mysql/index.js +0 -18
  748. package/build/esm/integrations/tracing/mysql/index.js.map +0 -1
  749. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +0 -183
  750. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +0 -1
  751. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +0 -5
  752. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +0 -1
  753. package/build/esm/integrations/tracing/mysql/vendored/utils.js +0 -33
  754. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +0 -1
  755. package/build/esm/integrations/tracing/mysql2/index.js +0 -19
  756. package/build/esm/integrations/tracing/mysql2/index.js.map +0 -1
  757. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +0 -136
  758. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +0 -1
  759. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +0 -5
  760. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +0 -1
  761. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +0 -75
  762. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +0 -1
  763. package/build/esm/integrations/tracing/openai/index.js +0 -20
  764. package/build/esm/integrations/tracing/openai/index.js.map +0 -1
  765. package/build/esm/integrations/tracing/openai/instrumentation.js +0 -78
  766. package/build/esm/integrations/tracing/openai/instrumentation.js.map +0 -1
  767. package/build/esm/integrations/tracing/postgres/index.js +0 -24
  768. package/build/esm/integrations/tracing/postgres/index.js.map +0 -1
  769. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -9
  770. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +0 -1
  771. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +0 -9
  772. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +0 -1
  773. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +0 -223
  774. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +0 -1
  775. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +0 -5
  776. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +0 -1
  777. package/build/esm/integrations/tracing/postgres/vendored/utils.js +0 -136
  778. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +0 -1
  779. package/build/esm/integrations/tracing/postgresjs.js +0 -261
  780. package/build/esm/integrations/tracing/postgresjs.js.map +0 -1
  781. package/build/esm/integrations/tracing/redis/cache.js +0 -38
  782. package/build/esm/integrations/tracing/redis/cache.js.map +0 -1
  783. package/build/esm/integrations/tracing/redis/index.js +0 -43
  784. package/build/esm/integrations/tracing/redis/index.js.map +0 -1
  785. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +0 -145
  786. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +0 -1
  787. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +0 -443
  788. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +0 -1
  789. package/build/esm/integrations/tracing/redis/vendored/semconv.js +0 -5
  790. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +0 -1
  791. package/build/esm/integrations/tracing/tedious/index.js +0 -18
  792. package/build/esm/integrations/tracing/tedious/index.js.map +0 -1
  793. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +0 -152
  794. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +0 -1
  795. package/build/esm/integrations/tracing/tedious/vendored/semconv.js +0 -5
  796. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +0 -1
  797. package/build/esm/integrations/tracing/tedious/vendored/utils.js +0 -26
  798. package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +0 -1
  799. package/build/esm/integrations/tracing/vercelai/constants.js +0 -4
  800. package/build/esm/integrations/tracing/vercelai/constants.js.map +0 -1
  801. package/build/esm/integrations/tracing/vercelai/index.js +0 -33
  802. package/build/esm/integrations/tracing/vercelai/index.js.map +0 -1
  803. package/build/esm/integrations/tracing/vercelai/instrumentation.js +0 -174
  804. package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +0 -1
  805. package/build/esm/preload.js +0 -8
  806. package/build/esm/preload.js.map +0 -1
  807. package/build/esm/sdk/diagnosticsChannelInjection.js +0 -17
  808. package/build/esm/sdk/diagnosticsChannelInjection.js.map +0 -1
  809. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +0 -30
  810. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +0 -1
  811. package/build/esm/utils/redisCache.js +0 -89
  812. package/build/esm/utils/redisCache.js.map +0 -1
  813. package/build/esm/utils/setHttpServerSpanRouteAttribute.js +0 -19
  814. package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +0 -1
  815. package/build/loader-hook.mjs +0 -1
  816. package/build/types/init.d.ts +0 -2
  817. package/build/types/init.d.ts.map +0 -1
  818. package/build/types/integrations/http.d.ts +0 -131
  819. package/build/types/integrations/http.d.ts.map +0 -1
  820. package/build/types/integrations/node-fetch.d.ts +0 -9
  821. package/build/types/integrations/node-fetch.d.ts.map +0 -1
  822. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +0 -9
  823. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +0 -1
  824. package/build/types/integrations/tracing/amqplib/index.d.ts +0 -22
  825. package/build/types/integrations/tracing/amqplib/index.d.ts.map +0 -1
  826. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +0 -44
  827. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +0 -1
  828. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +0 -11
  829. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +0 -1
  830. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +0 -11
  831. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +0 -1
  832. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +0 -23
  833. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +0 -1
  834. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +0 -49
  835. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +0 -1
  836. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +0 -42
  837. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +0 -1
  838. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +0 -62
  839. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +0 -1
  840. package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts +0 -19
  841. package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts.map +0 -1
  842. package/build/types/integrations/tracing/connect/index.d.ts +0 -48
  843. package/build/types/integrations/tracing/connect/index.d.ts.map +0 -1
  844. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -9
  845. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +0 -1
  846. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +0 -18
  847. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +0 -1
  848. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +0 -31
  849. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +0 -1
  850. package/build/types/integrations/tracing/connect/vendored/utils.d.ts +0 -5
  851. package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +0 -1
  852. package/build/types/integrations/tracing/dataloader/index.d.ts +0 -22
  853. package/build/types/integrations/tracing/dataloader/index.d.ts.map +0 -1
  854. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +0 -18
  855. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +0 -1
  856. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +0 -22
  857. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +0 -1
  858. package/build/types/integrations/tracing/express.d.ts +0 -19
  859. package/build/types/integrations/tracing/express.d.ts.map +0 -1
  860. package/build/types/integrations/tracing/fastify/index.d.ts +0 -124
  861. package/build/types/integrations/tracing/fastify/index.d.ts.map +0 -1
  862. package/build/types/integrations/tracing/fastify/types.d.ts +0 -33
  863. package/build/types/integrations/tracing/fastify/types.d.ts.map +0 -1
  864. package/build/types/integrations/tracing/fastify/v3/constants.d.ts +0 -3
  865. package/build/types/integrations/tracing/fastify/v3/constants.d.ts.map +0 -1
  866. package/build/types/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts +0 -15
  867. package/build/types/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts.map +0 -1
  868. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts +0 -16
  869. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +0 -1
  870. package/build/types/integrations/tracing/fastify/v3/internal-types.d.ts +0 -7
  871. package/build/types/integrations/tracing/fastify/v3/internal-types.d.ts.map +0 -1
  872. package/build/types/integrations/tracing/fastify/v3/types.d.ts +0 -21
  873. package/build/types/integrations/tracing/fastify/v3/types.d.ts.map +0 -1
  874. package/build/types/integrations/tracing/fastify/v3/utils.d.ts +0 -28
  875. package/build/types/integrations/tracing/fastify/v3/utils.d.ts.map +0 -1
  876. package/build/types/integrations/tracing/firebase/firebase.d.ts +0 -8
  877. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +0 -1
  878. package/build/types/integrations/tracing/firebase/index.d.ts +0 -2
  879. package/build/types/integrations/tracing/firebase/index.d.ts.map +0 -1
  880. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +0 -14
  881. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +0 -1
  882. package/build/types/integrations/tracing/firebase/otel/index.d.ts +0 -3
  883. package/build/types/integrations/tracing/firebase/otel/index.d.ts.map +0 -1
  884. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +0 -22
  885. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +0 -1
  886. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +0 -18
  887. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +0 -1
  888. package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -100
  889. package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +0 -1
  890. package/build/types/integrations/tracing/genericPool/index.d.ts +0 -22
  891. package/build/types/integrations/tracing/genericPool/index.d.ts.map +0 -1
  892. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +0 -5
  893. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +0 -1
  894. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +0 -11
  895. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +0 -1
  896. package/build/types/integrations/tracing/google-genai/index.d.ts +0 -62
  897. package/build/types/integrations/tracing/google-genai/index.d.ts.map +0 -1
  898. package/build/types/integrations/tracing/google-genai/instrumentation.d.ts +0 -20
  899. package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +0 -1
  900. package/build/types/integrations/tracing/graphql/index.d.ts +0 -50
  901. package/build/types/integrations/tracing/graphql/index.d.ts.map +0 -1
  902. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +0 -38
  903. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +0 -1
  904. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +0 -10
  905. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +0 -1
  906. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +0 -2
  907. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +0 -1
  908. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +0 -25
  909. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +0 -1
  910. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +0 -63
  911. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +0 -1
  912. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +0 -3
  913. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +0 -1
  914. package/build/types/integrations/tracing/graphql/vendored/types.d.ts +0 -33
  915. package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +0 -1
  916. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +0 -14
  917. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +0 -1
  918. package/build/types/integrations/tracing/hapi/index.d.ts +0 -52
  919. package/build/types/integrations/tracing/hapi/index.d.ts.map +0 -1
  920. package/build/types/integrations/tracing/hapi/types.d.ts +0 -166
  921. package/build/types/integrations/tracing/hapi/types.d.ts.map +0 -1
  922. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +0 -6
  923. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +0 -1
  924. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +0 -70
  925. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +0 -1
  926. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +0 -72
  927. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +0 -1
  928. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +0 -32
  929. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +0 -1
  930. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +0 -18
  931. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +0 -1
  932. package/build/types/integrations/tracing/hono/constants.d.ts +0 -11
  933. package/build/types/integrations/tracing/hono/constants.d.ts.map +0 -1
  934. package/build/types/integrations/tracing/hono/index.d.ts +0 -60
  935. package/build/types/integrations/tracing/hono/index.d.ts.map +0 -1
  936. package/build/types/integrations/tracing/hono/instrumentation.d.ts +0 -55
  937. package/build/types/integrations/tracing/hono/instrumentation.d.ts.map +0 -1
  938. package/build/types/integrations/tracing/hono/types.d.ts +0 -36
  939. package/build/types/integrations/tracing/hono/types.d.ts.map +0 -1
  940. package/build/types/integrations/tracing/kafka/index.d.ts +0 -21
  941. package/build/types/integrations/tracing/kafka/index.d.ts.map +0 -1
  942. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +0 -15
  943. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +0 -1
  944. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -79
  945. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +0 -1
  946. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +0 -54
  947. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +0 -1
  948. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +0 -29
  949. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +0 -1
  950. package/build/types/integrations/tracing/knex/index.d.ts +0 -22
  951. package/build/types/integrations/tracing/knex/index.d.ts.map +0 -1
  952. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +0 -12
  953. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +0 -1
  954. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +0 -7
  955. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +0 -1
  956. package/build/types/integrations/tracing/knex/vendored/utils.d.ts +0 -9
  957. package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +0 -1
  958. package/build/types/integrations/tracing/koa/index.d.ts +0 -72
  959. package/build/types/integrations/tracing/koa/index.d.ts.map +0 -1
  960. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +0 -5
  961. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +0 -1
  962. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +0 -32
  963. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +0 -1
  964. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +0 -34
  965. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +0 -1
  966. package/build/types/integrations/tracing/koa/vendored/types.d.ts +0 -13
  967. package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +0 -1
  968. package/build/types/integrations/tracing/koa/vendored/utils.d.ts +0 -15
  969. package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +0 -1
  970. package/build/types/integrations/tracing/langchain/index.d.ts +0 -101
  971. package/build/types/integrations/tracing/langchain/index.d.ts.map +0 -1
  972. package/build/types/integrations/tracing/langchain/instrumentation.d.ts +0 -38
  973. package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +0 -1
  974. package/build/types/integrations/tracing/langgraph/index.d.ts +0 -77
  975. package/build/types/integrations/tracing/langgraph/index.d.ts.map +0 -1
  976. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +0 -19
  977. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +0 -1
  978. package/build/types/integrations/tracing/lrumemoizer/index.d.ts +0 -21
  979. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +0 -1
  980. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +0 -6
  981. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +0 -1
  982. package/build/types/integrations/tracing/mongo/index.d.ts +0 -22
  983. package/build/types/integrations/tracing/mongo/index.d.ts.map +0 -1
  984. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +0 -11
  985. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +0 -1
  986. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -62
  987. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +0 -1
  988. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +0 -15
  989. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +0 -1
  990. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +0 -15
  991. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +0 -1
  992. package/build/types/integrations/tracing/mongoose/index.d.ts +0 -22
  993. package/build/types/integrations/tracing/mongoose/index.d.ts.map +0 -1
  994. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +0 -33
  995. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +0 -1
  996. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +0 -18
  997. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +0 -1
  998. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +0 -4
  999. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +0 -1
  1000. package/build/types/integrations/tracing/mysql/index.d.ts +0 -22
  1001. package/build/types/integrations/tracing/mysql/index.d.ts.map +0 -1
  1002. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +0 -14
  1003. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +0 -1
  1004. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +0 -78
  1005. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +0 -1
  1006. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +0 -19
  1007. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +0 -1
  1008. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +0 -22
  1009. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +0 -1
  1010. package/build/types/integrations/tracing/mysql2/index.d.ts +0 -22
  1011. package/build/types/integrations/tracing/mysql2/index.d.ts.map +0 -1
  1012. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +0 -9
  1013. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +0 -1
  1014. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +0 -39
  1015. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +0 -1
  1016. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +0 -3
  1017. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +0 -1
  1018. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +0 -25
  1019. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +0 -1
  1020. package/build/types/integrations/tracing/openai/index.d.ts +0 -62
  1021. package/build/types/integrations/tracing/openai/index.d.ts.map +0 -1
  1022. package/build/types/integrations/tracing/openai/instrumentation.d.ts +0 -26
  1023. package/build/types/integrations/tracing/openai/instrumentation.d.ts.map +0 -1
  1024. package/build/types/integrations/tracing/postgres/index.d.ts +0 -26
  1025. package/build/types/integrations/tracing/postgres/index.d.ts.map +0 -1
  1026. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -6
  1027. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +0 -1
  1028. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +0 -6
  1029. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +0 -1
  1030. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +0 -12
  1031. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +0 -1
  1032. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -33
  1033. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +0 -1
  1034. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +0 -20
  1035. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +0 -1
  1036. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +0 -54
  1037. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +0 -1
  1038. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +0 -13
  1039. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +0 -1
  1040. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +0 -11
  1041. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +0 -1
  1042. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +0 -56
  1043. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +0 -1
  1044. package/build/types/integrations/tracing/postgresjs.d.ts +0 -103
  1045. package/build/types/integrations/tracing/postgresjs.d.ts.map +0 -1
  1046. package/build/types/integrations/tracing/redis/cache.d.ts +0 -22
  1047. package/build/types/integrations/tracing/redis/cache.d.ts.map +0 -1
  1048. package/build/types/integrations/tracing/redis/index.d.ts +0 -28
  1049. package/build/types/integrations/tracing/redis/index.d.ts.map +0 -1
  1050. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +0 -10
  1051. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +0 -1
  1052. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +0 -16
  1053. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +0 -1
  1054. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +0 -4
  1055. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +0 -1
  1056. package/build/types/integrations/tracing/redis/vendored/types.d.ts +0 -24
  1057. package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +0 -1
  1058. package/build/types/integrations/tracing/tedious/index.d.ts +0 -22
  1059. package/build/types/integrations/tracing/tedious/index.d.ts.map +0 -1
  1060. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +0 -11
  1061. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +0 -1
  1062. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +0 -19
  1063. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +0 -1
  1064. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +0 -21
  1065. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +0 -1
  1066. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +0 -9
  1067. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +0 -1
  1068. package/build/types/integrations/tracing/vercelai/constants.d.ts +0 -2
  1069. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +0 -1
  1070. package/build/types/integrations/tracing/vercelai/index.d.ts +0 -44
  1071. package/build/types/integrations/tracing/vercelai/index.d.ts.map +0 -1
  1072. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +0 -56
  1073. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +0 -1
  1074. package/build/types/integrations/tracing/vercelai/types.d.ts +0 -50
  1075. package/build/types/integrations/tracing/vercelai/types.d.ts.map +0 -1
  1076. package/build/types/preload.d.ts +0 -2
  1077. package/build/types/preload.d.ts.map +0 -1
  1078. package/build/types/sdk/diagnosticsChannelInjection.d.ts +0 -41
  1079. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +0 -1
  1080. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +0 -37
  1081. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +0 -1
  1082. package/build/types/utils/redisCache.d.ts +0 -17
  1083. package/build/types/utils/redisCache.d.ts.map +0 -1
  1084. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +0 -9
  1085. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +0 -1
  1086. package/build/types-ts3.8/debug-build.d.ts +0 -7
  1087. package/build/types-ts3.8/index.d.ts +0 -44
  1088. package/build/types-ts3.8/init.d.ts +0 -2
  1089. package/build/types-ts3.8/integrations/featureFlagShims/growthbook.d.ts +0 -6
  1090. package/build/types-ts3.8/integrations/featureFlagShims/index.d.ts +0 -6
  1091. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +0 -12
  1092. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +0 -25
  1093. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +0 -8
  1094. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +0 -8
  1095. package/build/types-ts3.8/integrations/fs/index.d.ts +0 -14
  1096. package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +0 -5
  1097. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +0 -3
  1098. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +0 -23
  1099. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +0 -15
  1100. package/build/types-ts3.8/integrations/http.d.ts +0 -134
  1101. package/build/types-ts3.8/integrations/node-fetch.d.ts +0 -9
  1102. package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +0 -9
  1103. package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +0 -22
  1104. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +0 -44
  1105. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +0 -11
  1106. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +0 -11
  1107. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +0 -23
  1108. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +0 -49
  1109. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +0 -42
  1110. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +0 -62
  1111. package/build/types-ts3.8/integrations/tracing/anthropic-ai/instrumentation.d.ts +0 -19
  1112. package/build/types-ts3.8/integrations/tracing/connect/index.d.ts +0 -48
  1113. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -9
  1114. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +0 -18
  1115. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +0 -36
  1116. package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +0 -5
  1117. package/build/types-ts3.8/integrations/tracing/dataloader/index.d.ts +0 -22
  1118. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +0 -18
  1119. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +0 -22
  1120. package/build/types-ts3.8/integrations/tracing/express.d.ts +0 -19
  1121. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +0 -124
  1122. package/build/types-ts3.8/integrations/tracing/fastify/types.d.ts +0 -33
  1123. package/build/types-ts3.8/integrations/tracing/fastify/v3/constants.d.ts +0 -3
  1124. package/build/types-ts3.8/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts +0 -15
  1125. package/build/types-ts3.8/integrations/tracing/fastify/v3/instrumentation.d.ts +0 -16
  1126. package/build/types-ts3.8/integrations/tracing/fastify/v3/internal-types.d.ts +0 -7
  1127. package/build/types-ts3.8/integrations/tracing/fastify/v3/types.d.ts +0 -21
  1128. package/build/types-ts3.8/integrations/tracing/fastify/v3/utils.d.ts +0 -28
  1129. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +0 -8
  1130. package/build/types-ts3.8/integrations/tracing/firebase/index.d.ts +0 -2
  1131. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +0 -14
  1132. package/build/types-ts3.8/integrations/tracing/firebase/otel/index.d.ts +0 -3
  1133. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +0 -22
  1134. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +0 -18
  1135. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -100
  1136. package/build/types-ts3.8/integrations/tracing/genericPool/index.d.ts +0 -22
  1137. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +0 -5
  1138. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +0 -11
  1139. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +0 -62
  1140. package/build/types-ts3.8/integrations/tracing/google-genai/instrumentation.d.ts +0 -20
  1141. package/build/types-ts3.8/integrations/tracing/graphql/index.d.ts +0 -50
  1142. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +0 -38
  1143. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +0 -10
  1144. package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +0 -2
  1145. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +0 -25
  1146. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +0 -63
  1147. package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +0 -3
  1148. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +0 -33
  1149. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +0 -14
  1150. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +0 -52
  1151. package/build/types-ts3.8/integrations/tracing/hapi/types.d.ts +0 -166
  1152. package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +0 -6
  1153. package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +0 -70
  1154. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +0 -72
  1155. package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +0 -32
  1156. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +0 -18
  1157. package/build/types-ts3.8/integrations/tracing/hono/constants.d.ts +0 -11
  1158. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +0 -60
  1159. package/build/types-ts3.8/integrations/tracing/hono/instrumentation.d.ts +0 -55
  1160. package/build/types-ts3.8/integrations/tracing/hono/types.d.ts +0 -36
  1161. package/build/types-ts3.8/integrations/tracing/index.d.ts +0 -12
  1162. package/build/types-ts3.8/integrations/tracing/kafka/index.d.ts +0 -21
  1163. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +0 -15
  1164. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -79
  1165. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +0 -54
  1166. package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +0 -29
  1167. package/build/types-ts3.8/integrations/tracing/knex/index.d.ts +0 -22
  1168. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +0 -12
  1169. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +0 -7
  1170. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +0 -9
  1171. package/build/types-ts3.8/integrations/tracing/koa/index.d.ts +0 -72
  1172. package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +0 -5
  1173. package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +0 -32
  1174. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +0 -34
  1175. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +0 -13
  1176. package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +0 -15
  1177. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +0 -101
  1178. package/build/types-ts3.8/integrations/tracing/langchain/instrumentation.d.ts +0 -38
  1179. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +0 -77
  1180. package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +0 -19
  1181. package/build/types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts +0 -21
  1182. package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +0 -6
  1183. package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +0 -22
  1184. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +0 -11
  1185. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -62
  1186. package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +0 -15
  1187. package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +0 -15
  1188. package/build/types-ts3.8/integrations/tracing/mongoose/index.d.ts +0 -22
  1189. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +0 -33
  1190. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +0 -18
  1191. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +0 -4
  1192. package/build/types-ts3.8/integrations/tracing/mysql/index.d.ts +0 -22
  1193. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +0 -14
  1194. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +0 -78
  1195. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +0 -19
  1196. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +0 -22
  1197. package/build/types-ts3.8/integrations/tracing/mysql2/index.d.ts +0 -22
  1198. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +0 -9
  1199. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +0 -39
  1200. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +0 -3
  1201. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +0 -25
  1202. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +0 -62
  1203. package/build/types-ts3.8/integrations/tracing/openai/instrumentation.d.ts +0 -26
  1204. package/build/types-ts3.8/integrations/tracing/postgres/index.d.ts +0 -26
  1205. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -6
  1206. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +0 -6
  1207. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +0 -12
  1208. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -33
  1209. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +0 -20
  1210. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +0 -54
  1211. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +0 -13
  1212. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +0 -11
  1213. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +0 -56
  1214. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +0 -103
  1215. package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +0 -22
  1216. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +0 -28
  1217. package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +0 -10
  1218. package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +0 -16
  1219. package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +0 -4
  1220. package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +0 -24
  1221. package/build/types-ts3.8/integrations/tracing/tedious/index.d.ts +0 -22
  1222. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +0 -11
  1223. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +0 -19
  1224. package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +0 -21
  1225. package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +0 -9
  1226. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +0 -2
  1227. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +0 -44
  1228. package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +0 -56
  1229. package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +0 -50
  1230. package/build/types-ts3.8/preload.d.ts +0 -2
  1231. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +0 -41
  1232. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +0 -37
  1233. package/build/types-ts3.8/sdk/index.d.ts +0 -36
  1234. package/build/types-ts3.8/sdk/initOtel.d.ts +0 -30
  1235. package/build/types-ts3.8/types.d.ts +0 -89
  1236. package/build/types-ts3.8/utils/redisCache.d.ts +0 -17
  1237. package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +0 -9
@@ -0,0 +1,266 @@
1
+ import * as diagch from 'diagnostics_channel';
2
+ import { URL } from 'url';
3
+ import { LRUMap, safeCallback, isTracingSuppressed, debug, getUrlFragment, filterCollectedUrlQuery, getUrlQuery, filterCollectedUrl, stripDataUrlContent, getClient, hasSpanStreamingEnabled, getSanitizedUrlString, parseUrl, startInactiveSpan, httpHeadersToSpanAttributes, getSpanStatusFromHttpCode, SPAN_STATUS_ERROR, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, HTTP_SPAN_NAME_FALLBACK } from '@sentry/core';
4
+ import { addTracePropagationHeadersToFetchRequest, addFetchRequestBreadcrumb } from '../../utils/outgoingFetchRequest.js';
5
+ import { URL_FRAGMENT, URL_QUERY, URL_PATH, URL_DOMAIN, URL_FULL, HTTP_RESPONSE_STATUS_CODE, URL_SCHEME, HTTP_REQUEST_METHOD, SENTRY_OP, SENTRY_KIND, SERVER_ADDRESS, SERVER_PORT, USER_AGENT_ORIGINAL, NETWORK_PEER_PORT, NETWORK_PEER_ADDRESS } from '@sentry/conventions/attributes';
6
+ import { HTTP_CLIENT } from '@sentry/conventions/op';
7
+ import { DEBUG_BUILD } from '../../debug-build.js';
8
+
9
+ const ATTR_HTTP_REQUEST_METHOD_ORIGINAL = "http.request.method_original";
10
+ let _isInstrumented = false;
11
+ const spanFromReq = /* @__PURE__ */ new WeakMap();
12
+ const ignoreRequestMap = /* @__PURE__ */ new WeakMap();
13
+ const propagationDecisionMap = new LRUMap(100);
14
+ function instrumentUndici(config = {}) {
15
+ if (_isInstrumented) {
16
+ return;
17
+ }
18
+ _isInstrumented = true;
19
+ subscribeToChannel("undici:request:create", (message) => onRequestCreated(config, message));
20
+ subscribeToChannel(
21
+ "undici:client:sendHeaders",
22
+ (message) => onRequestHeaders(config, message)
23
+ );
24
+ subscribeToChannel("undici:request:headers", (message) => onResponseHeaders(config, message));
25
+ subscribeToChannel("undici:request:trailers", (message) => onDone(message));
26
+ subscribeToChannel("undici:request:error", (message) => onError(message));
27
+ }
28
+ function subscribeToChannel(diagnosticChannel, onMessage) {
29
+ diagch.subscribe?.(diagnosticChannel, onMessage);
30
+ }
31
+ function parseRequestHeaders(request) {
32
+ const result = /* @__PURE__ */ new Map();
33
+ if (Array.isArray(request.headers)) {
34
+ for (let i = 0; i < request.headers.length; i += 2) {
35
+ const key = request.headers[i];
36
+ const value = request.headers[i + 1];
37
+ if (typeof key === "string" && value !== void 0) {
38
+ result.set(key.toLowerCase(), value);
39
+ }
40
+ }
41
+ } else if (typeof request.headers === "string") {
42
+ const headers = request.headers.split("\r\n");
43
+ for (const line of headers) {
44
+ if (!line) {
45
+ continue;
46
+ }
47
+ const colonIndex = line.indexOf(":");
48
+ if (colonIndex === -1) {
49
+ continue;
50
+ }
51
+ const key = line.substring(0, colonIndex).toLowerCase();
52
+ const value = line.substring(colonIndex + 1).trim();
53
+ const allValues = result.get(key);
54
+ if (allValues && Array.isArray(allValues)) {
55
+ allValues.push(value);
56
+ } else if (allValues) {
57
+ result.set(key, [allValues, value]);
58
+ } else {
59
+ result.set(key, value);
60
+ }
61
+ }
62
+ }
63
+ return result;
64
+ }
65
+ function onRequestCreated(config, { request }) {
66
+ const url = getAbsoluteUrl(request.origin, request.path);
67
+ const ignoredByCallback = safeCallback(
68
+ DEBUG_BUILD ? "The `ignoreOutgoingRequests` callback threw an error, not ignoring the request:" : "",
69
+ () => !!config.ignoreOutgoingRequests?.(url),
70
+ () => false
71
+ );
72
+ const ignoreForBreadcrumbs = isTracingSuppressed() || !!ignoredByCallback;
73
+ ignoreRequestMap.set(request, ignoreForBreadcrumbs);
74
+ if (!config.spans) {
75
+ if (config.tracePropagation !== false && !ignoreForBreadcrumbs) {
76
+ addTracePropagationHeadersToFetchRequest(request, propagationDecisionMap);
77
+ }
78
+ return;
79
+ }
80
+ if (request.method === "CONNECT" || ignoredByCallback) {
81
+ return;
82
+ }
83
+ let requestUrl;
84
+ try {
85
+ requestUrl = new URL(request.path, request.origin);
86
+ } catch (err) {
87
+ DEBUG_BUILD && debug.warn("could not determine url.full:", err);
88
+ return;
89
+ }
90
+ const urlScheme = requestUrl.protocol.replace(":", "");
91
+ const requestMethod = getRequestMethod(request.method);
92
+ const attributes = {
93
+ [SENTRY_KIND]: "client",
94
+ [SENTRY_OP]: HTTP_CLIENT,
95
+ [HTTP_REQUEST_METHOD]: requestMethod,
96
+ [ATTR_HTTP_REQUEST_METHOD_ORIGINAL]: request.method,
97
+ [URL_FULL]: filterCollectedUrl(requestUrl.toString()),
98
+ [URL_DOMAIN]: requestUrl.hostname || void 0,
99
+ [URL_PATH]: requestUrl.pathname,
100
+ [URL_QUERY]: filterCollectedUrlQuery(getUrlQuery(requestUrl.search)),
101
+ [URL_FRAGMENT]: getUrlFragment(requestUrl.hash),
102
+ [URL_SCHEME]: urlScheme,
103
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.node_fetch"
104
+ };
105
+ if (url.startsWith("data:")) {
106
+ const sanitizedUrl = stripDataUrlContent(url);
107
+ attributes[URL_FULL] = sanitizedUrl;
108
+ attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME] = `${request.method || "GET"} ${sanitizedUrl}`;
109
+ }
110
+ const schemePorts = { https: "443", http: "80" };
111
+ const serverAddress = requestUrl.hostname;
112
+ const serverPort = requestUrl.port || schemePorts[urlScheme];
113
+ attributes[SERVER_ADDRESS] = serverAddress;
114
+ if (serverPort && !isNaN(Number(serverPort))) {
115
+ attributes[SERVER_PORT] = Number(serverPort);
116
+ }
117
+ const headersMap = parseRequestHeaders(request);
118
+ const userAgentValues = headersMap.get("user-agent");
119
+ if (userAgentValues) {
120
+ const userAgent = Array.isArray(userAgentValues) ? userAgentValues[userAgentValues.length - 1] : userAgentValues;
121
+ attributes[USER_AGENT_ORIGINAL] = userAgent;
122
+ }
123
+ const isDataUrl = url.startsWith("data:");
124
+ const client = getClient();
125
+ let spanName;
126
+ if (requestMethod === "_OTHER") {
127
+ spanName = HTTP_SPAN_NAME_FALLBACK;
128
+ } else if (!!client && hasSpanStreamingEnabled(client)) {
129
+ spanName = requestUrl.hostname ? `${requestMethod} ${requestUrl.hostname}` : requestMethod;
130
+ } else if (isDataUrl) {
131
+ spanName = `${request.method || "GET"} ${stripDataUrlContent(url)}`;
132
+ } else {
133
+ spanName = `${requestMethod} ${getSanitizedUrlString(parseUrl(requestUrl.toString()))}`;
134
+ }
135
+ const span = startInactiveSpan({
136
+ name: spanName,
137
+ attributes,
138
+ onlyIfParent: !client || !hasSpanStreamingEnabled(client)
139
+ });
140
+ safeCallback(
141
+ DEBUG_BUILD ? "The `requestHook` callback threw an error:" : "",
142
+ () => config.requestHook?.(span, request),
143
+ () => void 0
144
+ );
145
+ addTracePropagationHeadersToFetchRequest(request, propagationDecisionMap, span);
146
+ spanFromReq.set(request, span);
147
+ }
148
+ function onRequestHeaders(config, { request, socket }) {
149
+ const span = spanFromReq.get(request);
150
+ if (!span) {
151
+ return;
152
+ }
153
+ const { remoteAddress, remotePort } = socket;
154
+ const spanAttributes = {
155
+ [NETWORK_PEER_ADDRESS]: remoteAddress,
156
+ [NETWORK_PEER_PORT]: remotePort
157
+ };
158
+ const client = getClient();
159
+ if (config.headersToSpanAttributes?.requestHeaders && client) {
160
+ const headersToAttribs = new Set(config.headersToSpanAttributes.requestHeaders.map((n) => n.toLowerCase()));
161
+ const headersMap = parseRequestHeaders(request);
162
+ const allowlisted = {};
163
+ for (const [name, value] of headersMap.entries()) {
164
+ if (headersToAttribs.has(name)) {
165
+ allowlisted[name] = value;
166
+ }
167
+ }
168
+ Object.assign(spanAttributes, httpHeadersToSpanAttributes(allowlisted, client.getDataCollectionOptions()));
169
+ }
170
+ span.setAttributes(spanAttributes);
171
+ }
172
+ function onResponseHeaders(config, { request, response }) {
173
+ const breadcrumbsEnabled = config.breadcrumbs !== false;
174
+ if (breadcrumbsEnabled && !ignoreRequestMap.get(request)) {
175
+ addFetchRequestBreadcrumb(request, response);
176
+ }
177
+ const span = spanFromReq.get(request);
178
+ if (!span) {
179
+ return;
180
+ }
181
+ const spanAttributes = {
182
+ [HTTP_RESPONSE_STATUS_CODE]: response.statusCode
183
+ };
184
+ safeCallback(
185
+ DEBUG_BUILD ? "The `responseHook` callback threw an error:" : "",
186
+ () => config.responseHook?.(span, { request, response }),
187
+ () => void 0
188
+ );
189
+ const client = getClient();
190
+ if (config.headersToSpanAttributes?.responseHeaders && client) {
191
+ const headersToAttribs = /* @__PURE__ */ new Set();
192
+ config.headersToSpanAttributes?.responseHeaders.forEach((name) => headersToAttribs.add(name.toLowerCase()));
193
+ const allowlisted = {};
194
+ for (let idx = 0; idx < response.headers.length; idx = idx + 2) {
195
+ const nameBuf = response.headers[idx];
196
+ const valueBuf = response.headers[idx + 1];
197
+ if (nameBuf === void 0 || valueBuf === void 0) {
198
+ continue;
199
+ }
200
+ const name = nameBuf.toString().toLowerCase();
201
+ if (headersToAttribs.has(name)) {
202
+ (allowlisted[name] ?? (allowlisted[name] = [])).push(valueBuf.toString());
203
+ }
204
+ }
205
+ Object.assign(
206
+ spanAttributes,
207
+ httpHeadersToSpanAttributes(allowlisted, client.getDataCollectionOptions(), "response")
208
+ );
209
+ }
210
+ span.setAttributes(spanAttributes);
211
+ if (response.statusCode >= 400) {
212
+ span.setStatus(getSpanStatusFromHttpCode(response.statusCode));
213
+ }
214
+ }
215
+ function onDone({ request }) {
216
+ const span = spanFromReq.get(request);
217
+ if (!span) {
218
+ return;
219
+ }
220
+ span.end();
221
+ spanFromReq.delete(request);
222
+ }
223
+ function onError({ request, error }) {
224
+ const span = spanFromReq.get(request);
225
+ if (!span) {
226
+ return;
227
+ }
228
+ span.setStatus({
229
+ code: SPAN_STATUS_ERROR,
230
+ message: error.message
231
+ });
232
+ span.end();
233
+ spanFromReq.delete(request);
234
+ }
235
+ function getRequestMethod(original) {
236
+ const knownMethods = {
237
+ CONNECT: true,
238
+ OPTIONS: true,
239
+ HEAD: true,
240
+ GET: true,
241
+ POST: true,
242
+ PUT: true,
243
+ PATCH: true,
244
+ DELETE: true,
245
+ TRACE: true,
246
+ // QUERY from https://datatracker.ietf.org/doc/rfc10008/
247
+ QUERY: true
248
+ };
249
+ if (original.toUpperCase() in knownMethods) {
250
+ return original.toUpperCase();
251
+ }
252
+ return "_OTHER";
253
+ }
254
+ function getAbsoluteUrl(origin, path = "/") {
255
+ const url = `${origin}`;
256
+ if (url.endsWith("/") && path.startsWith("/")) {
257
+ return `${url}${path.slice(1)}`;
258
+ }
259
+ if (!url.endsWith("/") && !path.startsWith("/")) {
260
+ return `${url}/${path}`;
261
+ }
262
+ return `${url}${path}`;
263
+ }
264
+
265
+ export { instrumentUndici };
266
+ //# sourceMappingURL=undici-instrumentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undici-instrumentation.js","sources":["../../../../src/integrations/node-fetch/undici-instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/ed97091c9890dd18e52759f2ea98e9d7593b3ae4/packages/instrumentation-undici\n * - Upstream version: @opentelemetry/instrumentation-undici@0.24.0\n * - Tracking issue: https://github.com/getsentry/sentry-javascript/issues/20165\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n * - Dropped the OTel metrics (no MeterProvider is wired up) and the dead\n * `requireParentforSpans` code path (the SDK always passes `false`)\n * - Dropped the `@opentelemetry/instrumentation` base (undici reports via `diagnostics_channel`,\n * so no module patching was needed) — exposed as a plain `instrumentUndici()` function that the\n * integration wires up directly\n */\n\n/* eslint-disable max-lines */\n\nimport * as diagch from 'diagnostics_channel';\nimport { URL } from 'url';\n\nimport type { Span, SpanAttributes } from '@sentry/core';\nimport {\n debug,\n getClient,\n getSanitizedUrlString,\n getSpanStatusFromHttpCode,\n hasSpanStreamingEnabled,\n HTTP_SPAN_NAME_FALLBACK,\n isTracingSuppressed,\n LRUMap,\n parseUrl,\n safeCallback,\n SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n stripDataUrlContent,\n getUrlFragment,\n getUrlQuery,\n filterCollectedUrl,\n filterCollectedUrlQuery,\n httpHeadersToSpanAttributes,\n} from '@sentry/core';\nimport { addFetchRequestBreadcrumb, addTracePropagationHeadersToFetchRequest } from '../../utils/outgoingFetchRequest';\nimport {\n HTTP_REQUEST_METHOD,\n HTTP_RESPONSE_STATUS_CODE,\n NETWORK_PEER_ADDRESS,\n NETWORK_PEER_PORT,\n SENTRY_KIND,\n SENTRY_OP,\n SERVER_ADDRESS,\n SERVER_PORT,\n URL_DOMAIN,\n URL_FRAGMENT,\n URL_FULL,\n URL_PATH,\n URL_QUERY,\n URL_SCHEME,\n USER_AGENT_ORIGINAL,\n} from '@sentry/conventions/attributes';\nimport { HTTP_CLIENT } from '@sentry/conventions/op';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type {\n NodeFetchOptions,\n UndiciRequest,\n RequestErrorMessage,\n RequestHeadersMessage,\n RequestMessage,\n RequestTrailersMessage,\n ResponseHeadersMessage,\n} from './types';\n\n// `http.request.method_original` is not part of `@sentry/conventions`, so we keep it inline.\nconst ATTR_HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original';\n\nlet _isInstrumented = false;\nconst spanFromReq = new WeakMap<UndiciRequest, Span>();\n// Whether breadcrumbs (and span-less trace propagation) should be skipped for a given request.\n// We evaluate this at request-creation time because the active context is no longer correct by the\n// time the response-headers event fires.\nconst ignoreRequestMap = new WeakMap<UndiciRequest, boolean>();\n// Caches trace-propagation decisions per URL so we don't recompute the `tracePropagationTargets` regexes per request.\nconst propagationDecisionMap = new LRUMap<string, boolean>(100);\n\n/**\n * Instrument outgoing HTTP requests made through `undici` or the global `fetch` API: emit `http.client`\n * spans, record breadcrumbs, and propagate traces into the outgoing request headers.\n *\n * Span creation is gated by the `spans` option (defaults to `true`). When spans are disabled, breadcrumbs\n * are still recorded and trace propagation headers are still injected (gated by `tracePropagation`).\n *\n * undici reports its request lifecycle via `diagnostics_channel`, so rather than patching any module we\n * subscribe to those channels directly. This is idempotent — subsequent calls are no-ops once the\n * channels have been subscribed to, and the config of the first call wins.\n *\n * A combination of https://github.com/elastic/apm-agent-nodejs and\n * https://github.com/gadget-inc/opentelemetry-instrumentations/blob/main/packages/opentelemetry-instrumentation-undici/src/index.ts\n */\nexport function instrumentUndici(config: NodeFetchOptions = {}): void {\n // Avoid duplicate subscriptions\n if (_isInstrumented) {\n return;\n }\n _isInstrumented = true;\n\n subscribeToChannel('undici:request:create', message => onRequestCreated(config, message as RequestMessage));\n subscribeToChannel('undici:client:sendHeaders', message =>\n onRequestHeaders(config, message as RequestHeadersMessage),\n );\n subscribeToChannel('undici:request:headers', message => onResponseHeaders(config, message as ResponseHeadersMessage));\n subscribeToChannel('undici:request:trailers', message => onDone(message as RequestTrailersMessage));\n subscribeToChannel('undici:request:error', message => onError(message as RequestErrorMessage));\n}\n\nfunction subscribeToChannel(\n diagnosticChannel: string,\n onMessage: (message: unknown, name: string | symbol) => void,\n): void {\n diagch.subscribe?.(diagnosticChannel, onMessage);\n}\n\nfunction parseRequestHeaders(request: UndiciRequest): Map<string, string | string[]> {\n const result = new Map<string, string | string[]>();\n\n if (Array.isArray(request.headers)) {\n // headers are an array [k1, v2, k2, v2] (undici v6+)\n // values could be string or a string[] for multiple values\n for (let i = 0; i < request.headers.length; i += 2) {\n const key = request.headers[i];\n const value = request.headers[i + 1];\n\n // Key should always be a string, but the types don't know that, and let's be safe\n if (typeof key === 'string' && value !== undefined) {\n result.set(key.toLowerCase(), value);\n }\n }\n } else if (typeof request.headers === 'string') {\n // headers are a raw string (undici v5)\n // headers could be repeated in several lines for multiple values\n const headers = request.headers.split('\\r\\n');\n for (const line of headers) {\n if (!line) {\n continue;\n }\n const colonIndex = line.indexOf(':');\n if (colonIndex === -1) {\n // Invalid header? Probably this can't happen, but again let's be safe.\n continue;\n }\n const key = line.substring(0, colonIndex).toLowerCase();\n const value = line.substring(colonIndex + 1).trim();\n const allValues = result.get(key);\n\n if (allValues && Array.isArray(allValues)) {\n allValues.push(value);\n } else if (allValues) {\n result.set(key, [allValues, value]);\n } else {\n result.set(key, value);\n }\n }\n }\n return result;\n}\n\n// This is the 1st message we receive for each request (fired after request creation). Here we will\n// create the span and populate some atttributes, then link the span to the request for further\n// span processing\nfunction onRequestCreated(config: NodeFetchOptions, { request }: RequestMessage): void {\n const url = getAbsoluteUrl(request.origin, request.path);\n\n const ignoredByCallback = safeCallback(\n DEBUG_BUILD ? 'The `ignoreOutgoingRequests` callback threw an error, not ignoring the request:' : '',\n () => !!config.ignoreOutgoingRequests?.(url),\n () => false,\n );\n\n // Breadcrumbs & span-less trace propagation are additionally skipped when tracing is suppressed.\n // We store this here because the active context is no longer correct in later channel events.\n const ignoreForBreadcrumbs = isTracingSuppressed() || !!ignoredByCallback;\n ignoreRequestMap.set(request, ignoreForBreadcrumbs);\n\n // When spans are disabled we do not create a span, but we still inject trace propagation headers\n // directly (unless disabled via `tracePropagation`).\n if (!config.spans) {\n if (config.tracePropagation !== false && !ignoreForBreadcrumbs) {\n addTracePropagationHeadersToFetchRequest(request, propagationDecisionMap);\n }\n return;\n }\n\n // Ignore span creation if:\n // - the outgoing request is ignored via config\n // - method is 'CONNECT'\n if (request.method === 'CONNECT' || ignoredByCallback) {\n return;\n }\n\n let requestUrl;\n try {\n requestUrl = new URL(request.path, request.origin);\n } catch (err) {\n DEBUG_BUILD && debug.warn('could not determine url.full:', err);\n // Skip instrumenting this request.\n return;\n }\n\n const urlScheme = requestUrl.protocol.replace(':', '');\n const requestMethod = getRequestMethod(request.method);\n const attributes: SpanAttributes = {\n [SENTRY_KIND]: 'client',\n [SENTRY_OP]: HTTP_CLIENT,\n [HTTP_REQUEST_METHOD]: requestMethod,\n [ATTR_HTTP_REQUEST_METHOD_ORIGINAL]: request.method,\n [URL_FULL]: filterCollectedUrl(requestUrl.toString()),\n [URL_DOMAIN]: requestUrl.hostname || undefined,\n [URL_PATH]: requestUrl.pathname,\n [URL_QUERY]: filterCollectedUrlQuery(getUrlQuery(requestUrl.search)),\n [URL_FRAGMENT]: getUrlFragment(requestUrl.hash),\n [URL_SCHEME]: urlScheme,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.node_fetch',\n };\n\n // Sanitize data URLs to prevent long base64 strings in span attributes\n if (url.startsWith('data:')) {\n const sanitizedUrl = stripDataUrlContent(url);\n attributes[URL_FULL] = sanitizedUrl;\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME] = `${request.method || 'GET'} ${sanitizedUrl}`;\n }\n\n const schemePorts: Record<string, string> = { https: '443', http: '80' };\n const serverAddress = requestUrl.hostname;\n const serverPort = requestUrl.port || schemePorts[urlScheme];\n\n attributes[SERVER_ADDRESS] = serverAddress;\n if (serverPort && !isNaN(Number(serverPort))) {\n attributes[SERVER_PORT] = Number(serverPort);\n }\n\n // Get user agent from headers\n const headersMap = parseRequestHeaders(request);\n const userAgentValues = headersMap.get('user-agent');\n\n if (userAgentValues) {\n // NOTE: having multiple user agents is not expected so\n // we're going to take last one like `curl` does\n // ref: https://curl.se/docs/manpage.html#-A\n const userAgent = Array.isArray(userAgentValues) ? userAgentValues[userAgentValues.length - 1] : userAgentValues;\n attributes[USER_AGENT_ORIGINAL] = userAgent;\n }\n\n // Outside of span streaming, only record an `http.client` span when it has a parent. An orphan\n // one (no local parent) is left to the server for the downstream sampling decision: `onlyIfParent`\n // still creates a non-recording span so trace propagation headers are injected, but it isn't\n // emitted as a standalone transaction. This rule also lives in `SentrySampler`, but that only runs\n // when an OpenTelemetry SDK tracer provider is set up, so we enforce it here too, which covers\n // SDKs that don't use an OpenTelemetry tracer provider at all.\n const isDataUrl = url.startsWith('data:');\n const client = getClient();\n\n let spanName: string;\n if (requestMethod === '_OTHER') {\n spanName = HTTP_SPAN_NAME_FALLBACK;\n } else if (!!client && hasSpanStreamingEnabled(client)) {\n // With span streaming, span names have to be low cardinality, so the URL path is dropped and only\n // the domain is kept. Outgoing requests have no route to parameterize, and data URLs have no domain.\n spanName = requestUrl.hostname ? `${requestMethod} ${requestUrl.hostname}` : requestMethod;\n } else if (isDataUrl) {\n spanName = `${request.method || 'GET'} ${stripDataUrlContent(url)}`;\n } else {\n spanName = `${requestMethod} ${getSanitizedUrlString(parseUrl(requestUrl.toString()))}`;\n }\n\n const span = startInactiveSpan({\n name: spanName,\n attributes,\n onlyIfParent: !client || !hasSpanStreamingEnabled(client),\n });\n\n // Execute the request hook if defined\n safeCallback(\n DEBUG_BUILD ? 'The `requestHook` callback threw an error:' : '',\n () => config.requestHook?.(span, request),\n () => undefined,\n );\n\n // Context propagation goes last so no hook can tamper the propagation headers.\n // We propagate the trace data of the freshly created client span (not the active parent span)\n // so downstream services are parented to the http.client span, matching the upstream behavior.\n // This also de-duplicates against any trace headers the user set manually (e.g. via `getTraceData()`).\n addTracePropagationHeadersToFetchRequest(request, propagationDecisionMap, span);\n\n spanFromReq.set(request, span);\n}\n\n// This is the 2nd message we receive for each request. It is fired when connection with\n// the remote is established and about to send the first byte. Here we do have info about the\n// remote address and port so we can populate some `network.*` attributes into the span\nfunction onRequestHeaders(config: NodeFetchOptions, { request, socket }: RequestHeadersMessage): void {\n const span = spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n const { remoteAddress, remotePort } = socket;\n const spanAttributes: SpanAttributes = {\n [NETWORK_PEER_ADDRESS]: remoteAddress,\n [NETWORK_PEER_PORT]: remotePort,\n };\n\n // After hooks have been processed (which may modify request headers)\n // we can collect the headers based on the configuration\n const client = getClient();\n if (config.headersToSpanAttributes?.requestHeaders && client) {\n const headersToAttribs = new Set(config.headersToSpanAttributes.requestHeaders.map(n => n.toLowerCase()));\n const headersMap = parseRequestHeaders(request);\n\n const allowlisted: Record<string, string | string[]> = {};\n for (const [name, value] of headersMap.entries()) {\n if (headersToAttribs.has(name)) {\n allowlisted[name] = value;\n }\n }\n\n // An entry in `headersToSpanAttributes` does not exempt a header from the `dataCollection`\n // filtering, so the allowlisted subset goes through the same pipeline as any other header.\n Object.assign(spanAttributes, httpHeadersToSpanAttributes(allowlisted, client.getDataCollectionOptions()));\n }\n\n span.setAttributes(spanAttributes);\n}\n\n// This is the 3rd message we get for each request and it's fired when the server\n// headers are received, body may not be accessible yet.\n// From the response headers we can set the status and content length\nfunction onResponseHeaders(config: NodeFetchOptions, { request, response }: ResponseHeadersMessage): void {\n // Breadcrumbs are recorded independently of spans, so this runs even when span creation is disabled.\n const breadcrumbsEnabled = config.breadcrumbs !== false;\n if (breadcrumbsEnabled && !ignoreRequestMap.get(request)) {\n addFetchRequestBreadcrumb(request, response);\n }\n\n const span = spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n const spanAttributes: SpanAttributes = {\n [HTTP_RESPONSE_STATUS_CODE]: response.statusCode,\n };\n\n // Execute the response hook if defined\n safeCallback(\n DEBUG_BUILD ? 'The `responseHook` callback threw an error:' : '',\n () => config.responseHook?.(span, { request, response }),\n () => undefined,\n );\n\n const client = getClient();\n if (config.headersToSpanAttributes?.responseHeaders && client) {\n const headersToAttribs = new Set<string>();\n config.headersToSpanAttributes?.responseHeaders.forEach(name => headersToAttribs.add(name.toLowerCase()));\n\n const allowlisted: Record<string, string[]> = {};\n for (let idx = 0; idx < response.headers.length; idx = idx + 2) {\n const nameBuf = response.headers[idx];\n const valueBuf = response.headers[idx + 1];\n if (nameBuf === undefined || valueBuf === undefined) {\n continue;\n }\n const name = nameBuf.toString().toLowerCase();\n\n if (headersToAttribs.has(name)) {\n (allowlisted[name] ??= []).push(valueBuf.toString());\n }\n }\n\n // An entry in `headersToSpanAttributes` does not exempt a header from the `dataCollection`\n // filtering, so the allowlisted subset goes through the same pipeline as any other header.\n Object.assign(\n spanAttributes,\n httpHeadersToSpanAttributes(allowlisted, client.getDataCollectionOptions(), 'response'),\n );\n }\n\n span.setAttributes(spanAttributes);\n\n // Resolve the HTTP status code to a Sentry span status here (like the raw http client/server\n // instrumentation does) instead of setting a bare error and deferring to downstream inference.\n // The SentryTracerProvider's status finalization reads the already-stringified span status, which\n // can no longer be inferred back to `not_found` etc. the way the OpenTelemetry SDK exporter's\n // `mapStatus` does from the raw `{ code, message }`.\n if (response.statusCode >= 400) {\n span.setStatus(getSpanStatusFromHttpCode(response.statusCode));\n }\n}\n\n// This is the last event we receive if the request went without any errors\nfunction onDone({ request }: RequestTrailersMessage): void {\n const span = spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n span.end();\n spanFromReq.delete(request);\n}\n\n// This is the event we get when something is wrong in the request like\n// - invalid options when calling `fetch` global API or any undici method for request\n// - connectivity errors such as unreachable host\n// - requests aborted through an `AbortController.signal`\n// NOTE: server errors are considered valid responses and it's the lib consumer\n// who should deal with that.\nfunction onError({ request, error }: RequestErrorMessage): void {\n const span = spanFromReq.get(request);\n\n if (!span) {\n return;\n }\n\n // NOTE: in `undici@6.3.0` when request aborted the error type changes from\n // a custom error (`RequestAbortedError`) to a built-in `DOMException` carrying\n // some differences:\n // - `code` is from DOMEXception (ABORT_ERR: 20)\n // - `message` changes\n // - stacktrace is smaller and contains node internal frames\n span.setStatus({\n code: SPAN_STATUS_ERROR,\n message: error.message,\n });\n span.end();\n spanFromReq.delete(request);\n}\n\nfunction getRequestMethod(original: string): string {\n const knownMethods = {\n CONNECT: true,\n OPTIONS: true,\n HEAD: true,\n GET: true,\n POST: true,\n PUT: true,\n PATCH: true,\n DELETE: true,\n TRACE: true,\n // QUERY from https://datatracker.ietf.org/doc/rfc10008/\n QUERY: true,\n };\n\n if (original.toUpperCase() in knownMethods) {\n return original.toUpperCase();\n }\n\n return '_OTHER';\n}\n\n// Matching the behavior of the base instrumentation\nfunction getAbsoluteUrl(origin: string, path: string = '/'): string {\n const url = `${origin}`;\n\n if (url.endsWith('/') && path.startsWith('/')) {\n return `${url}${path.slice(1)}`;\n }\n\n if (!url.endsWith('/') && !path.startsWith('/')) {\n return `${url}/${path}`;\n }\n\n return `${url}${path}`;\n}\n"],"names":[],"mappings":";;;;;;;;AA2EA,MAAM,iCAAA,GAAoC,8BAAA;AAE1C,IAAI,eAAA,GAAkB,KAAA;AACtB,MAAM,WAAA,uBAAkB,OAAA,EAA6B;AAIrD,MAAM,gBAAA,uBAAuB,OAAA,EAAgC;AAE7D,MAAM,sBAAA,GAAyB,IAAI,MAAA,CAAwB,GAAG,CAAA;AAgBvD,SAAS,gBAAA,CAAiB,MAAA,GAA2B,EAAC,EAAS;AAEpE,EAAA,IAAI,eAAA,EAAiB;AACnB,IAAA;AAAA,EACF;AACA,EAAA,eAAA,GAAkB,IAAA;AAElB,EAAA,kBAAA,CAAmB,uBAAA,EAAyB,CAAA,OAAA,KAAW,gBAAA,CAAiB,MAAA,EAAQ,OAAyB,CAAC,CAAA;AAC1G,EAAA,kBAAA;AAAA,IAAmB,2BAAA;AAAA,IAA6B,CAAA,OAAA,KAC9C,gBAAA,CAAiB,MAAA,EAAQ,OAAgC;AAAA,GAC3D;AACA,EAAA,kBAAA,CAAmB,wBAAA,EAA0B,CAAA,OAAA,KAAW,iBAAA,CAAkB,MAAA,EAAQ,OAAiC,CAAC,CAAA;AACpH,EAAA,kBAAA,CAAmB,yBAAA,EAA2B,CAAA,OAAA,KAAW,MAAA,CAAO,OAAiC,CAAC,CAAA;AAClG,EAAA,kBAAA,CAAmB,sBAAA,EAAwB,CAAA,OAAA,KAAW,OAAA,CAAQ,OAA8B,CAAC,CAAA;AAC/F;AAEA,SAAS,kBAAA,CACP,mBACA,SAAA,EACM;AACN,EAAA,MAAA,CAAO,SAAA,GAAY,mBAAmB,SAAS,CAAA;AACjD;AAEA,SAAS,oBAAoB,OAAA,EAAwD;AACnF,EAAA,MAAM,MAAA,uBAAa,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A,CAAM,CAAC,CAAC,CAAA,CAAA;AAAA,EAC/B;AAEA,EAAA,IAAI,CAAC,IAAI,QAAA,CAAS,GAAG,KAAK,CAAC,IAAA,CAAK,UAAA,CAAW,GAAG,CAAA,EAAG;AAC/C,IAAA,OAAO,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA;AAAA,EACvB;AAEA,EAAA,OAAO,CAAA,EAAG,GAAG,CAAA,EAAG,IAAI,CAAA,CAAA;AACtB;;;;"}
@@ -0,0 +1,179 @@
1
+ import { monitorEventLoopDelay, performance } from 'perf_hooks';
2
+ import { defineIntegration, _INTERNAL_safeDateNow, metrics } from '@sentry/core';
3
+ import { _INTERNAL_safeUnref } from '@sentry/core/server';
4
+
5
+ const INTEGRATION_NAME = "NodeRuntimeMetrics";
6
+ const DEFAULT_INTERVAL_MS = 3e4;
7
+ const MIN_COLLECTION_INTERVAL_MS = 1e3;
8
+ const EVENT_LOOP_DELAY_RESOLUTION_MS = 10;
9
+ function _INTERNAL_normalizeCollectionInterval(rawInterval, integrationName, defaultInterval) {
10
+ if (!Number.isFinite(rawInterval)) {
11
+ console.warn(
12
+ `[Sentry] ${integrationName}: collectionIntervalMs (${rawInterval}) is invalid. Using default of ${defaultInterval}ms.`
13
+ );
14
+ return defaultInterval;
15
+ }
16
+ if (rawInterval < MIN_COLLECTION_INTERVAL_MS) {
17
+ console.warn(
18
+ `[Sentry] ${integrationName}: collectionIntervalMs (${rawInterval}) is below the minimum of ${MIN_COLLECTION_INTERVAL_MS}ms. Using minimum of ${MIN_COLLECTION_INTERVAL_MS}ms.`
19
+ );
20
+ return MIN_COLLECTION_INTERVAL_MS;
21
+ }
22
+ return rawInterval;
23
+ }
24
+ const nodeRuntimeMetricsIntegration = defineIntegration((options = {}) => {
25
+ const collectionIntervalMs = _INTERNAL_normalizeCollectionInterval(
26
+ options.collectionIntervalMs ?? DEFAULT_INTERVAL_MS,
27
+ INTEGRATION_NAME,
28
+ DEFAULT_INTERVAL_MS
29
+ );
30
+ const collect = {
31
+ // Default on
32
+ cpuUtilization: true,
33
+ memHeapUsed: true,
34
+ memHeapTotal: true,
35
+ memRss: true,
36
+ eventLoopDelayP50: true,
37
+ eventLoopDelayP99: true,
38
+ eventLoopUtilization: true,
39
+ uptime: true,
40
+ // Default off
41
+ cpuTime: false,
42
+ memExternal: false,
43
+ eventLoopDelayMin: false,
44
+ eventLoopDelayMax: false,
45
+ eventLoopDelayMean: false,
46
+ eventLoopDelayP90: false,
47
+ ...options.collect
48
+ };
49
+ const needsEventLoopDelay = collect.eventLoopDelayP99 || collect.eventLoopDelayMin || collect.eventLoopDelayMax || collect.eventLoopDelayMean || collect.eventLoopDelayP50 || collect.eventLoopDelayP90;
50
+ const needsCpu = collect.cpuUtilization || collect.cpuTime;
51
+ let intervalId;
52
+ let prevCpuUsage;
53
+ let prevElu;
54
+ let prevFlushTime = 0;
55
+ let eventLoopDelayHistogram;
56
+ const resolutionNs = EVENT_LOOP_DELAY_RESOLUTION_MS * 1e6;
57
+ const nsToS = (ns) => Math.max(0, (ns - resolutionNs) / 1e9);
58
+ const METRIC_ATTRIBUTES = { attributes: { "sentry.origin": "auto.node.runtime_metrics" } };
59
+ const METRIC_ATTRIBUTES_BYTE = { unit: "byte", attributes: { "sentry.origin": "auto.node.runtime_metrics" } };
60
+ const METRIC_ATTRIBUTES_SECOND = { unit: "second", attributes: { "sentry.origin": "auto.node.runtime_metrics" } };
61
+ function collectMetrics() {
62
+ const now = _INTERNAL_safeDateNow();
63
+ const elapsed = now - prevFlushTime;
64
+ if (needsCpu && prevCpuUsage !== void 0) {
65
+ const delta = process.cpuUsage(prevCpuUsage);
66
+ if (collect.cpuTime) {
67
+ metrics.gauge("node.runtime.cpu.user", delta.user / 1e6, METRIC_ATTRIBUTES_SECOND);
68
+ metrics.gauge("node.runtime.cpu.system", delta.system / 1e6, METRIC_ATTRIBUTES_SECOND);
69
+ }
70
+ if (collect.cpuUtilization && elapsed > 0) {
71
+ metrics.gauge(
72
+ "node.runtime.cpu.utilization",
73
+ (delta.user + delta.system) / (elapsed * 1e3),
74
+ METRIC_ATTRIBUTES
75
+ );
76
+ }
77
+ prevCpuUsage = process.cpuUsage();
78
+ }
79
+ if (collect.memRss || collect.memHeapUsed || collect.memHeapTotal || collect.memExternal) {
80
+ const mem = process.memoryUsage();
81
+ if (collect.memRss) {
82
+ metrics.gauge("node.runtime.mem.rss", mem.rss, METRIC_ATTRIBUTES_BYTE);
83
+ }
84
+ if (collect.memHeapUsed) {
85
+ metrics.gauge("node.runtime.mem.heap_used", mem.heapUsed, METRIC_ATTRIBUTES_BYTE);
86
+ }
87
+ if (collect.memHeapTotal) {
88
+ metrics.gauge("node.runtime.mem.heap_total", mem.heapTotal, METRIC_ATTRIBUTES_BYTE);
89
+ }
90
+ if (collect.memExternal) {
91
+ metrics.gauge("node.runtime.mem.external", mem.external, METRIC_ATTRIBUTES_BYTE);
92
+ metrics.gauge("node.runtime.mem.array_buffers", mem.arrayBuffers, METRIC_ATTRIBUTES_BYTE);
93
+ }
94
+ }
95
+ if (needsEventLoopDelay && eventLoopDelayHistogram) {
96
+ if (collect.eventLoopDelayMin) {
97
+ metrics.gauge(
98
+ "node.runtime.event_loop.delay.min",
99
+ nsToS(eventLoopDelayHistogram.min),
100
+ METRIC_ATTRIBUTES_SECOND
101
+ );
102
+ }
103
+ if (collect.eventLoopDelayMax) {
104
+ metrics.gauge(
105
+ "node.runtime.event_loop.delay.max",
106
+ nsToS(eventLoopDelayHistogram.max),
107
+ METRIC_ATTRIBUTES_SECOND
108
+ );
109
+ }
110
+ if (collect.eventLoopDelayMean) {
111
+ metrics.gauge(
112
+ "node.runtime.event_loop.delay.mean",
113
+ nsToS(eventLoopDelayHistogram.mean),
114
+ METRIC_ATTRIBUTES_SECOND
115
+ );
116
+ }
117
+ if (collect.eventLoopDelayP50) {
118
+ metrics.gauge(
119
+ "node.runtime.event_loop.delay.p50",
120
+ nsToS(eventLoopDelayHistogram.percentile(50)),
121
+ METRIC_ATTRIBUTES_SECOND
122
+ );
123
+ }
124
+ if (collect.eventLoopDelayP90) {
125
+ metrics.gauge(
126
+ "node.runtime.event_loop.delay.p90",
127
+ nsToS(eventLoopDelayHistogram.percentile(90)),
128
+ METRIC_ATTRIBUTES_SECOND
129
+ );
130
+ }
131
+ if (collect.eventLoopDelayP99) {
132
+ metrics.gauge(
133
+ "node.runtime.event_loop.delay.p99",
134
+ nsToS(eventLoopDelayHistogram.percentile(99)),
135
+ METRIC_ATTRIBUTES_SECOND
136
+ );
137
+ }
138
+ eventLoopDelayHistogram.reset();
139
+ }
140
+ if (collect.eventLoopUtilization && prevElu !== void 0) {
141
+ const currentElu = performance.eventLoopUtilization();
142
+ const delta = performance.eventLoopUtilization(currentElu, prevElu);
143
+ metrics.gauge("node.runtime.event_loop.utilization", delta.utilization, METRIC_ATTRIBUTES);
144
+ prevElu = currentElu;
145
+ }
146
+ if (collect.uptime && elapsed > 0) {
147
+ metrics.count("node.runtime.process.uptime", elapsed / 1e3, METRIC_ATTRIBUTES_SECOND);
148
+ }
149
+ prevFlushTime = now;
150
+ }
151
+ return {
152
+ name: INTEGRATION_NAME,
153
+ setup() {
154
+ if (needsEventLoopDelay) {
155
+ eventLoopDelayHistogram?.disable();
156
+ try {
157
+ eventLoopDelayHistogram = monitorEventLoopDelay({ resolution: EVENT_LOOP_DELAY_RESOLUTION_MS });
158
+ eventLoopDelayHistogram.enable();
159
+ } catch {
160
+ eventLoopDelayHistogram = void 0;
161
+ }
162
+ }
163
+ if (needsCpu) {
164
+ prevCpuUsage = process.cpuUsage();
165
+ }
166
+ if (collect.eventLoopUtilization) {
167
+ prevElu = performance.eventLoopUtilization();
168
+ }
169
+ prevFlushTime = _INTERNAL_safeDateNow();
170
+ if (intervalId) {
171
+ clearInterval(intervalId);
172
+ }
173
+ intervalId = _INTERNAL_safeUnref(setInterval(collectMetrics, collectionIntervalMs));
174
+ }
175
+ };
176
+ });
177
+
178
+ export { _INTERNAL_normalizeCollectionInterval, nodeRuntimeMetricsIntegration };
179
+ //# sourceMappingURL=nodeRuntimeMetrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeRuntimeMetrics.js","sources":["../../../src/integrations/nodeRuntimeMetrics.ts"],"sourcesContent":["import { monitorEventLoopDelay, performance } from 'perf_hooks';\nimport { _INTERNAL_safeDateNow, defineIntegration, metrics } from '@sentry/core';\nimport { _INTERNAL_safeUnref } from '@sentry/core/server';\n\nconst INTEGRATION_NAME = 'NodeRuntimeMetrics' as const;\nconst DEFAULT_INTERVAL_MS = 30_000;\nconst MIN_COLLECTION_INTERVAL_MS = 1_000;\nconst EVENT_LOOP_DELAY_RESOLUTION_MS = 10;\n\n/**\n * Normalizes a `collectionIntervalMs` value, enforcing a minimum of 1000ms.\n * - Non-finite values (NaN, Infinity): warns and falls back to `defaultInterval`.\n * - Values below the minimum: warns and clamps to 1000ms.\n * @internal\n */\nexport function _INTERNAL_normalizeCollectionInterval(\n rawInterval: number,\n integrationName: string,\n defaultInterval: number,\n): number {\n if (!Number.isFinite(rawInterval)) {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] ${integrationName}: collectionIntervalMs (${rawInterval}) is invalid. Using default of ${defaultInterval}ms.`,\n );\n return defaultInterval;\n }\n if (rawInterval < MIN_COLLECTION_INTERVAL_MS) {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] ${integrationName}: collectionIntervalMs (${rawInterval}) is below the minimum of ${MIN_COLLECTION_INTERVAL_MS}ms. Using minimum of ${MIN_COLLECTION_INTERVAL_MS}ms.`,\n );\n return MIN_COLLECTION_INTERVAL_MS;\n }\n return rawInterval;\n}\n\nexport interface NodeRuntimeMetricsOptions {\n /**\n * Which metrics to collect.\n *\n * Default on (8 metrics):\n * - `cpuUtilization` — CPU utilization ratio\n * - `memRss` — Resident Set Size (actual memory footprint)\n * - `memHeapUsed` — V8 heap currently in use\n * - `memHeapTotal` — total V8 heap allocated (headroom paired with `memHeapUsed`)\n * - `eventLoopDelayP50` — median event loop delay (baseline latency)\n * - `eventLoopDelayP99` — 99th percentile event loop delay (tail latency / spikes)\n * - `eventLoopUtilization` — fraction of time the event loop was active\n * - `uptime` — process uptime (detect restarts/crashes)\n *\n * Default off (opt-in):\n * - `cpuTime` — raw user/system CPU time in seconds\n * - `memExternal` — external/ArrayBuffer memory (relevant for native addons)\n * - `eventLoopDelayMin` / `eventLoopDelayMax` / `eventLoopDelayMean` / `eventLoopDelayP90`\n */\n collect?: {\n // Default on\n cpuUtilization?: boolean;\n memHeapUsed?: boolean;\n memRss?: boolean;\n eventLoopDelayP99?: boolean;\n eventLoopUtilization?: boolean;\n uptime?: boolean;\n // Default off\n cpuTime?: boolean;\n memHeapTotal?: boolean;\n memExternal?: boolean;\n eventLoopDelayMin?: boolean;\n eventLoopDelayMax?: boolean;\n eventLoopDelayMean?: boolean;\n eventLoopDelayP50?: boolean;\n eventLoopDelayP90?: boolean;\n };\n /**\n * How often to collect metrics, in milliseconds.\n * Minimum allowed value is 1000ms.\n * @default 30000\n * @minimum 1000\n */\n collectionIntervalMs?: number;\n}\n\n/**\n * Automatically collects Node.js runtime metrics and emits them to Sentry.\n *\n * @example\n * ```ts\n * Sentry.init({\n * integrations: [\n * Sentry.nodeRuntimeMetricsIntegration(),\n * ],\n * });\n * ```\n */\nexport const nodeRuntimeMetricsIntegration = defineIntegration((options: NodeRuntimeMetricsOptions = {}) => {\n const collectionIntervalMs = _INTERNAL_normalizeCollectionInterval(\n options.collectionIntervalMs ?? DEFAULT_INTERVAL_MS,\n INTEGRATION_NAME,\n DEFAULT_INTERVAL_MS,\n );\n const collect = {\n // Default on\n cpuUtilization: true,\n memHeapUsed: true,\n memHeapTotal: true,\n memRss: true,\n eventLoopDelayP50: true,\n eventLoopDelayP99: true,\n eventLoopUtilization: true,\n uptime: true,\n // Default off\n cpuTime: false,\n memExternal: false,\n eventLoopDelayMin: false,\n eventLoopDelayMax: false,\n eventLoopDelayMean: false,\n eventLoopDelayP90: false,\n ...options.collect,\n };\n\n const needsEventLoopDelay =\n collect.eventLoopDelayP99 ||\n collect.eventLoopDelayMin ||\n collect.eventLoopDelayMax ||\n collect.eventLoopDelayMean ||\n collect.eventLoopDelayP50 ||\n collect.eventLoopDelayP90;\n\n const needsCpu = collect.cpuUtilization || collect.cpuTime;\n\n let intervalId: ReturnType<typeof setInterval> | undefined;\n let prevCpuUsage: NodeJS.CpuUsage | undefined;\n let prevElu: ReturnType<typeof performance.eventLoopUtilization> | undefined;\n let prevFlushTime: number = 0;\n let eventLoopDelayHistogram: ReturnType<typeof monitorEventLoopDelay> | undefined;\n\n const resolutionNs = EVENT_LOOP_DELAY_RESOLUTION_MS * 1e6;\n const nsToS = (ns: number): number => Math.max(0, (ns - resolutionNs) / 1e9);\n\n const METRIC_ATTRIBUTES = { attributes: { 'sentry.origin': 'auto.node.runtime_metrics' } };\n const METRIC_ATTRIBUTES_BYTE = { unit: 'byte', attributes: { 'sentry.origin': 'auto.node.runtime_metrics' } };\n const METRIC_ATTRIBUTES_SECOND = { unit: 'second', attributes: { 'sentry.origin': 'auto.node.runtime_metrics' } };\n\n function collectMetrics(): void {\n const now = _INTERNAL_safeDateNow();\n const elapsed = now - prevFlushTime;\n\n if (needsCpu && prevCpuUsage !== undefined) {\n const delta = process.cpuUsage(prevCpuUsage);\n\n if (collect.cpuTime) {\n metrics.gauge('node.runtime.cpu.user', delta.user / 1e6, METRIC_ATTRIBUTES_SECOND);\n metrics.gauge('node.runtime.cpu.system', delta.system / 1e6, METRIC_ATTRIBUTES_SECOND);\n }\n if (collect.cpuUtilization && elapsed > 0) {\n // Ratio of CPU time to wall-clock time. Can exceed 1.0 on multi-core systems.\n // TODO: In cluster mode, add a runtime_id/process_id attribute to disambiguate per-worker metrics.\n metrics.gauge(\n 'node.runtime.cpu.utilization',\n (delta.user + delta.system) / (elapsed * 1000),\n METRIC_ATTRIBUTES,\n );\n }\n\n prevCpuUsage = process.cpuUsage();\n }\n\n if (collect.memRss || collect.memHeapUsed || collect.memHeapTotal || collect.memExternal) {\n const mem = process.memoryUsage();\n if (collect.memRss) {\n metrics.gauge('node.runtime.mem.rss', mem.rss, METRIC_ATTRIBUTES_BYTE);\n }\n if (collect.memHeapUsed) {\n metrics.gauge('node.runtime.mem.heap_used', mem.heapUsed, METRIC_ATTRIBUTES_BYTE);\n }\n if (collect.memHeapTotal) {\n metrics.gauge('node.runtime.mem.heap_total', mem.heapTotal, METRIC_ATTRIBUTES_BYTE);\n }\n if (collect.memExternal) {\n metrics.gauge('node.runtime.mem.external', mem.external, METRIC_ATTRIBUTES_BYTE);\n metrics.gauge('node.runtime.mem.array_buffers', mem.arrayBuffers, METRIC_ATTRIBUTES_BYTE);\n }\n }\n\n if (needsEventLoopDelay && eventLoopDelayHistogram) {\n if (collect.eventLoopDelayMin) {\n metrics.gauge(\n 'node.runtime.event_loop.delay.min',\n nsToS(eventLoopDelayHistogram.min),\n METRIC_ATTRIBUTES_SECOND,\n );\n }\n if (collect.eventLoopDelayMax) {\n metrics.gauge(\n 'node.runtime.event_loop.delay.max',\n nsToS(eventLoopDelayHistogram.max),\n METRIC_ATTRIBUTES_SECOND,\n );\n }\n if (collect.eventLoopDelayMean) {\n metrics.gauge(\n 'node.runtime.event_loop.delay.mean',\n nsToS(eventLoopDelayHistogram.mean),\n METRIC_ATTRIBUTES_SECOND,\n );\n }\n if (collect.eventLoopDelayP50) {\n metrics.gauge(\n 'node.runtime.event_loop.delay.p50',\n nsToS(eventLoopDelayHistogram.percentile(50)),\n METRIC_ATTRIBUTES_SECOND,\n );\n }\n if (collect.eventLoopDelayP90) {\n metrics.gauge(\n 'node.runtime.event_loop.delay.p90',\n nsToS(eventLoopDelayHistogram.percentile(90)),\n METRIC_ATTRIBUTES_SECOND,\n );\n }\n if (collect.eventLoopDelayP99) {\n metrics.gauge(\n 'node.runtime.event_loop.delay.p99',\n nsToS(eventLoopDelayHistogram.percentile(99)),\n METRIC_ATTRIBUTES_SECOND,\n );\n }\n\n eventLoopDelayHistogram.reset();\n }\n\n if (collect.eventLoopUtilization && prevElu !== undefined) {\n const currentElu = performance.eventLoopUtilization();\n const delta = performance.eventLoopUtilization(currentElu, prevElu);\n metrics.gauge('node.runtime.event_loop.utilization', delta.utilization, METRIC_ATTRIBUTES);\n prevElu = currentElu;\n }\n\n if (collect.uptime && elapsed > 0) {\n metrics.count('node.runtime.process.uptime', elapsed / 1000, METRIC_ATTRIBUTES_SECOND);\n }\n\n prevFlushTime = now;\n }\n\n return {\n name: INTEGRATION_NAME,\n\n setup(): void {\n if (needsEventLoopDelay) {\n // Disable any previous histogram before overwriting (prevents native resource leak on re-init).\n eventLoopDelayHistogram?.disable();\n try {\n eventLoopDelayHistogram = monitorEventLoopDelay({ resolution: EVENT_LOOP_DELAY_RESOLUTION_MS });\n eventLoopDelayHistogram.enable();\n } catch {\n // Not available in all runtimes (e.g. Bun throws NotImplementedError).\n eventLoopDelayHistogram = undefined;\n }\n }\n\n // Prime baselines before the first collection interval.\n if (needsCpu) {\n prevCpuUsage = process.cpuUsage();\n }\n if (collect.eventLoopUtilization) {\n prevElu = performance.eventLoopUtilization();\n }\n prevFlushTime = _INTERNAL_safeDateNow();\n\n // Guard against double setup (e.g. re-init).\n if (intervalId) {\n clearInterval(intervalId);\n }\n intervalId = _INTERNAL_safeUnref(setInterval(collectMetrics, collectionIntervalMs));\n },\n };\n});\n"],"names":[],"mappings":";;;;AAIA,MAAM,gBAAA,GAAmB,oBAAA;AACzB,MAAM,mBAAA,GAAsB,GAAA;AAC5B,MAAM,0BAAA,GAA6B,GAAA;AACnC,MAAM,8BAAA,GAAiC,EAAA;AAQhC,SAAS,qCAAA,CACd,WAAA,EACA,eAAA,EACA,eAAA,EACQ;AACR,EAAA,IAAI,CAAC,MAAA,CAAO,QAAA,CAAS,WAAW,CAAA,EAAG;AAEjC,IAAA,OAAA,CAAQ,IAAA;AAAA,MACN,CAAA,SAAA,EAAY,eAAe,CAAA,wBAAA,EAA2B,WAAW,kCAAkC,eAAe,CAAA,GA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AA;AAAA,IACZ;AAEA,IAAA,IAAI,OAAA,CAAQ,MAAA,IAAU,OAAA,GAAU,CAAA,EAAG;AACjC,MAAA,OAAA,CAAQ,KAAA,CAAM,6BAAA,EAA+B,OAAA,GAAU,GAAA,EAAM,wBAAwB,CAAA;AAAA,IACvF;AAEA,IAAA,aAAA,GAAgB,GAAA;AAAA,EAClB;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IAEN,KAAA,GAAc;AACZ,MAAA,IAAI,mBAAA,EAAqB;AAEvB,QAAA,uBAAA,EAAyB,OAAA,EAAQ;AACjC,QAAA,IAAI;AACF,UAAA,uBAAA,GAA0B,qBAAA,CAAsB,EAAE,UAAA,EAAY,8BAAA,EAAgC,CAAA;AAC9F,UAAA,uBAAA,CAAwB,MAAA,EAAO;AAAA,QACjC,CAAA,CAAA,MAAQ;AAEN,UAAA,uBAAA,GAA0B,MAAA;AAAA,QAC5B;AAAA,MACF;AAGA,MAAA,IAAI,QAAA,EAAU;AACZ,QAAA,YAAA,GAAe,QAAQ,QAAA,EAAS;AAAA,MAClC;AACA,MAAA,IAAI,QAAQ,oBAAA,EAAsB;AAChC,QAAA,OAAA,GAAU,YAAY,oBAAA,EAAqB;AAAA,MAC7C;AACA,MAAA,aAAA,GAAgB,qBAAA,EAAsB;AAGtC,MAAA,IAAI,UAAA,EAAY;AACd,QAAA,aAAA,CAAc,UAAU,CAAA;AAAA,MAC1B;AACA,MAAA,UAAA,GAAa,mBAAA,CAAoB,WAAA,CAAY,cAAA,EAAgB,oBAAoB,CAAC,CAAA;AAAA,IACpF;AAAA,GACF;AACF,CAAC;;;;"}
@@ -0,0 +1,89 @@
1
+ import { defineIntegration, getClient, captureException, debug } from '@sentry/core';
2
+ import { isMainThread } from 'worker_threads';
3
+ import { DEBUG_BUILD } from '../debug-build.js';
4
+ import { logAndExitProcess } from '../utils/errorhandling.js';
5
+
6
+ const INTEGRATION_NAME = "OnUncaughtException";
7
+ const onUncaughtExceptionIntegration = defineIntegration((options = {}) => {
8
+ const optionsWithDefaults = {
9
+ exitEvenIfOtherHandlersAreRegistered: false,
10
+ ...options
11
+ };
12
+ return {
13
+ name: INTEGRATION_NAME,
14
+ setup(client) {
15
+ if (!isMainThread) {
16
+ return;
17
+ }
18
+ global.process.on("uncaughtException", makeErrorHandler(client, optionsWithDefaults));
19
+ }
20
+ };
21
+ });
22
+ function makeErrorHandler(client, options) {
23
+ const timeout = 2e3;
24
+ let caughtFirstError = false;
25
+ let caughtSecondError = false;
26
+ let calledFatalError = false;
27
+ let firstError;
28
+ const clientOptions = client.getOptions();
29
+ return Object.assign(
30
+ (error) => {
31
+ let onFatalError = logAndExitProcess;
32
+ if (options.onFatalError) {
33
+ onFatalError = options.onFatalError;
34
+ } else if (clientOptions.onFatalError) {
35
+ onFatalError = clientOptions.onFatalError;
36
+ }
37
+ const userProvidedListenersCount = global.process.listeners("uncaughtException").filter((listener) => {
38
+ return (
39
+ // as soon as we're using domains this listener is attached by node itself
40
+ listener.name !== "domainUncaughtExceptionClear" && // the handler we register in this integration
41
+ listener._errorHandler !== true
42
+ );
43
+ }).length;
44
+ const processWouldExit = userProvidedListenersCount === 0;
45
+ const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;
46
+ if (!caughtFirstError) {
47
+ firstError = error;
48
+ caughtFirstError = true;
49
+ if (getClient() === client) {
50
+ captureException(error, {
51
+ originalException: error,
52
+ captureContext: {
53
+ level: "fatal"
54
+ },
55
+ mechanism: {
56
+ handled: false,
57
+ type: "auto.node.onuncaughtexception"
58
+ }
59
+ });
60
+ }
61
+ if (!calledFatalError && shouldApplyFatalHandlingLogic) {
62
+ calledFatalError = true;
63
+ onFatalError(error);
64
+ }
65
+ } else {
66
+ if (shouldApplyFatalHandlingLogic) {
67
+ if (calledFatalError) {
68
+ DEBUG_BUILD && debug.warn(
69
+ "uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"
70
+ );
71
+ logAndExitProcess(error);
72
+ } else if (!caughtSecondError) {
73
+ caughtSecondError = true;
74
+ setTimeout(() => {
75
+ if (!calledFatalError) {
76
+ calledFatalError = true;
77
+ onFatalError(firstError, error);
78
+ }
79
+ }, timeout);
80
+ }
81
+ }
82
+ }
83
+ },
84
+ { _errorHandler: true }
85
+ );
86
+ }
87
+
88
+ export { makeErrorHandler, onUncaughtExceptionIntegration };
89
+ //# sourceMappingURL=onuncaughtexception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onuncaughtexception.js","sources":["../../../src/integrations/onuncaughtexception.ts"],"sourcesContent":["import { captureException, debug, defineIntegration, getClient } from '@sentry/core';\nimport { isMainThread } from 'worker_threads';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { NodeClient } from '../sdk/client';\nimport { logAndExitProcess } from '../utils/errorhandling';\n\ntype OnFatalErrorHandler = (firstError: Error, secondError?: Error) => void;\n\ninterface OnUncaughtExceptionOptions {\n /**\n * Controls if the SDK should register a handler to exit the process on uncaught errors:\n * - `true`: The SDK will exit the process on all uncaught errors.\n * - `false`: The SDK will only exit the process when there are no other `uncaughtException` handlers attached.\n *\n * Default: `false`\n */\n exitEvenIfOtherHandlersAreRegistered: boolean;\n\n /**\n * This is called when an uncaught error would cause the process to exit.\n *\n * @param firstError Uncaught error causing the process to exit\n * @param secondError Will be set if the handler was called multiple times. This can happen either because\n * `onFatalError` itself threw, or because an independent error happened somewhere else while `onFatalError`\n * was running.\n */\n onFatalError?(this: void, firstError: Error, secondError?: Error): void;\n}\n\nconst INTEGRATION_NAME = 'OnUncaughtException' as const;\n\n/**\n * Add a global exception handler.\n */\nexport const onUncaughtExceptionIntegration = defineIntegration((options: Partial<OnUncaughtExceptionOptions> = {}) => {\n const optionsWithDefaults = {\n exitEvenIfOtherHandlersAreRegistered: false,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setup(client: NodeClient) {\n // errors in worker threads are already handled by the childProcessIntegration\n // also we don't want to exit the Node process on worker thread errors\n if (!isMainThread) {\n return;\n }\n\n global.process.on('uncaughtException', makeErrorHandler(client, optionsWithDefaults));\n },\n };\n});\n\ntype ErrorHandler = { _errorHandler: boolean } & ((error: Error) => void);\n\n/** Exported only for tests */\nexport function makeErrorHandler(client: NodeClient, options: OnUncaughtExceptionOptions): ErrorHandler {\n const timeout = 2000;\n let caughtFirstError: boolean = false;\n let caughtSecondError: boolean = false;\n let calledFatalError: boolean = false;\n let firstError: Error;\n\n const clientOptions = client.getOptions();\n\n return Object.assign(\n (error: Error): void => {\n let onFatalError: OnFatalErrorHandler = logAndExitProcess;\n\n if (options.onFatalError) {\n onFatalError = options.onFatalError;\n } else if (clientOptions.onFatalError) {\n onFatalError = clientOptions.onFatalError;\n }\n\n // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not\n // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust\n // exit behaviour of the SDK accordingly:\n // - If other listeners are attached, do not exit.\n // - If the only listener attached is ours, exit.\n const userProvidedListenersCount = global.process.listeners('uncaughtException').filter(listener => {\n // There are 3 listeners we ignore:\n return (\n // as soon as we're using domains this listener is attached by node itself\n listener.name !== 'domainUncaughtExceptionClear' &&\n // the handler we register in this integration\n (listener as ErrorHandler)._errorHandler !== true\n );\n }).length;\n\n const processWouldExit = userProvidedListenersCount === 0;\n const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;\n\n if (!caughtFirstError) {\n // this is the first uncaught error and the ultimate reason for shutting down\n // we want to do absolutely everything possible to ensure it gets captured\n // also we want to make sure we don't go recursion crazy if more errors happen after this one\n firstError = error;\n caughtFirstError = true;\n\n if (getClient() === client) {\n captureException(error, {\n originalException: error,\n captureContext: {\n level: 'fatal',\n },\n mechanism: {\n handled: false,\n type: 'auto.node.onuncaughtexception',\n },\n });\n }\n\n if (!calledFatalError && shouldApplyFatalHandlingLogic) {\n calledFatalError = true;\n onFatalError(error);\n }\n } else {\n if (shouldApplyFatalHandlingLogic) {\n if (calledFatalError) {\n // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down\n DEBUG_BUILD &&\n debug.warn(\n 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown',\n );\n logAndExitProcess(error);\n } else if (!caughtSecondError) {\n // two cases for how we can hit this branch:\n // - capturing of first error blew up and we just caught the exception from that\n // - quit trying to capture, proceed with shutdown\n // - a second independent error happened while waiting for first error to capture\n // - want to avoid causing premature shutdown before first error capture finishes\n // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff\n // so let's instead just delay a bit before we proceed with our action here\n // in case 1, we just wait a bit unnecessarily but ultimately do the same thing\n // in case 2, the delay hopefully made us wait long enough for the capture to finish\n // two potential nonideal outcomes:\n // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError\n // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error\n // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError)\n // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish\n caughtSecondError = true;\n setTimeout(() => {\n if (!calledFatalError) {\n // it was probably case 1, let's treat err as the sendErr and call onFatalError\n calledFatalError = true;\n onFatalError(firstError, error);\n } else {\n // it was probably case 2, our first error finished capturing while we waited, cool, do nothing\n }\n }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc\n }\n }\n }\n },\n { _errorHandler: true },\n );\n}\n"],"names":[],"mappings":";;;;;AA6BA,MAAM,gBAAA,GAAmB,qBAAA;AAKlB,MAAM,8BAAA,GAAiC,iBAAA,CAAkB,CAAC,OAAA,GAA+C,EAAC,KAAM;AACrH,EAAA,MAAM,mBAAA,GAAsB;AAAA,IAC1B,oCAAA,EAAsC,KAAA;AAAA,IACtC,GAAG;AAAA,GACL;AAEA,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAoB;A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