@depup/sentry__server-utils 10.67.0-depup.0 → 10.68.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/README.md +5 -4
  2. package/build/cjs/integrations/tracing-channel/dataloader.js +17 -7
  3. package/build/cjs/integrations/tracing-channel/dataloader.js.map +1 -1
  4. package/build/cjs/integrations/tracing-channel/fastify/index.js +2 -4
  5. package/build/cjs/integrations/tracing-channel/fastify/index.js.map +1 -1
  6. package/build/cjs/integrations/tracing-channel/fastify/utils.js.map +1 -1
  7. package/build/cjs/integrations/tracing-channel/firebase/firestore.js +78 -0
  8. package/build/cjs/integrations/tracing-channel/firebase/firestore.js.map +1 -0
  9. package/build/cjs/integrations/tracing-channel/firebase/functions.js +67 -0
  10. package/build/cjs/integrations/tracing-channel/firebase/functions.js.map +1 -0
  11. package/build/cjs/integrations/tracing-channel/firebase/index.js +24 -0
  12. package/build/cjs/integrations/tracing-channel/firebase/index.js.map +1 -0
  13. package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js +66 -0
  14. package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js.map +1 -0
  15. package/build/cjs/orchestrion/bundler/esbuild.js +24 -1
  16. package/build/cjs/orchestrion/bundler/esbuild.js.map +1 -1
  17. package/build/cjs/orchestrion/bundler/options.js +16 -2
  18. package/build/cjs/orchestrion/bundler/options.js.map +1 -1
  19. package/build/cjs/orchestrion/bundler/rollup.js +11 -1
  20. package/build/cjs/orchestrion/bundler/rollup.js.map +1 -1
  21. package/build/cjs/orchestrion/bundler/subscribeInjection.js +40 -0
  22. package/build/cjs/orchestrion/bundler/subscribeInjection.js.map +1 -0
  23. package/build/cjs/orchestrion/bundler/vite.js +13 -0
  24. package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
  25. package/build/cjs/orchestrion/bundler/webpack.js +32 -1
  26. package/build/cjs/orchestrion/bundler/webpack.js.map +1 -1
  27. package/build/cjs/orchestrion/channels.js +0 -4
  28. package/build/cjs/orchestrion/channels.js.map +1 -1
  29. package/build/cjs/orchestrion/config/amqplib.js +4 -0
  30. package/build/cjs/orchestrion/config/amqplib.js.map +1 -1
  31. package/build/cjs/orchestrion/config/anthropic-ai.js +4 -0
  32. package/build/cjs/orchestrion/config/anthropic-ai.js.map +1 -1
  33. package/build/cjs/orchestrion/config/aws-sdk.js +4 -0
  34. package/build/cjs/orchestrion/config/aws-sdk.js.map +1 -1
  35. package/build/cjs/orchestrion/config/channel-integration-definitions.js +29 -0
  36. package/build/cjs/orchestrion/config/channel-integration-definitions.js.map +1 -0
  37. package/build/cjs/orchestrion/config/dataloader.js +4 -0
  38. package/build/cjs/orchestrion/config/dataloader.js.map +1 -1
  39. package/build/cjs/orchestrion/config/express.js +4 -0
  40. package/build/cjs/orchestrion/config/express.js.map +1 -1
  41. package/build/cjs/orchestrion/config/firebase.js +79 -2
  42. package/build/cjs/orchestrion/config/firebase.js.map +1 -1
  43. package/build/cjs/orchestrion/config/generic-pool.js +4 -0
  44. package/build/cjs/orchestrion/config/generic-pool.js.map +1 -1
  45. package/build/cjs/orchestrion/config/google-genai.js +4 -0
  46. package/build/cjs/orchestrion/config/google-genai.js.map +1 -1
  47. package/build/cjs/orchestrion/config/graphql.js +4 -0
  48. package/build/cjs/orchestrion/config/graphql.js.map +1 -1
  49. package/build/cjs/orchestrion/config/hapi.js +4 -0
  50. package/build/cjs/orchestrion/config/hapi.js.map +1 -1
  51. package/build/cjs/orchestrion/config/index.js +33 -5
  52. package/build/cjs/orchestrion/config/index.js.map +1 -1
  53. package/build/cjs/orchestrion/config/ioredis.js +4 -0
  54. package/build/cjs/orchestrion/config/ioredis.js.map +1 -1
  55. package/build/cjs/orchestrion/config/kafkajs.js +4 -0
  56. package/build/cjs/orchestrion/config/kafkajs.js.map +1 -1
  57. package/build/cjs/orchestrion/config/knex.js +4 -0
  58. package/build/cjs/orchestrion/config/knex.js.map +1 -1
  59. package/build/cjs/orchestrion/config/koa.js +4 -0
  60. package/build/cjs/orchestrion/config/koa.js.map +1 -1
  61. package/build/cjs/orchestrion/config/langchain.js +4 -0
  62. package/build/cjs/orchestrion/config/langchain.js.map +1 -1
  63. package/build/cjs/orchestrion/config/langgraph.js +4 -0
  64. package/build/cjs/orchestrion/config/langgraph.js.map +1 -1
  65. package/build/cjs/orchestrion/config/lru-memoizer.js +4 -0
  66. package/build/cjs/orchestrion/config/lru-memoizer.js.map +1 -1
  67. package/build/cjs/orchestrion/config/mongodb.js +4 -0
  68. package/build/cjs/orchestrion/config/mongodb.js.map +1 -1
  69. package/build/cjs/orchestrion/config/mongoose.js +4 -0
  70. package/build/cjs/orchestrion/config/mongoose.js.map +1 -1
  71. package/build/cjs/orchestrion/config/mysql.js +4 -0
  72. package/build/cjs/orchestrion/config/mysql.js.map +1 -1
  73. package/build/cjs/orchestrion/config/mysql2.js +4 -0
  74. package/build/cjs/orchestrion/config/mysql2.js.map +1 -1
  75. package/build/cjs/orchestrion/config/nestjs.js +4 -0
  76. package/build/cjs/orchestrion/config/nestjs.js.map +1 -1
  77. package/build/cjs/orchestrion/config/openai.js +4 -0
  78. package/build/cjs/orchestrion/config/openai.js.map +1 -1
  79. package/build/cjs/orchestrion/config/pg.js +4 -0
  80. package/build/cjs/orchestrion/config/pg.js.map +1 -1
  81. package/build/cjs/orchestrion/config/postgres.js +4 -0
  82. package/build/cjs/orchestrion/config/postgres.js.map +1 -1
  83. package/build/cjs/orchestrion/config/redis.js +4 -0
  84. package/build/cjs/orchestrion/config/redis.js.map +1 -1
  85. package/build/cjs/orchestrion/config/remix.js +4 -0
  86. package/build/cjs/orchestrion/config/remix.js.map +1 -1
  87. package/build/cjs/orchestrion/config/subscribe-injection.js +25 -0
  88. package/build/cjs/orchestrion/config/subscribe-injection.js.map +1 -0
  89. package/build/cjs/orchestrion/config/tedious.js +4 -0
  90. package/build/cjs/orchestrion/config/tedious.js.map +1 -1
  91. package/build/cjs/orchestrion/config/vercel-ai.js +4 -0
  92. package/build/cjs/orchestrion/config/vercel-ai.js.map +1 -1
  93. package/build/cjs/orchestrion/index.js +12 -7
  94. package/build/cjs/orchestrion/index.js.map +1 -1
  95. package/build/cjs/orchestrion/registerChannelIntegration.js +13 -0
  96. package/build/cjs/orchestrion/registerChannelIntegration.js.map +1 -0
  97. package/build/cjs/vercel-ai/index.js.map +1 -1
  98. package/build/esm/integrations/tracing-channel/dataloader.js +17 -7
  99. package/build/esm/integrations/tracing-channel/dataloader.js.map +1 -1
  100. package/build/esm/integrations/tracing-channel/fastify/index.js +2 -4
  101. package/build/esm/integrations/tracing-channel/fastify/index.js.map +1 -1
  102. package/build/esm/integrations/tracing-channel/fastify/utils.js.map +1 -1
  103. package/build/esm/integrations/tracing-channel/firebase/firestore.js +75 -0
  104. package/build/esm/integrations/tracing-channel/firebase/firestore.js.map +1 -0
  105. package/build/esm/integrations/tracing-channel/firebase/functions.js +65 -0
  106. package/build/esm/integrations/tracing-channel/firebase/functions.js.map +1 -0
  107. package/build/esm/integrations/tracing-channel/firebase/index.js +22 -0
  108. package/build/esm/integrations/tracing-channel/firebase/index.js.map +1 -0
  109. package/build/esm/integrations/tracing-channel/firebase/instrumentation.js +64 -0
  110. package/build/esm/integrations/tracing-channel/firebase/instrumentation.js.map +1 -0
  111. package/build/esm/orchestrion/bundler/esbuild.js +25 -2
  112. package/build/esm/orchestrion/bundler/esbuild.js.map +1 -1
  113. package/build/esm/orchestrion/bundler/options.js +15 -3
  114. package/build/esm/orchestrion/bundler/options.js.map +1 -1
  115. package/build/esm/orchestrion/bundler/rollup.js +12 -2
  116. package/build/esm/orchestrion/bundler/rollup.js.map +1 -1
  117. package/build/esm/orchestrion/bundler/subscribeInjection.js +38 -0
  118. package/build/esm/orchestrion/bundler/subscribeInjection.js.map +1 -0
  119. package/build/esm/orchestrion/bundler/vite.js +14 -1
  120. package/build/esm/orchestrion/bundler/vite.js.map +1 -1
  121. package/build/esm/orchestrion/bundler/webpack.js +33 -3
  122. package/build/esm/orchestrion/bundler/webpack.js.map +1 -1
  123. package/build/esm/orchestrion/channels.js +0 -4
  124. package/build/esm/orchestrion/channels.js.map +1 -1
  125. package/build/esm/orchestrion/config/amqplib.js +4 -1
  126. package/build/esm/orchestrion/config/amqplib.js.map +1 -1
  127. package/build/esm/orchestrion/config/anthropic-ai.js +4 -1
  128. package/build/esm/orchestrion/config/anthropic-ai.js.map +1 -1
  129. package/build/esm/orchestrion/config/aws-sdk.js +4 -1
  130. package/build/esm/orchestrion/config/aws-sdk.js.map +1 -1
  131. package/build/esm/orchestrion/config/channel-integration-definitions.js +26 -0
  132. package/build/esm/orchestrion/config/channel-integration-definitions.js.map +1 -0
  133. package/build/esm/orchestrion/config/dataloader.js +4 -1
  134. package/build/esm/orchestrion/config/dataloader.js.map +1 -1
  135. package/build/esm/orchestrion/config/express.js +4 -1
  136. package/build/esm/orchestrion/config/express.js.map +1 -1
  137. package/build/esm/orchestrion/config/firebase.js +79 -3
  138. package/build/esm/orchestrion/config/firebase.js.map +1 -1
  139. package/build/esm/orchestrion/config/generic-pool.js +4 -1
  140. package/build/esm/orchestrion/config/generic-pool.js.map +1 -1
  141. package/build/esm/orchestrion/config/google-genai.js +4 -1
  142. package/build/esm/orchestrion/config/google-genai.js.map +1 -1
  143. package/build/esm/orchestrion/config/graphql.js +4 -1
  144. package/build/esm/orchestrion/config/graphql.js.map +1 -1
  145. package/build/esm/orchestrion/config/hapi.js +4 -1
  146. package/build/esm/orchestrion/config/hapi.js.map +1 -1
  147. package/build/esm/orchestrion/config/index.js +61 -34
  148. package/build/esm/orchestrion/config/index.js.map +1 -1
  149. package/build/esm/orchestrion/config/ioredis.js +4 -1
  150. package/build/esm/orchestrion/config/ioredis.js.map +1 -1
  151. package/build/esm/orchestrion/config/kafkajs.js +4 -1
  152. package/build/esm/orchestrion/config/kafkajs.js.map +1 -1
  153. package/build/esm/orchestrion/config/knex.js +4 -1
  154. package/build/esm/orchestrion/config/knex.js.map +1 -1
  155. package/build/esm/orchestrion/config/koa.js +4 -1
  156. package/build/esm/orchestrion/config/koa.js.map +1 -1
  157. package/build/esm/orchestrion/config/langchain.js +4 -1
  158. package/build/esm/orchestrion/config/langchain.js.map +1 -1
  159. package/build/esm/orchestrion/config/langgraph.js +4 -1
  160. package/build/esm/orchestrion/config/langgraph.js.map +1 -1
  161. package/build/esm/orchestrion/config/lru-memoizer.js +4 -1
  162. package/build/esm/orchestrion/config/lru-memoizer.js.map +1 -1
  163. package/build/esm/orchestrion/config/mongodb.js +4 -1
  164. package/build/esm/orchestrion/config/mongodb.js.map +1 -1
  165. package/build/esm/orchestrion/config/mongoose.js +4 -1
  166. package/build/esm/orchestrion/config/mongoose.js.map +1 -1
  167. package/build/esm/orchestrion/config/mysql.js +4 -1
  168. package/build/esm/orchestrion/config/mysql.js.map +1 -1
  169. package/build/esm/orchestrion/config/mysql2.js +4 -1
  170. package/build/esm/orchestrion/config/mysql2.js.map +1 -1
  171. package/build/esm/orchestrion/config/nestjs.js +4 -1
  172. package/build/esm/orchestrion/config/nestjs.js.map +1 -1
  173. package/build/esm/orchestrion/config/openai.js +4 -1
  174. package/build/esm/orchestrion/config/openai.js.map +1 -1
  175. package/build/esm/orchestrion/config/pg.js +4 -1
  176. package/build/esm/orchestrion/config/pg.js.map +1 -1
  177. package/build/esm/orchestrion/config/postgres.js +4 -1
  178. package/build/esm/orchestrion/config/postgres.js.map +1 -1
  179. package/build/esm/orchestrion/config/redis.js +4 -1
  180. package/build/esm/orchestrion/config/redis.js.map +1 -1
  181. package/build/esm/orchestrion/config/remix.js +4 -1
  182. package/build/esm/orchestrion/config/remix.js.map +1 -1
  183. package/build/esm/orchestrion/config/subscribe-injection.js +22 -0
  184. package/build/esm/orchestrion/config/subscribe-injection.js.map +1 -0
  185. package/build/esm/orchestrion/config/tedious.js +4 -1
  186. package/build/esm/orchestrion/config/tedious.js.map +1 -1
  187. package/build/esm/orchestrion/config/vercel-ai.js +4 -1
  188. package/build/esm/orchestrion/config/vercel-ai.js.map +1 -1
  189. package/build/esm/orchestrion/index.js +5 -2
  190. package/build/esm/orchestrion/index.js.map +1 -1
  191. package/build/esm/orchestrion/registerChannelIntegration.js +11 -0
  192. package/build/esm/orchestrion/registerChannelIntegration.js.map +1 -0
  193. package/build/esm/package.json +1 -1
  194. package/build/esm/vercel-ai/index.js.map +1 -1
  195. package/build/types/index.d.ts +1 -1
  196. package/build/types/index.d.ts.map +1 -1
  197. package/build/types/integrations/tracing-channel/dataloader.d.ts.map +1 -1
  198. package/build/types/integrations/tracing-channel/fastify/index.d.ts +2 -2
  199. package/build/types/integrations/tracing-channel/fastify/index.d.ts.map +1 -1
  200. package/build/types/integrations/tracing-channel/fastify/utils.d.ts +1 -1
  201. package/build/types/integrations/tracing-channel/fastify/utils.d.ts.map +1 -1
  202. package/build/types/integrations/tracing-channel/firebase/firestore-types.d.ts +38 -0
  203. package/build/types/integrations/tracing-channel/firebase/firestore-types.d.ts.map +1 -0
  204. package/build/types/integrations/tracing-channel/firebase/firestore.d.ts +18 -0
  205. package/build/types/integrations/tracing-channel/firebase/firestore.d.ts.map +1 -0
  206. package/build/types/integrations/tracing-channel/firebase/functions.d.ts +15 -0
  207. package/build/types/integrations/tracing-channel/firebase/functions.d.ts.map +1 -0
  208. package/build/types/integrations/tracing-channel/firebase/index.d.ts +15 -0
  209. package/build/types/integrations/tracing-channel/firebase/index.d.ts.map +1 -0
  210. package/build/types/integrations/tracing-channel/firebase/instrumentation.d.ts +2 -0
  211. package/build/types/integrations/tracing-channel/firebase/instrumentation.d.ts.map +1 -0
  212. package/build/types/integrations/tracing-channel/vercel-ai.d.ts +1 -5
  213. package/build/types/integrations/tracing-channel/vercel-ai.d.ts.map +1 -1
  214. package/build/types/orchestrion/bundler/esbuild.d.ts +2 -3
  215. package/build/types/orchestrion/bundler/esbuild.d.ts.map +1 -1
  216. package/build/types/orchestrion/bundler/options.d.ts +34 -0
  217. package/build/types/orchestrion/bundler/options.d.ts.map +1 -1
  218. package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -1
  219. package/build/types/orchestrion/bundler/subscribeInjection.d.ts +13 -0
  220. package/build/types/orchestrion/bundler/subscribeInjection.d.ts.map +1 -0
  221. package/build/types/orchestrion/bundler/vite.d.ts.map +1 -1
  222. package/build/types/orchestrion/bundler/webpack.d.ts +6 -1
  223. package/build/types/orchestrion/bundler/webpack.d.ts.map +1 -1
  224. package/build/types/orchestrion/channels.d.ts +15 -0
  225. package/build/types/orchestrion/channels.d.ts.map +1 -1
  226. package/build/types/orchestrion/config/amqplib.d.ts +2 -0
  227. package/build/types/orchestrion/config/amqplib.d.ts.map +1 -1
  228. package/build/types/orchestrion/config/anthropic-ai.d.ts +2 -0
  229. package/build/types/orchestrion/config/anthropic-ai.d.ts.map +1 -1
  230. package/build/types/orchestrion/config/aws-sdk.d.ts +2 -0
  231. package/build/types/orchestrion/config/aws-sdk.d.ts.map +1 -1
  232. package/build/types/orchestrion/config/channel-integration-definitions.d.ts +81 -0
  233. package/build/types/orchestrion/config/channel-integration-definitions.d.ts.map +1 -0
  234. package/build/types/orchestrion/config/dataloader.d.ts +2 -0
  235. package/build/types/orchestrion/config/dataloader.d.ts.map +1 -1
  236. package/build/types/orchestrion/config/express.d.ts +2 -0
  237. package/build/types/orchestrion/config/express.d.ts.map +1 -1
  238. package/build/types/orchestrion/config/firebase.d.ts +41 -2
  239. package/build/types/orchestrion/config/firebase.d.ts.map +1 -1
  240. package/build/types/orchestrion/config/generic-pool.d.ts +2 -0
  241. package/build/types/orchestrion/config/generic-pool.d.ts.map +1 -1
  242. package/build/types/orchestrion/config/google-genai.d.ts +2 -0
  243. package/build/types/orchestrion/config/google-genai.d.ts.map +1 -1
  244. package/build/types/orchestrion/config/graphql.d.ts +2 -0
  245. package/build/types/orchestrion/config/graphql.d.ts.map +1 -1
  246. package/build/types/orchestrion/config/hapi.d.ts +2 -0
  247. package/build/types/orchestrion/config/hapi.d.ts.map +1 -1
  248. package/build/types/orchestrion/config/index.d.ts +12 -0
  249. package/build/types/orchestrion/config/index.d.ts.map +1 -1
  250. package/build/types/orchestrion/config/ioredis.d.ts +1 -0
  251. package/build/types/orchestrion/config/ioredis.d.ts.map +1 -1
  252. package/build/types/orchestrion/config/kafkajs.d.ts +2 -0
  253. package/build/types/orchestrion/config/kafkajs.d.ts.map +1 -1
  254. package/build/types/orchestrion/config/knex.d.ts +1 -0
  255. package/build/types/orchestrion/config/knex.d.ts.map +1 -1
  256. package/build/types/orchestrion/config/koa.d.ts +2 -0
  257. package/build/types/orchestrion/config/koa.d.ts.map +1 -1
  258. package/build/types/orchestrion/config/langchain.d.ts +2 -0
  259. package/build/types/orchestrion/config/langchain.d.ts.map +1 -1
  260. package/build/types/orchestrion/config/langgraph.d.ts +2 -0
  261. package/build/types/orchestrion/config/langgraph.d.ts.map +1 -1
  262. package/build/types/orchestrion/config/lru-memoizer.d.ts +2 -0
  263. package/build/types/orchestrion/config/lru-memoizer.d.ts.map +1 -1
  264. package/build/types/orchestrion/config/mongodb.d.ts +2 -0
  265. package/build/types/orchestrion/config/mongodb.d.ts.map +1 -1
  266. package/build/types/orchestrion/config/mongoose.d.ts +2 -0
  267. package/build/types/orchestrion/config/mongoose.d.ts.map +1 -1
  268. package/build/types/orchestrion/config/mysql.d.ts +2 -0
  269. package/build/types/orchestrion/config/mysql.d.ts.map +1 -1
  270. package/build/types/orchestrion/config/mysql2.d.ts +2 -0
  271. package/build/types/orchestrion/config/mysql2.d.ts.map +1 -1
  272. package/build/types/orchestrion/config/nestjs.d.ts +1 -0
  273. package/build/types/orchestrion/config/nestjs.d.ts.map +1 -1
  274. package/build/types/orchestrion/config/openai.d.ts +2 -0
  275. package/build/types/orchestrion/config/openai.d.ts.map +1 -1
  276. package/build/types/orchestrion/config/pg.d.ts +2 -0
  277. package/build/types/orchestrion/config/pg.d.ts.map +1 -1
  278. package/build/types/orchestrion/config/postgres.d.ts +1 -0
  279. package/build/types/orchestrion/config/postgres.d.ts.map +1 -1
  280. package/build/types/orchestrion/config/redis.d.ts +2 -0
  281. package/build/types/orchestrion/config/redis.d.ts.map +1 -1
  282. package/build/types/orchestrion/config/remix.d.ts +1 -0
  283. package/build/types/orchestrion/config/remix.d.ts.map +1 -1
  284. package/build/types/orchestrion/config/subscribe-injection.d.ts +31 -0
  285. package/build/types/orchestrion/config/subscribe-injection.d.ts.map +1 -0
  286. package/build/types/orchestrion/config/tedious.d.ts +1 -0
  287. package/build/types/orchestrion/config/tedious.d.ts.map +1 -1
  288. package/build/types/orchestrion/config/vercel-ai.d.ts +1 -0
  289. package/build/types/orchestrion/config/vercel-ai.d.ts.map +1 -1
  290. package/build/types/orchestrion/index.d.ts +7 -6
  291. package/build/types/orchestrion/index.d.ts.map +1 -1
  292. package/build/types/orchestrion/registerChannelIntegration.d.ts +33 -0
  293. package/build/types/orchestrion/registerChannelIntegration.d.ts.map +1 -0
  294. package/build/types/vercel-ai/index.d.ts +2 -3
  295. package/build/types/vercel-ai/index.d.ts.map +1 -1
  296. package/build/types-ts3.8/index.d.ts +1 -1
  297. package/build/types-ts3.8/integrations/tracing-channel/fastify/index.d.ts +2 -2
  298. package/build/types-ts3.8/integrations/tracing-channel/fastify/utils.d.ts +1 -1
  299. package/build/types-ts3.8/integrations/tracing-channel/firebase/firestore-types.d.ts +38 -0
  300. package/build/types-ts3.8/integrations/tracing-channel/firebase/firestore.d.ts +18 -0
  301. package/build/types-ts3.8/integrations/tracing-channel/firebase/functions.d.ts +15 -0
  302. package/build/types-ts3.8/integrations/tracing-channel/firebase/index.d.ts +15 -0
  303. package/build/types-ts3.8/integrations/tracing-channel/firebase/instrumentation.d.ts +2 -0
  304. package/build/types-ts3.8/integrations/tracing-channel/vercel-ai.d.ts +1 -5
  305. package/build/types-ts3.8/orchestrion/bundler/esbuild.d.ts +2 -3
  306. package/build/types-ts3.8/orchestrion/bundler/options.d.ts +34 -0
  307. package/build/types-ts3.8/orchestrion/bundler/subscribeInjection.d.ts +13 -0
  308. package/build/types-ts3.8/orchestrion/bundler/webpack.d.ts +6 -1
  309. package/build/types-ts3.8/orchestrion/channels.d.ts +15 -0
  310. package/build/types-ts3.8/orchestrion/config/amqplib.d.ts +2 -0
  311. package/build/types-ts3.8/orchestrion/config/anthropic-ai.d.ts +2 -0
  312. package/build/types-ts3.8/orchestrion/config/aws-sdk.d.ts +2 -0
  313. package/build/types-ts3.8/orchestrion/config/channel-integration-definitions.d.ts +139 -0
  314. package/build/types-ts3.8/orchestrion/config/dataloader.d.ts +2 -0
  315. package/build/types-ts3.8/orchestrion/config/express.d.ts +2 -0
  316. package/build/types-ts3.8/orchestrion/config/firebase.d.ts +41 -2
  317. package/build/types-ts3.8/orchestrion/config/generic-pool.d.ts +2 -0
  318. package/build/types-ts3.8/orchestrion/config/google-genai.d.ts +2 -0
  319. package/build/types-ts3.8/orchestrion/config/graphql.d.ts +2 -0
  320. package/build/types-ts3.8/orchestrion/config/hapi.d.ts +2 -0
  321. package/build/types-ts3.8/orchestrion/config/index.d.ts +12 -0
  322. package/build/types-ts3.8/orchestrion/config/ioredis.d.ts +1 -0
  323. package/build/types-ts3.8/orchestrion/config/kafkajs.d.ts +2 -0
  324. package/build/types-ts3.8/orchestrion/config/knex.d.ts +1 -0
  325. package/build/types-ts3.8/orchestrion/config/koa.d.ts +2 -0
  326. package/build/types-ts3.8/orchestrion/config/langchain.d.ts +2 -0
  327. package/build/types-ts3.8/orchestrion/config/langgraph.d.ts +2 -0
  328. package/build/types-ts3.8/orchestrion/config/lru-memoizer.d.ts +2 -0
  329. package/build/types-ts3.8/orchestrion/config/mongodb.d.ts +2 -0
  330. package/build/types-ts3.8/orchestrion/config/mongoose.d.ts +2 -0
  331. package/build/types-ts3.8/orchestrion/config/mysql.d.ts +2 -0
  332. package/build/types-ts3.8/orchestrion/config/mysql2.d.ts +2 -0
  333. package/build/types-ts3.8/orchestrion/config/nestjs.d.ts +1 -0
  334. package/build/types-ts3.8/orchestrion/config/openai.d.ts +2 -0
  335. package/build/types-ts3.8/orchestrion/config/pg.d.ts +2 -0
  336. package/build/types-ts3.8/orchestrion/config/postgres.d.ts +1 -0
  337. package/build/types-ts3.8/orchestrion/config/redis.d.ts +2 -0
  338. package/build/types-ts3.8/orchestrion/config/remix.d.ts +1 -0
  339. package/build/types-ts3.8/orchestrion/config/subscribe-injection.d.ts +31 -0
  340. package/build/types-ts3.8/orchestrion/config/tedious.d.ts +1 -0
  341. package/build/types-ts3.8/orchestrion/config/vercel-ai.d.ts +1 -0
  342. package/build/types-ts3.8/orchestrion/index.d.ts +7 -6
  343. package/build/types-ts3.8/orchestrion/registerChannelIntegration.d.ts +33 -0
  344. package/build/types-ts3.8/vercel-ai/index.d.ts +2 -3
  345. package/changes.json +7 -3
  346. package/package.json +11 -6
  347. package/build/cjs/orchestrion/config/prisma.js +0 -8
  348. package/build/cjs/orchestrion/config/prisma.js.map +0 -1
  349. package/build/cjs/orchestrion/config/react-router.js +0 -8
  350. package/build/cjs/orchestrion/config/react-router.js.map +0 -1
  351. package/build/esm/orchestrion/config/prisma.js +0 -5
  352. package/build/esm/orchestrion/config/prisma.js.map +0 -1
  353. package/build/esm/orchestrion/config/react-router.js +0 -5
  354. package/build/esm/orchestrion/config/react-router.js.map +0 -1
  355. package/build/types/orchestrion/config/prisma.d.ts +0 -4
  356. package/build/types/orchestrion/config/prisma.d.ts.map +0 -1
  357. package/build/types/orchestrion/config/react-router.d.ts +0 -4
  358. package/build/types/orchestrion/config/react-router.d.ts.map +0 -1
  359. package/build/types-ts3.8/orchestrion/config/prisma.d.ts +0 -4
  360. package/build/types-ts3.8/orchestrion/config/react-router.d.ts +0 -4
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const codeTransformer = require('@apm-js-collab/code-transformer-bundler-plugins/rollup');
4
+ const index = require('../config/index.js');
4
5
  const options = require('./options.js');
