@sentry/server-utils 10.65.0 → 10.66.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 (301) hide show
  1. package/build/cjs/graphql/graphql-dc-subscriber.js +2 -4
  2. package/build/cjs/graphql/graphql-dc-subscriber.js.map +1 -1
  3. package/build/cjs/graphql/utils.js +7 -1
  4. package/build/cjs/graphql/utils.js.map +1 -1
  5. package/build/cjs/index.js +11 -8
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/integrations/tracing-channel/dataloader.js +95 -0
  8. package/build/cjs/integrations/tracing-channel/dataloader.js.map +1 -0
  9. package/build/cjs/integrations/tracing-channel/generic-pool.js +34 -0
  10. package/build/cjs/integrations/tracing-channel/generic-pool.js.map +1 -0
  11. package/build/cjs/integrations/tracing-channel/graphql/spans.js +2 -2
  12. package/build/cjs/integrations/tracing-channel/graphql/spans.js.map +1 -1
  13. package/build/cjs/integrations/tracing-channel/ioredis.js +29 -26
  14. package/build/cjs/integrations/tracing-channel/ioredis.js.map +1 -1
  15. package/build/cjs/integrations/tracing-channel/kafkajs/consumer.js +71 -0
  16. package/build/cjs/integrations/tracing-channel/kafkajs/consumer.js.map +1 -0
  17. package/build/cjs/integrations/tracing-channel/kafkajs/index.js +70 -0
  18. package/build/cjs/integrations/tracing-channel/kafkajs/index.js.map +1 -0
  19. package/build/cjs/integrations/tracing-channel/kafkajs/semconv.js +22 -0
  20. package/build/cjs/integrations/tracing-channel/kafkajs/semconv.js.map +1 -0
  21. package/build/cjs/integrations/tracing-channel/kafkajs/spans.js +119 -0
  22. package/build/cjs/integrations/tracing-channel/kafkajs/spans.js.map +1 -0
  23. package/build/cjs/integrations/tracing-channel/knex.js +188 -0
  24. package/build/cjs/integrations/tracing-channel/knex.js.map +1 -0
  25. package/build/cjs/integrations/tracing-channel/mysql2.js +83 -0
  26. package/build/cjs/integrations/tracing-channel/mysql2.js.map +1 -0
  27. package/build/cjs/orchestrion/bundler/esbuild.js +11 -0
  28. package/build/cjs/orchestrion/bundler/esbuild.js.map +1 -0
  29. package/build/cjs/orchestrion/bundler/options.js +15 -0
  30. package/build/cjs/orchestrion/bundler/options.js.map +1 -0
  31. package/build/cjs/orchestrion/bundler/rollup.js +11 -0
  32. package/build/cjs/orchestrion/bundler/rollup.js.map +1 -0
  33. package/build/cjs/orchestrion/bundler/vite.js +4 -21
  34. package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
  35. package/build/cjs/orchestrion/bundler/webpack.js +32 -0
  36. package/build/cjs/orchestrion/bundler/webpack.js.map +1 -0
  37. package/build/cjs/orchestrion/channels.js +50 -20
  38. package/build/cjs/orchestrion/channels.js.map +1 -1
  39. package/build/cjs/orchestrion/config/dataloader.js +53 -0
  40. package/build/cjs/orchestrion/config/dataloader.js.map +1 -0
  41. package/build/cjs/orchestrion/config/firebase.js +8 -0
  42. package/build/cjs/orchestrion/config/firebase.js.map +1 -0
  43. package/build/cjs/orchestrion/config/generic-pool.js +21 -0
  44. package/build/cjs/orchestrion/config/generic-pool.js.map +1 -0
  45. package/build/cjs/orchestrion/config/index.js +55 -23
  46. package/build/cjs/orchestrion/config/index.js.map +1 -1
  47. package/build/cjs/orchestrion/config/kafkajs.js +30 -0
  48. package/build/cjs/orchestrion/config/kafkajs.js.map +1 -0
  49. package/build/cjs/orchestrion/config/knex.js +43 -0
  50. package/build/cjs/orchestrion/config/knex.js.map +1 -0
  51. package/build/cjs/orchestrion/config/langchain.js +8 -0
  52. package/build/cjs/orchestrion/config/langchain.js.map +1 -0
  53. package/build/cjs/orchestrion/config/langgraph.js +8 -0
  54. package/build/cjs/orchestrion/config/langgraph.js.map +1 -0
  55. package/build/cjs/orchestrion/config/mongodb.js +8 -0
  56. package/build/cjs/orchestrion/config/mongodb.js.map +1 -0
  57. package/build/cjs/orchestrion/config/mongoose.js +8 -0
  58. package/build/cjs/orchestrion/config/mongoose.js.map +1 -0
  59. package/build/cjs/orchestrion/config/mysql2.js +32 -0
  60. package/build/cjs/orchestrion/config/mysql2.js.map +1 -0
  61. package/build/cjs/orchestrion/config/nestjs.js +122 -0
  62. package/build/cjs/orchestrion/config/nestjs.js.map +1 -0
  63. package/build/cjs/orchestrion/config/prisma.js +8 -0
  64. package/build/cjs/orchestrion/config/prisma.js.map +1 -0
  65. package/build/cjs/orchestrion/config/react-router.js +8 -0
  66. package/build/cjs/orchestrion/config/react-router.js.map +1 -0
  67. package/build/cjs/orchestrion/config/remix.js +8 -0
  68. package/build/cjs/orchestrion/config/remix.js.map +1 -0
  69. package/build/cjs/orchestrion/config/tedious.js +8 -0
  70. package/build/cjs/orchestrion/config/tedious.js.map +1 -0
  71. package/build/cjs/orchestrion/detect.js +12 -11
  72. package/build/cjs/orchestrion/detect.js.map +1 -1
  73. package/build/cjs/orchestrion/index.js +16 -1
  74. package/build/cjs/orchestrion/index.js.map +1 -1
  75. package/build/cjs/orchestrion/runtime/register.js +25 -14
  76. package/build/cjs/orchestrion/runtime/register.js.map +1 -1
  77. package/build/cjs/prisma/global.js +14 -0
  78. package/build/cjs/prisma/global.js.map +1 -0
  79. package/build/cjs/prisma/index.js +27 -0
  80. package/build/cjs/prisma/index.js.map +1 -0
  81. package/build/cjs/prisma/tracing-helper.js +211 -0
  82. package/build/cjs/prisma/tracing-helper.js.map +1 -0
  83. package/build/cjs/vercel-ai/util.js +0 -11
  84. package/build/cjs/vercel-ai/util.js.map +1 -1
  85. package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js +9 -9
  86. package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
  87. package/build/esm/graphql/graphql-dc-subscriber.js +3 -5
  88. package/build/esm/graphql/graphql-dc-subscriber.js.map +1 -1
  89. package/build/esm/graphql/utils.js +8 -2
  90. package/build/esm/graphql/utils.js.map +1 -1
  91. package/build/esm/index.js +1 -0
  92. package/build/esm/index.js.map +1 -1
  93. package/build/esm/integrations/tracing-channel/dataloader.js +93 -0
  94. package/build/esm/integrations/tracing-channel/dataloader.js.map +1 -0
  95. package/build/esm/integrations/tracing-channel/generic-pool.js +32 -0
  96. package/build/esm/integrations/tracing-channel/generic-pool.js.map +1 -0
  97. package/build/esm/integrations/tracing-channel/graphql/spans.js +3 -3
  98. package/build/esm/integrations/tracing-channel/graphql/spans.js.map +1 -1
  99. package/build/esm/integrations/tracing-channel/ioredis.js +29 -27
  100. package/build/esm/integrations/tracing-channel/ioredis.js.map +1 -1
  101. package/build/esm/integrations/tracing-channel/kafkajs/consumer.js +67 -0
  102. package/build/esm/integrations/tracing-channel/kafkajs/consumer.js.map +1 -0
  103. package/build/esm/integrations/tracing-channel/kafkajs/index.js +68 -0
  104. package/build/esm/integrations/tracing-channel/kafkajs/index.js.map +1 -0
  105. package/build/esm/integrations/tracing-channel/kafkajs/semconv.js +12 -0
  106. package/build/esm/integrations/tracing-channel/kafkajs/semconv.js.map +1 -0
  107. package/build/esm/integrations/tracing-channel/kafkajs/spans.js +112 -0
  108. package/build/esm/integrations/tracing-channel/kafkajs/spans.js.map +1 -0
  109. package/build/esm/integrations/tracing-channel/knex.js +186 -0
  110. package/build/esm/integrations/tracing-channel/knex.js.map +1 -0
  111. package/build/esm/integrations/tracing-channel/mysql2.js +81 -0
  112. package/build/esm/integrations/tracing-channel/mysql2.js.map +1 -0
  113. package/build/esm/orchestrion/bundler/esbuild.js +9 -0
  114. package/build/esm/orchestrion/bundler/esbuild.js.map +1 -0
  115. package/build/esm/orchestrion/bundler/options.js +13 -0
  116. package/build/esm/orchestrion/bundler/options.js.map +1 -0
  117. package/build/esm/orchestrion/bundler/rollup.js +9 -0
  118. package/build/esm/orchestrion/bundler/rollup.js.map +1 -0
  119. package/build/esm/orchestrion/bundler/vite.js +5 -22
  120. package/build/esm/orchestrion/bundler/vite.js.map +1 -1
  121. package/build/esm/orchestrion/bundler/webpack.js +27 -0
  122. package/build/esm/orchestrion/bundler/webpack.js.map +1 -0
  123. package/build/esm/orchestrion/channels.js +50 -20
  124. package/build/esm/orchestrion/channels.js.map +1 -1
  125. package/build/esm/orchestrion/config/dataloader.js +50 -0
  126. package/build/esm/orchestrion/config/dataloader.js.map +1 -0
  127. package/build/esm/orchestrion/config/firebase.js +5 -0
  128. package/build/esm/orchestrion/config/firebase.js.map +1 -0
  129. package/build/esm/orchestrion/config/generic-pool.js +18 -0
  130. package/build/esm/orchestrion/config/generic-pool.js.map +1 -0
  131. package/build/esm/orchestrion/config/index.js +55 -24
  132. package/build/esm/orchestrion/config/index.js.map +1 -1
  133. package/build/esm/orchestrion/config/kafkajs.js +27 -0
  134. package/build/esm/orchestrion/config/kafkajs.js.map +1 -0
  135. package/build/esm/orchestrion/config/knex.js +40 -0
  136. package/build/esm/orchestrion/config/knex.js.map +1 -0
  137. package/build/esm/orchestrion/config/langchain.js +5 -0
  138. package/build/esm/orchestrion/config/langchain.js.map +1 -0
  139. package/build/esm/orchestrion/config/langgraph.js +5 -0
  140. package/build/esm/orchestrion/config/langgraph.js.map +1 -0
  141. package/build/esm/orchestrion/config/mongodb.js +5 -0
  142. package/build/esm/orchestrion/config/mongodb.js.map +1 -0
  143. package/build/esm/orchestrion/config/mongoose.js +5 -0
  144. package/build/esm/orchestrion/config/mongoose.js.map +1 -0
  145. package/build/esm/orchestrion/config/mysql2.js +29 -0
  146. package/build/esm/orchestrion/config/mysql2.js.map +1 -0
  147. package/build/esm/orchestrion/config/nestjs.js +119 -0
  148. package/build/esm/orchestrion/config/nestjs.js.map +1 -0
  149. package/build/esm/orchestrion/config/prisma.js +5 -0
  150. package/build/esm/orchestrion/config/prisma.js.map +1 -0
  151. package/build/esm/orchestrion/config/react-router.js +5 -0
  152. package/build/esm/orchestrion/config/react-router.js.map +1 -0
  153. package/build/esm/orchestrion/config/remix.js +5 -0
  154. package/build/esm/orchestrion/config/remix.js.map +1 -0
  155. package/build/esm/orchestrion/config/tedious.js +5 -0
  156. package/build/esm/orchestrion/config/tedious.js.map +1 -0
  157. package/build/esm/orchestrion/detect.js +13 -12
  158. package/build/esm/orchestrion/detect.js.map +1 -1
  159. package/build/esm/orchestrion/index.js +11 -2
  160. package/build/esm/orchestrion/index.js.map +1 -1
  161. package/build/esm/orchestrion/runtime/register.js +27 -16
  162. package/build/esm/orchestrion/runtime/register.js.map +1 -1
  163. package/build/esm/package.json +1 -1
  164. package/build/esm/prisma/global.js +12 -0
  165. package/build/esm/prisma/global.js.map +1 -0
  166. package/build/esm/prisma/index.js +24 -0
  167. package/build/esm/prisma/index.js.map +1 -0
  168. package/build/esm/prisma/tracing-helper.js +209 -0
  169. package/build/esm/prisma/tracing-helper.js.map +1 -0
  170. package/build/esm/vercel-ai/util.js +1 -11
  171. package/build/esm/vercel-ai/util.js.map +1 -1
  172. package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js +11 -11
  173. package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
  174. package/build/types/graphql/utils.d.ts +2 -6
  175. package/build/types/graphql/utils.d.ts.map +1 -1
  176. package/build/types/index.d.ts +2 -0
  177. package/build/types/index.d.ts.map +1 -1
  178. package/build/types/integrations/tracing-channel/dataloader.d.ts +11 -0
  179. package/build/types/integrations/tracing-channel/dataloader.d.ts.map +1 -0
  180. package/build/types/integrations/tracing-channel/generic-pool.d.ts +10 -0
  181. package/build/types/integrations/tracing-channel/generic-pool.d.ts.map +1 -0
  182. package/build/types/integrations/tracing-channel/ioredis.d.ts +20 -0
  183. package/build/types/integrations/tracing-channel/ioredis.d.ts.map +1 -1
  184. package/build/types/integrations/tracing-channel/kafkajs/consumer.d.ts +8 -0
  185. package/build/types/integrations/tracing-channel/kafkajs/consumer.d.ts.map +1 -0
  186. package/build/types/integrations/tracing-channel/kafkajs/index.d.ts +17 -0
  187. package/build/types/integrations/tracing-channel/kafkajs/index.d.ts.map +1 -0
  188. package/build/types/integrations/tracing-channel/kafkajs/semconv.d.ts +10 -0
  189. package/build/types/integrations/tracing-channel/kafkajs/semconv.d.ts.map +1 -0
  190. package/build/types/integrations/tracing-channel/kafkajs/spans.d.ts +38 -0
  191. package/build/types/integrations/tracing-channel/kafkajs/spans.d.ts.map +1 -0
  192. package/build/types/integrations/tracing-channel/kafkajs/types.d.ts +40 -0
  193. package/build/types/integrations/tracing-channel/kafkajs/types.d.ts.map +1 -0
  194. package/build/types/integrations/tracing-channel/knex.d.ts +11 -0
  195. package/build/types/integrations/tracing-channel/knex.d.ts.map +1 -0
  196. package/build/types/integrations/tracing-channel/mysql2.d.ts +15 -0
  197. package/build/types/integrations/tracing-channel/mysql2.d.ts.map +1 -0
  198. package/build/types/orchestrion/bundler/esbuild.d.ts +21 -0
  199. package/build/types/orchestrion/bundler/esbuild.d.ts.map +1 -0
  200. package/build/types/orchestrion/bundler/options.d.ts +19 -0
  201. package/build/types/orchestrion/bundler/options.d.ts.map +1 -0
  202. package/build/types/orchestrion/bundler/rollup.d.ts +17 -0
  203. package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -0
  204. package/build/types/orchestrion/bundler/vite.d.ts +4 -17
  205. package/build/types/orchestrion/bundler/vite.d.ts.map +1 -1
  206. package/build/types/orchestrion/bundler/webpack.d.ts +19 -0
  207. package/build/types/orchestrion/bundler/webpack.d.ts.map +1 -0
  208. package/build/types/orchestrion/channels.d.ts +64 -37
  209. package/build/types/orchestrion/channels.d.ts.map +1 -1
  210. package/build/types/orchestrion/config/dataloader.d.ts +46 -0
  211. package/build/types/orchestrion/config/dataloader.d.ts.map +1 -0
  212. package/build/types/orchestrion/config/firebase.d.ts +4 -0
  213. package/build/types/orchestrion/config/firebase.d.ts.map +1 -0
  214. package/build/types/orchestrion/config/generic-pool.d.ts +31 -0
  215. package/build/types/orchestrion/config/generic-pool.d.ts.map +1 -0
  216. package/build/types/orchestrion/config/index.d.ts +18 -5
  217. package/build/types/orchestrion/config/index.d.ts.map +1 -1
  218. package/build/types/orchestrion/config/kafkajs.d.ts +17 -0
  219. package/build/types/orchestrion/config/kafkajs.d.ts.map +1 -0
  220. package/build/types/orchestrion/config/knex.d.ts +9 -0
  221. package/build/types/orchestrion/config/knex.d.ts.map +1 -0
  222. package/build/types/orchestrion/config/langchain.d.ts +4 -0
  223. package/build/types/orchestrion/config/langchain.d.ts.map +1 -0
  224. package/build/types/orchestrion/config/langgraph.d.ts +4 -0
  225. package/build/types/orchestrion/config/langgraph.d.ts.map +1 -0
  226. package/build/types/orchestrion/config/mongodb.d.ts +4 -0
  227. package/build/types/orchestrion/config/mongodb.d.ts.map +1 -0
  228. package/build/types/orchestrion/config/mongoose.d.ts +4 -0
  229. package/build/types/orchestrion/config/mongoose.d.ts.map +1 -0
  230. package/build/types/orchestrion/config/mysql2.d.ts +18 -0
  231. package/build/types/orchestrion/config/mysql2.d.ts.map +1 -0
  232. package/build/types/orchestrion/config/nestjs.d.ts +24 -0
  233. package/build/types/orchestrion/config/nestjs.d.ts.map +1 -0
  234. package/build/types/orchestrion/config/prisma.d.ts +4 -0
  235. package/build/types/orchestrion/config/prisma.d.ts.map +1 -0
  236. package/build/types/orchestrion/config/react-router.d.ts +4 -0
  237. package/build/types/orchestrion/config/react-router.d.ts.map +1 -0
  238. package/build/types/orchestrion/config/remix.d.ts +4 -0
  239. package/build/types/orchestrion/config/remix.d.ts.map +1 -0
  240. package/build/types/orchestrion/config/tedious.d.ts +4 -0
  241. package/build/types/orchestrion/config/tedious.d.ts.map +1 -0
  242. package/build/types/orchestrion/detect.d.ts +3 -10
  243. package/build/types/orchestrion/detect.d.ts.map +1 -1
  244. package/build/types/orchestrion/index.d.ts +25 -1
  245. package/build/types/orchestrion/index.d.ts.map +1 -1
  246. package/build/types/orchestrion/runtime/register.d.ts +11 -9
  247. package/build/types/orchestrion/runtime/register.d.ts.map +1 -1
  248. package/build/types/prisma/global.d.ts +5 -0
  249. package/build/types/prisma/global.d.ts.map +1 -0
  250. package/build/types/prisma/index.d.ts +45 -0
  251. package/build/types/prisma/index.d.ts.map +1 -0
  252. package/build/types/prisma/tracing-helper.d.ts +46 -0
  253. package/build/types/prisma/tracing-helper.d.ts.map +1 -0
  254. package/build/types/prisma/types.d.ts +37 -0
  255. package/build/types/prisma/types.d.ts.map +1 -0
  256. package/build/types/vercel-ai/util.d.ts +0 -2
  257. package/build/types/vercel-ai/util.d.ts.map +1 -1
  258. package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
  259. package/build/types-ts3.8/graphql/utils.d.ts +2 -6
  260. package/build/types-ts3.8/index.d.ts +2 -0
  261. package/build/types-ts3.8/integrations/tracing-channel/dataloader.d.ts +11 -0
  262. package/build/types-ts3.8/integrations/tracing-channel/generic-pool.d.ts +10 -0
  263. package/build/types-ts3.8/integrations/tracing-channel/ioredis.d.ts +20 -0
  264. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/consumer.d.ts +8 -0
  265. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/index.d.ts +17 -0
  266. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/semconv.d.ts +10 -0
  267. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/spans.d.ts +38 -0
  268. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/types.d.ts +40 -0
  269. package/build/types-ts3.8/integrations/tracing-channel/knex.d.ts +11 -0
  270. package/build/types-ts3.8/integrations/tracing-channel/mysql2.d.ts +15 -0
  271. package/build/types-ts3.8/orchestrion/bundler/esbuild.d.ts +21 -0
  272. package/build/types-ts3.8/orchestrion/bundler/options.d.ts +19 -0
  273. package/build/types-ts3.8/orchestrion/bundler/rollup.d.ts +17 -0
  274. package/build/types-ts3.8/orchestrion/bundler/vite.d.ts +4 -17
  275. package/build/types-ts3.8/orchestrion/bundler/webpack.d.ts +19 -0
  276. package/build/types-ts3.8/orchestrion/channels.d.ts +64 -37
  277. package/build/types-ts3.8/orchestrion/config/dataloader.d.ts +46 -0
  278. package/build/types-ts3.8/orchestrion/config/firebase.d.ts +4 -0
  279. package/build/types-ts3.8/orchestrion/config/generic-pool.d.ts +31 -0
  280. package/build/types-ts3.8/orchestrion/config/index.d.ts +18 -5
  281. package/build/types-ts3.8/orchestrion/config/kafkajs.d.ts +17 -0
  282. package/build/types-ts3.8/orchestrion/config/knex.d.ts +9 -0
  283. package/build/types-ts3.8/orchestrion/config/langchain.d.ts +4 -0
  284. package/build/types-ts3.8/orchestrion/config/langgraph.d.ts +4 -0
  285. package/build/types-ts3.8/orchestrion/config/mongodb.d.ts +4 -0
  286. package/build/types-ts3.8/orchestrion/config/mongoose.d.ts +4 -0
  287. package/build/types-ts3.8/orchestrion/config/mysql2.d.ts +18 -0
  288. package/build/types-ts3.8/orchestrion/config/nestjs.d.ts +24 -0
  289. package/build/types-ts3.8/orchestrion/config/prisma.d.ts +4 -0
  290. package/build/types-ts3.8/orchestrion/config/react-router.d.ts +4 -0
  291. package/build/types-ts3.8/orchestrion/config/remix.d.ts +4 -0
  292. package/build/types-ts3.8/orchestrion/config/tedious.d.ts +4 -0
  293. package/build/types-ts3.8/orchestrion/detect.d.ts +3 -10
  294. package/build/types-ts3.8/orchestrion/index.d.ts +25 -1
  295. package/build/types-ts3.8/orchestrion/runtime/register.d.ts +11 -9
  296. package/build/types-ts3.8/prisma/global.d.ts +5 -0
  297. package/build/types-ts3.8/prisma/index.d.ts +45 -0
  298. package/build/types-ts3.8/prisma/tracing-helper.d.ts +52 -0
  299. package/build/types-ts3.8/prisma/types.d.ts +40 -0
  300. package/build/types-ts3.8/vercel-ai/util.d.ts +0 -2
  301. package/package.json +41 -8
