@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 @@
1
+ {"version":3,"file":"dataloader.js","sources":["../../../../src/orchestrion/config/dataloader.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// `dataloader` ships a single transpiled CommonJS `index.js`. Its class methods are emitted as\n// `_proto.<name> = function <name>() {}` (named function *expressions*), so they match on\n// `expressionName` rather than `methodName`. The constructor is a named function declaration.\n// The version range mirrors `supportedVersions` in the vendored OTel instrumentation.\nconst module = { name: 'dataloader', versionRange: '>=2.0.0 <3', filePath: 'index.js' } as const;\n\nexport const dataloaderConfig = [\n // Wrap the constructor so the subscriber can wrap the user's `batchLoadFn` (arg 0). The batch span\n // is opened when that wrapped function actually runs (on the deferred dispatch tick), mirroring the\n // vendored OTel instrumentation which also wraps `batchLoadFn` at construction time.\n {\n channelName: 'construct',\n module,\n functionQuery: { functionName: 'DataLoader', kind: 'Sync' },\n },\n // `load`/`loadMany` return Promises, so they're `Async`: the span ends on `asyncEnd` (when the\n // load resolves), capturing the real latency and enclosing the deferred `batch` span — matching the\n // vendored OTel `startSpan`. `prime`/`clear`/`clearAll` return `this` synchronously, so they stay `Sync`.\n {\n channelName: 'load',\n module,\n functionQuery: { expressionName: 'load', kind: 'Async' },\n },\n {\n channelName: 'loadMany',\n module,\n functionQuery: { expressionName: 'loadMany', kind: 'Async' },\n },\n {\n channelName: 'prime',\n module,\n functionQuery: { expressionName: 'prime', kind: 'Sync' },\n },\n {\n channelName: 'clear',\n module,\n functionQuery: { expressionName: 'clear', kind: 'Sync' },\n },\n {\n channelName: 'clearAll',\n module,\n functionQuery: { expressionName: 'clearAll', kind: 'Sync' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const dataloaderChannels = {\n DATALOADER_CONSTRUCT: 'orchestrion:dataloader:construct',\n DATALOADER_LOAD: 'orchestrion:dataloader:load',\n DATALOADER_LOAD_MANY: 'orchestrion:dataloader:loadMany',\n DATALOADER_PRIME: 'orchestrion:dataloader:prime',\n DATALOADER_CLEAR: 'orchestrion:dataloader:clear',\n DATALOADER_CLEAR_ALL: 'orchestrion:dataloader:clearAll',\n} as const;\n"],"names":["module"],"mappings":"AAMA,MAAMA,WAAS,EAAE,IAAA,EAAM,cAAc,YAAA,EAAc,YAAA,EAAc,UAAU,UAAA,EAAW;AAE/E,MAAM,gBAAA,GAAmB;AAAA;AAAA;AAAA;AAAA,EAI9B;AAAA,IACE,WAAA,EAAa,WAAA;AAAA,YACbA,QAAA;AAAA,IACA,aAAA,EAAe,EAAE,YAAA,EAAc,YAAA,EAAc,MAAM,MAAA;AAAO,GAC5D;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA,IACE,WAAA,EAAa,MAAA;AAAA,YACbA,QAAA;AAAA,IACA,aAAA,EAAe,EAAE,cAAA,EAAgB,MAAA,EAAQ,MAAM,OAAA;AAAQ,GACzD;AAAA,EACA;AAAA,IACE,WAAA,EAAa,UAAA;AAAA,YACbA,QAAA;AAAA,IACA,aAAA,EAAe,EAAE,cAAA,EAAgB,UAAA,EAAY,MAAM,OAAA;AAAQ,GAC7D;AAAA,EACA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,YACbA,QAAA;AAAA,IACA,aAAA,EAAe,EAAE,cAAA,EAAgB,OAAA,EAAS,MAAM,MAAA;AAAO,GACzD;AAAA,EACA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,YACbA,QAAA;AAAA,IACA,aAAA,EAAe,EAAE,cAAA,EAAgB,OAAA,EAAS,MAAM,MAAA;AAAO,GACzD;AAAA,EACA;AAAA,IACE,WAAA,EAAa,UAAA;AAAA,YACbA,QAAA;AAAA,IACA,aAAA,EAAe,EAAE,cAAA,EAAgB,UAAA,EAAY,MAAM,MAAA;AAAO;AAE9D;AAEO,MAAM,kBAAA,GAAqB;AAAA,EAChC,oBAAA,EAAsB,kCAAA;AAAA,EACtB,eAAA,EAAiB,6BAAA;AAAA,EACjB,oBAAA,EAAsB,iCAAA;AAAA,EACtB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,oBAAA,EAAsB;AACxB;;;;"}
@@ -0,0 +1,5 @@
1
+ const firebaseConfig = [];
2
+ const firebaseChannels = {};
3
+
4
+ export { firebaseChannels, firebaseConfig };
5
+ //# sourceMappingURL=firebase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebase.js","sources":["../../../../src/orchestrion/config/firebase.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `firebase` orchestrion integration (ports `FirebaseInstrumentation`).\nexport const firebaseConfig: InstrumentationConfig[] = [];\n\nexport const firebaseChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,iBAA0C;AAEhD,MAAM,mBAAmB;;;;"}
@@ -0,0 +1,18 @@
1
+ const genericPoolConfig = [
2
+ {
3
+ channelName: "acquire",
4
+ module: { name: "generic-pool", versionRange: ">=3.0.0 <4", filePath: "lib/Pool.js" },
5
+ functionQuery: { className: "Pool", methodName: "acquire", kind: "Auto" }
6
+ },
7
+ {
8
+ channelName: "acquire",
9
+ module: { name: "generic-pool", versionRange: ">=2.4.0 <3", filePath: "lib/generic-pool.js" },
10
+ functionQuery: { expressionName: "acquire", kind: "Callback" }
11
+ }
12
+ ];
13
+ const genericPoolChannels = {
14
+ GENERIC_POOL_ACQUIRE: "orchestrion:generic-pool:acquire"
15
+ };
16
+
17
+ export { genericPoolChannels, genericPoolConfig };
18
+ //# sourceMappingURL=generic-pool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generic-pool.js","sources":["../../../../src/orchestrion/config/generic-pool.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// Two shapes of `acquire`, both publishing to the same `orchestrion:generic-pool:acquire` channel:\n// - v3+: `class Pool { acquire(priority) }` returns a promise, so `kind: 'Auto'` resolves to `wrapPromise`.\n// - v2.4–v3: `Pool.prototype.acquire = function acquire(callback, priority)` is callback-based.\n// Versions before 2.4 assigned an anonymous `acquire` per pool instance (a factory), which a static\n// transform can't target, so they're out of scope (matching how the OTel instrumentation split them).\nexport const genericPoolConfig = [\n {\n channelName: 'acquire',\n module: { name: 'generic-pool', versionRange: '>=3.0.0 <4', filePath: 'lib/Pool.js' },\n functionQuery: { className: 'Pool', methodName: 'acquire', kind: 'Auto' },\n },\n {\n channelName: 'acquire',\n module: { name: 'generic-pool', versionRange: '>=2.4.0 <3', filePath: 'lib/generic-pool.js' },\n functionQuery: { expressionName: 'acquire', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const genericPoolChannels = {\n GENERIC_POOL_ACQUIRE: 'orchestrion:generic-pool:acquire',\n} as const;\n"],"names":[],"mappings":"AAOO,MAAM,iBAAA,GAAoB;AAAA,EAC/B;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,YAAA,EAAc,UAAU,aAAA,EAAc;AAAA,IACpF,eAAe,EAAE,SAAA,EAAW,QAAQ,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO,GAC1E;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,YAAA,EAAc,UAAU,qBAAA,EAAsB;AAAA,IAC5F,aAAA,EAAe,EAAE,cAAA,EAAgB,SAAA,EAAW,MAAM,UAAA;AAAW;AAEjE;AAEO,MAAM,mBAAA,GAAsB;AAAA,EACjC,oBAAA,EAAsB;AACxB;;;;"}
@@ -1,44 +1,75 @@
1
1
  import { uniq } from '@sentry/core';
2
- import { mysqlConfig } from './mysql.js';
3
- import { lruMemoizerConfig } from './lru-memoizer.js';
2
+ import { amqplibConfig } from './amqplib.js';
3
+ import { anthropicAiConfig } from './anthropic-ai.js';
4
+ import { dataloaderConfig } from './dataloader.js';
5
+ import { expressConfig } from './express.js';
6
+ import { firebaseConfig } from './firebase.js';
7
+ import { genericPoolConfig } from './generic-pool.js';
8
+ import { googleGenAiConfig } from './google-genai.js';
9
+ import { graphqlConfig } from './graphql.js';
10
+ import { hapiConfig } from './hapi.js';
4
11
  import { ioredisConfig } from './ioredis.js';