5
6
 
6
7
  const _interopDefault = e => e && e.__esModule ? e.default : e;
@@ -8,7 +9,16 @@ const _interopDefault = e => e && e.__esModule ? e.default : e;
8
9
  const codeTransformer__default = /*#__PURE__*/_interopDefault(codeTransformer);
9
10
 
10
11
  function sentryOrchestrionPlugin(options$1 = {}) {
11
- return codeTransformer__default(options.orchestrionTransformOptions(options$1));
12
+ const moduleNames = index.instrumentedModuleNames(options$1.instrumentations);
13
+ return {
14
+ ...codeTransformer__default(options.orchestrionTransformOptions(options$1)),
15
+ buildStart(rollupOptions) {
16
+ const externalizedModules = moduleNames.filter((name) => rollupOptions.external(name, void 0, false));
17
+ if (externalizedModules.length > 0) {
18
+ this.warn(options.externalizedModulesWarning(externalizedModules));
19
+ }
20
+ }
21
+ };
12
22
  }
13
23
 
14
24
  exports.sentryOrchestrionPlugin = sentryOrchestrionPlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.js","sources":["../../../../src/orchestrion/bundler/rollup.ts"],"sourcesContent":["import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/rollup';\nimport type { PluginOptions } from './options';\nimport { orchestrionTransformOptions } from './options';\n\n/**\n * Rollup plugin that runs the orchestrion code transform on the bundled output.\n *\n * Use when bundling a Node app with Rollup. For unbundled Node processes use the\n * runtime hook instead (`node --import @sentry/node/orchestrion app.js`).\n *\n * @example\n * ```ts\n * // rollup.config.js\n * import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/rollup';\n * export default { plugins: [sentryOrchestrionPlugin()] };\n * ```\n */\nexport function sentryOrchestrionPlugin(options: PluginOptions = {}): ReturnType<typeof codeTransformer> {\n return codeTransformer(orchestrionTransformOptions(options));\n}\n"],"names":["options","codeTransformer","orchestrionTransformOptions"],"mappings":";;;;;;;;;AAiBO,SAAS,uBAAA,CAAwBA,SAAA,GAAyB,EAAC,EAAuC;AACvG,EAAA,OAAOC,wBAAA,CAAgBC,mCAAA,CAA4BF,SAAO,CAAC,CAAA;AAC7D;;;;"}
1
+ {"version":3,"file":"rollup.js","sources":["../../../../src/orchestrion/bundler/rollup.ts"],"sourcesContent":["import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/rollup';\nimport type { NormalizedInputOptions, PluginContext } from 'rollup';\nimport { instrumentedModuleNames } from '../config';\nimport type { PluginOptions } from './options';\nimport { externalizedModulesWarning, orchestrionTransformOptions } from './options';\n\n/**\n * Rollup plugin that runs the orchestrion code transform on the bundled output.\n *\n * Use when bundling a Node app with Rollup. For unbundled Node processes use the\n * runtime hook instead (`node --import @sentry/node/orchestrion app.js`).\n *\n * @example\n * ```ts\n * // rollup.config.js\n * import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/rollup';\n * export default { plugins: [sentryOrchestrionPlugin()] };\n * ```\n */\nexport function sentryOrchestrionPlugin(options: PluginOptions = {}): ReturnType<typeof codeTransformer> {\n const moduleNames = instrumentedModuleNames(options.instrumentations);\n\n return {\n ...codeTransformer(orchestrionTransformOptions(options)),\n buildStart(this: PluginContext, rollupOptions: NormalizedInputOptions): void {\n // An externalized dependency never passes through the code transform, so\n // its diagnostics_channel calls are silently never injected. By the time\n // buildStart runs, Rollup has normalized `external` (string arrays,\n // RegExps or user functions) into a single predicate we can probe.\n const externalizedModules = moduleNames.filter(name => rollupOptions.external(name, undefined, false));\n if (externalizedModules.length > 0) {\n this.warn(externalizedModulesWarning(externalizedModules));\n }\n },\n };\n}\n"],"names":["options","instrumentedModuleNames","codeTransformer","orchestrionTransformOptions","externalizedModulesWarning"],"mappings":";;;;;;;;;;AAmBO,SAAS,uBAAA,CAAwBA,SAAA,GAAyB,EAAC,EAAuC;AACvG,EAAA,MAAM,WAAA,GAAcC,6BAAA,CAAwBD,SAAA,CAAQ,gBAAgB,CAAA;AAEpE,EAAA,OAAO;AAAA,IACL,GAAGE,wBAAA,CAAgBC,mCAAA,CAA4BH,SAAO,CAAC,CAAA;AAAA,IACvD,WAAgC,aAAA,EAA6C;AAK3E,MAAA,MAAM,mBAAA,GAAsB,YAAY,MAAA,CAAO,CAAA,IAAA,KAAQ,cAAc,QAAA,CAAS,IAAA,EAAM,MAAA,EAAW,KAAK,CAAC,CAAA;AACrG,MAAA,IAAI,mBAAA,CAAoB,SAAS,CAAA,EAAG;AAClC,QAAA,IAAA,CAAK,IAAA,CAAKI,kCAAA,CAA2B,mBAAmB,CAAC,CAAA;AAAA,MAC3D;AAAA,IACF;AAAA,GACF;AACF;;;;"}
@@ -0,0 +1,40 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const meriyah = require('meriyah');
4
+ const index = require('../config/index.js');
5
+ const channelIntegrationDefinitions = require('../config/channel-integration-definitions.js');
6
+ const subscribeInjection = require('../config/subscribe-injection.js');
7
+
8
+ const injectedPrograms = /* @__PURE__ */ new WeakSet();
9
+ function subscribeSnippet(exportName, esm) {
10
+ const importStmt = esm ? `import { ${exportName}, registerOrchestrionChannelIntegration } from '@sentry/server-utils/orchestrion';` : `const { ${exportName}, registerOrchestrionChannelIntegration } = require('@sentry/server-utils/orchestrion');`;
11
+ return `${importStmt}
12
+ registerOrchestrionChannelIntegration(${JSON.stringify(exportName)}, ${exportName});`;
13
+ }
14
+ const injectSubscribe = (state, program) => {
15
+ const node = program;
16
+ if (injectedPrograms.has(node)) {
17
+ return;
18
+ }
19
+ const { moduleType, channelName } = state;
20
+ const exportName = channelName ? channelIntegrationDefinitions.subscriberExportForModule(channelName) : void 0;
21
+ if (!exportName) {
22
+ return;
23
+ }
24
+ injectedPrograms.add(node);
25
+ const statements = meriyah.parse(subscribeSnippet(exportName, moduleType === "esm"), {
26
+ module: moduleType === "esm",
27
+ next: true
28
+ }).body;
29
+ const directiveIndex = node.body.findIndex((n) => n.type === "ExpressionStatement" && n.directive === "use strict");
30
+ node.body.splice(directiveIndex + 1, 0, ...statements);
31
+ };
32
+ function subscribeInjectionOptions() {
33
+ return {
34
+ instrumentations: index.SUBSCRIBE_INJECTIONS,
35
+ customTransforms: { [subscribeInjection.SUBSCRIBE_TRANSFORM_NAME]: injectSubscribe }
36
+ };
37
+ }
38
+
39
+ exports.subscribeInjectionOptions = subscribeInjectionOptions;
40
+ //# sourceMappingURL=subscribeInjection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscribeInjection.js","sources":["../../../../src/orchestrion/bundler/subscribeInjection.ts"],"sourcesContent":["import type { CustomTransform } from '@apm-js-collab/code-transformer';\nimport { parse } from 'meriyah';\nimport { SUBSCRIBE_INJECTIONS } from '../config';\nimport { subscriberExportForModule } from '../config/channel-integration-definitions';\nimport { SUBSCRIBE_TRANSFORM_NAME } from '../config/subscribe-injection';\nimport type { PluginOptions } from './options';\n\n// Tracks Program nodes we already injected into, so a package with several\n// instrumented files (or several configs pointing at one file) is injected only\n// once per file. A `WeakSet` keyed by the node avoids mutating the emitted AST.\nconst injectedPrograms = new WeakSet<object>();\n\ninterface ProgramNode {\n type: string;\n body: Array<{ type: string; directive?: string }>;\n}\n\n/**\n * Snippet injected into each instrumented module. It imports ONLY that package's\n * channel-subscriber factory (plus the `registerOrchestrionChannelIntegration`\n * helper) from `@sentry/server-utils/orchestrion`, and hands both to the helper,\n * which stores the factory on the global marker and live-registers it on any\n * existing client (see that helper for the load-order and dedup rationale).\n *\n * Importing the single named factory (rather than a central dispatch that pulls\n * in every subscriber) is what makes this tree-shake: a bundle carries only the\n * subscriber code for packages actually transformed into it. The same\n * \"only-active-when-bundled\" property the runtime module hook gives unbundled\n * Node, but without a hook (workerd can't monkey-patch requires). The helper is\n * generic (references no factory), so importing it alongside doesn't pull siblings.\n */\nfunction subscribeSnippet(exportName: string, esm: boolean): string {\n const importStmt = esm\n ? `import { ${exportName}, registerOrchestrionChannelIntegration } from '@sentry/server-utils/orchestrion';`\n : `const { ${exportName}, registerOrchestrionChannelIntegration } = require('@sentry/server-utils/orchestrion');`;\n\n return `${importStmt}\\nregisterOrchestrionChannelIntegration(${JSON.stringify(exportName)}, ${exportName});`;\n}\n\n/**\n * The custom transform registered under {@link SUBSCRIBE_TRANSFORM_NAME}. It is\n * invoked with the matched `Program` node and mutates it in place, splicing the\n * marker-push snippet in after any `'use strict'` directive.\n *\n * `state` carries the matched config spread with `{ moduleType }`; the config's\n * `channelName` carries the package name (see `toSubscribeInjections`), which\n * maps to the subscriber's export name.\n */\nconst injectSubscribe: CustomTransform = (state, program) => {\n const node = program as ProgramNode;\n if (injectedPrograms.has(node)) {\n return;\n }\n\n const { moduleType, channelName } = state as { moduleType?: string; channelName?: string };\n const exportName = channelName ? subscriberExportForModule(channelName) : undefined;\n if (!exportName) {\n return;\n }\n\n injectedPrograms.add(node);\n\n const statements = parse(subscribeSnippet(exportName, moduleType === 'esm'), {\n module: moduleType === 'esm',\n next: true,\n }).body as ProgramNode['body'];\n\n const directiveIndex = node.body.findIndex(n => n.type === 'ExpressionStatement' && n.directive === 'use strict');\n node.body.splice(directiveIndex + 1, 0, ...statements);\n};\n\n/**\n * The `instrumentations` + `customTransforms` a bundler plugin passes to\n * {@link orchestrionTransformOptions} to enable the marker-push subscribe\n * injection used by bundler-only SDKs (e.g. `@sentry/cloudflare`).\n *\n * The `SUBSCRIBE_INJECTIONS` configs ride alongside the real channel-publishing\n * configs, and `injectSubscribe` runs on each matched module, so every\n * transformed package self-registers its subscriber on the global marker\n * without a runtime module hook.\n */\nexport function subscribeInjectionOptions(): Pick<PluginOptions, 'instrumentations' | 'customTransforms'> {\n return {\n instrumentations: SUBSCRIBE_INJECTIONS,\n customTransforms: { [SUBSCRIBE_TRANSFORM_NAME]: injectSubscribe },\n };\n}\n"],"names":["subscriberExportForModule","parse","SUBSCRIBE_INJECTIONS","SUBSCRIBE_TRANSFORM_NAME"],"mappings":";;;;;;;AAUA,MAAM,gBAAA,uBAAuB,OAAA,EAAgB;AAqB7C,SAAS,gBAAA,CAAiB,YAAoB,GAAA,EAAsB;AAClE,EAAA,MAAM,aAAa,GAAA,GACf,CAAA,SAAA,EAAY,UAAU,CAAA,kFAAA,CAAA,GACtB,WAAW,UAAU,CAAA,wFAAA,CAAA;AAEzB,EAAA,OAAO,GAAG,UAAU;AAAA,sCAAA,EAA2C,IAAA,CAAK,SAAA,CAAU,UAAU,CAAC,KAAK,UAAU,CAAA,EAAA,CAAA;AAC1G;AAWA,MAAM,eAAA,GAAmC,CAAC,KAAA,EAAO,OAAA,KAAY;AAC3D,EAAA,MAAM,IAAA,GAAO,OAAA;AACb,EAAA,IAAI,gBAAA,CAAiB,GAAA,CAAI,IAAI,CAAA,EAAG;AAC9B,IAAA;AAAA,EACF;AAEA,EAAA,MAAM,EAAE,UAAA,EAAY,WAAA,EAAY,GAAI,KAAA;AACpC,EAAA,MAAM,UAAA,GAAa,WAAA,GAAcA,uDAAA,CAA0B,WAAW,CAAA,GAAI,MAAA;AAC1E,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA;AAAA,EACF;AAEA,EAAA,gBAAA,CAAiB,IAAI,IAAI,CAAA;AAEzB,EAAA,MAAM,aAAaC,aAAA,CAAM,gBAAA,CAAiB,UAAA,EAAY,UAAA,KAAe,KAAK,CAAA,EAAG;AAAA,IAC3E,QAAQ,UAAA,KAAe,KAAA;AAAA,IACvB,IAAA,EAAM;AAAA,GACP,CAAA,CAAE,IAAA;AAEH,EAAA,MAAM,cAAA,GAAiB,IAAA,CAAK,IAAA,CAAK,SAAA,CAAU,CAAA,CAAA,KAAK,EAAE,IAAA,KAAS,qBAAA,IAAyB,CAAA,CAAE,SAAA,KAAc,YAAY,CAAA;AAChH,EAAA,IAAA,CAAK,KAAK,MAAA,CAAO,cAAA,GAAiB,CAAA,EAAG,CAAA,EAAG,GAAG,UAAU,CAAA;AACvD,CAAA;AAYO,SAAS,yBAAA,GAA0F;AACxG,EAAA,OAAO;AAAA,IACL,gBAAA,EAAkBC,0BAAA;AAAA,IAClB,gBAAA,EAAkB,EAAE,CAACC,2CAAwB,GAAG,eAAA;AAAgB,GAClE;AACF;;;;"}
@@ -13,6 +13,19 @@ function sentryOrchestrionPlugin(options$1 = {}) {
13
13
  ...codeTransformer__default(options.orchestrionTransformOptions(options$1)),
14
14
  config() {
15
15
  return { ssr: { noExternal: index.instrumentedModuleNames(options$1.instrumentations) } };
16
+ },
17
+ configResolved(config) {
18
+ const external = config.ssr?.external;
19
+ if (!Array.isArray(external)) {
20
+ return;
21
+ }
22
+ const moduleNames = index.instrumentedModuleNames(options$1.instrumentations);
23
+ const externalizedModules = moduleNames.filter(
24
+ (name) => external.some((entry) => options.externalEntryMatchesModule(entry, name))
25
+ );
26
+ if (externalizedModules.length > 0) {
27
+ config.logger.warn(`[Sentry] ${options.externalizedModulesWarning(externalizedModules)}`);
28
+ }
16
29
  }
17
30
  };