@@ -0,0 +1,52 @@
1
+ import { Span } from '@sentry/core';
2
+ import { EngineSpan, ExtendedSpanOptions, SpanCallback, TracingHelper } from './types';
3
+ type Options = {
4
+ ignoreSpanTypes: (string | RegExp)[];
5
+ };
6
+ type V5EngineSpanEvent = {
7
+ span: boolean;
8
+ spans: V5EngineSpan[];
9
+ };
10
+ type V5EngineSpanKind = 'client' | 'internal';
11
+ type V5EngineSpan = {
12
+ span: boolean;
13
+ name: string;
14
+ trace_id: string;
15
+ span_id: string;
16
+ parent_span_id: string;
17
+ start_time: [
18
+ number,
19
+ number
20
+ ];
21
+ end_time: [
22
+ number,
23
+ number
24
+ ];
25
+ attributes?: Record<string, string>;
26
+ links?: {
27
+ trace_id: string;
28
+ span_id: string;
29
+ }[];
30
+ kind: V5EngineSpanKind;
31
+ };
32
+ /**
33
+ * This satisifes the TracingHelper interface for Prisma v5 and v6/v7.
34
+ */
35
+ export declare class ActiveTracingHelper implements TracingHelper {
36
+ private ignoreSpanTypes;
37
+ constructor({ ignoreSpanTypes }: Options);
38
+ isEnabled(): boolean;
39
+ getTraceParent(span?: Span): string;
40
+ dispatchEngineSpans(spans: EngineSpan[]): void;
41
+ /**
42
+ * Prisma v5 broke the tracing helper interface with the v6 major, replacing `createEngineSpan` with
43
+ * `dispatchEngineSpans`. We implement the v6/v7 interface (`dispatchEngineSpans`) but also keep this
44
+ * v5-only method so the same helper doesn't blow up in Prisma 5 users' faces, minting v5 engine spans
45
+ * through Sentry's span APIs instead of crashing.
46
+ */
47
+ createEngineSpan(engineSpanEvent: V5EngineSpanEvent): void;
48
+ getActiveContext(): Span | undefined;
49
+ runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
50
+ }
51
+ export {};
52
+ //# sourceMappingURL=tracing-helper.d.ts.map
@@ -0,0 +1,40 @@
1
+ import { Span, SpanAttributes, SpanKindValue, SpanLink, SpanTimeInput } from '@sentry/core';
2
+ export type SpanCallback<R> = (span?: Span, parentSpan?: Span) => R;
3
+ export interface ExtendedSpanOptions {
4
+ /** The name of the span */
5
+ name: string;
6
+ internal?: boolean;
7
+ /** Whether it propagates context (?=true) */
8
+ active?: boolean;
9
+ attributes?: SpanAttributes;
10
+ kind?: SpanKindValue;
11
+ links?: SpanLink[];
12
+ startTime?: SpanTimeInput;
13
+ }
14
+ export type EngineSpanId = string;
15
+ export type HrTime = [
16
+ number,
17
+ number
18
+ ];
19
+ export type EngineSpanKind = 'client' | 'internal';
20
+ export type EngineSpan = {
21
+ id: EngineSpanId;
22
+ parentId: string | null;
23
+ name: string;
24
+ startTime: HrTime;
25
+ endTime: HrTime;
26
+ kind: EngineSpanKind;
27
+ attributes?: Record<string, unknown>;
28
+ links?: EngineSpanId[];
29
+ };
30
+ export interface TracingHelper {
31
+ isEnabled(): boolean;
32
+ getTraceParent(span?: Span): string;
33
+ dispatchEngineSpans(spans: EngineSpan[]): void;
34
+ getActiveContext(): Span | undefined;
35
+ runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
36
+ }
37
+ export interface PrismaInstrumentationGlobalValue {
38
+ helper?: TracingHelper;
39
+ }
40
+ //# sourceMappingURL=types.d.ts.map
@@ -5,8 +5,6 @@ export declare function asString(value: unknown): string | undefined;
5
5
  export declare function asNumber(value: unknown): number | undefined;