12
+ import { kafkajsConfig } from './kafkajs.js';
13
+ import { knexConfig } from './knex.js';
14
+ import { langchainConfig } from './langchain.js';
15
+ import { langgraphConfig } from './langgraph.js';
16
+ import { lruMemoizerConfig } from './lru-memoizer.js';
17
+ import { mongodbConfig } from './mongodb.js';
18
+ import { mongooseConfig } from './mongoose.js';
19
+ import { mysql2Config } from './mysql2.js';
20
+ import { mysqlConfig } from './mysql.js';
21
+ import { nestjsConfig } from './nestjs.js';
5
22
  import { openaiConfig } from './openai.js';
6
23
  import { pgConfig } from './pg.js';
7
24
  import { postgresJsConfig } from './postgres.js';
8
- import { anthropicAiConfig } from './anthropic-ai.js';
9
- import { googleGenAiConfig } from './google-genai.js';
10
- import { vercelAiConfig } from './vercel-ai.js';
11
- import { amqplibConfig } from './amqplib.js';
12
- import { hapiConfig } from './hapi.js';
25
+ import { prismaConfig } from './prisma.js';
26
+ import { reactRouterConfig } from './react-router.js';
13
27
  import { redisConfig } from './redis.js';
14
- import { expressConfig } from './express.js';
15
- import { graphqlConfig } from './graphql.js';
28
+ import { remixConfig } from './remix.js';
29
+ import { tediousConfig } from './tedious.js';
30
+ import { vercelAiConfig } from './vercel-ai.js';
16
31
 
17
32
  const SENTRY_INSTRUMENTATIONS = [
18
- ...mysqlConfig,
19
- ...lruMemoizerConfig,
33
+ ...amqplibConfig,
34
+ ...anthropicAiConfig,
35
+ ...dataloaderConfig,
36
+ ...expressConfig,
37
+ ...firebaseConfig,
38
+ ...genericPoolConfig,
39
+ ...googleGenAiConfig,
40
+ ...graphqlConfig,
41
+ ...hapiConfig,
20
42
  ...ioredisConfig,
43
+ ...kafkajsConfig,
44
+ ...knexConfig,
45
+ ...langchainConfig,
46
+ ...langgraphConfig,
47
+ ...lruMemoizerConfig,
48
+ ...mongodbConfig,
49
+ ...mongooseConfig,
50
+ ...mysql2Config,
51
+ ...mysqlConfig,
52
+ ...nestjsConfig,
21
53
  ...openaiConfig,
22
54
  ...pgConfig,
23
55
  ...postgresJsConfig,
24
- ...anthropicAiConfig,
25
- ...googleGenAiConfig,
26
- ...vercelAiConfig,
27
- ...hapiConfig,
28
- ...amqplibConfig,
56
+ ...prismaConfig,
57
+ ...reactRouterConfig,
29
58
  ...redisConfig,
30
- ...expressConfig,
31
- ...graphqlConfig
59
+ ...remixConfig,
60
+ ...tediousConfig,
61
+ ...vercelAiConfig
32
62
  ];