18
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vite.js","sources":["../../../../src/orchestrion/bundler/vite.ts"],"sourcesContent":["import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/vite';\nimport { instrumentedModuleNames } from '../config';\nimport type { PluginOptions } from './options';\nimport { orchestrionTransformOptions } from './options';\n\n/**\n * Vite plugin that runs the orchestrion code transform on the bundled output.\n *\n * Use when bundling a Node app with Vite (e.g. Vite SSR builds, Nuxt's Nitro\n * pipeline, SvelteKit). For unbundled Node processes use the runtime hook\n * instead (`node --import @sentry/node/orchestrion app.js`).\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\n * export default { plugins: [sentryOrchestrionPlugin()] };\n * ```\n */\nexport function sentryOrchestrionPlugin(options: PluginOptions = {}): ReturnType<typeof codeTransformer> {\n return {\n ...codeTransformer(orchestrionTransformOptions(options)),\n config(): { ssr: { noExternal: string[] } } {\n // Force-bundle every instrumented package so the code transform actually\n // sees its source. Vite externalizes dependencies in SSR builds by\n // default, leaving them as bare `require()`/`import` calls resolved from\n // `node_modules` at runtime — those copies are untouched and the\n // diagnostics_channel calls never get injected. Vite merges array\n // `noExternal` entries with the user's config, so we don't overwrite\n // their additions.\n return { ssr: { noExternal: instrumentedModuleNames(options.instrumentations) } };\n },\n };\n}\n"],"names":["options","codeTransformer","orchestrionTransformOptions","instrumentedModuleNames"],"mappings":";;;;;;;;;;AAmBO,SAAS,uBAAA,CAAwBA,SAAA,GAAyB,EAAC,EAAuC;AACvG,EAAA,OAAO;AAAA,IACL,GAAGC,wBAAA,CAAgBC,mCAAA,CAA4BF,SAAO,CAAC,CAAA;AAAA,IACvD,MAAA,GAA4C;AAQ1C,MAAA,OAAO,EAAE,KAAK,EAAE,UAAA,EAAYG,8BAAwBH,SAAA,CAAQ,gBAAgB,GAAE,EAAE;AAAA,IAClF;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"vite.js","sources":["../../../../src/orchestrion/bundler/vite.ts"],"sourcesContent":["import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/vite';\nimport type { ResolvedConfig } from 'vite';\nimport { instrumentedModuleNames } from '../config';\nimport type { PluginOptions } from './options';\nimport { externalEntryMatchesModule, externalizedModulesWarning, orchestrionTransformOptions } from './options';\n\n/**\n * Vite plugin that runs the orchestrion code transform on the bundled output.\n *\n * Use when bundling a Node app with Vite (e.g. Vite SSR builds, Nuxt's Nitro\n * pipeline, SvelteKit). For unbundled Node processes use the runtime hook\n * instead (`node --import @sentry/node/orchestrion app.js`).\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';\n * export default { plugins: [sentryOrchestrionPlugin()] };\n * ```\n */\nexport function sentryOrchestrionPlugin(options: PluginOptions = {}): ReturnType<typeof codeTransformer> {\n return {\n ...codeTransformer(orchestrionTransformOptions(options)),\n config(): { ssr: { noExternal: string[] } } {\n // Force-bundle every instrumented package so the code transform actually\n // sees its source. Vite externalizes dependencies in SSR builds by\n // default, leaving them as bare `require()`/`import` calls resolved from\n // `node_modules` at runtime — those copies are untouched and the\n // diagnostics_channel calls never get injected. Vite merges array\n // `noExternal` entries with the user's config, so we don't overwrite\n // their additions.\n return { ssr: { noExternal: instrumentedModuleNames(options.instrumentations) } };\n },\n configResolved(config: ResolvedConfig): void {\n // Explicit `ssr.external` string entries take priority over `noExternal`\n // in Vite, so they defeat the force-bundling above. (`ssr.external: true`\n // does not — `noExternal` entries still win there.)\n const external = config.ssr?.external;\n if (!Array.isArray(external)) {\n return;\n }\n const moduleNames = instrumentedModuleNames(options.instrumentations);\n const externalizedModules = moduleNames.filter(name =>\n external.some(entry => externalEntryMatchesModule(entry, name)),\n );\n if (externalizedModules.length > 0) {\n config.logger.warn(`[Sentry] ${externalizedModulesWarning(externalizedModules)}`);\n }\n },\n };\n}\n"],"names":["options","codeTransformer","orchestrionTransformOptions","instrumentedModuleNames","externalEntryMatchesModule","externalizedModulesWarning"],"mappings":";;;;;;;;;;AAoBO,SAAS,uBAAA,CAAwBA,SAAA,GAAyB,EAAC,EAAuC;AACvG,EAAA,OAAO;AAAA,IACL,GAAGC,wBAAA,CAAgBC,mCAAA,CAA4BF,SAAO,CAAC,CAAA;AAAA,IACvD,MAAA,GAA4C;AAQ1C,MAAA,OAAO,EAAE,KAAK,EAAE,UAAA,EAAYG,8BAAwBH,SAAA,CAAQ,gBAAgB,GAAE,EAAE;AAAA,IAClF,CAAA;AAAA,IACA,eAAe,MAAA,EAA8B;AAI3C,MAAA,MAAM,QAAA,GAAW,OAAO,GAAA,EAAK,QAAA;AAC7B,MAAA,IAAI,CAAC,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AAC5B,QAAA;AAAA,MACF;AACA,MAAA,MAAM,WAAA,GAAcG,6BAAA,CAAwBH,SAAA,CAAQ,gBAAgB,CAAA;AACpE,MAAA,MAAM,sBAAsB,WAAA,CAAY,MAAA;AAAA,QAAO,UAC7C,QAAA,CAAS,IAAA,CAAK,WAASI,kCAAA,CAA2B,KAAA,EAAO,IAAI,CAAC;AAAA,OAChE;AACA,MAAA,IAAI,mBAAA,CAAoB,SAAS,CAAA,EAAG;AAClC,QAAA,MAAA,CAAO,OAAO,IAAA,CAAK,CAAA,SAAA,EAAYC,kCAAA,CAA2B,mBAAmB,CAAC,CAAA,CAAE,CAAA;AAAA,MAClF;AAAA,IACF;AAAA,GACF;AACF;;;;"}
@@ -4,6 +4,7 @@ const Module = require('node:module');
4
4
  const node_path = require('node:path');
5
5
  const index = require('../config/index.js');
6
6
  const codeTransformerWebpack = require('@apm-js-collab/code-transformer-bundler-plugins/webpack');
7
+ const core = require('@apm-js-collab/code-transformer-bundler-plugins/core');
7
8
  const options = require('./options.js');
8
9
 
9
10
  const _interopDefault = e => e && e.__esModule ? e.default : e;
@@ -25,10 +26,40 @@ function getTracingHooksDirectory() {
25
26
  function getSentryInstrumentations() {
26
27
  return index.SENTRY_INSTRUMENTATIONS;
27
28
  }
29
+ function externalizedWebpackModules(externals, moduleNames) {
30
+ const entries = Array.isArray(externals) ? externals : [externals];
31
+ return moduleNames.filter(
32
+ (name) => entries.some((entry) => {
33
+ if (typeof entry === "string") {
34
+ return options.externalEntryMatchesModule(entry, name);
35
+ }
36
+ if (entry instanceof RegExp) {
37
+ return entry.test(name);
38
+ }
39
+ if (entry && typeof entry === "object") {
40
+ return name in entry;
41
+ }
42
+ return false;
43
+ })
44
+ );
45
+ }
28
46
  function sentryOrchestrionWebpackPlugin(options$1 = {}) {
29
- return codeTransformerWebpack__default(options.orchestrionTransformOptions(options$1));
47
+ const plugin = codeTransformerWebpack__default(options.orchestrionTransformOptions(options$1));
48
+ const moduleNames = index.instrumentedModuleNames(options$1.instrumentations);
49
+ const apply = plugin.apply.bind(plugin);
50
+ plugin.apply = (compiler) => {
51
+ const externalizedModules = externalizedWebpackModules(compiler.options.externals, moduleNames);
52
+ if (externalizedModules.length > 0) {
53
+ compiler.hooks.thisCompilation.tap("SentryOrchestrionExternalsCheck", (compilation) => {
54
+ compilation.warnings.push(new compiler.webpack.WebpackError(options.externalizedModulesWarning(externalizedModules)));
55
+ });
56
+ }
57
+ apply(compiler);
58
+ };
59
+ return plugin;
30
60
  }
31
61
 
62
+ exports.serializeInstrumentations = core.serializeInstrumentations;
32
63
  exports.getOrchestrionLoaderPath = getOrchestrionLoaderPath;
33
64
  exports.getSentryInstrumentations = getSentryInstrumentations;
34
65
  exports.getTracingHooksDirectory = getTracingHooksDirectory;
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.js","sources":["../../../../src/orchestrion/bundler/webpack.ts"],"sourcesContent":["// EXPERIMENTAL — orchestrion code-transform loader + webpack plugin. The loader is exposed\n// separately because Turbopack can only take webpack loaders (via `turbopack.rules`), not plugins.\n\nimport { createRequire } from 'node:module';\nimport { dirname } from 'node:path';\nimport type { InstrumentationConfig } from '..';\nimport { SENTRY_INSTRUMENTATIONS } from '../config';\nimport codeTransformerWebpack from '@apm-js-collab/code-transformer-bundler-plugins/webpack';\nimport type { PluginOptions } from './options';\nimport { orchestrionTransformOptions } from './options';\n\n// Both branches use `createRequire` (never alias the CJS `require`) so bundlers consuming this\n// module don't emit a \"Critical dependency\" warning.\nfunction getOrchestrionRequire(): ReturnType<typeof createRequire> {\n let nodeRequire: ReturnType<typeof createRequire>;\n /*! rollup-include-cjs-only */\n nodeRequire = createRequire(__filename);\n /*! rollup-include-cjs-only-end */\n /*! rollup-include-esm-only */\n nodeRequire = createRequire(import.meta.url);\n /*! rollup-include-esm-only-end */\n return nodeRequire;\n}\n\n/** Absolute path to the code-transform loader (a webpack loader; also usable as a Turbopack loader). */\nexport function getOrchestrionLoaderPath(): string {\n return getOrchestrionRequire().resolve('@apm-js-collab/code-transformer-bundler-plugins/webpack-loader');\n}\n\n/**\n * Absolute path to the `@apm-js-collab/tracing-hooks` package directory, resolved from this\n * package's own dependency graph. SDKs inject it at build time so the runtime module hook can\n * load the package even where the bare specifier doesn't resolve (bundled SDK code under\n * isolated installs, e.g. pnpm).\n */\nexport function getTracingHooksDirectory(): string {\n const packageJsonPath = getOrchestrionRequire().resolve('@apm-js-collab/tracing-hooks/package.json');\n // This avoids any backslash-escaping concerns on Windows\n return dirname(packageJsonPath).replace(/\\\\/g, '/');\n}\n\n/** The central instrumentation config, to pass as the loader's `instrumentations` option. */\nexport function getSentryInstrumentations(): InstrumentationConfig[] {\n return SENTRY_INSTRUMENTATIONS;\n}\n\n/**\n * The code-transform webpack plugin, pre-fed the instrumentation config\n */\nexport function sentryOrchestrionWebpackPlugin(options: PluginOptions = {}): ReturnType<typeof codeTransformerWebpack> {\n return codeTransformerWebpack(orchestrionTransformOptions(options));\n}\n"],"names":["createRequire","dirname","SENTRY_INSTRUMENTATIONS","codeTransformerWebpack","orchestrionTransformOptions","options"],"mappings":";;;;;;;;;;;;AAaA,SAAS,qBAAA,GAA0D;AACjE,EAAA,IAAI,WAAA;AAAA,EACJ,WAAA,GAAAA,oBAAA,CAAA,UAAA,CAAA;AACA,EAAA,OAAA;AAAsC;AAEtC,SAAA,wBAAA,GAAA;AACA,EAAA,OAAA,qBAA4B,2EAAe,CAAA;AAAA;AAE3C,SAAO,wBAAA,GAAA;AACT,EAAA,MAAA,eAAA,GAAA,qBAAA,EAAA,CAAA,OAAA,CAAA,2CAAA,CAAA;AAGO,EAAA,OAAAC,iBAAS,CAAA,eAAA,CAAA,CAAA,OAAA,CAAA,KAAmC,EAAA,GAAA,CAAA;AACjD;AACF,SAAA,yBAAA,GAAA;AAQO,EAAA,OAAAC,6BAAS;AACd;AAEA,SAAO,wCAA2C,GAAA,EAAA,EAAA;AACpD,EAAA,OAAAC,+BAAA,CAAAC,mCAAA,CAAAC,SAAA,CAAA,CAAA;AAGO;;;;;;;"}
1
+ {"version":3,"file":"webpack.js","sources":["../../../../src/orchestrion/bundler/webpack.ts"],"sourcesContent":["// EXPERIMENTAL — orchestrion code-transform loader + webpack plugin. The loader is exposed\n// separately because Turbopack can only take webpack loaders (via `turbopack.rules`), not plugins.\n\nimport { createRequire } from 'node:module';\nimport { dirname } from 'node:path';\nimport type { Compiler } from 'webpack';\nimport type { InstrumentationConfig } from '..';\nimport { instrumentedModuleNames, SENTRY_INSTRUMENTATIONS } from '../config';\nimport codeTransformerWebpack from '@apm-js-collab/code-transformer-bundler-plugins/webpack';\nimport type { PluginOptions } from './options';\n\nexport { serializeInstrumentations } from '@apm-js-collab/code-transformer-bundler-plugins/core';\nexport type { SerializableInstrumentationConfig } from '@apm-js-collab/code-transformer-bundler-plugins/core';\nimport { externalEntryMatchesModule, externalizedModulesWarning, orchestrionTransformOptions } from './options';\n\n// Both branches use `createRequire` (never alias the CJS `require`) so bundlers consuming this\n// module don't emit a \"Critical dependency\" warning.\nfunction getOrchestrionRequire(): ReturnType<typeof createRequire> {\n let nodeRequire: ReturnType<typeof createRequire>;\n /*! rollup-include-cjs-only */\n nodeRequire = createRequire(__filename);\n /*! rollup-include-cjs-only-end */\n /*! rollup-include-esm-only */\n nodeRequire = createRequire(import.meta.url);\n /*! rollup-include-esm-only-end */\n return nodeRequire;\n}\n\n/** Absolute path to the code-transform loader (a webpack loader; also usable as a Turbopack loader). */\nexport function getOrchestrionLoaderPath(): string {\n return getOrchestrionRequire().resolve('@apm-js-collab/code-transformer-bundler-plugins/webpack-loader');\n}\n\n/**\n * Absolute path to the `@apm-js-collab/tracing-hooks` package directory, resolved from this\n * package's own dependency graph. SDKs inject it at build time so the runtime module hook can\n * load the package even where the bare specifier doesn't resolve (bundled SDK code under\n * isolated installs, e.g. pnpm).\n */\nexport function getTracingHooksDirectory(): string {\n const packageJsonPath = getOrchestrionRequire().resolve('@apm-js-collab/tracing-hooks/package.json');\n // This avoids any backslash-escaping concerns on Windows\n return dirname(packageJsonPath).replace(/\\\\/g, '/');\n}\n\n/** The central instrumentation config, to pass as the loader's `instrumentations` option. */\nexport function getSentryInstrumentations(): InstrumentationConfig[] {\n return SENTRY_INSTRUMENTATIONS;\n}\n\n// Handles the declarative `externals` shapes (string, RegExp, object, arrays\n// thereof). Function externals (e.g. webpack-node-externals) are skipped: they\n// may resolve asynchronously, so they can't be probed reliably here.\nfunction externalizedWebpackModules(externals: unknown, moduleNames: string[]): string[] {\n const entries = Array.isArray(externals) ? externals : [externals];\n return moduleNames.filter(name =>\n entries.some(entry => {\n if (typeof entry === 'string') {\n return externalEntryMatchesModule(entry, name);\n }\n if (entry instanceof RegExp) {\n return entry.test(name);\n }\n if (entry && typeof entry === 'object') {\n return name in entry;\n }\n return false;\n }),\n );\n}\n\n/**\n * The code-transform webpack plugin, pre-fed the instrumentation config.\n *\n * Instrumented packages marked as `externals` never pass through the code\n * transform, so a compilation warning is emitted for them.\n */\nexport function sentryOrchestrionWebpackPlugin(options: PluginOptions = {}): ReturnType<typeof codeTransformerWebpack> {\n const plugin = codeTransformerWebpack(orchestrionTransformOptions(options));\n const moduleNames = instrumentedModuleNames(options.instrumentations);\n // The upstream plugin is a class instance, so `apply` is overridden in place\n // rather than spread into a new object (which would lose prototype methods).\n const apply = plugin.apply.bind(plugin);\n plugin.apply = (compiler: Compiler): void => {\n const externalizedModules = externalizedWebpackModules(compiler.options.externals, moduleNames);\n if (externalizedModules.length > 0) {\n compiler.hooks.thisCompilation.tap('SentryOrchestrionExternalsCheck', compilation => {\n compilation.warnings.push(new compiler.webpack.WebpackError(externalizedModulesWarning(externalizedModules)));\n });\n }\n apply(compiler);\n };\n return plugin;\n}\n"],"names":["createRequire","dirname","SENTRY_INSTRUMENTATIONS","externalEntryMatchesModule","options","codeTransformerWebpack","orchestrionTransformOptions","instrumentedModuleNames","externalizedModulesWarning"],"mappings":";;;;;;;;;;;;;AAiBA,SAAS,qBAAA,GAA0D;AACjE,EAAA,IAAI,WAAA;AAAA,EACJ,WAAA,GAAAA,oBAAA,CAAA,UAAA,CAAA;AACA,EAAA,OAAA;AAAsC;AAEtC,SAAA,wBAAA,GAAA;AACA,EAAA,OAAA,qBAA4B,2EAAe,CAAA;AAAA;AAE3C,SAAO,wBAAA,GAAA;AACT,EAAA,MAAA,eAAA,GAAA,qBAAA,EAAA,CAAA,OAAA,CAAA,2CAAA,CAAA;AAGO,EAAA,OAAAC,iBAAS,CAAA,eAAA,CAAA,CAAA,OAAA,CAAA,KAAmC,EAAA,GAAA,CAAA;AACjD;AACF,SAAA,yBAAA,GAAA;AAQO,EAAA,OAAAC,6BAAS;AACd;AAEA,SAAO,0BAAyB,CAAA,sBAAkB,EAAA;AACpD,EAAA,MAAA,OAAA,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A,CAAA,CAAA,CAAA;AACtC,MAAA,CAAA,CAAA;AACE,IAAA;AACA,IAAA,KAAI,CAAA,QAAA,CAAA;AACF,EAAA,CAAA;AACE,EAAA,OAAA,MAAA;AAA4G;;;;;;;;"}
@@ -25,8 +25,6 @@ const nestjs = require('./config/nestjs.js');
25
25
  const openai = require('./config/openai.js');
26
26
  const pg = require('./config/pg.js');
27
27
  const postgres = require('./config/postgres.js');
28
- const prisma = require('./config/prisma.js');
29
- const reactRouter = require('./config/react-router.js');
30
28
  const redis = require('./config/redis.js');
31
29
  const remix = require('./config/remix.js');
32
30
  const tedious = require('./config/tedious.js');
@@ -58,8 +56,6 @@ const CHANNELS = {
58
56
  ...openai.openaiChannels,
59
57
  ...pg.pgChannels,
60
58
  ...postgres.postgresJsChannels,
61
- ...prisma.prismaChannels,
62
- ...reactRouter.reactRouterChannels,
63
59
  ...redis.redisChannels,
64
60
  ...remix.remixChannels,
65
61
  ...tedious.tediousChannels,
@@ -1 +1 @@
1
- {"version":3,"file":"channels.js","sources":["../../../src/orchestrion/channels.ts"],"sourcesContent":["import { amqplibChannels } from './config/amqplib';\nimport { anthropicAiChannels } from './config/anthropic-ai';\nimport { awsSdkChannels } from './config/aws-sdk';\nimport { dataloaderChannels } from './config/dataloader';\nimport { expressChannels } from './config/express';\nimport { firebaseChannels } from './config/firebase';\nimport { genericPoolChannels } from './config/generic-pool';\nimport { googleGenAiChannels } from './config/google-genai';\nimport { graphqlChannels } from './config/graphql';\nimport { hapiChannels } from './config/hapi';\nimport { ioredisChannels } from './config/ioredis';\nimport { kafkajsChannels } from './config/kafkajs';\nimport { knexChannels } from './config/knex';\nimport { koaChannels } from './config/koa';\nimport { langchainChannels } from './config/langchain';\nimport { langgraphChannels } from './config/langgraph';\nimport { lruMemoizerChannels } from './config/lru-memoizer';\nimport { mongodbChannels } from './config/mongodb';\nimport { mongooseChannels } from './config/mongoose';\nimport { mysql2Channels } from './config/mysql2';\nimport { mysqlChannels } from './config/mysql';\nimport { nestjsChannels } from './config/nestjs';\nimport { openaiChannels } from './config/openai';\nimport { pgChannels } from './config/pg';\nimport { postgresJsChannels } from './config/postgres';\nimport { prismaChannels } from './config/prisma';\nimport { reactRouterChannels } from './config/react-router';\nimport { redisChannels } from './config/redis';\nimport { remixChannels } from './config/remix';\nimport { tediousChannels } from './config/tedious';\nimport { vercelAiChannels } from './config/vercel-ai';\n\n/**\n * Fully-qualified `diagnostics_channel` names that orchestrion publishes to.\n *\n * Orchestrion's transform always prefixes the configured `channelName` with\n * `orchestrion:${module.name}:`. So a config of\n * `{ channelName: 'query', module: { name: 'mysql' } }`\n * publishes to `orchestrion:mysql:query`.\n *\n * Subscribers (`integrations/<lib>/tracing-channel.ts`) consume the full\n * prefixed string from this map; the config files set only the unprefixed\n * suffix in `channelName`. Keeping both pieces in one file is what guarantees\n * they don't drift apart and silently stop firing.\n *\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 */\nexport const CHANNELS = {\n ...amqplibChannels,\n ...anthropicAiChannels,\n ...awsSdkChannels,\n ...dataloaderChannels,\n ...expressChannels,\n ...firebaseChannels,\n ...genericPoolChannels,\n ...googleGenAiChannels,\n ...graphqlChannels,\n ...hapiChannels,\n ...ioredisChannels,\n ...kafkajsChannels,\n ...knexChannels,\n ...koaChannels,\n ...langchainChannels,\n ...langgraphChannels,\n ...lruMemoizerChannels,\n ...mongodbChannels,\n ...mongooseChannels,\n ...mysql2Channels,\n ...mysqlChannels,\n ...nestjsChannels,\n ...openaiChannels,\n ...pgChannels,\n ...postgresJsChannels,\n ...prismaChannels,\n ...reactRouterChannels,\n ...redisChannels,\n ...remixChannels,\n ...tediousChannels,\n ...vercelAiChannels,\n} as const;\n\nexport type ChannelName = (typeof CHANNELS)[keyof typeof CHANNELS];\n"],"names":["amqplibChannels","anthropicAiChannels","awsSdkChannels","dataloaderChannels","expressChannels","firebaseChannels","genericPoolChannels","googleGenAiChannels","graphqlChannels","hapiChannels","ioredisChannels","kafkajsChannels","knexChannels","koaChannels","langchainChannels","langgraphChannels","lruMemoizerChannels","mongodbChannels","mongooseChannels","mysql2Channels","mysqlChannels","nestjsChannels","openaiChannels","pgChannels","postgresJsChannels","prismaChannels","reactRouterChannels","redisChannels","remixChannels","tediousChannels","vercelAiChannels"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDO,MAAM,QAAA,GAAW;AAAA,EACtB,GAAGA,uBAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,6BAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,yBAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,iBAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,iBAAA;AAAA,EACH,GAAGC,eAAA;AAAA,EACH,GAAGC,2BAAA;AAAA,EACH,GAAGC,2BAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,yBAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,mBAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,aAAA;AAAA,EACH,GAAGC,2BAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,mBAAA;AAAA,EACH,GAAGC,mBAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC;AACL;;;;"}
1
+ {"version":3,"file":"channels.js","sources":["../../../src/orchestrion/channels.ts"],"sourcesContent":["import { amqplibChannels } from './config/amqplib';\nimport { anthropicAiChannels } from './config/anthropic-ai';\nimport { awsSdkChannels } from './config/aws-sdk';\nimport { dataloaderChannels } from './config/dataloader';\nimport { expressChannels } from './config/express';\nimport { firebaseChannels } from './config/firebase';\nimport { genericPoolChannels } from './config/generic-pool';\nimport { googleGenAiChannels } from './config/google-genai';\nimport { graphqlChannels } from './config/graphql';\nimport { hapiChannels } from './config/hapi';\nimport { ioredisChannels } from './config/ioredis';\nimport { kafkajsChannels } from './config/kafkajs';\nimport { knexChannels } from './config/knex';\nimport { koaChannels } from './config/koa';\nimport { langchainChannels } from './config/langchain';\nimport { langgraphChannels } from './config/langgraph';\nimport { lruMemoizerChannels } from './config/lru-memoizer';\nimport { mongodbChannels } from './config/mongodb';\nimport { mongooseChannels } from './config/mongoose';\nimport { mysql2Channels } from './config/mysql2';\nimport { mysqlChannels } from './config/mysql';\nimport { nestjsChannels } from './config/nestjs';\nimport { openaiChannels } from './config/openai';\nimport { pgChannels } from './config/pg';\nimport { postgresJsChannels } from './config/postgres';\nimport { redisChannels } from './config/redis';\nimport { remixChannels } from './config/remix';\nimport { tediousChannels } from './config/tedious';\nimport { vercelAiChannels } from './config/vercel-ai';\n\n/**\n * Fully-qualified `diagnostics_channel` names that orchestrion publishes to.\n *\n * Orchestrion's transform always prefixes the configured `channelName` with\n * `orchestrion:${module.name}:`. So a config of\n * `{ channelName: 'query', module: { name: 'mysql' } }`\n * publishes to `orchestrion:mysql:query`.\n *\n * Subscribers (`integrations/<lib>/tracing-channel.ts`) consume the full\n * prefixed string from this map; the config files set only the unprefixed\n * suffix in `channelName`. Keeping both pieces in one file is what guarantees\n * they don't drift apart and silently stop firing.\n *\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 */\nexport const CHANNELS = {\n ...amqplibChannels,\n ...anthropicAiChannels,\n ...awsSdkChannels,\n ...dataloaderChannels,\n ...expressChannels,\n ...firebaseChannels,\n ...genericPoolChannels,\n ...googleGenAiChannels,\n ...graphqlChannels,\n ...hapiChannels,\n ...ioredisChannels,\n ...kafkajsChannels,\n ...knexChannels,\n ...koaChannels,\n ...langchainChannels,\n ...langgraphChannels,\n ...lruMemoizerChannels,\n ...mongodbChannels,\n ...mongooseChannels,\n ...mysql2Channels,\n ...mysqlChannels,\n ...nestjsChannels,\n ...openaiChannels,\n ...pgChannels,\n ...postgresJsChannels,\n ...redisChannels,\n ...remixChannels,\n ...tediousChannels,\n ...vercelAiChannels,\n} as const;\n\nexport type ChannelName = (typeof CHANNELS)[keyof typeof CHANNELS];\n"],"names":["amqplibChannels","anthropicAiChannels","awsSdkChannels","dataloaderChannels","expressChannels","firebaseChannels","genericPoolChannels","googleGenAiChannels","graphqlChannels","hapiChannels","ioredisChannels","kafkajsChannels","knexChannels","koaChannels","langchainChannels","langgraphChannels","lruMemoizerChannels","mongodbChannels","mongooseChannels","mysql2Channels","mysqlChannels","nestjsChannels","openaiChannels","pgChannels","postgresJsChannels","redisChannels","remixChannels","tediousChannels","vercelAiChannels"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,MAAM,QAAA,GAAW;AAAA,EACtB,GAAGA,uBAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,6BAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,yBAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,iBAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,iBAAA;AAAA,EACH,GAAGC,eAAA;AAAA,EACH,GAAGC,2BAAA;AAAA,EACH,GAAGC,2BAAA;AAAA,EACH,GAAGC,+BAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC,yBAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,mBAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,qBAAA;AAAA,EACH,GAAGC,aAAA;AAAA,EACH,GAAGC,2BAAA;AAAA,EACH,GAAGC,mBAAA;AAAA,EACH,GAAGC,mBAAA;AAAA,EACH,GAAGC,uBAAA;AAAA,EACH,GAAGC;AACL;;;;"}
@@ -1,5 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const subscribeInjection = require('./subscribe-injection.js');
4
+
3
5
  const module$1 = { name: "amqplib", versionRange: ">=0.5.5 <2" };
4
6
  const amqplibConfig = [
5
7
  // Producer span + trace-header injection. `sendToQueue` delegates to `publish`, so it's covered.
@@ -75,7 +77,9 @@ const amqplibChannels = {
75
77
  AMQPLIB_NACK_ALL: "orchestrion:amqplib:nackAll",
76
78
  AMQPLIB_CONNECT: "orchestrion:amqplib:connect"
77
79
  };
80
+ const amqplibSubscribeInjection = subscribeInjection.toSubscribeInjections(amqplibConfig);
78
81
 
79
82
  exports.amqplibChannels = amqplibChannels;
80
83
  exports.amqplibConfig = amqplibConfig;
84
+ exports.amqplibSubscribeInjection = amqplibSubscribeInjection;
81
85
  //# sourceMappingURL=amqplib.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"amqplib.js","sources":["../../../../src/orchestrion/config/amqplib.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\n// `amqplib` splits its API across three files:\n// - `lib/channel_model.js` holds `class Channel` (publish/consume/ack/nack/reject/…) and\n// `class ConfirmChannel extends Channel` (a `publish` that takes a broker-confirm callback).\n// - `lib/channel.js` holds `class BaseChannel` whose `dispatchMessage` invokes the registered\n// consumer callback once per delivered message — the natural per-message hook for consumer spans\n// (`Channel.consume` itself only registers the callback, it isn't called per message).\n// - `lib/connect.js` holds the `connect` function whose callback receives the open connection, used\n// to capture connection attributes.\n//\n// The version range mirrors `supportedVersions` in the vendored OTel instrumentation.\nconst module = { name: 'amqplib', versionRange: '>=0.5.5 <2' } as const;\n\nexport const amqplibConfig = [\n // Producer span + trace-header injection. `sendToQueue` delegates to `publish`, so it's covered.\n {\n channelName: 'publish',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'publish', kind: 'Sync' },\n },\n // Confirm-channel producer span; the trailing broker-confirm callback ends the span when the\n // broker acks/nacks. It internally calls `super.publish`, so the subscriber guards against the\n // base `publish` channel double-instrumenting.\n {\n channelName: 'confirmPublish',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'ConfirmChannel', methodName: 'publish', kind: 'Callback' },\n },\n // Records `consumerTag -> { noAck, queue }` so the per-message dispatch hook knows how to name and\n // when to end the consumer span.\n {\n channelName: 'consume',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'consume', kind: 'Async' },\n },\n // Per delivered message: creates the consumer span and runs the user callback under it.\n {\n channelName: 'dispatch',\n module: { ...module, filePath: 'lib/channel.js' },\n functionQuery: { className: 'BaseChannel', methodName: 'dispatchMessage', kind: 'Sync' },\n },\n // End the consumer span when the user settles the message.\n {\n channelName: 'ack',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'ack', kind: 'Sync' },\n },\n {\n channelName: 'nack',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'nack', kind: 'Sync' },\n },\n {\n channelName: 'reject',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'reject', kind: 'Sync' },\n },\n {\n channelName: 'ackAll',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'ackAll', kind: 'Sync' },\n },\n {\n channelName: 'nackAll',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'nackAll', kind: 'Sync' },\n },\n // Stashes connection attributes (url/host/port/protocol/server product) on the connection object\n // for span-time reads via `channel.connection`.\n {\n channelName: 'connect',\n module: { ...module, filePath: 'lib/connect.js' },\n functionQuery: { functionName: 'connect', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const amqplibChannels = {\n AMQPLIB_PUBLISH: 'orchestrion:amqplib:publish',\n AMQPLIB_CONFIRM_PUBLISH: 'orchestrion:amqplib:confirmPublish',\n AMQPLIB_CONSUME: 'orchestrion:amqplib:consume',\n AMQPLIB_DISPATCH: 'orchestrion:amqplib:dispatch',\n AMQPLIB_ACK: 'orchestrion:amqplib:ack',\n AMQPLIB_NACK: 'orchestrion:amqplib:nack',\n AMQPLIB_REJECT: 'orchestrion:amqplib:reject',\n AMQPLIB_ACK_ALL: 'orchestrion:amqplib:ackAll',\n AMQPLIB_NACK_ALL: 'orchestrion:amqplib:nackAll',\n AMQPLIB_CONNECT: 'orchestrion:amqplib:connect',\n} as const;\n"],"names":["module"],"mappings":";;AAYA,MAAMA,QAAA,GAAS,EAAE,IAAA,EAAM,SAAA,EAAW,cAAc,YAAA,EAAa;AAEtD,MAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,sBAAA,EAAuB;AAAA,IACtD,eAAe,EAAE,SAAA,EAAW,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO,GAC7E;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA,IACE,WAAA,EAAa,gBAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,sBAAA,EAAuB;AAAA,IACtD,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW,GACxF;AAAA;AAAA;AAAA,EAGA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,sBAAA,EAAuB;AAAA,IACtD,eAAe,EAAE,SAAA,EAAW,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,OAAA;AAAQ,GAC9E;AAAA;AAAA,EAEA;AAAA,IACE,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E,WAAA,EAAa,SAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,gBAAA,EAAiB;AAAA,IAChD,aAAA,EAAe,EAAE,YAAA,EAAc,SAAA,EAAW,MAAM,UAAA;AAAW;AAE/D;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,eAAA,EAAiB,6BAAA;AAAA,EACjB,uBAAA,EAAyB,oCAAA;AAAA,EACzB,eAAA,EAAiB,6BAAA;AAAA,EACjB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,WAAA,EAAa,yBAAA;AAAA,EACb,YAAA,EAAc,0BAAA;AAAA,EACd,cAAA,EAAgB,4BAAA;AAAA,EAChB,eAAA,EAAiB,4BAAA;AAAA,EACjB,gBAAA,EAAkB,6BAAA;AAAA,EAClB,eAAA,EAAiB;AACnB;;;;;"}
1
+ {"version":3,"file":"amqplib.js","sources":["../../../../src/orchestrion/config/amqplib.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n// `amqplib` splits its API across three files:\n// - `lib/channel_model.js` holds `class Channel` (publish/consume/ack/nack/reject/…) and\n// `class ConfirmChannel extends Channel` (a `publish` that takes a broker-confirm callback).\n// - `lib/channel.js` holds `class BaseChannel` whose `dispatchMessage` invokes the registered\n// consumer callback once per delivered message — the natural per-message hook for consumer spans\n// (`Channel.consume` itself only registers the callback, it isn't called per message).\n// - `lib/connect.js` holds the `connect` function whose callback receives the open connection, used\n// to capture connection attributes.\n//\n// The version range mirrors `supportedVersions` in the vendored OTel instrumentation.\nconst module = { name: 'amqplib', versionRange: '>=0.5.5 <2' } as const;\n\nexport const amqplibConfig = [\n // Producer span + trace-header injection. `sendToQueue` delegates to `publish`, so it's covered.\n {\n channelName: 'publish',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'publish', kind: 'Sync' },\n },\n // Confirm-channel producer span; the trailing broker-confirm callback ends the span when the\n // broker acks/nacks. It internally calls `super.publish`, so the subscriber guards against the\n // base `publish` channel double-instrumenting.\n {\n channelName: 'confirmPublish',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'ConfirmChannel', methodName: 'publish', kind: 'Callback' },\n },\n // Records `consumerTag -> { noAck, queue }` so the per-message dispatch hook knows how to name and\n // when to end the consumer span.\n {\n channelName: 'consume',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'consume', kind: 'Async' },\n },\n // Per delivered message: creates the consumer span and runs the user callback under it.\n {\n channelName: 'dispatch',\n module: { ...module, filePath: 'lib/channel.js' },\n functionQuery: { className: 'BaseChannel', methodName: 'dispatchMessage', kind: 'Sync' },\n },\n // End the consumer span when the user settles the message.\n {\n channelName: 'ack',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'ack', kind: 'Sync' },\n },\n {\n channelName: 'nack',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'nack', kind: 'Sync' },\n },\n {\n channelName: 'reject',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'reject', kind: 'Sync' },\n },\n {\n channelName: 'ackAll',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'ackAll', kind: 'Sync' },\n },\n {\n channelName: 'nackAll',\n module: { ...module, filePath: 'lib/channel_model.js' },\n functionQuery: { className: 'Channel', methodName: 'nackAll', kind: 'Sync' },\n },\n // Stashes connection attributes (url/host/port/protocol/server product) on the connection object\n // for span-time reads via `channel.connection`.\n {\n channelName: 'connect',\n module: { ...module, filePath: 'lib/connect.js' },\n functionQuery: { functionName: 'connect', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const amqplibChannels = {\n AMQPLIB_PUBLISH: 'orchestrion:amqplib:publish',\n AMQPLIB_CONFIRM_PUBLISH: 'orchestrion:amqplib:confirmPublish',\n AMQPLIB_CONSUME: 'orchestrion:amqplib:consume',\n AMQPLIB_DISPATCH: 'orchestrion:amqplib:dispatch',\n AMQPLIB_ACK: 'orchestrion:amqplib:ack',\n AMQPLIB_NACK: 'orchestrion:amqplib:nack',\n AMQPLIB_REJECT: 'orchestrion:amqplib:reject',\n AMQPLIB_ACK_ALL: 'orchestrion:amqplib:ackAll',\n AMQPLIB_NACK_ALL: 'orchestrion:amqplib:nackAll',\n AMQPLIB_CONNECT: 'orchestrion:amqplib:connect',\n} as const;\n\nexport const amqplibSubscribeInjection = toSubscribeInjections(amqplibConfig);\n"],"names":["module","toSubscribeInjections"],"mappings":";;;;AAaA,MAAMA,QAAA,GAAS,EAAE,IAAA,EAAM,SAAA,EAAW,cAAc,YAAA,EAAa;AAEtD,MAAM,aAAA,GAAgB;AAAA;AAAA,EAE3B;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,sBAAA,EAAuB;AAAA,IACtD,eAAe,EAAE,SAAA,EAAW,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO,GAC7E;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA,IACE,WAAA,EAAa,gBAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,sBAAA,EAAuB;AAAA,IACtD,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW,GACxF;AAAA;AAAA;AAAA,EAGA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,sBAAA,EAAuB;AAAA,IACtD,eAAe,EAAE,SAAA,EAAW,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,OAAA;AAAQ,GAC9E;AAAA;AAAA,EAEA;AAAA,IACE,WAAA,EAAa,UAAA;AAAA,IACb,MAAA,EAAQ,EAA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AAE,GAAGA,QAAA,EAAQ,UAAU,gBAAA,EAAiB;AAAA,IAChD,aAAA,EAAe,EAAE,YAAA,EAAc,SAAA,EAAW,MAAM,UAAA;AAAW;AAE/D;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,eAAA,EAAiB,6BAAA;AAAA,EACjB,uBAAA,EAAyB,oCAAA;AAAA,EACzB,eAAA,EAAiB,6BAAA;AAAA,EACjB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,WAAA,EAAa,yBAAA;AAAA,EACb,YAAA,EAAc,0BAAA;AAAA,EACd,cAAA,EAAgB,4BAAA;AAAA,EAChB,eAAA,EAAiB,4BAAA;AAAA,EACjB,gBAAA,EAAkB,6BAAA;AAAA,EAClB,eAAA,EAAiB;AACnB;AAEO,MAAM,yBAAA,GAA4BC,yCAAsB,aAAa;;;;;;"}
@@ -1,5 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const subscribeInjection = require('./subscribe-injection.js');
4
+
3
5
  const anthropicAiConfig = [
4
6
  // One entry each for CJS/ESM
5
7
  ...["resources/messages/messages.js", "resources/messages/messages.mjs"].flatMap(
@@ -37,7 +39,9 @@ const anthropicAiChannels = {
37
39
  ANTHROPIC_MODELS: "orchestrion:@anthropic-ai/sdk:models",
38
40
  ANTHROPIC_MESSAGES_STREAM: "orchestrion:@anthropic-ai/sdk:messages-stream"
39
41
  };
42
+ const anthropicAiSubscribeInjection = subscribeInjection.toSubscribeInjections(anthropicAiConfig);
40
43
 
41
44
  exports.anthropicAiChannels = anthropicAiChannels;
42
45
  exports.anthropicAiConfig = anthropicAiConfig;
46
+ exports.anthropicAiSubscribeInjection = anthropicAiSubscribeInjection;
43
47
  //# sourceMappingURL=anthropic-ai.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"anthropic-ai.js","sources":["../../../../src/orchestrion/config/anthropic-ai.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nexport const anthropicAiConfig = [\n // One entry each for CJS/ESM\n ...['resources/messages/messages.js', 'resources/messages/messages.mjs'].flatMap(filePath =>\n (['create', 'countTokens'] as const).map(methodName => ({\n channelName: 'chat',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Messages', methodName, kind: 'Auto' as const },\n })),\n ),\n ...['resources/completions.js', 'resources/completions.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Completions', methodName: 'create', kind: 'Auto' as const },\n })),\n ...['resources/beta/messages/messages.js', 'resources/beta/messages/messages.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Messages', methodName: 'create', kind: 'Auto' as const },\n })),\n ...['resources/models.js', 'resources/models.mjs'].map(filePath => ({\n channelName: 'models',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Models', methodName: 'retrieve', kind: 'Auto' as const },\n })),\n // `messages.stream()` returns a synchronous emitter, not a promise, so `kind: 'Sync'` is required:\n // `Auto`'s promise wrapper never publishes `end` for a non-thenable return, so the span would never end.\n ...['resources/messages/messages.js', 'resources/messages/messages.mjs'].map(filePath => ({\n channelName: 'messages-stream',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Messages', methodName: 'stream', kind: 'Sync' as const },\n })),\n] satisfies InstrumentationConfig[];\n\nexport const anthropicAiChannels = {\n ANTHROPIC_CHAT: 'orchestrion:@anthropic-ai/sdk:chat',\n ANTHROPIC_MODELS: 'orchestrion:@anthropic-ai/sdk:models',\n ANTHROPIC_MESSAGES_STREAM: 'orchestrion:@anthropic-ai/sdk:messages-stream',\n} as const;\n"],"names":[],"mappings":";;AAEO,MAAM,iBAAA,GAAoB;AAAA;AAAA,EAE/B,GAAG,CAAC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AAAA;AAAA;AAAA,EAGF,GAAG,CAAC,gCAAA,EAAkC,iCAAiC,CAAA,CAAE,IAAI,CAAA,QAAA,MAAa;AAAA,IACxF,WAAA,EAAa,iBAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,mBAAA,EAAqB,YAAA,EAAc,eAAe,QAAA,EAAS;AAAA,IAC3E,eAAe,EAAE,SAAA,EAAW,YAAY,UAAA,EAAY,QAAA,EAAU,MAAM,MAAA;AAAgB,GACtF,CAAE;AACJ;AAEO,MAAM,mBAAA,GAAsB;AAAA,EACjC,cAAA,EAAgB,oCAAA;AAAA,EAChB,gBAAA,EAAkB,sCAAA;AAAA,EAClB,yBAAA,EAA2B;AAC7B;;;;;"}
1
+ {"version":3,"file":"anthropic-ai.js","sources":["../../../../src/orchestrion/config/anthropic-ai.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nexport const anthropicAiConfig = [\n // One entry each for CJS/ESM\n ...['resources/messages/messages.js', 'resources/messages/messages.mjs'].flatMap(filePath =>\n (['create', 'countTokens'] as const).map(methodName => ({\n channelName: 'chat',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Messages', methodName, kind: 'Auto' as const },\n })),\n ),\n ...['resources/completions.js', 'resources/completions.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Completions', methodName: 'create', kind: 'Auto' as const },\n })),\n ...['resources/beta/messages/messages.js', 'resources/beta/messages/messages.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Messages', methodName: 'create', kind: 'Auto' as const },\n })),\n ...['resources/models.js', 'resources/models.mjs'].map(filePath => ({\n channelName: 'models',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Models', methodName: 'retrieve', kind: 'Auto' as const },\n })),\n // `messages.stream()` returns a synchronous emitter, not a promise, so `kind: 'Sync'` is required:\n // `Auto`'s promise wrapper never publishes `end` for a non-thenable return, so the span would never end.\n ...['resources/messages/messages.js', 'resources/messages/messages.mjs'].map(filePath => ({\n channelName: 'messages-stream',\n module: { name: '@anthropic-ai/sdk', versionRange: '>=0.19.2 <1', filePath },\n functionQuery: { className: 'Messages', methodName: 'stream', kind: 'Sync' as const },\n })),\n] satisfies InstrumentationConfig[];\n\nexport const anthropicAiChannels = {\n ANTHROPIC_CHAT: 'orchestrion:@anthropic-ai/sdk:chat',\n ANTHROPIC_MODELS: 'orchestrion:@anthropic-ai/sdk:models',\n ANTHROPIC_MESSAGES_STREAM: 'orchestrion:@anthropic-ai/sdk:messages-stream',\n} as const;\n\nexport const anthropicAiSubscribeInjection = toSubscribeInjections(anthropicAiConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAGO,MAAM,iBAAA,GAAoB;AAAA;AAAA,EAE/B,GAAG,CAAC,gCAAA,EAAkC,iCAAiC,CAAA,CAAE,OAAA;AAAA,IAAQ,cAC9E,CAAC,QAAA,EAAU,aAAa,CAAA,CAAY,IAAI,CAAA,UAAA,MAAe;AAAA,MACtD,WAAA,EAAa,MAAA;AAAA,MACb,QAAQ,EAAE,IAAA,EAAM,mBAAA,EAAqB,YAAA,EAAc,eAAe,QAAA,EAAS;AAAA,MAC3E,eAAe,EAAE,SAAA,EAAW,UAAA,EAAY,UAAA,EAAY,MAAM,MAAA;AAAgB,KAC5E,CAAE;AAAA,GACJ;AAAA,EACA,GAAG,CAAC,0BAAA,EAA4B,2BAA2B,CAAA,CAAE,IAAI,CAAA,QAAA,MAAa;AAAA,IAC5E,WAAA,EAAa,MAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,mBAAA,EAAqB,YAAA,EAAc,eAAe,QAAA,EAAS;AAAA,IAC3E,eAAe,EAAE,SAAA,EAAW,eA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ribeInjection = require('./subscribe-injection.js');
4
+
3
5
  const awsSdkConfig = [
4
6
  {
5
7
  channelName: "send",
@@ -22,7 +24,9 @@ const awsSdkChannels = {
22
24
  AWS_SMITHY_CLIENT_SEND: "orchestrion:@smithy/smithy-client:send",
23
25
  AWS_SDK_SMITHY_CLIENT_SEND: "orchestrion:@aws-sdk/smithy-client:send"
24
26
  };
27
+ const awsSdkSubscribeInjection = subscribeInjection.toSubscribeInjections(awsSdkConfig);
25
28
 
26
29
  exports.awsSdkChannels = awsSdkChannels;
27
30
  exports.awsSdkConfig = awsSdkConfig;
31
+ exports.awsSdkSubscribeInjection = awsSdkSubscribeInjection;
28
32
  //# sourceMappingURL=aws-sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"aws-sdk.js","sources":["../../../../src/orchestrion/config/aws-sdk.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n// The AWS SDK (v3) routes every command through the smithy `Client.prototype.send` method. Which\n// package hosts that `Client` class changed across versions, so we target all of them; only the one\n// the app's client actually extends is ever invoked.\n//\n// - `@smithy/core` >= 3.24.0: the `Client` class moved into the `client` submodule bundle.\n// - `@smithy/smithy-client`: the `Client` class for aws-sdk v3.363.0+ (pre-`@smithy/core` stack).\n// - `@aws-sdk/smithy-client`: the `Client` class for older aws-sdk v3 releases.\n//\n// `send` is `async send(command, options)` (returns a promise), so `kind: 'Async'`.\nexport const awsSdkConfig = [\n {\n channelName: 'send',\n module: { name: '@smithy/core', versionRange: '>=3.24.0 <4', filePath: 'dist-cjs/submodules/client/index.js' },\n functionQuery: { className: 'Client', methodName: 'send', kind: 'Async' },\n },\n {\n channelName: 'send',\n module: { name: '@smithy/smithy-client', versionRange: '>=1.0.3 <5', filePath: 'dist-cjs/index.js' },\n functionQuery: { className: 'Client', methodName: 'send', kind: 'Async' },\n },\n {\n channelName: 'send',\n module: { name: '@aws-sdk/smithy-client', versionRange: '^3.1.0', filePath: 'dist-cjs/index.js' },\n functionQuery: { className: 'Client', methodName: 'send', kind: 'Async' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const awsSdkChannels = {\n AWS_SMITHY_CORE_SEND: 'orchestrion:@smithy/core:send',\n AWS_SMITHY_CLIENT_SEND: 'orchestrion:@smithy/smithy-client:send',\n AWS_SDK_SMITHY_CLIENT_SEND: 'orchestrion:@aws-sdk/smithy-client:send',\n} as const;\n"],"names":[],"mappings":";;AAWO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,MAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,aAAA,EAAe,UAAU,qCAAA,EAAsC;AAAA,IAC7G,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,MAAA,EAAQ,MAAM,OAAA;AAAQ,GAC1E;AAAA,EACA;AAAA,IACE,WAAA,EAAa,MAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,yBAAyB,YAAA,EAAc,YAAA,EAAc,UAAU,mBAAA,EAAoB;AAAA,IACnG,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,MAAA,EAAQ,MAAM,OAAA;AAAQ,GAC1E;AAAA,EACA;AAAA,IACE,WAAA,EAAa,MAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,0BAA0B,YAAA,EAAc,QAAA,EAAU,UAAU,mBAAA,EAAoB;AAAA,IAChG,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,MAAA,EAAQ,MAAM,OAAA;AAAQ;AAE5E;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,oBAAA,EAAsB,+BAAA;AAAA,EACtB,sBAAA,EAAwB,wCAAA;AAAA,EACxB,0BAAA,EAA4B;AAC9B;;;;;"}
1
+ {"version":3,"file":"aws-sdk.js","sources":["../../../../src/orchestrion/config/aws-sdk.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n// The AWS SDK (v3) routes every command through the smithy `Client.prototype.send` method. Which\n// package hosts that `Client` class changed across versions, so we target all of them; only the one\n// the app's client actually extends is ever invoked.\n//\n// - `@smithy/core` >= 3.24.0: the `Client` class moved into the `client` submodule bundle.\n// - `@smithy/smithy-client`: the `Client` class for aws-sdk v3.363.0+ (pre-`@smithy/core` stack).\n// - `@aws-sdk/smithy-client`: the `Client` class for older aws-sdk v3 releases.\n//\n// `send` is `async send(command, options)` (returns a promise), so `kind: 'Async'`.\nexport const awsSdkConfig = [\n {\n channelName: 'send',\n module: { name: '@smithy/core', versionRange: '>=3.24.0 <4', filePath: 'dist-cjs/submodules/client/index.js' },\n functionQuery: { className: 'Client', methodName: 'send', kind: 'Async' },\n },\n {\n channelName: 'send',\n module: { name: '@smithy/smithy-client', versionRange: '>=1.0.3 <5', filePath: 'dist-cjs/index.js' },\n functionQuery: { className: 'Client', methodName: 'send', kind: 'Async' },\n },\n {\n channelName: 'send',\n module: { name: '@aws-sdk/smithy-client', versionRange: '^3.1.0', filePath: 'dist-cjs/index.js' },\n functionQuery: { className: 'Client', methodName: 'send', kind: 'Async' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const awsSdkChannels = {\n AWS_SMITHY_CORE_SEND: 'orchestrion:@smithy/core:send',\n AWS_SMITHY_CLIENT_SEND: 'orchestrion:@smithy/smithy-client:send',\n AWS_SDK_SMITHY_CLIENT_SEND: 'orchestrion:@aws-sdk/smithy-client:send',\n} as const;\n\nexport const awsSdkSubscribeInjection = toSubscribeInjections(awsSdkConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAYO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,MAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,aAAA,EAAe,UAAU,qCAAA,EAAsC;AAAA,IAC7G,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,MAAA,EAAQ,MAAM,OAAA;AAAQ,GAC1E;AAAA,EACA;AAAA,IACE,WAAA,EAAa,MAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,yBAAyB,YAAA,EAAc,YAAA,EAAc,UAAU,mBAAA,EAAoB;AAAA,IACnG,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,MAAA,EAAQ,MAAM,OAAA;AAAQ,GAC1E;AAAA,EACA;AAAA,IACE,WAAA,EAAa,MAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,0BAA0B,YAAA,EAAc,QAAA,EAAU,UAAU,mBAAA,EAAoB;AAAA,IAChG,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,MAAA,EAAQ,MAAM,OAAA;AAAQ;AAE5E;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,oBAAA,EAAsB,+BAAA;AAAA,EACtB,sBAAA,EAAwB,wCAAA;AAAA,EACxB,0BAAA,EAA4B;AAC9B;AAEO,MAAM,wBAAA,GAA2BA,yCAAsB,YAAY;;;;;;"}
@@ -0,0 +1,29 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const CHANNEL_INTEGRATION_DEFINITIONS = [
4
+ { exportName: "postgresChannelIntegration", modules: ["pg", "pg-pool"] },
5
+ { exportName: "postgresJsChannelIntegration", modules: ["postgres"] },
6
+ { exportName: "mysqlChannelIntegration", modules: ["mysql"] },
7
+ { exportName: "mysql2ChannelIntegration", modules: ["mysql2"] },
8
+ { exportName: "genericPoolChannelIntegration", modules: ["generic-pool"] },
9
+ { exportName: "lruMemoizerChannelIntegration", modules: ["lru-memoizer"] },
10
+ { exportName: "openaiChannelIntegration", modules: ["openai"] },
11
+ { exportName: "anthropicChannelIntegration", modules: ["@anthropic-ai/sdk"] },
12
+ { exportName: "googleGenAIChannelIntegration", modules: ["@google/genai"] },
13
+ { exportName: "vercelAiChannelIntegration", modules: ["ai"] },
14
+ { exportName: "amqplibChannelIntegration", modules: ["amqplib"] },
15
+ { exportName: "hapiChannelIntegration", modules: ["@hapi/hapi"] },
16
+ { exportName: "expressChannelIntegration", modules: ["express", "router"] },
17
+ { exportName: "graphqlChannelIntegration", modules: ["graphql"] },
18
+ { exportName: "kafkajsChannelIntegration", modules: ["kafkajs"] },
19
+ { exportName: "redisChannelIntegration", modules: ["redis", "@redis/client"] },
20
+ { exportName: "ioredisChannelIntegration", modules: ["ioredis"] },
21
+ { exportName: "dataloaderChannelIntegration", modules: ["dataloader"] }
22
+ ];
23
+ function subscriberExportForModule(moduleName) {
24
+ return CHANNEL_INTEGRATION_DEFINITIONS.find((d) => d.modules.includes(moduleName))?.exportName;
25
+ }
26
+
27
+ exports.CHANNEL_INTEGRATION_DEFINITIONS = CHANNEL_INTEGRATION_DEFINITIONS;
28
+ exports.subscriberExportForModule = subscriberExportForModule;
29
+ //# sourceMappingURL=channel-integration-definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-integration-definitions.js","sources":["../../../../src/orchestrion/config/channel-integration-definitions.ts"],"sourcesContent":["/**\n * Build-time metadata mapping each instrumented package (orchestrion\n * `module.name`) to the channel-subscriber integration that consumes the\n * channels injected into it — by the `exportName` it is published under from\n * `@sentry/server-utils/orchestrion`.\n *\n * Kept in a separate, factory-free module on purpose: the subscribe-injection\n * transform (reachable from every orchestrion bundler plugin) reads this to\n * generate the tiny snippet it injects into each instrumented file, and must\n * not drag any subscriber code — or its `@sentry/core` span machinery — into\n * the plugin's own build to do so.\n *\n * `exportName` must be a named export of `@sentry/server-utils/orchestrion`.\n * `modules` must match `module.name` values in `SENTRY_INSTRUMENTATIONS` — e.g.\n * `postgresChannelIntegration` covers both `pg` and `pg-pool`, and\n * `redisChannelIntegration` both `redis` and `@redis/client`.\n *\n * `redis`, `ioredis` and `dataloader` are included even though they're not in\n * the node SDK's `channelIntegrations` (they only partially replace an OTel\n * integration there): in a bundler-only runtime like Cloudflare Workers there\n * is no OTel integration to coordinate with, so subscribing whenever the\n * package is bundled is unconditionally correct.\n */\nexport const CHANNEL_INTEGRATION_DEFINITIONS = [\n { exportName: 'postgresChannelIntegration', modules: ['pg', 'pg-pool'] },\n { exportName: 'postgresJsChannelIntegration', modules: ['postgres'] },\n { exportName: 'mysqlChannelIntegration', modules: ['mysql'] },\n { exportName: 'mysql2ChannelIntegration', modules: ['mysql2'] },\n { exportName: 'genericPoolChannelIntegration', modules: ['generic-pool'] },\n { exportName: 'lruMemoizerChannelIntegration', modules: ['lru-memoizer'] },\n { exportName: 'openaiChannelIntegration', modules: ['openai'] },\n { exportName: 'anthropicChannelIntegration', modules: ['@anthropic-ai/sdk'] },\n { exportName: 'googleGenAIChannelIntegration', modules: ['@google/genai'] },\n { exportName: 'vercelAiChannelIntegration', modules: ['ai'] },\n { exportName: 'amqplibChannelIntegration', modules: ['amqplib'] },\n { exportName: 'hapiChannelIntegration', modules: ['@hapi/hapi'] },\n { exportName: 'expressChannelIntegration', modules: ['express', 'router'] },\n { exportName: 'graphqlChannelIntegration', modules: ['graphql'] },\n { exportName: 'kafkajsChannelIntegration', modules: ['kafkajs'] },\n { exportName: 'redisChannelIntegration', modules: ['redis', '@redis/client'] },\n { exportName: 'ioredisChannelIntegration', modules: ['ioredis'] },\n { exportName: 'dataloaderChannelIntegration', modules: ['dataloader'] },\n] as const satisfies ReadonlyArray<{ exportName: string; modules: readonly string[] }>;\n\n/** Look up the subscriber export name for an instrumented package, if any. */\nexport function subscriberExportForModule(moduleName: string): string | undefined {\n return CHANNEL_INTEGRATION_DEFINITIONS.find(d => (d.modules as readonly string[]).includes(moduleName))?.exportName;\n}\n"],"names":[],"mappings":";;AAuBO,MAAM,+BAAA,GAAkC;AAAA,EAC7C,EAAE,UAAA,EAAY,4BAAA,EAA8B,SAAS,CAAC,IAAA,EAAM,SAAS,CAAA,EAAE;AAAA,EACvE,EAAE,UAAA,EAAY,8BAAA,EAAgC,OAAA,EAAS,CAAC,UAAU,CAAA,EAAE;AAAA,EACpE,EAAE,UAAA,EAAY,yBAAA,EAA2B,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AgC,OAAA,EAAS,CAAC,YAAY,CAAA;AACtE;AAGO,SAAS,0BAA0B,UAAA,EAAwC;AAChF,EAAA,OAAO,+BAAA,CAAgC,KAAK,CAAA,CAAA,KAAM,CAAA,CAAE,QAA8B,QAAA,CAAS,UAAU,CAAC,CAAA,EAAG,UAAA;AAC3G;;;;;"}
@@ -1,5 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const subscribeInjection = require('./subscribe-injection.js');
4
+
3
5
  const module$1 = { name: "dataloader", versionRange: ">=2.0.0 <3", filePath: "index.js" };
4
6
  const dataloaderConfig = [
5
7
  // Wrap the constructor so the subscriber can wrap the user's `batchLoadFn` (arg 0). The batch span
@@ -47,7 +49,9 @@ const dataloaderChannels = {
47
49
  DATALOADER_CLEAR: "orchestrion:dataloader:clear",
48
50
  DATALOADER_CLEAR_ALL: "orchestrion:dataloader:clearAll"
49
51
  };
52
+ const dataloaderSubscribeInjection = subscribeInjection.toSubscribeInjections(dataloaderConfig);
50
53
 
51
54
  exports.dataloaderChannels = dataloaderChannels;
52
55
  exports.dataloaderConfig = dataloaderConfig;
56
+ exports.dataloaderSubscribeInjection = dataloaderSubscribeInjection;
53
57
  //# sourceMappingURL=dataloader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataloader.js","sources":["../../../../src/orchestrion/config/dataloader.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\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;;;;;"}
1
+ {"version":3,"file":"dataloader.js","sources":["../../../../src/orchestrion/config/dataloader.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\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\nexport const dataloaderSubscribeInjection = toSubscribeInjections(dataloaderConfig);\n"],"names":["module","toSubscribeInjections"],"mappings":";;;;AAOA,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;AAEO,MAAM,4BAAA,GAA+BC,yCAAsB,gBAAgB;;;;;;"}
@@ -1,5 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const subscribeInjection = require('./subscribe-injection.js');
4
+
3
5
  const expressConfig = [
4
6
  // Express funnels every middleware/route handler through a single method on
5
7
  // its routing `Layer`, so instrumenting that one method covers the whole
@@ -71,7 +73,9 @@ const expressChannels = {
71
73
  EXPRESS_REGISTER: "orchestrion:express:register",
72
74
  ROUTER_REGISTER: "orchestrion:router:register"
73
75
  };
76
+ const expressSubscribeInjection = subscribeInjection.toSubscribeInjections(expressConfig);
74
77
 
75
78
  exports.expressChannels = expressChannels;
76
79
  exports.expressConfig = expressConfig;
80
+ exports.expressSubscribeInjection = expressSubscribeInjection;
77
81
  //# sourceMappingURL=express.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"express.js","sources":["../../../../src/orchestrion/config/express.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nexport const expressConfig = [\n // Express funnels every middleware/route handler through a single method on\n // its routing `Layer`, so instrumenting that one method covers the whole\n // request pipeline. The `expressChannelIntegration` opens one span per layer\n // invocation. Both are `Layer.prototype.<method> = function <fn>(req, res, next)`\n // prototype assignments (not `class` methods), so `expressionName` (matching\n // the assignment's `left.property.name`) is used. `Callback`: the handler's\n // last argument is `next`, so the transform ends the traced operation when\n // `next` is invoked (and publishes `error` when it's called with an error).\n //\n // Express v4 ships its own router in `express/lib/router/layer.js`.\n {\n channelName: 'handle',\n module: { name: 'express', versionRange: '>=4.0.0 <5', filePath: 'lib/router/layer.js' },\n // v4's method is `Layer.prototype.handle_request = function handle(...)` —\n // match the assigned property name, not the function name.\n functionQuery: { expressionName: 'handle_request', kind: 'Callback' },\n },\n // Express v5 delegates routing to the standalone `router` package.\n {\n channelName: 'handle',\n module: { name: 'router', versionRange: '>=2.0.0 <3', filePath: 'lib/layer.js' },\n functionQuery: { expressionName: 'handleRequest', kind: 'Callback' },\n },\n // Layer *registration* methods. `Router.prototype.route`/`.use` are called\n // once per registered route/middleware (including internally by `app.get`/\n // `app.use`), so subscribing here lets us record each layer's registered path\n // *pattern* — which the handler path (`req.baseUrl`) can't recover for\n // parameterized mounts. `Sync`: these return synchronously and, unlike a\n // handler, `use`'s trailing function argument is a registration payload, not a\n // callback — so `Callback` would misclassify it and never fire `end`.\n //\n // `route` and `use` share one `register` channel because the subscriber handles\n // them identically, saving a channel per module.\n //\n // Express v4 ships its own router in `express/lib/router/index.js`.\n {\n channelName: 'register',\n module: { name: 'express', versionRange: '>=4.0.0 <5', filePath: 'lib/router/index.js' },\n functionQuery: { expressionName: 'route', kind: 'Sync' },\n },\n {\n channelName: 'register',\n module: { name: 'express', versionRange: '>=4.0.0 <5', filePath: 'lib/router/index.js' },\n functionQuery: { expressionName: 'use', kind: 'Sync' },\n },\n // Express v5 delegates routing to the standalone `router` package.\n {\n channelName: 'register',\n module: { name: 'router', versionRange: '>=2.0.0 <3', filePath: 'index.js' },\n functionQuery: { expressionName: 'route', kind: 'Sync' },\n },\n {\n channelName: 'register',\n module: { name: 'router', versionRange: '>=2.0.0 <3', filePath: 'index.js' },\n functionQuery: { expressionName: 'use', kind: 'Sync' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const expressChannels = {\n // Express v4 runs each layer's handler through `Layer.prototype.handle_request`\n // in the `express` module.\n EXPRESS_HANDLE: 'orchestrion:express:handle',\n // Express v5 delegates routing to the standalone `router` package, where the\n // equivalent method is `Layer.prototype.handleRequest`.\n ROUTER_HANDLE: 'orchestrion:router:handle',\n // Layer *registration* (`Router.prototype.route`/`.use`), used to capture each\n // layer's registered path pattern so the matched route can be reconstructed\n // with its parameters intact (`req.baseUrl` only exposes the resolved prefix).\n EXPRESS_REGISTER: 'orchestrion:express:register',\n ROUTER_REGISTER: 'orchestrion:router:register',\n} as const;\n"],"names":[],"mappings":";;AAEO,MAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW3B;AAAA,IACE,WAAA,EAAa,QAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,WAAW,YAAA,EAAc,YAAA,EAAc,UAAU,qBAAA,EAAsB;AAAA;AAAA;AAAA,IAGvF,aAAA,EAAe,EAAE,cAAA,EAAgB,gBAAA,EAAkB,MAAM,UAAA;AAAW,GACtE;AAAA;AAAA,EAEA;AAAA,IACE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,gBAAA,EAAkB,8BAAA;AAAA,EAClB,eAAA,EAAiB;AACnB;;;;;"}
1
+ {"version":3,"file":"express.js","sources":["../../../../src/orchestrion/config/express.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nexport const expressConfig = [\n // Express funnels every middleware/route handler through a single method on\n // its routing `Layer`, so instrumenting that one method covers the whole\n // request pipeline. The `expressChannelIntegration` opens one span per layer\n // invocation. Both are `Layer.prototype.<method> = function <fn>(req, res, next)`\n // prototype assignments (not `class` methods), so `expressionName` (matching\n // the assignment's `left.property.name`) is used. `Callback`: the handler's\n // last argument is `next`, so the transform ends the traced operation when\n // `next` is invoked (and publishes `error` when it's called with an error).\n //\n // Express v4 ships its own router in `express/lib/router/layer.js`.\n {\n channelName: 'handle',\n module: { name: 'express', versionRange: '>=4.0.0 <5', filePath: 'lib/router/layer.js' },\n // v4's method is `Layer.prototype.handle_request = function handle(...)` —\n // match the assigned property name, not the function name.\n functionQuery: { expressionName: 'handle_request', kind: 'Callback' },\n },\n // Express v5 delegates routing to the standalone `router` package.\n {\n channelName: 'handle',\n module: { name: 'router', versionRange: '>=2.0.0 <3', filePath: 'lib/layer.js' },\n functionQuery: { expressionName: 'handleRequest', kind: 'Callback' },\n },\n // Layer *registration* methods. `Router.prototype.route`/`.use` are called\n // once per registered route/middleware (including internally by `app.get`/\n // `app.use`), so subscribing here lets us record each layer's registered path\n // *pattern* — which the handler path (`req.baseUrl`) can't recover for\n // parameterized mounts. `Sync`: these return synchronously and, unlike a\n // handler, `use`'s trailing function argument is a registration payload, not a\n // callback — so `Callback` would misclassify it and never fire `end`.\n //\n // `route` and `use` share one `register` channel because the subscriber handles\n // them identically, saving a channel per module.\n //\n // Express v4 ships its own router in `express/lib/router/index.js`.\n {\n channelName: 'register',\n module: { name: 'express', versionRange: '>=4.0.0 <5', filePath: 'lib/router/index.js' },\n functionQuery: { expressionName: 'route', kind: 'Sync' },\n },\n {\n channelName: 'register',\n module: { name: 'express', versionRange: '>=4.0.0 <5', filePath: 'lib/router/index.js' },\n functionQuery: { expressionName: 'use', kind: 'Sync' },\n },\n // Express v5 delegates routing to the standalone `router` package.\n {\n channelName: 'register',\n module: { name: 'router', versionRange: '>=2.0.0 <3', filePath: 'index.js' },\n functionQuery: { expressionName: 'route', kind: 'Sync' },\n },\n {\n channelName: 'register',\n module: { name: 'router', versionRange: '>=2.0.0 <3', filePath: 'index.js' },\n functionQuery: { expressionName: 'use', kind: 'Sync' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const expressChannels = {\n // Express v4 runs each layer's handler through `Layer.prototype.handle_request`\n // in the `express` module.\n EXPRESS_HANDLE: 'orchestrion:express:handle',\n // Express v5 delegates routing to the standalone `router` package, where the\n // equivalent method is `Layer.prototype.handleRequest`.\n ROUTER_HANDLE: 'orchestrion:router:handle',\n // Layer *registration* (`Router.prototype.route`/`.use`), used to capture each\n // layer's registered path pattern so the matched route can be reconstructed\n // with its parameters intact (`req.baseUrl` only exposes the resolved prefix).\n EXPRESS_REGISTER: 'orchestrion:express:register',\n ROUTER_REGISTER: 'orchestrion:router:register',\n} as const;\n\nexport const expressSubscribeInjection = toSubscribeInjections(expressConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAGO,MAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW3B;AAAA,IACE,WAAA,EAAa,QAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,WAAW,YAAA,EAAc,YAAA,EAAc,UAAU,qBAAA,EAAsB;AAAA;AAAA;AAAA,IAGvF,aAAA,EAAe,EAAE,cAAA,EAAgB,gBAAA,EAAkB,MAAM,UAAA;AAAW,GACtE;AAAA;AAAA,EAEA;AAAA,IACE,WAAA,EAAa,QAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,YAAA,EAAc,UAAU,cAAA,EAAe;AAAA,IA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