6
6
  /** Add two optional numbers, treating a missing operand as `0` but returning `undefined` when both are absent. */
7
7
  export declare function sum(a: number | undefined, b: number | undefined): number | undefined;
8
- /** Stringify a value, passing strings through and falling back to a placeholder on circular/unserializable input. */
9
- export declare function safeStringify(value: unknown): string;
10
8
  /** The aggregate handed back once a streamed model call finishes, in the shape `enrichSpanOnEnd` expects. */
11
9
  export interface StreamedModelCallResult {
12
10
  text?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/server-utils",
3
- "version": "10.65.0",
3
+ "version": "10.66.0",
4
4
  "description": "Server Utilities for all Sentry JavaScript SDKs",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/server-utils",
@@ -39,7 +39,23 @@
39
39
  },
40
40
  "./orchestrion/vite": {
41
41
  "types": "./build/types/orchestrion/bundler/vite.d.ts",
42
- "import": "./build/esm/orchestrion/bundler/vite.js"
42
+ "import": "./build/esm/orchestrion/bundler/vite.js",
43
+ "require": "./build/cjs/orchestrion/bundler/vite.js"
44
+ },
45
+ "./orchestrion/rollup": {
46
+ "types": "./build/types/orchestrion/bundler/rollup.d.ts",
47
+ "import": "./build/esm/orchestrion/bundler/rollup.js",
48
+ "require": "./build/cjs/orchestrion/bundler/rollup.js"
49
+ },
50
+ "./orchestrion/webpack": {
51
+ "types": "./build/types/orchestrion/bundler/webpack.d.ts",
52
+ "import": "./build/esm/orchestrion/bundler/webpack.js",
53
+ "require": "./build/cjs/orchestrion/bundler/webpack.js"
54
+ },
55
+ "./orchestrion/esbuild": {
56
+ "types": "./build/types/orchestrion/bundler/esbuild.d.ts",
57
+ "import": "./build/esm/orchestrion/bundler/esbuild.js",
58
+ "require": "./build/cjs/orchestrion/bundler/esbuild.js"
43
59
  },