33
- const INSTRUMENTED_MODULE_NAMES = uniq(SENTRY_INSTRUMENTATIONS.map((i) => i.module.name));
34
- function withoutInstrumentedExternals(external) {
63
+ function instrumentedModuleNames(instrumentations = []) {
64
+ return uniq([...SENTRY_INSTRUMENTATIONS, ...instrumentations].map((i) => i.module.name));
65
+ }
66
+ const INSTRUMENTED_MODULE_NAMES = instrumentedModuleNames();
67
+ function withoutInstrumentedExternals(external, moduleNames = INSTRUMENTED_MODULE_NAMES) {
35
68
  if (!external) {
36
69
  return void 0;
37
70
  }
38
- return external.filter(
39
- (entry) => !INSTRUMENTED_MODULE_NAMES.some((name) => entry === name || entry.startsWith(`${name}/`))
40
- );
71
+ return external.filter((entry) => !moduleNames.some((name) => entry === name || entry.startsWith(`${name}/`)));
41
72
  }
42
73
 
43
- export { INSTRUMENTED_MODULE_NAMES, SENTRY_INSTRUMENTATIONS, withoutInstrumentedExternals };
74
+ export { INSTRUMENTED_MODULE_NAMES, SENTRY_INSTRUMENTATIONS, instrumentedModuleNames, withoutInstrumentedExternals };
44
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/orchestrion/config/index.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\nimport { uniq } from '@sentry/core';\nimport { mysqlConfig } from './mysql';\nimport { lruMemoizerConfig } from './lru-memoizer';\nimport { ioredisConfig } from './ioredis';\nimport { openaiConfig } from './openai';\nimport { pgConfig } from './pg';\nimport { postgresJsConfig } from './postgres';\nimport { anthropicAiConfig } from './anthropic-ai';\nimport { googleGenAiConfig } from './google-genai';\nimport { vercelAiConfig } from './vercel-ai';\nimport { amqplibConfig } from './amqplib';\nimport { hapiConfig } from './hapi';\nimport { redisConfig } from './redis';\nimport { expressConfig } from './express';\nimport { graphqlConfig } from './graphql';\n\nexport const SENTRY_INSTRUMENTATIONS: InstrumentationConfig[] = [\n ...mysqlConfig,\n ...lruMemoizerConfig,\n ...ioredisConfig,\n ...openaiConfig,\n ...pgConfig,\n ...postgresJsConfig,\n ...anthropicAiConfig,\n ...googleGenAiConfig,\n ...vercelAiConfig,\n ...hapiConfig,\n ...amqplibConfig,\n ...redisConfig,\n ...expressConfig,\n ...graphqlConfig,\n];\n\n/**\n * The unique set of package names instrumented by `SENTRY_INSTRUMENTATIONS`\n * (e.g. `['mysql']`).\n *\n * Bundler plugins MUST ensure these are actually bundled rather than\n * externalized: an externalized dependency is resolved from `node_modules` at\n * runtime and never passes through the code transform's `onLoad`, so its\n * diagnostics_channel calls are silently never injected.\n */\nexport const INSTRUMENTED_MODULE_NAMES: string[] = uniq(SENTRY_INSTRUMENTATIONS.map(i => i.module.name));\n\n/**\n * Returns `external` with any instrumented packages removed, so a bundler that\n * uses an \"external\" denylist (esbuild, Bun, Rollup) still bundles — and thus\n * transforms — them. Matches an exact package name (`'mysql'`) or a subpath\n * (`'mysql/lib/...'`); wildcard/other patterns are left untouched. `undefined`\n * is returned unchanged.\n *\n * (Vite uses an `ssr.noExternal` allowlist instead, so it consumes\n * `INSTRUMENTED_MODULE_NAMES` directly rather than this helper.)\n */\nexport function withoutInstrumentedExternals(external: readonly string[] | undefined): string[] | undefined {\n if (!external) {\n return undefined;\n }\n return external.filter(\n entry => !INSTRUMENTED_MODULE_NAMES.some(name => entry === name || entry.startsWith(`${name}/`)),\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiBO,MAAM,uBAAA,GAAmD;AAAA,EAC9D,GAAG,WAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,gBAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,cAAA;AAAA,EACH,GAAG,UAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG;AACL;AAWO,MAAM,yBAAA,GAAsC,KAAK,uBAAA,CAAwB,GAAA,CAAI,OAAK,CAAA,CAAE,MAAA,CAAO,IAAI,CAAC;AAYhG,SAAS,6BAA6B,QAAA,EAA+D;AAC1G,EAAA,IAAI,CAAC,QAAA,EAAU;AACb,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,OAAO,QAAA,CAAS,MAAA;AAAA,IACd,CAAA,KAAA,KAAS,CAAC,yBAAA,CAA0B,IAAA,CAAK,CAAA,IAAA,KAAQ,KAAA,KAAU,IAAA,IAAQ,KAAA,CAAM,UAAA,CAAW,CAAA,EAAG,IAAI,CAAA,CAAA,CAAG,CAAC;AAAA,GACjG;AACF;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/orchestrion/config/index.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\nimport { uniq } from '@sentry/core';\n\nimport { amqplibConfig } from './amqplib';\nimport { anthropicAiConfig } from './anthropic-ai';\nimport { dataloaderConfig } from './dataloader';\nimport { expressConfig } from './express';\nimport { firebaseConfig } from './firebase';\nimport { genericPoolConfig } from './generic-pool';\nimport { googleGenAiConfig } from './google-genai';\nimport { graphqlConfig } from './graphql';\nimport { hapiConfig } from './hapi';\nimport { ioredisConfig } from './ioredis';\nimport { kafkajsConfig } from './kafkajs';\nimport { knexConfig } from './knex';\nimport { langchainConfig } from './langchain';\nimport { langgraphConfig } from './langgraph';\nimport { lruMemoizerConfig } from './lru-memoizer';\nimport { mongodbConfig } from './mongodb';\nimport { mongooseConfig } from './mongoose';\nimport { mysql2Config } from './mysql2';\nimport { mysqlConfig } from './mysql';\nimport { nestjsConfig } from './nestjs';\nimport { openaiConfig } from './openai';\nimport { pgConfig } from './pg';\nimport { postgresJsConfig } from './postgres';\nimport { prismaConfig } from './prisma';\nimport { reactRouterConfig } from './react-router';\nimport { redisConfig } from './redis';\nimport { remixConfig } from './remix';\nimport { tediousConfig } from './tedious';\nimport { vercelAiConfig } from './vercel-ai';\n// Kept sorted alphabetically by module so concurrent additions insert at different\n// points rather than all appending to the end (fewer merge conflicts).\n\n/**\n * The orchestrion code-transform configs. Every instrumentable library is here\n * so the transform is all-or-nothing: whenever orchestrion is enabled, all of\n * these are injected. The channel LISTENERS may live elsewhere (e.g. the NestJS\n * one lives in `@sentry/nestjs`), but the config that decides what gets\n * transformed is centralized here.\n */\nexport const SENTRY_INSTRUMENTATIONS: InstrumentationConfig[] = [\n ...amqplibConfig,\n ...anthropicAiConfig,\n ...dataloaderConfig,\n ...expressConfig,\n ...firebaseConfig,\n ...genericPoolConfig,\n ...googleGenAiConfig,\n ...graphqlConfig,\n ...hapiConfig,\n ...ioredisConfig,\n ...kafkajsConfig,\n ...knexConfig,\n ...langchainConfig,\n ...langgraphConfig,\n ...lruMemoizerConfig,\n ...mongodbConfig,\n ...mongooseConfig,\n ...mysql2Config,\n ...mysqlConfig,\n ...nestjsConfig,\n ...openaiConfig,\n ...pgConfig,\n ...postgresJsConfig,\n ...prismaConfig,\n ...reactRouterConfig,\n ...redisConfig,\n ...remixConfig,\n ...tediousConfig,\n ...vercelAiConfig,\n];\n\n/**\n * The unique set of package names instrumented by `SENTRY_INSTRUMENTATIONS`\n * merged with any caller-provided `instrumentations` (e.g. `['mysql']`).\n *\n * Bundler plugins MUST ensure these are actually bundled rather than\n * externalized: an externalized dependency is resolved from `node_modules` at\n * runtime and never passes through the code transform's `onLoad`, so its\n * diagnostics_channel calls are silently never injected. This includes a\n * plugin's custom `instrumentations`, otherwise those extra packages can stay\n * externalized and their transform never runs.\n */\nexport function instrumentedModuleNames(instrumentations: InstrumentationConfig[] = []): string[] {\n return uniq([...SENTRY_INSTRUMENTATIONS, ...instrumentations].map(i => i.module.name));\n}\n\n/** The instrumented module names from the default Sentry config, with no custom additions. */\nexport const INSTRUMENTED_MODULE_NAMES: string[] = instrumentedModuleNames();\n\n/**\n * Returns `external` with any instrumented packages removed, so a bundler that\n * uses an \"external\" denylist (esbuild, Bun, Rollup) still bundles — and thus\n * transforms — them. Matches an exact package name (`'mysql'`) or a subpath\n * (`'mysql/lib/...'`); wildcard/other patterns are left untouched. `undefined`\n * is returned unchanged.\n *\n * Pass `moduleNames` from `instrumentedModuleNames(options.instrumentations)` so\n * custom instrumentations are stripped too; it defaults to the Sentry config\n * list. (Vite uses an `ssr.noExternal` allowlist instead, so it consumes\n * `instrumentedModuleNames` directly rather than this helper.)\n */\nexport function withoutInstrumentedExternals(\n external: readonly string[] | undefined,\n moduleNames: string[] = INSTRUMENTED_MODULE_NAMES,\n): string[] | undefined {\n if (!external) {\n return undefined;\n }\n return external.filter(entry => !moduleNames.some(name => entry === name || entry.startsWith(`${name}/`)));\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,MAAM,uBAAA,GAAmD;AAAA,EAC9D,GAAG,aAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,gBAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG,cAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG,UAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG,UAAA;AAAA,EACH,GAAG,eAAA;AAAA,EACH,GAAG,eAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG,cAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,gBAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,GAAG;AACL;AAaO,SAAS,uBAAA,CAAwB,gBAAA,GAA4C,EAAC,EAAa;AAChG,EAAA,OAAO,IAAA,CAAK,CAAC,GAAG,uBAAA,EAAyB,GAAG,gBAAgB,CAAA,CAAE,GAAA,CAAI,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,CAAO,IAAI,CAAC,CAAA;AACvF;AAGO,MAAM,4BAAsC,uBAAA;AAc5C,SAAS,4BAAA,CACd,QAAA,EACA,WAAA,GAAwB,yBAAA,EACF;AACtB,EAAA,IAAI,CAAC,QAAA,EAAU;AACb,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,OAAO,QAAA,CAAS,MAAA,CAAO,CAAA,KAAA,KAAS,CAAC,YAAY,IAAA,CAAK,CAAA,IAAA,KAAQ,KAAA,KAAU,IAAA,IAAQ,MAAM,UAAA,CAAW,CAAA,EAAG,IAAI,CAAA,CAAA,CAAG,CAAC,CAAC,CAAA;AAC3G;;;;"}
@@ -0,0 +1,27 @@
1
+ const kafkajsConfig = [
2
+ {
3
+ channelName: "send_batch",
4
+ module: { name: "kafkajs", versionRange: ">=2.0.0 <3", filePath: "src/producer/messageProducer.js" },
5
+ // `const sendBatch = async (...) => {...}` — `expressionName` matches the `const` assignment.
6
+ // We instrument ONLY `sendBatch`: `send` funnels into it internally, so `producer.send`,
7
+ // `producer.sendBatch` and their transactional variants all flow through this one channel.
8
+ // Instrumenting `send` too would double-count spans.
9
+ functionQuery: { expressionName: "sendBatch", kind: "Async" }
10
+ },
11
+ {
12
+ channelName: "consumer_run",
13
+ module: { name: "kafkajs", versionRange: ">=2.0.0 <3", filePath: "src/consumer/index.js" },
14
+ // `const run = async (config) => {...}` — matched by `expressionName`. We don't span `run` itself:
15
+ // the `start` subscriber swaps `config.eachMessage`/`eachBatch` (on `ctx.arguments[0]`) for
16
+ // span-creating wrappers before the original runs. This works because the transform re-reads
17
+ // `ctx.arguments` when invoking the original.
18
+ functionQuery: { expressionName: "run", kind: "Async" }
19
+ }
20
+ ];
21
+ const kafkajsChannels = {
22
+ KAFKAJS_SEND_BATCH: "orchestrion:kafkajs:send_batch",
23
+ KAFKAJS_CONSUMER_RUN: "orchestrion:kafkajs:consumer_run"
24
+ };
25
+
26
+ export { kafkajsChannels, kafkajsConfig };
27
+ //# sourceMappingURL=kafkajs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kafkajs.js","sources":["../../../../src/orchestrion/config/kafkajs.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\nexport const kafkajsConfig = [\n {\n channelName: 'send_batch',\n module: { name: 'kafkajs', versionRange: '>=2.0.0 <3', filePath: 'src/producer/messageProducer.js' },\n // `const sendBatch = async (...) => {...}` — `expressionName` matches the `const` assignment.\n // We instrument ONLY `sendBatch`: `send` funnels into it internally, so `producer.send`,\n // `producer.sendBatch` and their transactional variants all flow through this one channel.\n // Instrumenting `send` too would double-count spans.\n functionQuery: { expressionName: 'sendBatch', kind: 'Async' },\n },\n {\n channelName: 'consumer_run',\n module: { name: 'kafkajs', versionRange: '>=2.0.0 <3', filePath: 'src/consumer/index.js' },\n // `const run = async (config) => {...}` — matched by `expressionName`. We don't span `run` itself:\n // the `start` subscriber swaps `config.eachMessage`/`eachBatch` (on `ctx.arguments[0]`) for\n // span-creating wrappers before the original runs. This works because the transform re-reads\n // `ctx.arguments` when invoking the original.\n functionQuery: { expressionName: 'run', kind: 'Async' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const kafkajsChannels = {\n KAFKAJS_SEND_BATCH: 'orchestrion:kafkajs:send_batch',\n KAFKAJS_CONSUMER_RUN: 'orchestrion:kafkajs:consumer_run',\n} as const;\n"],"names":[],"mappings":"AAEO,MAAM,aAAA,GAAgB;AAAA,EAC3B;AAAA,IACE,WAAA,EAAa,YAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,WAAW,YAAA,EAAc,YAAA,EAAc,UAAU,iCAAA,EAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnG,aAAA,EAAe,EAAE,cAAA,EAAgB,WAAA,EAAa,MAAM,OAAA;AAAQ,GAC9D;AAAA,EACA;AAAA,IACE,WAAA,EAAa,cAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,WAAW,YAAA,EAAc,YAAA,EAAc,UAAU,uBAAA,EAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKzF,aAAA,EAAe,EAAE,cAAA,EAAgB,KAAA,EAAO,MAAM,OAAA;AAAQ;AAE1D;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,kBAAA,EAAoB,gCAAA;AAAA,EACpB,oBAAA,EAAsB;AACxB;;;;"}
@@ -0,0 +1,40 @@
1
+ const MODULE_NAME = "knex";
2
+ const RUNNER_FILES = [
3
+ { filePath: "lib/execution/runner.js", versionRange: ">=0.22.0 <4" },
4
+ { filePath: "lib/runner.js", versionRange: ">=0.10.0 <0.22.0" },
5
+ { filePath: "src/runner.js", versionRange: ">=0.18.0 <0.19.0" }
6
+ ];
7
+ const CLIENT_FILES = [
8
+ { filePath: "lib/client.js", versionRange: ">=0.10.0 <4" },
9
+ { filePath: "src/client.js", versionRange: ">=0.18.0 <0.19.0" }
10
+ ];
11
+ const CLIENT_METHODS = ["queryBuilder", "schemaBuilder", "raw"];
12
+ function runnerQuery(filePath, versionRange) {
13
+ return {
14
+ channelName: "query",
15
+ module: { name: MODULE_NAME, versionRange, filePath },
16
+ functionQuery: { className: "Runner", methodName: "query", kind: "Async" }
17
+ };
18
+ }
19
+ function clientMethod(methodName, filePath, versionRange) {
20
+ return {
21
+ channelName: methodName,
22
+ module: { name: MODULE_NAME, versionRange, filePath },
23
+ functionQuery: { className: "Client", methodName, kind: "Sync" }
24
+ };
25
+ }
26
+ const knexConfig = [
27
+ ...RUNNER_FILES.map(({ filePath, versionRange }) => runnerQuery(filePath, versionRange)),
28
+ ...CLIENT_FILES.flatMap(
29
+ ({ filePath, versionRange }) => CLIENT_METHODS.map((methodName) => clientMethod(methodName, filePath, versionRange))
30
+ )
31
+ ];
32
+ const knexChannels = {
33
+ KNEX_QUERY: "orchestrion:knex:query",
34
+ KNEX_QUERY_BUILDER: "orchestrion:knex:queryBuilder",
35
+ KNEX_SCHEMA_BUILDER: "orchestrion:knex:schemaBuilder",
36
+ KNEX_RAW: "orchestrion:knex:raw"
37
+ };
38
+
39
+ export { knexChannels, knexConfig };
40
+ //# sourceMappingURL=knex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knex.js","sources":["../../../../src/orchestrion/config/knex.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\nconst MODULE_NAME = 'knex';\n\n// knex ships different file layouts across versions (see `SUPPORTED_VERSIONS` in the vendored OTel\n// instrumentation). Modern builds keep the runner under `lib/execution`, older ones under `lib`, and\n// the source-tree build under `src`. A file that doesn't exist for a given version simply never\n// matches, so overlapping ranges are safe.\nconst RUNNER_FILES = [\n { filePath: 'lib/execution/runner.js', versionRange: '>=0.22.0 <4' },\n { filePath: 'lib/runner.js', versionRange: '>=0.10.0 <0.22.0' },\n { filePath: 'src/runner.js', versionRange: '>=0.18.0 <0.19.0' },\n];\n\nconst CLIENT_FILES = [\n { filePath: 'lib/client.js', versionRange: '>=0.10.0 <4' },\n { filePath: 'src/client.js', versionRange: '>=0.18.0 <0.19.0' },\n];\n\n// The three `Client` methods that create a builder. Wrapping them lets the subscriber capture the\n// span active at builder-creation time, which is reused as the parent when the query runs later\n// (often in a different async context).\nconst CLIENT_METHODS = ['queryBuilder', 'schemaBuilder', 'raw'] as const;\n\nfunction runnerQuery(filePath: string, versionRange: string): InstrumentationConfig {\n return {\n channelName: 'query',\n module: { name: MODULE_NAME, versionRange, filePath },\n functionQuery: { className: 'Runner', methodName: 'query', kind: 'Async' },\n };\n}\n\nfunction clientMethod(methodName: string, filePath: string, versionRange: string): InstrumentationConfig {\n return {\n channelName: methodName,\n module: { name: MODULE_NAME, versionRange, filePath },\n functionQuery: { className: 'Client', methodName, kind: 'Sync' },\n };\n}\n\nexport const knexConfig: InstrumentationConfig[] = [\n ...RUNNER_FILES.map(({ filePath, versionRange }) => runnerQuery(filePath, versionRange)),\n ...CLIENT_FILES.flatMap(({ filePath, versionRange }) =>\n CLIENT_METHODS.map(methodName => clientMethod(methodName, filePath, versionRange)),\n ),\n];\n\nexport const knexChannels = {\n KNEX_QUERY: 'orchestrion:knex:query',\n KNEX_QUERY_BUILDER: 'orchestrion:knex:queryBuilder',\n KNEX_SCHEMA_BUILDER: 'orchestrion:knex:schemaBuilder',\n KNEX_RAW: 'orchestrion:knex:raw',\n} as const;\n"],"names":[],"mappings":"AAEA,MAAM,WAAA,GAAc,MAAA;AAMpB,MAAM,YAAA,GAAe;AAAA,EACnB,EAAE,QAAA,EAAU,yBAAA,EAA2B,YAAA,EAAc,aAAA,EAAc;AAAA,EACnE,EAAE,QAAA,EAAU,eAAA,EAAiB,YAAA,EAAc,kBAAA,EAAmB;AAAA,EAC9D,EAAE,QAAA,EAAU,eAAA,EAAiB,YAAA,EAAc,kBAAA;AAC7C,CAAA;AAEA,MAAM,YAAA,GAAe;AAAA,EACnB,EAAE,QAAA,EAAU,eAAA,EAAiB,YAAA,EAAc,aAAA,EAAc;AAAA,EACzD,EAAE,QAAA,EAAU,eAAA,EAAiB,YAAA,EAAc,kBAAA;AAC7C,CAAA;AAKA,MAAM,cAAA,GAAiB,CAAC,cAAA,EAAgB,eAAA,EAAiB,KAAK,CAAA;AAE9D,SAAS,WAAA,CAAY,UAAkB,YAAA,EAA6C;AAClF,EAAA,OAAO;AAAA,IACL,WAAA,EAAa,OAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,WAAA,EAAa,cAAc,QAAA,EAAS;AAAA,IACpD,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,OAAA,EAAS,MAAM,OAAA;AAAQ,GAC3E;AACF;AAEA,SAAS,YAAA,CAAa,UAAA,EAAoB,QAAA,EAAkB,YAAA,EAA6C;AACvG,EAAA,OAAO;AAAA,IACL,WAAA,EAAa,UAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,WAAA,EAAa,cAAc,QAAA,EAAS;AAAA,IACpD,eAAe,EAAE,SAAA,EAAW,QAAA,EAAU,UAAA,EAAY,MAAM,MAAA;AAAO,GACjE;AACF;AAEO,MAAM,UAAA,GAAsC;AAAA,EACjD,GAAG,YAAA,CAAa,GAAA,CAAI,CAAC,EAAE,QAAA,EAAU,YAAA,EAAa,KAAM,WAAA,CAAY,QAAA,EAAU,YAAY,CAAC,CAAA;AAAA,EACvF,GAAG,YAAA,CAAa,OAAA;AAAA,IAAQ,CAAC,EAAE,QAAA,EAAU,YAAA,EAAa,KAChD,cAAA,CAAe,GAAA,CAAI,CAAA,UAAA,KAAc,YAAA,CAAa,UAAA,EAAY,QAAA,EAAU,YAAY,CAAC;AAAA;AAErF;AAEO,MAAM,YAAA,GAAe;AAAA,EAC1B,UAAA,EAAY,wBAAA;AAAA,EACZ,kBAAA,EAAoB,+BAAA;AAAA,EACpB,mBAAA,EAAqB,gCAAA;AAAA,EACrB,QAAA,EAAU;AACZ;;;;"}
@@ -0,0 +1,5 @@
1
+ const langchainConfig = [];
2
+ const langchainChannels = {};
3
+
4
+ export { langchainChannels, langchainConfig };
5
+ //# sourceMappingURL=langchain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"langchain.js","sources":["../../../../src/orchestrion/config/langchain.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `langchain` orchestrion integration (ports `SentryLangChainInstrumentation`).\nexport const langchainConfig: InstrumentationConfig[] = [];\n\nexport const langchainChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,kBAA2C;AAEjD,MAAM,oBAAoB;;;;"}
@@ -0,0 +1,5 @@
1
+ const langgraphConfig = [];
2
+ const langgraphChannels = {};
3
+
4
+ export { langgraphChannels, langgraphConfig };
5
+ //# sourceMappingURL=langgraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"langgraph.js","sources":["../../../../src/orchestrion/config/langgraph.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `langgraph` orchestrion integration (ports `SentryLangGraphInstrumentation`).\nexport const langgraphConfig: InstrumentationConfig[] = [];\n\nexport const langgraphChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,kBAA2C;AAEjD,MAAM,oBAAoB;;;;"}
@@ -0,0 +1,5 @@
1
+ const mongodbConfig = [];
2
+ const mongodbChannels = {};
3
+
4
+ export { mongodbChannels, mongodbConfig };
5
+ //# sourceMappingURL=mongodb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongodb.js","sources":["../../../../src/orchestrion/config/mongodb.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `mongodb` orchestrion integration (ports `@opentelemetry/instrumentation-mongodb`).\nexport const mongodbConfig: InstrumentationConfig[] = [];\n\nexport const mongodbChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,gBAAyC;AAE/C,MAAM,kBAAkB;;;;"}
@@ -0,0 +1,5 @@
1
+ const mongooseConfig = [];
2
+ const mongooseChannels = {};
3
+
4
+ export { mongooseChannels, mongooseConfig };
5
+ //# sourceMappingURL=mongoose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongoose.js","sources":["../../../../src/orchestrion/config/mongoose.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `mongoose` orchestrion integration (ports `@opentelemetry/instrumentation-mongoose`).\nexport const mongooseConfig: InstrumentationConfig[] = [];\n\nexport const mongooseChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,iBAA0C;AAEhD,MAAM,mBAAmB;;;;"}
@@ -0,0 +1,29 @@
1
+ const mysql2Config = [
2
+ {
3
+ channelName: "query",
4
+ module: { name: "mysql2", versionRange: ">=1.4.2 <3.11.5", filePath: "lib/connection.js" },
5
+ functionQuery: { className: "Connection", methodName: "query", kind: "Callback" }
6
+ },
7
+ {
8
+ channelName: "execute",
9
+ module: { name: "mysql2", versionRange: ">=1.4.2 <3.11.5", filePath: "lib/connection.js" },
10
+ functionQuery: { className: "Connection", methodName: "execute", kind: "Callback" }
11
+ },
12
+ {
13
+ channelName: "query",
14
+ module: { name: "mysql2", versionRange: ">=3.11.5 <3.20.0", filePath: "lib/base/connection.js" },
15
+ functionQuery: { className: "BaseConnection", methodName: "query", kind: "Callback" }
16
+ },
17
+ {
18
+ channelName: "execute",
19
+ module: { name: "mysql2", versionRange: ">=3.11.5 <3.20.0", filePath: "lib/base/connection.js" },
20
+ functionQuery: { className: "BaseConnection", methodName: "execute", kind: "Callback" }
21
+ }
22
+ ];
23
+ const mysql2Channels = {
24
+ MYSQL2_QUERY: "orchestrion:mysql2:query",
25
+ MYSQL2_EXECUTE: "orchestrion:mysql2:execute"
26
+ };
27
+
28
+ export { mysql2Channels, mysql2Config };
29
+ //# sourceMappingURL=mysql2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mysql2.js","sources":["../../../../src/orchestrion/config/mysql2.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// Ports `@opentelemetry/instrumentation-mysql2` (which patches `query`/`execute` on the connection\n// prototype) to orchestrion channel injection.\n//\n// Two file layouts across the supported range:\n// - `< 3.11.5` → `class Connection` with `query`/`execute` in `lib/connection.js`\n// - `>= 3.11.5` → the methods moved to `class BaseConnection` in `lib/base/connection.js`\n//\n// Gated to `< 3.20.0`: from 3.20.0 mysql2 publishes to `node:diagnostics_channel` natively, and\n// that path is instrumented by `subscribeMysql2DiagnosticChannels` instead. Injecting there too\n// would emit two spans per query.\n//\n// `Callback` traces the callback shapes: `query(sql, cb)`, `query(sql, values, cb)`, and — since the\n// promise API funnels through the callback form — `await connection.query(sql)`. `execute` never\n// delegates to `query` internally, so instrumenting both is safe.\n//\n// NOT `Auto`: `Auto`'s no-callback branch probes the return value for `.then`, but mysql2's callback-\n// less `query(sql)` returns a `Query` whose `.then()` throws (mysql2's \"use the promise wrapper\"\n// guard) — so `Auto` would crash streamed queries. `Callback` leaves that shape untouched (a rare,\n// row-streaming use that consumes the emitter's events), the tradeoff being it isn't traced.\nexport const mysql2Config = [\n {\n channelName: 'query',\n module: { name: 'mysql2', versionRange: '>=1.4.2 <3.11.5', filePath: 'lib/connection.js' },\n functionQuery: { className: 'Connection', methodName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'execute',\n module: { name: 'mysql2', versionRange: '>=1.4.2 <3.11.5', filePath: 'lib/connection.js' },\n functionQuery: { className: 'Connection', methodName: 'execute', kind: 'Callback' },\n },\n {\n channelName: 'query',\n module: { name: 'mysql2', versionRange: '>=3.11.5 <3.20.0', filePath: 'lib/base/connection.js' },\n functionQuery: { className: 'BaseConnection', methodName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'execute',\n module: { name: 'mysql2', versionRange: '>=3.11.5 <3.20.0', filePath: 'lib/base/connection.js' },\n functionQuery: { className: 'BaseConnection', methodName: 'execute', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mysql2Channels = {\n MYSQL2_QUERY: 'orchestrion:mysql2:query',\n MYSQL2_EXECUTE: 'orchestrion:mysql2:execute',\n} as const;\n"],"names":[],"mappings":"AAqBO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,iBAAA,EAAmB,UAAU,mBAAA,EAAoB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,cAAc,UAAA,EAAY,OAAA,EAAS,MAAM,UAAA;AAAW,GAClF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,iBAAA,EAAmB,UAAU,mBAAA,EAAoB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,cAAc,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW,GACpF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,kBAAA,EAAoB,UAAU,wBAAA,EAAyB;AAAA,IAC/F,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,OAAA,EAAS,MAAM,UAAA;AAAW,GACtF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,kBAAA,EAAoB,UAAU,wBAAA,EAAyB;AAAA,IAC/F,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW;AAE1F;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,YAAA,EAAc,0BAAA;AAAA,EACd,cAAA,EAAgB;AAClB;;;;"}
@@ -0,0 +1,119 @@
1
+ function astQueryInstrumentation(config) {
2
+ return config;
3
+ }
4
+ const nestjsConfig = [
5
+ {
6
+ channelName: "nestFactoryCreate",
7
+ module: { name: "@nestjs/core", versionRange: ">=8.0.0 <12", filePath: "nest-factory.js" },
8
+ functionQuery: { className: "NestFactoryStatic", methodName: "create", kind: "Async" }
9
+ },
10
+ {
11
+ channelName: "routerExecutionContextCreate",
12
+ module: { name: "@nestjs/core", versionRange: ">=8.0.0 <12", filePath: "router/router-execution-context.js" },
13
+ functionQuery: { className: "RouterExecutionContext", methodName: "create", kind: "Sync" }
14
+ },
15
+ astQueryInstrumentation({
16
+ // `@nestjs/common/decorators/core/injectable.decorator.js`:
17
+ // `function Injectable(options) { return (target) => { ... }; }`
18
+ // The inner decorator arrow is anonymous + returned, so only a raw
19
+ // `astQuery` can target it. The subscriber's `start` receives the
20
+ // decorated class as `arguments[0]` and patches its prototype
21
+ // use/canActivate/transform/intercept methods, reproducing the
22
+ // vendored `SentryNestInstrumentation` middleware/guard/pipe/interceptor
23
+ // spans. No span on the decorator itself, so `kind: 'Sync'`.
24
+ channelName: "injectableDecorator",
25
+ module: {
26
+ name: "@nestjs/common",
27
+ versionRange: ">=8.0.0 <12",
28
+ filePath: "decorators/core/injectable.decorator.js"
29
+ },
30
+ astQuery: 'FunctionDeclaration[id.name="Injectable"] ReturnStatement > ArrowFunctionExpression',
31
+ functionQuery: { kind: "Sync" }
32
+ }),
33
+ astQueryInstrumentation({
34
+ // `@nestjs/common/decorators/core/catch.decorator.js`:
35
+ // `function Catch(...exceptions) { return (target) => { ... }; }`
36
+ // Same anonymous-returned-arrow shape as `Injectable`. The subscriber's
37
+ // `start` patches the exception filter's prototype `catch` method to
38
+ // open an `exception_filter` span.
39
+ //
40
+ // Mirrors the vendored `SentryNestInstrumentation` `@Catch` wrap.
41
+ channelName: "catchDecorator",
42
+ module: { name: "@nestjs/common", versionRange: ">=8.0.0 <12", filePath: "decorators/core/catch.decorator.js" },
43
+ astQuery: 'FunctionDeclaration[id.name="Catch"] ReturnStatement > ArrowFunctionExpression',
44
+ functionQuery: { kind: "Sync" }
45
+ }),
46
+ // @nestjs/schedule @Cron/@Interval/@Timeout:
47
+ // `function Cron(...) { return applyDecorators(...); }`
48
+ // The returned decorator has no inline arrow to target, so we match the
49
+ // factory function and reassign `data.result` in `end` to wrap the
50
+ // decorator it returns (which rewrites the user handler `descriptor.value`
51
+ // with isolation-scope + error capture).
52
+ // Mirrors `SentryNestScheduleInstrumentation`, whose supported range we
53
+ // match so opting in doesn't drop coverage the OTel path had. The compiled
54
+ // `function Cron(...)` declaration is unchanged across 2.x–5.x.
55
+ {
56
+ channelName: "cronDecorator",
57
+ module: { name: "@nestjs/schedule", versionRange: ">=2.0.0", filePath: "dist/decorators/cron.decorator.js" },
58
+ functionQuery: { functionName: "Cron", kind: "Sync" }
59
+ },
60
+ {
61
+ channelName: "intervalDecorator",
62
+ module: { name: "@nestjs/schedule", versionRange: ">=2.0.0", filePath: "dist/decorators/interval.decorator.js" },
63
+ functionQuery: { functionName: "Interval", kind: "Sync" }
64
+ },
65
+ {
66
+ channelName: "timeoutDecorator",
67
+ module: { name: "@nestjs/schedule", versionRange: ">=2.0.0", filePath: "dist/decorators/timeout.decorator.js" },
68
+ functionQuery: { functionName: "Timeout", kind: "Sync" }
69
+ },
70
+ {
71
+ // @nestjs/event-emitter @OnEvent:
72
+ // `const OnEvent = (event, options) => {
73
+ // const decoratorFactory = (t, k, d) => {...}; return decoratorFactory;
74
+ // }`
75
+ // `OnEvent` is an arrow assigned to a const, so `expressionName`. `end`
76
+ // reassigns `data.result` to wrap the returned decorator, which rewrites
77
+ // the handler to open an `event.nestjs` span.
78
+ // Mirrors `SentryNestEventInstrumentation`; the `const OnEvent = (...) =>`
79
+ // shape is unchanged across 2.x–3.x.
80
+ channelName: "onEventDecorator",
81
+ module: {
82
+ name: "@nestjs/event-emitter",
83
+ versionRange: ">=2.0.0",
84
+ filePath: "dist/decorators/on-event.decorator.js"
85
+ },
86
+ functionQuery: { expressionName: "OnEvent", kind: "Sync" }
87
+ },
88
+ {
89
+ // @nestjs/bullmq @Processor:
90
+ // `function Processor(...) { return (target) => {...}; }`
91
+ // The factory arg carries the queue name, so we match the factory and
92
+ // reassign `data.result` in `end` to wrap the returned class decorator
93
+ // (which patches `target.prototype.process`).
94
+ // Mirrors `SentryNestBullMQInstrumentation`; the `function Processor(...)`
95
+ // declaration is unchanged across
96
+ // 10.x–11.x.
97
+ channelName: "processorDecorator",
98
+ module: {
99
+ name: "@nestjs/bullmq",
100
+ versionRange: ">=10.0.0",
101
+ filePath: "dist/decorators/processor.decorator.js"
102
+ },
103
+ functionQuery: { functionName: "Processor", kind: "Sync" }
104
+ }
105
+ ];
106
+ const nestjsChannels = {
107
+ NESTJS_APP_CREATION: "orchestrion:@nestjs/core:nestFactoryCreate",
108
+ NESTJS_ROUTER_CONTEXT: "orchestrion:@nestjs/core:routerExecutionContextCreate",
109
+ NESTJS_INJECTABLE: "orchestrion:@nestjs/common:injectableDecorator",
110
+ NESTJS_CATCH: "orchestrion:@nestjs/common:catchDecorator",
111
+ NESTJS_SCHEDULE_CRON: "orchestrion:@nestjs/schedule:cronDecorator",
112
+ NESTJS_SCHEDULE_INTERVAL: "orchestrion:@nestjs/schedule:intervalDecorator",
113
+ NESTJS_SCHEDULE_TIMEOUT: "orchestrion:@nestjs/schedule:timeoutDecorator",
114
+ NESTJS_ONEVENT: "orchestrion:@nestjs/event-emitter:onEventDecorator",
115
+ NESTJS_PROCESSOR: "orchestrion:@nestjs/bullmq:processorDecorator"
116
+ };
117
+
118
+ export { nestjsChannels, nestjsConfig };
119
+ //# sourceMappingURL=nestjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nestjs.js","sources":["../../../../src/orchestrion/config/nestjs.ts"],"sourcesContent":["import type { FunctionKind, InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n/**\n * Wrap an instrumentation that targets nodes via a raw esquery selector\n * (`NstQuery`) rather than the structured `functionQuery`. Needed when the\n * target can't be named, e.g. the anonymous arrow a decorator factory returns\n * The transformer supports `astQuery` at runtime (it takes precedence over\n * `functionQuery`, which then only supplies `kind`), but it isn't in the\n * published `InstrumentationConfig` type. Hence the cast.\n */\nfunction astQueryInstrumentation(config: {\n channelName: string;\n module: InstrumentationConfig['module'];\n astQuery: string;\n functionQuery: { kind: FunctionKind };\n}): InstrumentationConfig {\n return config as unknown as InstrumentationConfig;\n}\n\n/**\n * NestJS is different from the other instrumentations here. It's a standalone\n * metaframework SDK (`@sentry/nestjs`), so its channel LISTENER lives in that\n * package rather than in `server-utils`. Only the code-transform config (and\n * the channel names below) live here, so `@nestjs/*` is transformed whenever\n * orchestrion is enabled, same as every other library.\n *\n * `@sentry/nestjs` imports {@link nestjsChannels} to subscribe, and picks the\n * channel-vs-OTel path based on the global injection flag.\n */\nexport const nestjsConfig = [\n {\n channelName: 'nestFactoryCreate',\n module: { name: '@nestjs/core', versionRange: '>=8.0.0 <12', filePath: 'nest-factory.js' },\n functionQuery: { className: 'NestFactoryStatic', methodName: 'create', kind: 'Async' },\n },\n {\n channelName: 'routerExecutionContextCreate',\n module: { name: '@nestjs/core', versionRange: '>=8.0.0 <12', filePath: 'router/router-execution-context.js' },\n functionQuery: { className: 'RouterExecutionContext', methodName: 'create', kind: 'Sync' },\n },\n astQueryInstrumentation({\n // `@nestjs/common/decorators/core/injectable.decorator.js`:\n // `function Injectable(options) { return (target) => { ... }; }`\n // The inner decorator arrow is anonymous + returned, so only a raw\n // `astQuery` can target it. The subscriber's `start` receives the\n // decorated class as `arguments[0]` and patches its prototype\n // use/canActivate/transform/intercept methods, reproducing the\n // vendored `SentryNestInstrumentation` middleware/guard/pipe/interceptor\n // spans. No span on the decorator itself, so `kind: 'Sync'`.\n channelName: 'injectableDecorator',\n module: {\n name: '@nestjs/common',\n versionRange: '>=8.0.0 <12',\n filePath: 'decorators/core/injectable.decorator.js',\n },\n astQuery: 'FunctionDeclaration[id.name=\"Injectable\"] ReturnStatement > ArrowFunctionExpression',\n functionQuery: { kind: 'Sync' },\n }),\n astQueryInstrumentation({\n // `@nestjs/common/decorators/core/catch.decorator.js`:\n // `function Catch(...exceptions) { return (target) => { ... }; }`\n // Same anonymous-returned-arrow shape as `Injectable`. The subscriber's\n // `start` patches the exception filter's prototype `catch` method to\n // open an `exception_filter` span.\n //\n // Mirrors the vendored `SentryNestInstrumentation` `@Catch` wrap.\n channelName: 'catchDecorator',\n module: { name: '@nestjs/common', versionRange: '>=8.0.0 <12', filePath: 'decorators/core/catch.decorator.js' },\n astQuery: 'FunctionDeclaration[id.name=\"Catch\"] ReturnStatement > ArrowFunctionExpression',\n functionQuery: { kind: 'Sync' },\n }),\n // @nestjs/schedule @Cron/@Interval/@Timeout:\n // `function Cron(...) { return applyDecorators(...); }`\n // The returned decorator has no inline arrow to target, so we match the\n // factory function and reassign `data.result` in `end` to wrap the\n // decorator it returns (which rewrites the user handler `descriptor.value`\n // with isolation-scope + error capture).\n // Mirrors `SentryNestScheduleInstrumentation`, whose supported range we\n // match so opting in doesn't drop coverage the OTel path had. The compiled\n // `function Cron(...)` declaration is unchanged across 2.x–5.x.\n {\n channelName: 'cronDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/cron.decorator.js' },\n functionQuery: { functionName: 'Cron', kind: 'Sync' },\n },\n {\n channelName: 'intervalDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/interval.decorator.js' },\n functionQuery: { functionName: 'Interval', kind: 'Sync' },\n },\n {\n channelName: 'timeoutDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/timeout.decorator.js' },\n functionQuery: { functionName: 'Timeout', kind: 'Sync' },\n },\n {\n // @nestjs/event-emitter @OnEvent:\n // `const OnEvent = (event, options) => {\n // const decoratorFactory = (t, k, d) => {...}; return decoratorFactory;\n // }`\n // `OnEvent` is an arrow assigned to a const, so `expressionName`. `end`\n // reassigns `data.result` to wrap the returned decorator, which rewrites\n // the handler to open an `event.nestjs` span.\n // Mirrors `SentryNestEventInstrumentation`; the `const OnEvent = (...) =>`\n // shape is unchanged across 2.x–3.x.\n channelName: 'onEventDecorator',\n module: {\n name: '@nestjs/event-emitter',\n versionRange: '>=2.0.0',\n filePath: 'dist/decorators/on-event.decorator.js',\n },\n functionQuery: { expressionName: 'OnEvent', kind: 'Sync' },\n },\n {\n // @nestjs/bullmq @Processor:\n // `function Processor(...) { return (target) => {...}; }`\n // The factory arg carries the queue name, so we match the factory and\n // reassign `data.result` in `end` to wrap the returned class decorator\n // (which patches `target.prototype.process`).\n // Mirrors `SentryNestBullMQInstrumentation`; the `function Processor(...)`\n // declaration is unchanged across\n // 10.x–11.x.\n channelName: 'processorDecorator',\n module: {\n name: '@nestjs/bullmq',\n versionRange: '>=10.0.0',\n filePath: 'dist/decorators/processor.decorator.js',\n },\n functionQuery: { functionName: 'Processor', kind: 'Sync' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const nestjsChannels = {\n NESTJS_APP_CREATION: 'orchestrion:@nestjs/core:nestFactoryCreate',\n NESTJS_ROUTER_CONTEXT: 'orchestrion:@nestjs/core:routerExecutionContextCreate',\n NESTJS_INJECTABLE: 'orchestrion:@nestjs/common:injectableDecorator',\n NESTJS_CATCH: 'orchestrion:@nestjs/common:catchDecorator',\n NESTJS_SCHEDULE_CRON: 'orchestrion:@nestjs/schedule:cronDecorator',\n NESTJS_SCHEDULE_INTERVAL: 'orchestrion:@nestjs/schedule:intervalDecorator',\n NESTJS_SCHEDULE_TIMEOUT: 'orchestrion:@nestjs/schedule:timeoutDecorator',\n NESTJS_ONEVENT: 'orchestrion:@nestjs/event-emitter:onEventDecorator',\n NESTJS_PROCESSOR: 'orchestrion:@nestjs/bullmq:processorDecorator',\n} as const;\n"],"names":[],"mappings":"AAUA,SAAS,wBAAwB,MAAA,EAKP;AACxB,EAAA,OAAO,MAAA;AACT;AAYO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,mBAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,aAAA,EAAe,UAAU,iBAAA,EAAkB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,qBAAqB,UAAA,EAAY,QAAA,EAAU,MAAM,OAAA;AAAQ,GACvF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,8BAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,aAAA,EAAe,UAAU,oCAAA,EAAqC;AAAA,IAC5G,eAAe,EAAE,SAAA,EAAW,0BAA0B,UAAA,EAAY,QAAA,EAAU,MAAM,MAAA;AAAO,GAC3F;AAAA,EACA,uBAAA,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAStB,WAAA,EAAa,qBAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,gBAAA;AAAA,MACN,YAAA,EAAc,aAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,QAAA,EAAU,qFAAA;AAAA,IACV,aAAA,EAAe,EAAE,IAAA,EAAM,MAAA;AAAO,GAC/B,CAAA;AAAA,EACD,uBAAA,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQtB,WAAA,EAAa,gBAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,kBAAkB,YAAA,EAAc,aAAA,EAAe,UAAU,oCAAA,EAAqC;AAAA,IAC9G,QAAA,EAAU,gFAAA;AAAA,IACV,aAAA,EAAe,EAAE,IAAA,EAAM,MAAA;AAAO,GAC/B,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUD;AAAA,IACE,WAAA,EAAa,eAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,oBAAoB,YAAA,EAAc,SAAA,EAAW,UAAU,mCAAA,EAAoC;AAAA,IAC3G,aAAA,EAAe,EAAE,YAAA,EAAc,MAAA,EAAQ,MAAM,MAAA;AAAO,GACtD;AAAA,EACA;AAAA,IACE,WAAA,EAAa,mBAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,oBAAoB,YAAA,EAAc,SAAA,EAAW,UAAU,uCAAA,EAAwC;AAAA,IAC/G,aAAA,EAAe,EAAE,YAAA,EAAc,UAAA,EAAY,MAAM,MAAA;AAAO,GAC1D;AAAA,EACA;AAAA,IACE,WAAA,EAAa,kBAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,oBAAoB,YAAA,EAAc,SAAA,EAAW,UAAU,sCAAA,EAAuC;AAAA,IAC9G,aAAA,EAAe,EAAE,YAAA,EAAc,SAAA,EAAW,MAAM,MAAA;AAAO,GACzD;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUE,WAAA,EAAa,kBAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,uBAAA;AAAA,MACN,YAAA,EAAc,SAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,aAAA,EAAe,EAAE,cAAA,EAAgB,SAAA,EAAW,MAAM,MAAA;AAAO,GAC3D;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASE,WAAA,EAAa,oBAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,gBAAA;AAAA,MACN,YAAA,EAAc,UAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,aAAA,EAAe,EAAE,YAAA,EAAc,WAAA,EAAa,MAAM,MAAA;AAAO;AAE7D;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,mBAAA,EAAqB,4CAAA;AAAA,EACrB,qBAAA,EAAuB,uDAAA;AAAA,EACvB,iBAAA,EAAmB,gDAAA;AAAA,EACnB,YAAA,EAAc,2CAAA;AAAA,EACd,oBAAA,EAAsB,4CAAA;AAAA,EACtB,wBAAA,EAA0B,gDAAA;AAAA,EAC1B,uBAAA,EAAyB,+CAAA;AAAA,EACzB,cAAA,EAAgB,oDAAA;AAAA,EAChB,gBAAA,EAAkB;AACpB;;;;"}
@@ -0,0 +1,5 @@
1
+ const prismaConfig = [];
2
+ const prismaChannels = {};
3
+
4
+ export { prismaChannels, prismaConfig };
5
+ //# sourceMappingURL=prisma.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisma.js","sources":["../../../../src/orchestrion/config/prisma.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `prisma` orchestrion integration (ports `@prisma/instrumentation`).\nexport const prismaConfig: InstrumentationConfig[] = [];\n\nexport const prismaChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,eAAwC;AAE9C,MAAM,iBAAiB;;;;"}
@@ -0,0 +1,5 @@
1
+ const reactRouterConfig = [];
2
+ const reactRouterChannels = {};
3
+
4
+ export { reactRouterChannels, reactRouterConfig };
5
+ //# sourceMappingURL=react-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-router.js","sources":["../../../../src/orchestrion/config/react-router.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `react-router` orchestrion integration (ports `ReactRouterInstrumentation`).\nexport const reactRouterConfig: InstrumentationConfig[] = [];\n\nexport const reactRouterChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,oBAA6C;AAEnD,MAAM,sBAAsB;;;;"}
@@ -0,0 +1,5 @@
1
+ const remixConfig = [];
2
+ const remixChannels = {};
3
+
4
+ export { remixChannels, remixConfig };
5
+ //# sourceMappingURL=remix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remix.js","sources":["../../../../src/orchestrion/config/remix.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `remix` orchestrion integration (ports `RemixInstrumentation`).\nexport const remixConfig: InstrumentationConfig[] = [];\n\nexport const remixChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,cAAuC;AAE7C,MAAM,gBAAgB;;;;"}
@@ -0,0 +1,5 @@
1
+ const tediousConfig = [];
2
+ const tediousChannels = {};
3
+
4
+ export { tediousChannels, tediousConfig };
5
+ //# sourceMappingURL=tedious.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tedious.js","sources":["../../../../src/orchestrion/config/tedious.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// TODO: Stub for the `tedious` orchestrion integration (ports `@opentelemetry/instrumentation-tedious`).\nexport const tediousConfig: InstrumentationConfig[] = [];\n\nexport const tediousChannels = {} as const;\n"],"names":[],"mappings":"AAGO,MAAM,gBAAyC;AAE/C,MAAM,kBAAkB;;;;"}
@@ -1,21 +1,22 @@
1
- import { debug } from '@sentry/core';
2
- import { DEBUG_BUILD } from '../debug-build.js';
1
+ import { GLOBAL_OBJ, debug } from '@sentry/core';
3
2
 
4
3
  function isOrchestrionInjected() {
5
- const marker = globalThis.__SENTRY_ORCHESTRION__;
6
- return !!(marker?.runtime || marker?.bundler);
4
+ return !!GLOBAL_OBJ.__SENTRY_ORCHESTRION__;
7
5
  }
8
6
  function detectOrchestrionSetup() {
9
- if (!DEBUG_BUILD) return;
10
- const marker = globalThis.__SENTRY_ORCHESTRION__;
11
- const runtime = !!marker?.runtime;
12
- const bundler = !!marker?.bundler;
13
- DEBUG_BUILD && debug.log(`[orchestrion] detect: runtime=${runtime} bundler=${bundler}`);
14
- if (!isOrchestrionInjected()) {
15
- DEBUG_BUILD && debug.warn(
16
- "[Sentry] No diagnostics-channel injection detected. Channel-based integrations (mysql, \u2026) will not record spans. Make sure the diagnostics channels are injected via the runtime `--import` hook or a bundler plugin before the instrumented modules load."
7
+ const { runtime, bundler } = GLOBAL_OBJ.__SENTRY_ORCHESTRION__ ?? {};
8
+ if (!runtime && !bundler) {
9
+ debug.warn(
10
+ "[Sentry] No diagnostics-channel injection detected. Channel-based integrations will not record spans. Make sure the diagnostics channels are injected via the runtime `--import` hook or a bundler plugin before the instrumented modules load."
17
11
  );
12
+ return;
18
13
  }
14
+ debug.log(
15
+ runtime ? `[Sentry] Runtime hook registered, injected libraries=${JSON.stringify(runtime)}` : "[Sentry] Runtime hook not registered"
16
+ );
17
+ debug.log(
18
+ bundler ? `[Sentry] Bundler plugin ran, injected libraries=${JSON.stringify(bundler)}` : "[Sentry] Bundler plugin did not run"
19
+ );
19
20
  }
20
21
 
21
22
  export { detectOrchestrionSetup, isOrchestrionInjected };
@@ -1 +1 @@
1
- {"version":3,"file":"detect.js","sources":["../../../src/orchestrion/detect.ts"],"sourcesContent":["import { debug } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\n\ndeclare global {\n // eslint-disable-next-line no-var\n var __SENTRY_ORCHESTRION__: { runtime?: boolean; bundler?: boolean } | undefined;\n}\n\n/**\n * Whether orchestrion has injected the diagnostics channels into this process,\n * either by the runtime `--import` hook / init-time registration (`runtime`)\n * or a bundler plugin (`bundler`). Both injectors set a flag on the\n * `globalThis.__SENTRY_ORCHESTRION__` marker.\n *\n * Use this to avoid wiring up channel-subscriber integrations when nothing\n * will ever publish to those channels.\n */\nexport function isOrchestrionInjected(): boolean {\n const marker = globalThis.__SENTRY_ORCHESTRION__;\n return !!(marker?.runtime || marker?.bundler);\n}\n\n/**\n * Verifies that the diagnostics channels have been injected either by the\n * runtime `--import` hook (or init-time registration), a bundler plugin, or\n * both, and warns if not.\n *\n * Both injectors being active at once is fine: they operate on disjoint module\n * sets (a module is either loaded through Node's loader and transformed by the\n * runtime hook, or inlined by the bundler and transformed by the plugin), so\n * a single module can't be double-wrapped. A hybrid setup, with some deps\n * external and runtime-instrumented, others bundled and plugin-instrumented,\n * is fine.\n *\n * Note: intentionally does NOT warn in production, only in debug builds,\n * because production warnings are reserved for truly critical issues.\n */\nexport function detectOrchestrionSetup(): void {\n if (!DEBUG_BUILD) return;\n\n const marker = globalThis.__SENTRY_ORCHESTRION__;\n const runtime = !!marker?.runtime;\n const bundler = !!marker?.bundler;\n\n DEBUG_BUILD && debug.log(`[orchestrion] detect: runtime=${runtime} bundler=${bundler}`);\n\n if (!isOrchestrionInjected()) {\n DEBUG_BUILD &&\n debug.warn(\n '[Sentry] No diagnostics-channel injection detected. Channel-based integrations ' +\n '(mysql, …) will not record spans. Make sure the diagnostics channels are injected ' +\n 'via the runtime `--import` hook or a bundler plugin before the instrumented modules load.',\n );\n }\n}\n"],"names":[],"mappings":";;;AAiBO,SAAS,qBAAA,GAAiC;AAC/C,EAAA,MAAM,SAAS,UAAA,CAAW,sBAAA;AAC1B,EAAA,OAAO,CAAC,EAAE,MAAA,EAAQ,OAAA,IAAW,MAAA,EAAQ,OAAA,CAAA;AACvC;AAiBO,SAAS,sBAAA,GAA+B;AAC7C,EAAA,IAAI,CAAC,WAAA,EAAa;AAElB,EAAA,MAAM,SAAS,UAAA,CAAW,sBAAA;AAC1B,EAAA,MAAM,OAAA,GAAU,CAAC,CAAC,MAAA,EAAQ,OAAA;AAC1B,EAAA,MAAM,OAAA,GAAU,CAAC,CAAC,MAAA,EAAQ,OAAA;AAE1B,EAAA,WAAA,IAAe,MAAM,GAAA,CAAI,CAAA,8BAAA,EAAiC,OAAO,CAAA,SAAA,EAAY,OAAO,CAAA,CAAE,CAAA;AAEtF,EAAA,IAAI,CAAC,uBAAsB,EAAG;AAC5B,IAAA,WAAA,IACE,KAAA,CAAM,IAAA;AAAA,MACJ;AAAA,KAGF;AAAA,EACJ;AACF;;;;"}
1
+ {"version":3,"file":"detect.js","sources":["../../../src/orchestrion/detect.ts"],"sourcesContent":["import { debug, GLOBAL_OBJ } from '@sentry/core';\n\n/**\n * Whether orchestrion has injected the diagnostics channels into this process,\n * either by the runtime `--import` hook / init-time registration (`runtime`)\n * or a bundler plugin (`bundler`). Both injectors set a flag on the\n * `globalThis.__SENTRY_ORCHESTRION__` marker.\n *\n * Use this to avoid wiring up channel-subscriber integrations when nothing\n * will ever publish to those channels.\n */\nexport function isOrchestrionInjected(): boolean {\n return !!GLOBAL_OBJ.__SENTRY_ORCHESTRION__;\n}\n\n/**\n * Verifies that the diagnostics channels have been injected either by the\n * runtime `--import` hook (or init-time registration), a bundler plugin, or\n * both, and warns if not. When at least one injector is active, logs for each\n * mechanism whether it hooked (a defined array, even empty, means it did) and\n * which libraries it injected.\n *\n * Both injectors being active at once is fine: they operate on disjoint module\n * sets (a module is either loaded through Node's loader and transformed by the\n * runtime hook, or inlined by the bundler and transformed by the plugin), so\n * a single module can't be double-wrapped. A hybrid setup, with some deps\n * external and runtime-instrumented, others bundled and plugin-instrumented,\n * is fine.\n */\nexport function detectOrchestrionSetup(): void {\n const { runtime, bundler } = GLOBAL_OBJ.__SENTRY_ORCHESTRION__ ?? {};\n\n if (!runtime && !bundler) {\n debug.warn(\n '[Sentry] No diagnostics-channel injection detected. Channel-based integrations ' +\n 'will not record spans. Make sure the diagnostics channels are injected ' +\n 'via the runtime `--import` hook or a bundler plugin before the instrumented modules load.',\n );\n return;\n }\n\n debug.log(\n runtime\n ? `[Sentry] Runtime hook registered, injected libraries=${JSON.stringify(runtime)}`\n : '[Sentry] Runtime hook not registered',\n );\n debug.log(\n bundler\n ? `[Sentry] Bundler plugin ran, injected libraries=${JSON.stringify(bundler)}`\n : '[Sentry] Bundler plugin did not run',\n );\n}\n"],"names":[],"mappings":";;AAWO,SAAS,qBAAA,GAAiC;AAC/C,EAAA,OAAO,CAAC,CAAC,UAAA,CAAW,sBAAA;AACtB;AAgBO,SAAS,sBAAA,GAA+B;AAC7C,EAAA,MAAM,EAAE,OAAA,EAAS,OAAA,EAAQ,GAAI,UAAA,CAAW,0BAA0B,EAAC;AAEnE,EAAA,IAAI,CAAC,OAAA,IAAW,CAAC,OAAA,EAAS;AACxB,IAAA,KAAA,CAAM,IAAA;AAAA,MACJ;AAAA,KAGF;AACA,IAAA;AAAA,EACF;AAEA,EAAA,KAAA,CAAM,GAAA;AAAA,IACJ,UACI,CAAA,qDAAA,EAAwD,IAAA,CAAK,SAAA,CAAU,OAAO,CAAC,CAAA,CAAA,GAC/E;AAAA,GACN;AACA,EAAA,KAAA,CAAM,GAAA;AAAA,IACJ,UACI,CAAA,gDAAA,EAAmD,IAAA,CAAK,SAAA,CAAU,OAAO,CAAC,CAAA,CAAA,GAC1E;AAAA,GACN;AACF;;;;"}