44
60
  "./orchestrion/import-hook": {
45
61
  "import": "./build/orchestrion/import-hook.mjs"
@@ -61,6 +77,15 @@
61
77
  ],
62
78
  "orchestrion/vite": [
63
79
  "build/types-ts3.8/orchestrion/bundler/vite.d.ts"
80
+ ],
81
+ "orchestrion/rollup": [
82
+ "build/types-ts3.8/orchestrion/bundler/rollup.d.ts"
83
+ ],
84
+ "orchestrion/webpack": [
85
+ "build/types-ts3.8/orchestrion/bundler/webpack.d.ts"
86
+ ],
87
+ "orchestrion/esbuild": [
88
+ "build/types-ts3.8/orchestrion/bundler/esbuild.d.ts"
64
89
  ]
65
90
  },
66
91
  "*": {
@@ -75,6 +100,15 @@
75
100
  ],
76
101
  "orchestrion/vite": [
77
102
  "build/types/orchestrion/bundler/vite.d.ts"
103
+ ],
104
+ "orchestrion/rollup": [
105
+ "build/types/orchestrion/bundler/rollup.d.ts"
106
+ ],
107
+ "orchestrion/webpack": [
108
+ "build/types/orchestrion/bundler/webpack.d.ts"
109
+ ],
110
+ "orchestrion/esbuild": [
111
+ "build/types/orchestrion/bundler/esbuild.d.ts"
78
112
  ]
79
113
  }
80
114
  },
@@ -82,12 +116,11 @@
82
116
  "access": "public"
83
117
  },
84
118
  "dependencies": {
85
- "@apm-js-collab/code-transformer-bundler-plugins": "^0.5.0",
86
- "@apm-js-collab/code-transformer": "^0.15.0",
87
- "@apm-js-collab/tracing-hooks": "^0.10.1",
88
- "@sentry/conventions": "^0.15.1",
89
- "@sentry/core": "10.65.0",
90
- "magic-string": "~0.30.0"
119
+ "@apm-js-collab/code-transformer-bundler-plugins": "^0.6.1",
120
+ "@apm-js-collab/code-transformer": "^0.18.0",
121
+ "@apm-js-collab/tracing-hooks": "^0.13.0",
122
+ "@sentry/conventions": "^0.16.0",
123
+ "@sentry/core": "10.66.0"
91
124
  },
92
125
  "devDependencies": {
93
126
  "@types/node": "^18.19.1",