@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,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 lruMemoizerConfig = [
4
6
  {
5
7
  channelName: "load",
@@ -11,7 +13,9 @@ const lruMemoizerConfig = [
11
13
  const lruMemoizerChannels = {
12
14
  LRU_MEMOIZER_LOAD: "orchestrion:lru-memoizer:load"
13
15
  };
16
+ const lruMemoizerSubscribeInjection = subscribeInjection.toSubscribeInjections(lruMemoizerConfig);
14
17
 
15
18
  exports.lruMemoizerChannels = lruMemoizerChannels;
16
19
  exports.lruMemoizerConfig = lruMemoizerConfig;
20
+ exports.lruMemoizerSubscribeInjection = lruMemoizerSubscribeInjection;
17
21
  //# sourceMappingURL=lru-memoizer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lru-memoizer.js","sources":["../../../../src/orchestrion/config/lru-memoizer.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nexport const lruMemoizerConfig = [\n {\n channelName: 'load',\n // `>=2.1.0` only: the named `function memoizedFunction()` the selector targets exists from 2.1.0\n module: { name: 'lru-memoizer', versionRange: '>=2.1.0 <4', filePath: 'lib/async.js' },\n functionQuery: { functionName: 'memoizedFunction', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const lruMemoizerChannels = {\n LRU_MEMOIZER_LOAD: 'orchestrion:lru-memoizer:load',\n} as const;\n"],"names":[],"mappings":";;AAEO,MAAM,iBAAA,GAAoB;AAAA,EAC/B;AAAA,IACE,WAAA,EAAa,MAAA;AAAA;AAAA,IAEb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,YAAA,EAAc,UAAU,cAAA,EAAe;AAAA,IACrF,aAAA,EAAe,EAAE,YAAA,EAAc,kBAAA,EAAoB,MAAM,UAAA;AAAW;AAExE;AAEO,MAAM,mBAAA,GAAsB;AAAA,EACjC,iBAAA,EAAmB;AACrB;;;;;"}
1
+ {"version":3,"file":"lru-memoizer.js","sources":["../../../../src/orchestrion/config/lru-memoizer.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nexport const lruMemoizerConfig = [\n {\n channelName: 'load',\n // `>=2.1.0` only: the named `function memoizedFunction()` the selector targets exists from 2.1.0\n module: { name: 'lru-memoizer', versionRange: '>=2.1.0 <4', filePath: 'lib/async.js' },\n functionQuery: { functionName: 'memoizedFunction', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const lruMemoizerChannels = {\n LRU_MEMOIZER_LOAD: 'orchestrion:lru-memoizer:load',\n} as const;\n\nexport const lruMemoizerSubscribeInjection = toSubscribeInjections(lruMemoizerConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAGO,MAAM,iBAAA,GAAoB;AAAA,EAC/B;AAAA,IACE,WAAA,EAAa,MAAA;AAAA;AAAA,IAEb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,YAAA,EAAc,UAAU,cAAA,EAAe;AAAA,IACrF,aAAA,EAAe,EAAE,YAAA,EAAc,kBAAA,EAAoB,MAAM,UAAA;AAAW;AAExE;AAEO,MAAM,mBAAA,GAAsB;AAAA,EACjC,iBAAA,EAAmB;AACrB;AAEO,MAAM,6BAAA,GAAgCA,yCAAsB,iBAAiB;;;;;;"}
@@ -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: "mongodb" };
4
6
  const mongodbConfig = [
5
7
  // Band 1: mongodb >= 6.4 — promise-based command.
@@ -61,7 +63,9 @@ const mongodbChannels = {
61
63
  MONGODB_V3_QUERY: "orchestrion:mongodb:v3_query",
62
64
  MONGODB_V3_GET_MORE: "orchestrion:mongodb:v3_get_more"
63
65
  };
66
+ const mongodbSubscribeInjection = subscribeInjection.toSubscribeInjections(mongodbConfig);
64
67
 
65
68
  exports.mongodbChannels = mongodbChannels;
66
69
  exports.mongodbConfig = mongodbConfig;
70
+ exports.mongodbSubscribeInjection = mongodbSubscribeInjection;
67
71
  //# sourceMappingURL=mongodb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mongodb.js","sources":["../../../../src/orchestrion/config/mongodb.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\n// The mongodb driver's command architecture changed across majors, mirrored in the vendored OTel\n// instrumentation's version bands:\n// - >= 6.4: promise-based `Connection.prototype.command`\n// - >= 4.0 < 6.4: callback-based `Connection.prototype.command` + `ConnectionPool.checkOut`\n// (the pool runs the checkout callback in a detached context, so the channel re-propagates the\n// caller's async context to it — see the subscriber)\n// - >= 3.3 < 4: the `lib/core/wireprotocol` module functions\nconst module = { name: 'mongodb' } as const;\n\nexport const mongodbConfig = [\n // Band 1: mongodb >= 6.4 — promise-based command.\n // `methodName`-only (no `className`): the code-transformer's `className` matcher throws on classes\n // containing ES2022 `static {}` blocks (mongodb 7.x's `Connection`/`ConnectionPool` have them — see\n // `transformer-bug.md`), and `methodName` alone matches exactly the base method across all versions.\n {\n channelName: 'command',\n module: { ...module, versionRange: '>=6.4.0 <8', filePath: 'lib/cmap/connection.js' },\n functionQuery: { methodName: 'command', kind: 'Async' },\n },\n // Band 2: mongodb >= 4.0 < 6.4 — callback-based command (same `command` channel, different kind).\n {\n channelName: 'command',\n module: { ...module, versionRange: '>=4.0.0 <6.4', filePath: 'lib/cmap/connection.js' },\n functionQuery: { methodName: 'command', kind: 'Callback' },\n },\n // Band 2: the pool runs the checkout callback in a detached async context, so the operation's\n // `command()` (invoked inside it) loses the caller's active span. Hooking `checkOut` re-propagates\n // that context to the callback (the subscriber creates no span — see `getSpan` returning undefined).\n // Only needed < 6.4; from 6.4 `checkOut` is promise-based and the context survives natively.\n {\n channelName: 'checkout',\n module: { ...module, versionRange: '>=4.0.0 <6.4', filePath: 'lib/cmap/connection_pool.js' },\n functionQuery: { methodName: 'checkOut', kind: 'Callback' },\n },\n // Band 3: mongodb >= 3.3 < 4 — the driver had no unified `command`; each operation is a separate\n // `lib/core/wireprotocol` function, all callback-style. `insert`/`update`/`remove` are named\n // function expressions in the `index.js` `module.exports` object (matched by `expressionName`);\n // `command`/`query`/`getMore` are single-function modules (matched by `functionName`).\n ...(['insert', 'update', 'remove'] as const).map(op => ({\n channelName: `v3_${op}`,\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/index.js' },\n functionQuery: { expressionName: op, kind: 'Callback' as const },\n })),\n {\n channelName: 'v3_command',\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/command.js' },\n functionQuery: { functionName: 'command', kind: 'Callback' },\n },\n {\n channelName: 'v3_query',\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/query.js' },\n functionQuery: { functionName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'v3_get_more',\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/get_more.js' },\n functionQuery: { functionName: 'getMore', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mongodbChannels = {\n MONGODB_COMMAND: 'orchestrion:mongodb:command',\n MONGODB_CHECKOUT: 'orchestrion:mongodb:checkout',\n MONGODB_V3_INSERT: 'orchestrion:mongodb:v3_insert',\n MONGODB_V3_UPDATE: 'orchestrion:mongodb:v3_update',\n MONGODB_V3_REMOVE: 'orchestrion:mongodb:v3_remove',\n MONGODB_V3_COMMAND: 'orchestrion:mongodb:v3_command',\n MONGODB_V3_QUERY: 'orchestrion:mongodb:v3_query',\n MONGODB_V3_GET_MORE: 'orchestrion:mongodb:v3_get_more',\n} as const;\n"],"names":["module"],"mappings":";;AASA,MAAMA,QAAA,GAAS,EAAE,IAAA,EAAM,SAAA,EAAU;AAE1B,MAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,EAK3B;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,YAAA,EAAc,UAAU,wBAAA,EAAyB;AAAA,IACpF,aAAA,EAAe,EAAE,UAAA,EAAY,SAAA,EAAW,MAAM,OAAA;AAAQ,GACxD;AAAA;AAAA,EAEA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,cAAA,E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YAAA,EAAc,SAAA,EAAW,MAAM,UAAA;AAAW;AAE/D;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,eAAA,EAAiB,6BAAA;AAAA,EACjB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,iBAAA,EAAmB,+BAAA;AAAA,EACnB,iBAAA,EAAmB,+BAAA;AAAA,EACnB,iBAAA,EAAmB,+BAAA;AAAA,EACnB,kBAAA,EAAoB,gCAAA;AAAA,EACpB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,mBAAA,EAAqB;AACvB;;;;;"}
1
+ {"version":3,"file":"mongodb.js","sources":["../../../../src/orchestrion/config/mongodb.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n// The mongodb driver's command architecture changed across majors, mirrored in the vendored OTel\n// instrumentation's version bands:\n// - >= 6.4: promise-based `Connection.prototype.command`\n// - >= 4.0 < 6.4: callback-based `Connection.prototype.command` + `ConnectionPool.checkOut`\n// (the pool runs the checkout callback in a detached context, so the channel re-propagates the\n// caller's async context to it — see the subscriber)\n// - >= 3.3 < 4: the `lib/core/wireprotocol` module functions\nconst module = { name: 'mongodb' } as const;\n\nexport const mongodbConfig = [\n // Band 1: mongodb >= 6.4 — promise-based command.\n // `methodName`-only (no `className`): the code-transformer's `className` matcher throws on classes\n // containing ES2022 `static {}` blocks (mongodb 7.x's `Connection`/`ConnectionPool` have them — see\n // `transformer-bug.md`), and `methodName` alone matches exactly the base method across all versions.\n {\n channelName: 'command',\n module: { ...module, versionRange: '>=6.4.0 <8', filePath: 'lib/cmap/connection.js' },\n functionQuery: { methodName: 'command', kind: 'Async' },\n },\n // Band 2: mongodb >= 4.0 < 6.4 — callback-based command (same `command` channel, different kind).\n {\n channelName: 'command',\n module: { ...module, versionRange: '>=4.0.0 <6.4', filePath: 'lib/cmap/connection.js' },\n functionQuery: { methodName: 'command', kind: 'Callback' },\n },\n // Band 2: the pool runs the checkout callback in a detached async context, so the operation's\n // `command()` (invoked inside it) loses the caller's active span. Hooking `checkOut` re-propagates\n // that context to the callback (the subscriber creates no span — see `getSpan` returning undefined).\n // Only needed < 6.4; from 6.4 `checkOut` is promise-based and the context survives natively.\n {\n channelName: 'checkout',\n module: { ...module, versionRange: '>=4.0.0 <6.4', filePath: 'lib/cmap/connection_pool.js' },\n functionQuery: { methodName: 'checkOut', kind: 'Callback' },\n },\n // Band 3: mongodb >= 3.3 < 4 — the driver had no unified `command`; each operation is a separate\n // `lib/core/wireprotocol` function, all callback-style. `insert`/`update`/`remove` are named\n // function expressions in the `index.js` `module.exports` object (matched by `expressionName`);\n // `command`/`query`/`getMore` are single-function modules (matched by `functionName`).\n ...(['insert', 'update', 'remove'] as const).map(op => ({\n channelName: `v3_${op}`,\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/index.js' },\n functionQuery: { expressionName: op, kind: 'Callback' as const },\n })),\n {\n channelName: 'v3_command',\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/command.js' },\n functionQuery: { functionName: 'command', kind: 'Callback' },\n },\n {\n channelName: 'v3_query',\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/query.js' },\n functionQuery: { functionName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'v3_get_more',\n module: { ...module, versionRange: '>=3.3.0 <4', filePath: 'lib/core/wireprotocol/get_more.js' },\n functionQuery: { functionName: 'getMore', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mongodbChannels = {\n MONGODB_COMMAND: 'orchestrion:mongodb:command',\n MONGODB_CHECKOUT: 'orchestrion:mongodb:checkout',\n MONGODB_V3_INSERT: 'orchestrion:mongodb:v3_insert',\n MONGODB_V3_UPDATE: 'orchestrion:mongodb:v3_update',\n MONGODB_V3_REMOVE: 'orchestrion:mongodb:v3_remove',\n MONGODB_V3_COMMAND: 'orchestrion:mongodb:v3_command',\n MONGODB_V3_QUERY: 'orchestrion:mongodb:v3_query',\n MONGODB_V3_GET_MORE: 'orchestrion:mongodb:v3_get_more',\n} as const;\n\nexport const mongodbSubscribeInjection = toSubscribeInjections(mongodbConfig);\n"],"names":["module","toSubscribeInjections"],"mappings":";;;;AAUA,MAAMA,QAAA,GAAS,EAAE,IAAA,EAAM,SAAA,EAAU;AAE1B,MAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,EAK3B;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,YAAA,EAAc,UAAU,wBAAA,EAAyB;AAAA,IACpF,aAAA,EAAe,EAAE,UAAA,EAAY,SAAA,EAAW,MAAM,OAAA;AAAQ,GACxD;AAAA;AAAA,EAEA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,cAAA,EAAgB,UAAU,wBAAA,EAAyB;AAAA,IACtF,aAAA,EAAe,EAAE,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW,GAC3D;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA,IACE,WAAA,EAAa,UAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,cAAA,EAAgB,UAAU,6BAAA,EAA8B;AAAA,IAC3F,aAAA,EAAe,EAAE,UAAA,EAAY,UAAA,EAAY,MAAM,UAAA;AAAW,GAC5D;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,GAAI,CAAC,QAAA,EAAU,UAAU,QAAQ,CAAA,CAAY,IAAI,CAAA,EAAA,MAAO;AAAA,IACtD,WAAA,EAAa,MAAM,EAAE,CAAA,CAAA;AAAA,IACrB,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,YAAA,EAAc,UAAU,gCAAA,EAAiC;AAAA,IAC5F,aAAA,EAAe,EAAE,cAAA,EAAgB,EAAA,EAAI,MAAM,UAAA;AAAoB,GACjE,CAAE,CAAA;AAAA,EACF;AAAA,IACE,WAAA,EAAa,YAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,YAAA,EAAc,UAAU,kCAAA,EAAmC;AAAA,IAC9F,aAAA,EAAe,EAAE,YAAA,EAAc,SAAA,EAAW,MAAM,UAAA;AAAW,GAC7D;AAAA,EACA;AAAA,IACE,WAAA,EAAa,UAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,YAAA,EAAc,UAAU,gCAAA,EAAiC;AAAA,IAC5F,aAAA,EAAe,EAAE,YAAA,EAAc,OAAA,EAAS,MAAM,UAAA;AAAW,GAC3D;AAAA,EACA;AAAA,IACE,WAAA,EAAa,aAAA;AAAA,IACb,QAAQ,EAAE,GAAGA,UAAQ,YAAA,EAAc,YAAA,EAAc,UAAU,mCAAA,EAAoC;AAAA,IAC/F,aAAA,EAAe,EAAE,YAAA,EAAc,SAAA,EAAW,MAAM,UAAA;AAAW;AAE/D;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,eAAA,EAAiB,6BAAA;AAAA,EACjB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,iBAAA,EAAmB,+BAAA;AAAA,EACnB,iBAAA,EAAmB,+BAAA;AAAA,EACnB,iBAAA,EAAmB,+BAAA;AAAA,EACnB,kBAAA,EAAoB,gCAAA;AAAA,EACpB,gBAAA,EAAkB,8BAAA;AAAA,EAClB,mBAAA,EAAqB;AACvB;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 module$1 = { name: "mongoose", versionRange: ">=5.9.7 <9.7.0" };
4
6
  const CONTEXT_CAPTURE_QUERY_METHODS = [
5
7
  "find",
@@ -100,8 +102,10 @@ const mongooseChannels = {
100
102
  const MONGOOSE_CONTEXT_CAPTURE_CHANNELS = CONTEXT_CAPTURE_QUERY_METHODS.map(
101
103
  (methodName) => `orchestrion:mongoose:ctx_${methodName}`
102
104
  );
105
+ const mongooseSubscribeInjection = subscribeInjection.toSubscribeInjections(mongooseConfig);
103
106
 
104
107
  exports.MONGOOSE_CONTEXT_CAPTURE_CHANNELS = MONGOOSE_CONTEXT_CAPTURE_CHANNELS;
105
108
  exports.mongooseChannels = mongooseChannels;
106
109
  exports.mongooseConfig = mongooseConfig;
110
+ exports.mongooseSubscribeInjection = mongooseSubscribeInjection;
107
111
  //# sourceMappingURL=mongoose.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mongoose.js","sources":["../../../../src/orchestrion/config/mongoose.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\n// mongoose >= 9.7.0 publishes via its own `node:diagnostics_channel` tracing channels (handled by\n// `subscribeMongooseDiagnosticChannels`), so this transform is gated to `< 9.7.0` to avoid emitting\n// two spans per operation. The lower bound mirrors the vendored OTel IITM patcher's supported range.\nconst module = { name: 'mongoose', versionRange: '>=5.9.7 <9.7.0' } as const;\n\n// mongoose defines its prototype/static methods as assignments\n// (`Query.prototype.find = function(...)`, most of them anonymous), so the\n// transform matches the assigned property name via `expressionName`\n// rather than the function name. Entries whose method does not exist in a\n// given major are simply inert.\n\n// Builder methods that run synchronously and return a `Query`/`Aggregate`.\n// They don't get their own span; the subscriber only reads the active span\n// at build time and stashes it on the query so the later `exec()` can parent\n// to where the query was *built*, not where it is awaited. `kind: 'Sync'`\n// so the returned thenable isn't mistaken for the traced operation's result.\nconst CONTEXT_CAPTURE_QUERY_METHODS = [\n 'find',\n 'findOne',\n 'deleteOne',\n 'deleteMany',\n 'estimatedDocumentCount',\n 'countDocuments',\n 'distinct',\n 'where',\n '$where',\n 'findOneAndUpdate',\n 'findOneAndDelete',\n 'findOneAndReplace',\n // 5/6/7 only (removed in 8), inert in recent versions\n 'remove',\n 'count',\n 'findOneAndRemove',\n] as const;\n\nexport const mongooseConfig = [\n // Query execution\n // the span for most read/write operations. `op`, collection and model are\n // read off the `Query` at exec time.\n {\n channelName: 'query_exec',\n module: { ...module, filePath: 'lib/query.js' },\n functionQuery: { expressionName: 'exec', kind: 'Auto' },\n },\n // Aggregation pipeline execution.\n {\n channelName: 'aggregate_exec',\n module: { ...module, filePath: 'lib/aggregate.js' },\n functionQuery: { expressionName: 'exec', kind: 'Auto' },\n },\n // `doc.save()` (and its `$save` alias, which mongoose points at `save` on\n // require. the alias picks up the transformed body automatically, so no\n // separate entry is needed).\n {\n channelName: 'model_save',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'save', kind: 'Auto' },\n },\n // Static batch operations.\n {\n channelName: 'model_insert_many',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'insertMany', kind: 'Auto' },\n },\n {\n channelName: 'model_bulk_write',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'bulkWrite', kind: 'Auto' },\n },\n // `doc.remove()` (a document method, deprecated in 6 and removed in 7)\n // `expressionName: 'remove'` also matches the sibling `Model.remove`\n // *static* in this file, which no matcher can tell apart from the prototype\n // method; that static is deprecated and would just produce a redundant span\n // so the collision is accepted rather than dropping the doc-method span.\n {\n channelName: 'model_remove',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'remove', kind: 'Auto' },\n },\n // NOTE: document `updateOne`/`deleteOne` (mongoose 8.21+) are deliberately\n // NOT hooked here. The vendored OTel/IITM patcher wraps\n // `Model.prototype.updateOne`/`deleteOne`, but those delegate to\n // `Query.exec`, which the `query_exec` channel above already instruments\n // (its `this.op` is the right operation). Verified by the `mongoose-v8`\n // suite against a real mongoose 8.21+ under orchestrion. A dedicated hook\n // is also not possible cleanly: `expressionName: 'updateOne'` in\n // `lib/model.js` can't be told apart from the same-named `Model.updateOne`\n // *static* (the common query-builder form), so hooking it would double-span\n // every `Model.updateOne(...)` call.\n //\n // `Model.aggregate()` builds an `Aggregate` with no method to hook for\n // context capture, so hook the static itself and stash the active span\n // on the returned aggregate. `Sync`: it returns the aggregate.\n {\n channelName: 'model_aggregate',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'aggregate', kind: 'Sync' },\n },\n ...CONTEXT_CAPTURE_QUERY_METHODS.map(methodName => ({\n channelName: `ctx_${methodName}`,\n module: { ...module, filePath: 'lib/query.js' },\n functionQuery: { expressionName: methodName, kind: 'Sync' as const },\n })),\n] satisfies InstrumentationConfig[];\n\nexport const mongooseChannels = {\n MONGOOSE_QUERY_EXEC: 'orchestrion:mongoose:query_exec',\n MONGOOSE_AGGREGATE_EXEC: 'orchestrion:mongoose:aggregate_exec',\n MONGOOSE_MODEL_SAVE: 'orchestrion:mongoose:model_save',\n MONGOOSE_MODEL_INSERT_MANY: 'orchestrion:mongoose:model_insert_many',\n MONGOOSE_MODEL_BULK_WRITE: 'orchestrion:mongoose:model_bulk_write',\n MONGOOSE_MODEL_REMOVE: 'orchestrion:mongoose:model_remove',\n MONGOOSE_MODEL_AGGREGATE: 'orchestrion:mongoose:model_aggregate',\n} as const;\n\n/**\n * Fully-qualified names of the context-capture channels, derived from the\n * same method list the transform config uses so the two can't drift. The\n * subscriber subscribes to all of them uniformly to stash the build-time\n * parent span (see `mongooseChannels` for the span-creating channels).\n */\nexport const MONGOOSE_CONTEXT_CAPTURE_CHANNELS: string[] = CONTEXT_CAPTURE_QUERY_METHODS.map(\n methodName => `orchestrion:mongoose:ctx_${methodName}`,\n);\n"],"names":["module"],"mappings":";;AAKA,MAAMA,QAAA,GAAS,EAAE,IAAA,EAAM,UAAA,EAAY,cAAc,gBAAA,EAAiB;AAalE,MAAM,6BAAA,GAAgC;AAAA,EACpC,MAAA;AAAA,EACA,SAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA,wBAAA;AAAA,EACA,gBAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,kBAAA;AAAA,EACA,kB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A,EAAQ,UAAU,cAAA,EAAe;AAAA,IAC9C,aAAA,EAAe,EAAE,cAAA,EAAgB,QAAA,EAAU,MAAM,MAAA;AAAO,GAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA;AAAA,IACE,WAAA,EAAa,iBAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,cAAA,EAAe;AAAA,IAC9C,aAAA,EAAe,EAAE,cAAA,EAAgB,WAAA,EAAa,MAAM,MAAA;AAAO,GAC7D;AAAA,EACA,GAAG,6BAAA,CAA8B,GAAA,CAAI,CAAA,UAAA,MAAe;AAAA,IAClD,WAAA,EAAa,OAAO,UAAU,CAAA,CAAA;AAAA,IAC9B,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,cAAA,EAAe;AAAA,IAC9C,aAAA,EAAe,EAAE,cAAA,EAAgB,UAAA,EAAY,MAAM,MAAA;AAAgB,GACrE,CAAE;AACJ;AAEO,MAAM,gBAAA,GAAmB;AAAA,EAC9B,mBAAA,EAAqB,iCAAA;AAAA,EACrB,uBAAA,EAAyB,qCAAA;AAAA,EACzB,mBAAA,EAAqB,iCAAA;AAAA,EACrB,0BAAA,EAA4B,wCAAA;AAAA,EAC5B,yBAAA,EAA2B,uCAAA;AAAA,EAC3B,qBAAA,EAAuB,mCAAA;AAAA,EACvB,wBAAA,EAA0B;AAC5B;AAQO,MAAM,oCAA8C,6BAAA,CAA8B,GAAA;AAAA,EACvF,CAAA,UAAA,KAAc,4BAA4B,UAAU,CAAA;AACtD;;;;;;"}
1
+ {"version":3,"file":"mongoose.js","sources":["../../../../src/orchestrion/config/mongoose.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n// mongoose >= 9.7.0 publishes via its own `node:diagnostics_channel` tracing channels (handled by\n// `subscribeMongooseDiagnosticChannels`), so this transform is gated to `< 9.7.0` to avoid emitting\n// two spans per operation. The lower bound mirrors the vendored OTel IITM patcher's supported range.\nconst module = { name: 'mongoose', versionRange: '>=5.9.7 <9.7.0' } as const;\n\n// mongoose defines its prototype/static methods as assignments\n// (`Query.prototype.find = function(...)`, most of them anonymous), so the\n// transform matches the assigned property name via `expressionName`\n// rather than the function name. Entries whose method does not exist in a\n// given major are simply inert.\n\n// Builder methods that run synchronously and return a `Query`/`Aggregate`.\n// They don't get their own span; the subscriber only reads the active span\n// at build time and stashes it on the query so the later `exec()` can parent\n// to where the query was *built*, not where it is awaited. `kind: 'Sync'`\n// so the returned thenable isn't mistaken for the traced operation's result.\nconst CONTEXT_CAPTURE_QUERY_METHODS = [\n 'find',\n 'findOne',\n 'deleteOne',\n 'deleteMany',\n 'estimatedDocumentCount',\n 'countDocuments',\n 'distinct',\n 'where',\n '$where',\n 'findOneAndUpdate',\n 'findOneAndDelete',\n 'findOneAndReplace',\n // 5/6/7 only (removed in 8), inert in recent versions\n 'remove',\n 'count',\n 'findOneAndRemove',\n] as const;\n\nexport const mongooseConfig = [\n // Query execution\n // the span for most read/write operations. `op`, collection and model are\n // read off the `Query` at exec time.\n {\n channelName: 'query_exec',\n module: { ...module, filePath: 'lib/query.js' },\n functionQuery: { expressionName: 'exec', kind: 'Auto' },\n },\n // Aggregation pipeline execution.\n {\n channelName: 'aggregate_exec',\n module: { ...module, filePath: 'lib/aggregate.js' },\n functionQuery: { expressionName: 'exec', kind: 'Auto' },\n },\n // `doc.save()` (and its `$save` alias, which mongoose points at `save` on\n // require. the alias picks up the transformed body automatically, so no\n // separate entry is needed).\n {\n channelName: 'model_save',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'save', kind: 'Auto' },\n },\n // Static batch operations.\n {\n channelName: 'model_insert_many',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'insertMany', kind: 'Auto' },\n },\n {\n channelName: 'model_bulk_write',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'bulkWrite', kind: 'Auto' },\n },\n // `doc.remove()` (a document method, deprecated in 6 and removed in 7)\n // `expressionName: 'remove'` also matches the sibling `Model.remove`\n // *static* in this file, which no matcher can tell apart from the prototype\n // method; that static is deprecated and would just produce a redundant span\n // so the collision is accepted rather than dropping the doc-method span.\n {\n channelName: 'model_remove',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'remove', kind: 'Auto' },\n },\n // NOTE: document `updateOne`/`deleteOne` (mongoose 8.21+) are deliberately\n // NOT hooked here. The vendored OTel/IITM patcher wraps\n // `Model.prototype.updateOne`/`deleteOne`, but those delegate to\n // `Query.exec`, which the `query_exec` channel above already instruments\n // (its `this.op` is the right operation). Verified by the `mongoose-v8`\n // suite against a real mongoose 8.21+ under orchestrion. A dedicated hook\n // is also not possible cleanly: `expressionName: 'updateOne'` in\n // `lib/model.js` can't be told apart from the same-named `Model.updateOne`\n // *static* (the common query-builder form), so hooking it would double-span\n // every `Model.updateOne(...)` call.\n //\n // `Model.aggregate()` builds an `Aggregate` with no method to hook for\n // context capture, so hook the static itself and stash the active span\n // on the returned aggregate. `Sync`: it returns the aggregate.\n {\n channelName: 'model_aggregate',\n module: { ...module, filePath: 'lib/model.js' },\n functionQuery: { expressionName: 'aggregate', kind: 'Sync' },\n },\n ...CONTEXT_CAPTURE_QUERY_METHODS.map(methodName => ({\n channelName: `ctx_${methodName}`,\n module: { ...module, filePath: 'lib/query.js' },\n functionQuery: { expressionName: methodName, kind: 'Sync' as const },\n })),\n] satisfies InstrumentationConfig[];\n\nexport const mongooseChannels = {\n MONGOOSE_QUERY_EXEC: 'orchestrion:mongoose:query_exec',\n MONGOOSE_AGGREGATE_EXEC: 'orchestrion:mongoose:aggregate_exec',\n MONGOOSE_MODEL_SAVE: 'orchestrion:mongoose:model_save',\n MONGOOSE_MODEL_INSERT_MANY: 'orchestrion:mongoose:model_insert_many',\n MONGOOSE_MODEL_BULK_WRITE: 'orchestrion:mongoose:model_bulk_write',\n MONGOOSE_MODEL_REMOVE: 'orchestrion:mongoose:model_remove',\n MONGOOSE_MODEL_AGGREGATE: 'orchestrion:mongoose:model_aggregate',\n} as const;\n\n/**\n * Fully-qualified names of the context-capture channels, derived from the\n * same method list the transform config uses so the two can't drift. The\n * subscriber subscribes to all of them uniformly to stash the build-time\n * parent span (see `mongooseChannels` for the span-creating channels).\n */\nexport const MONGOOSE_CONTEXT_CAPTURE_CHANNELS: string[] = CONTEXT_CAPTURE_QUERY_METHODS.map(\n methodName => `orchestrion:mongoose:ctx_${methodName}`,\n);\n\nexport const mongooseSubscribeInjection = toSubscribeInjections(mongooseConfig);\n"],"names":["module","toSubscribeInjections"],"mappings":";;;;AAMA,MAAMA,QAAA,GAAS,EAAE,IAAA,EAAM,UAAA,EAAY,cAAc,gBAAA,EAAiB;AAalE,MAAM,6BAAA,GAAgC;AAAA,EACpC,MAAA;AAAA,EACA,SAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA,wBAAA;AAAA,EACA,gBAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,kBAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA;AAAA,EAEA,QAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA;AAEO,MAAM,cAAA,GAAiB;AAAA;AAAA;AAAA;AAAA,EAI5B;AAAA,IACE,WAAA,EAAa,YAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,cAAA,EAAe;AAAA,IAC9C,aAAA,EAAe,EAAE,cAAA,EAAgB,MAAA,EAAQ,MAAM,MAAA;AAAO,GACxD;AAAA;AAAA,EAEA;AAAA,IACE,WAAA,EAAa,gBAAA;AAAA,IACb,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,kBAAA,EAAmB;AAAA,IAClD,aAAA,EAAe,EAAE,cAAA,EAAgB,MAAA,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CAAA;AAAA,IAC9B,MAAA,EAAQ,EAAE,GAAGA,QAAA,EAAQ,UAAU,cAAA,EAAe;AAAA,IAC9C,aAAA,EAAe,EAAE,cAAA,EAAgB,UAAA,EAAY,MAAM,MAAA;AAAgB,GACrE,CAAE;AACJ;AAEO,MAAM,gBAAA,GAAmB;AAAA,EAC9B,mBAAA,EAAqB,iCAAA;AAAA,EACrB,uBAAA,EAAyB,qCAAA;AAAA,EACzB,mBAAA,EAAqB,iCAAA;AAAA,EACrB,0BAAA,EAA4B,wCAAA;AAAA,EAC5B,yBAAA,EAA2B,uCAAA;AAAA,EAC3B,qBAAA,EAAuB,mCAAA;AAAA,EACvB,wBAAA,EAA0B;AAC5B;AAQO,MAAM,oCAA8C,6BAAA,CAA8B,GAAA;AAAA,EACvF,CAAA,UAAA,KAAc,4BAA4B,UAAU,CAAA;AACtD;AAEO,MAAM,0BAAA,GAA6BC,yCAAsB,cAAc;;;;;;;"}
@@ -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 mysqlConfig = [
4
6
  {
5
7
  channelName: "query",
@@ -10,7 +12,9 @@ const mysqlConfig = [
10
12
  const mysqlChannels = {
11
13
  MYSQL_QUERY: "orchestrion:mysql:query"
12
14
  };
15
+ const mysqlSubscribeInjection = subscribeInjection.toSubscribeInjections(mysqlConfig);
13
16
 
14
17
  exports.mysqlChannels = mysqlChannels;
15
18
  exports.mysqlConfig = mysqlConfig;
19
+ exports.mysqlSubscribeInjection = mysqlSubscribeInjection;
16
20
  //# sourceMappingURL=mysql.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mysql.js","sources":["../../../../src/orchestrion/config/mysql.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nexport const mysqlConfig = [\n {\n channelName: 'query',\n module: { name: 'mysql', versionRange: '>=2.0.0 <3', filePath: 'lib/Connection.js' },\n functionQuery: { expressionName: 'query', kind: 'Auto' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mysqlChannels = {\n MYSQL_QUERY: 'orchestrion:mysql:query',\n} as const;\n"],"names":[],"mappings":";;AAEO,MAAM,WAAA,GAAc;AAAA,EACzB;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,SAAS,YAAA,EAAc,YAAA,EAAc,UAAU,mBAAA,EAAoB;AAAA,IACnF,aAAA,EAAe,EAAE,cAAA,EAAgB,OAAA,EAAS,MAAM,MAAA;AAAO;AAE3D;AAEO,MAAM,aAAA,GAAgB;AAAA,EAC3B,WAAA,EAAa;AACf;;;;;"}
1
+ {"version":3,"file":"mysql.js","sources":["../../../../src/orchestrion/config/mysql.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nexport const mysqlConfig = [\n {\n channelName: 'query',\n module: { name: 'mysql', versionRange: '>=2.0.0 <3', filePath: 'lib/Connection.js' },\n functionQuery: { expressionName: 'query', kind: 'Auto' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mysqlChannels = {\n MYSQL_QUERY: 'orchestrion:mysql:query',\n} as const;\n\nexport const mysqlSubscribeInjection = toSubscribeInjections(mysqlConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAGO,MAAM,WAAA,GAAc;AAAA,EACzB;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,SAAS,YAAA,EAAc,YAAA,EAAc,UAAU,mBAAA,EAAoB;AAAA,IACnF,aAAA,EAAe,EAAE,cAAA,EAAgB,OAAA,EAAS,MAAM,MAAA;AAAO;AAE3D;AAEO,MAAM,aAAA,GAAgB;AAAA,EAC3B,WAAA,EAAa;AACf;AAEO,MAAM,uBAAA,GAA0BA,yCAAsB,WAAW;;;;;;"}
@@ -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 mysql2Config = [
4
6
  {
5
7
  channelName: "query",
@@ -26,7 +28,9 @@ const mysql2Channels = {
26
28
  MYSQL2_QUERY: "orchestrion:mysql2:query",
27
29
  MYSQL2_EXECUTE: "orchestrion:mysql2:execute"
28
30
  };
31
+ const mysql2SubscribeInjection = subscribeInjection.toSubscribeInjections(mysql2Config);
29
32
 
30
33
  exports.mysql2Channels = mysql2Channels;
31
34
  exports.mysql2Config = mysql2Config;
35
+ exports.mysql2SubscribeInjection = mysql2SubscribeInjection;
32
36
  //# sourceMappingURL=mysql2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mysql2.js","sources":["../../../../src/orchestrion/config/mysql2.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\n// Ports `@opentelemetry/instrumentation-mysql2` (which patches `query`/`execute` on the connection\n// prototype) to orchestrion channel injection.\n//\n// Two file layouts across the supported range:\n// - `< 3.11.5` → `class Connection` with `query`/`execute` in `lib/connection.js`\n// - `>= 3.11.5` → the methods moved to `class BaseConnection` in `lib/base/connection.js`\n//\n// Gated to `< 3.20.0`: from 3.20.0 mysql2 publishes to `node:diagnostics_channel` natively, and\n// that path is instrumented by `subscribeMysql2DiagnosticChannels` instead. Injecting there too\n// would emit two spans per query.\n//\n// `Callback` traces the callback shapes: `query(sql, cb)`, `query(sql, values, cb)`, and — since the\n// promise API funnels through the callback form — `await connection.query(sql)`. `execute` never\n// delegates to `query` internally, so instrumenting both is safe.\n//\n// NOT `Auto`: `Auto`'s no-callback branch probes the return value for `.then`, but mysql2's callback-\n// less `query(sql)` returns a `Query` whose `.then()` throws (mysql2's \"use the promise wrapper\"\n// guard) — so `Auto` would crash streamed queries. `Callback` leaves that shape untouched (a rare,\n// row-streaming use that consumes the emitter's events), the tradeoff being it isn't traced.\nexport const mysql2Config = [\n {\n channelName: 'query',\n module: { name: 'mysql2', versionRange: '>=1.4.2 <3.11.5', filePath: 'lib/connection.js' },\n functionQuery: { className: 'Connection', methodName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'execute',\n module: { name: 'mysql2', versionRange: '>=1.4.2 <3.11.5', filePath: 'lib/connection.js' },\n functionQuery: { className: 'Connection', methodName: 'execute', kind: 'Callback' },\n },\n {\n channelName: 'query',\n module: { name: 'mysql2', versionRange: '>=3.11.5 <3.20.0', filePath: 'lib/base/connection.js' },\n functionQuery: { className: 'BaseConnection', methodName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'execute',\n module: { name: 'mysql2', versionRange: '>=3.11.5 <3.20.0', filePath: 'lib/base/connection.js' },\n functionQuery: { className: 'BaseConnection', methodName: 'execute', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mysql2Channels = {\n MYSQL2_QUERY: 'orchestrion:mysql2:query',\n MYSQL2_EXECUTE: 'orchestrion:mysql2:execute',\n} as const;\n"],"names":[],"mappings":";;AAqBO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,iBAAA,EAAmB,UAAU,mBAAA,EAAoB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,cAAc,UAAA,EAAY,OAAA,EAAS,MAAM,UAAA;AAAW,GAClF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,iBAAA,EAAmB,UAAU,mBAAA,EAAoB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,cAAc,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW,GACpF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,kBAAA,EAAoB,UAAU,wBAAA,EAAyB;AAAA,IAC/F,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,OAAA,EAAS,MAAM,UAAA;AAAW,GACtF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,kBAAA,EAAoB,UAAU,wBAAA,EAAyB;AAAA,IAC/F,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW;AAE1F;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,YAAA,EAAc,0BAAA;AAAA,EACd,cAAA,EAAgB;AAClB;;;;;"}
1
+ {"version":3,"file":"mysql2.js","sources":["../../../../src/orchestrion/config/mysql2.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n// Ports `@opentelemetry/instrumentation-mysql2` (which patches `query`/`execute` on the connection\n// prototype) to orchestrion channel injection.\n//\n// Two file layouts across the supported range:\n// - `< 3.11.5` → `class Connection` with `query`/`execute` in `lib/connection.js`\n// - `>= 3.11.5` → the methods moved to `class BaseConnection` in `lib/base/connection.js`\n//\n// Gated to `< 3.20.0`: from 3.20.0 mysql2 publishes to `node:diagnostics_channel` natively, and\n// that path is instrumented by `subscribeMysql2DiagnosticChannels` instead. Injecting there too\n// would emit two spans per query.\n//\n// `Callback` traces the callback shapes: `query(sql, cb)`, `query(sql, values, cb)`, and — since the\n// promise API funnels through the callback form — `await connection.query(sql)`. `execute` never\n// delegates to `query` internally, so instrumenting both is safe.\n//\n// NOT `Auto`: `Auto`'s no-callback branch probes the return value for `.then`, but mysql2's callback-\n// less `query(sql)` returns a `Query` whose `.then()` throws (mysql2's \"use the promise wrapper\"\n// guard) — so `Auto` would crash streamed queries. `Callback` leaves that shape untouched (a rare,\n// row-streaming use that consumes the emitter's events), the tradeoff being it isn't traced.\nexport const mysql2Config = [\n {\n channelName: 'query',\n module: { name: 'mysql2', versionRange: '>=1.4.2 <3.11.5', filePath: 'lib/connection.js' },\n functionQuery: { className: 'Connection', methodName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'execute',\n module: { name: 'mysql2', versionRange: '>=1.4.2 <3.11.5', filePath: 'lib/connection.js' },\n functionQuery: { className: 'Connection', methodName: 'execute', kind: 'Callback' },\n },\n {\n channelName: 'query',\n module: { name: 'mysql2', versionRange: '>=3.11.5 <3.20.0', filePath: 'lib/base/connection.js' },\n functionQuery: { className: 'BaseConnection', methodName: 'query', kind: 'Callback' },\n },\n {\n channelName: 'execute',\n module: { name: 'mysql2', versionRange: '>=3.11.5 <3.20.0', filePath: 'lib/base/connection.js' },\n functionQuery: { className: 'BaseConnection', methodName: 'execute', kind: 'Callback' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const mysql2Channels = {\n MYSQL2_QUERY: 'orchestrion:mysql2:query',\n MYSQL2_EXECUTE: 'orchestrion:mysql2:execute',\n} as const;\n\nexport const mysql2SubscribeInjection = toSubscribeInjections(mysql2Config);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAsBO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,iBAAA,EAAmB,UAAU,mBAAA,EAAoB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,cAAc,UAAA,EAAY,OAAA,EAAS,MAAM,UAAA;AAAW,GAClF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,iBAAA,EAAmB,UAAU,mBAAA,EAAoB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,cAAc,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW,GACpF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,kBAAA,EAAoB,UAAU,wBAAA,EAAyB;AAAA,IAC/F,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,OAAA,EAAS,MAAM,UAAA;AAAW,GACtF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,UAAU,YAAA,EAAc,kBAAA,EAAoB,UAAU,wBAAA,EAAyB;AAAA,IAC/F,eAAe,EAAE,SAAA,EAAW,kBAAkB,UAAA,EAAY,SAAA,EAAW,MAAM,UAAA;AAAW;AAE1F;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,YAAA,EAAc,0BAAA;AAAA,EACd,cAAA,EAAgB;AAClB;AAEO,MAAM,wBAAA,GAA2BA,yCAAsB,YAAY;;;;;;"}
@@ -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
  function astQueryInstrumentation(config) {
4
6
  return config;
5
7
  }
@@ -116,7 +118,9 @@ const nestjsChannels = {
116
118
  NESTJS_ONEVENT: "orchestrion:@nestjs/event-emitter:onEventDecorator",
117
119
  NESTJS_PROCESSOR: "orchestrion:@nestjs/bullmq:processorDecorator"
118
120
  };
121
+ const nestjsSubscribeInjection = subscribeInjection.toSubscribeInjections(nestjsConfig);
119
122
 
120
123
  exports.nestjsChannels = nestjsChannels;
121
124
  exports.nestjsConfig = nestjsConfig;
125
+ exports.nestjsSubscribeInjection = nestjsSubscribeInjection;
122
126
  //# sourceMappingURL=nestjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nestjs.js","sources":["../../../../src/orchestrion/config/nestjs.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\n/**\n * Wrap an instrumentation that targets nodes via a raw esquery selector\n * (`NstQuery`) rather than the structured `functionQuery`. Needed when the\n * target can't be named, e.g. the anonymous arrow a decorator factory returns\n * The transformer supports `astQuery` at runtime (it takes precedence over\n * `functionQuery`, which then only supplies `kind`), but it isn't in the\n * published `InstrumentationConfig` type. Hence the cast.\n */\nfunction astQueryInstrumentation(config: {\n channelName: string;\n module: InstrumentationConfig['module'];\n astQuery: string;\n functionQuery: { kind: 'Sync' | 'Async' | 'Callback' | 'Auto' };\n}): InstrumentationConfig {\n return config as unknown as InstrumentationConfig;\n}\n\n/**\n * NestJS is different from the other instrumentations here. It's a standalone\n * metaframework SDK (`@sentry/nestjs`), so its channel LISTENER lives in that\n * package rather than in `server-utils`. Only the code-transform config (and\n * the channel names below) live here, so `@nestjs/*` is transformed whenever\n * orchestrion is enabled, same as every other library.\n *\n * `@sentry/nestjs` imports {@link nestjsChannels} to subscribe, and picks the\n * channel-vs-OTel path based on the global injection flag.\n */\nexport const nestjsConfig = [\n {\n channelName: 'nestFactoryCreate',\n module: { name: '@nestjs/core', versionRange: '>=8.0.0 <12', filePath: 'nest-factory.js' },\n functionQuery: { className: 'NestFactoryStatic', methodName: 'create', kind: 'Async' },\n },\n {\n channelName: 'routerExecutionContextCreate',\n module: { name: '@nestjs/core', versionRange: '>=8.0.0 <12', filePath: 'router/router-execution-context.js' },\n functionQuery: { className: 'RouterExecutionContext', methodName: 'create', kind: 'Sync' },\n },\n astQueryInstrumentation({\n // `@nestjs/common/decorators/core/injectable.decorator.js`:\n // `function Injectable(options) { return (target) => { ... }; }`\n // The inner decorator arrow is anonymous + returned, so only a raw\n // `astQuery` can target it. The subscriber's `start` receives the\n // decorated class as `arguments[0]` and patches its prototype\n // use/canActivate/transform/intercept methods, reproducing the\n // vendored `SentryNestInstrumentation` middleware/guard/pipe/interceptor\n // spans. No span on the decorator itself, so `kind: 'Sync'`.\n channelName: 'injectableDecorator',\n module: {\n name: '@nestjs/common',\n versionRange: '>=8.0.0 <12',\n filePath: 'decorators/core/injectable.decorator.js',\n },\n astQuery: 'FunctionDeclaration[id.name=\"Injectable\"] ReturnStatement > ArrowFunctionExpression',\n functionQuery: { kind: 'Sync' },\n }),\n astQueryInstrumentation({\n // `@nestjs/common/decorators/core/catch.decorator.js`:\n // `function Catch(...exceptions) { return (target) => { ... }; }`\n // Same anonymous-returned-arrow shape as `Injectable`. The subscriber's\n // `start` patches the exception filter's prototype `catch` method to\n // open an `exception_filter` span.\n //\n // Mirrors the vendored `SentryNestInstrumentation` `@Catch` wrap.\n channelName: 'catchDecorator',\n module: { name: '@nestjs/common', versionRange: '>=8.0.0 <12', filePath: 'decorators/core/catch.decorator.js' },\n astQuery: 'FunctionDeclaration[id.name=\"Catch\"] ReturnStatement > ArrowFunctionExpression',\n functionQuery: { kind: 'Sync' },\n }),\n // @nestjs/schedule @Cron/@Interval/@Timeout:\n // `function Cron(...) { return applyDecorators(...); }`\n // The returned decorator has no inline arrow to target, so we match the\n // factory function and reassign `data.result` in `end` to wrap the\n // decorator it returns (which rewrites the user handler `descriptor.value`\n // with isolation-scope + error capture).\n // Mirrors `SentryNestScheduleInstrumentation`, whose supported range we\n // match so opting in doesn't drop coverage the OTel path had. The compiled\n // `function Cron(...)` declaration is unchanged across 2.x–5.x.\n {\n channelName: 'cronDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/cron.decorator.js' },\n functionQuery: { functionName: 'Cron', kind: 'Sync' },\n },\n {\n channelName: 'intervalDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/interval.decorator.js' },\n functionQuery: { functionName: 'Interval', kind: 'Sync' },\n },\n {\n channelName: 'timeoutDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/timeout.decorator.js' },\n functionQuery: { functionName: 'Timeout', kind: 'Sync' },\n },\n {\n // @nestjs/event-emitter @OnEvent:\n // `const OnEvent = (event, options) => {\n // const decoratorFactory = (t, k, d) => {...}; return decoratorFactory;\n // }`\n // `OnEvent` is an arrow assigned to a const, so `expressionName`. `end`\n // reassigns `data.result` to wrap the returned decorator, which rewrites\n // the handler to open an `event.nestjs` span.\n // Mirrors `SentryNestEventInstrumentation`; the `const OnEvent = (...) =>`\n // shape is unchanged across 2.x–3.x.\n channelName: 'onEventDecorator',\n module: {\n name: '@nestjs/event-emitter',\n versionRange: '>=2.0.0',\n filePath: 'dist/decorators/on-event.decorator.js',\n },\n functionQuery: { expressionName: 'OnEvent', kind: 'Sync' },\n },\n {\n // @nestjs/bullmq @Processor:\n // `function Processor(...) { return (target) => {...}; }`\n // The factory arg carries the queue name, so we match the factory and\n // reassign `data.result` in `end` to wrap the returned class decorator\n // (which patches `target.prototype.process`).\n // Mirrors `SentryNestBullMQInstrumentation`; the `function Processor(...)`\n // declaration is unchanged across\n // 10.x–11.x.\n channelName: 'processorDecorator',\n module: {\n name: '@nestjs/bullmq',\n versionRange: '>=10.0.0',\n filePath: 'dist/decorators/processor.decorator.js',\n },\n functionQuery: { functionName: 'Processor', kind: 'Sync' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const nestjsChannels = {\n NESTJS_APP_CREATION: 'orchestrion:@nestjs/core:nestFactoryCreate',\n NESTJS_ROUTER_CONTEXT: 'orchestrion:@nestjs/core:routerExecutionContextCreate',\n NESTJS_INJECTABLE: 'orchestrion:@nestjs/common:injectableDecorator',\n NESTJS_CATCH: 'orchestrion:@nestjs/common:catchDecorator',\n NESTJS_SCHEDULE_CRON: 'orchestrion:@nestjs/schedule:cronDecorator',\n NESTJS_SCHEDULE_INTERVAL: 'orchestrion:@nestjs/schedule:intervalDecorator',\n NESTJS_SCHEDULE_TIMEOUT: 'orchestrion:@nestjs/schedule:timeoutDecorator',\n NESTJS_ONEVENT: 'orchestrion:@nestjs/event-emitter:onEventDecorator',\n NESTJS_PROCESSOR: 'orchestrion:@nestjs/bullmq:processorDecorator',\n} as const;\n"],"names":[],"mappings":";;AAUA,SAAS,wBAAwB,MAAA,EAKP;AACxB,EAAA,OAAO,MAAA;AACT;AAYO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,mBAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,aAAA,EAAe,UAAU,iBAAA,E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B,cAAA,EAAgB,oDAAA;AAAA,EAChB,gBAAA,EAAkB;AACpB;;;;;"}
1
+ {"version":3,"file":"nestjs.js","sources":["../../../../src/orchestrion/config/nestjs.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n/**\n * Wrap an instrumentation that targets nodes via a raw esquery selector\n * (`NstQuery`) rather than the structured `functionQuery`. Needed when the\n * target can't be named, e.g. the anonymous arrow a decorator factory returns\n * The transformer supports `astQuery` at runtime (it takes precedence over\n * `functionQuery`, which then only supplies `kind`), but it isn't in the\n * published `InstrumentationConfig` type. Hence the cast.\n */\nfunction astQueryInstrumentation(config: {\n channelName: string;\n module: InstrumentationConfig['module'];\n astQuery: string;\n functionQuery: { kind: 'Sync' | 'Async' | 'Callback' | 'Auto' };\n}): InstrumentationConfig {\n return config as unknown as InstrumentationConfig;\n}\n\n/**\n * NestJS is different from the other instrumentations here. It's a standalone\n * metaframework SDK (`@sentry/nestjs`), so its channel LISTENER lives in that\n * package rather than in `server-utils`. Only the code-transform config (and\n * the channel names below) live here, so `@nestjs/*` is transformed whenever\n * orchestrion is enabled, same as every other library.\n *\n * `@sentry/nestjs` imports {@link nestjsChannels} to subscribe, and picks the\n * channel-vs-OTel path based on the global injection flag.\n */\nexport const nestjsConfig = [\n {\n channelName: 'nestFactoryCreate',\n module: { name: '@nestjs/core', versionRange: '>=8.0.0 <12', filePath: 'nest-factory.js' },\n functionQuery: { className: 'NestFactoryStatic', methodName: 'create', kind: 'Async' },\n },\n {\n channelName: 'routerExecutionContextCreate',\n module: { name: '@nestjs/core', versionRange: '>=8.0.0 <12', filePath: 'router/router-execution-context.js' },\n functionQuery: { className: 'RouterExecutionContext', methodName: 'create', kind: 'Sync' },\n },\n astQueryInstrumentation({\n // `@nestjs/common/decorators/core/injectable.decorator.js`:\n // `function Injectable(options) { return (target) => { ... }; }`\n // The inner decorator arrow is anonymous + returned, so only a raw\n // `astQuery` can target it. The subscriber's `start` receives the\n // decorated class as `arguments[0]` and patches its prototype\n // use/canActivate/transform/intercept methods, reproducing the\n // vendored `SentryNestInstrumentation` middleware/guard/pipe/interceptor\n // spans. No span on the decorator itself, so `kind: 'Sync'`.\n channelName: 'injectableDecorator',\n module: {\n name: '@nestjs/common',\n versionRange: '>=8.0.0 <12',\n filePath: 'decorators/core/injectable.decorator.js',\n },\n astQuery: 'FunctionDeclaration[id.name=\"Injectable\"] ReturnStatement > ArrowFunctionExpression',\n functionQuery: { kind: 'Sync' },\n }),\n astQueryInstrumentation({\n // `@nestjs/common/decorators/core/catch.decorator.js`:\n // `function Catch(...exceptions) { return (target) => { ... }; }`\n // Same anonymous-returned-arrow shape as `Injectable`. The subscriber's\n // `start` patches the exception filter's prototype `catch` method to\n // open an `exception_filter` span.\n //\n // Mirrors the vendored `SentryNestInstrumentation` `@Catch` wrap.\n channelName: 'catchDecorator',\n module: { name: '@nestjs/common', versionRange: '>=8.0.0 <12', filePath: 'decorators/core/catch.decorator.js' },\n astQuery: 'FunctionDeclaration[id.name=\"Catch\"] ReturnStatement > ArrowFunctionExpression',\n functionQuery: { kind: 'Sync' },\n }),\n // @nestjs/schedule @Cron/@Interval/@Timeout:\n // `function Cron(...) { return applyDecorators(...); }`\n // The returned decorator has no inline arrow to target, so we match the\n // factory function and reassign `data.result` in `end` to wrap the\n // decorator it returns (which rewrites the user handler `descriptor.value`\n // with isolation-scope + error capture).\n // Mirrors `SentryNestScheduleInstrumentation`, whose supported range we\n // match so opting in doesn't drop coverage the OTel path had. The compiled\n // `function Cron(...)` declaration is unchanged across 2.x–5.x.\n {\n channelName: 'cronDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/cron.decorator.js' },\n functionQuery: { functionName: 'Cron', kind: 'Sync' },\n },\n {\n channelName: 'intervalDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/interval.decorator.js' },\n functionQuery: { functionName: 'Interval', kind: 'Sync' },\n },\n {\n channelName: 'timeoutDecorator',\n module: { name: '@nestjs/schedule', versionRange: '>=2.0.0', filePath: 'dist/decorators/timeout.decorator.js' },\n functionQuery: { functionName: 'Timeout', kind: 'Sync' },\n },\n {\n // @nestjs/event-emitter @OnEvent:\n // `const OnEvent = (event, options) => {\n // const decoratorFactory = (t, k, d) => {...}; return decoratorFactory;\n // }`\n // `OnEvent` is an arrow assigned to a const, so `expressionName`. `end`\n // reassigns `data.result` to wrap the returned decorator, which rewrites\n // the handler to open an `event.nestjs` span.\n // Mirrors `SentryNestEventInstrumentation`; the `const OnEvent = (...) =>`\n // shape is unchanged across 2.x–3.x.\n channelName: 'onEventDecorator',\n module: {\n name: '@nestjs/event-emitter',\n versionRange: '>=2.0.0',\n filePath: 'dist/decorators/on-event.decorator.js',\n },\n functionQuery: { expressionName: 'OnEvent', kind: 'Sync' },\n },\n {\n // @nestjs/bullmq @Processor:\n // `function Processor(...) { return (target) => {...}; }`\n // The factory arg carries the queue name, so we match the factory and\n // reassign `data.result` in `end` to wrap the returned class decorator\n // (which patches `target.prototype.process`).\n // Mirrors `SentryNestBullMQInstrumentation`; the `function Processor(...)`\n // declaration is unchanged across\n // 10.x–11.x.\n channelName: 'processorDecorator',\n module: {\n name: '@nestjs/bullmq',\n versionRange: '>=10.0.0',\n filePath: 'dist/decorators/processor.decorator.js',\n },\n functionQuery: { functionName: 'Processor', kind: 'Sync' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const nestjsChannels = {\n NESTJS_APP_CREATION: 'orchestrion:@nestjs/core:nestFactoryCreate',\n NESTJS_ROUTER_CONTEXT: 'orchestrion:@nestjs/core:routerExecutionContextCreate',\n NESTJS_INJECTABLE: 'orchestrion:@nestjs/common:injectableDecorator',\n NESTJS_CATCH: 'orchestrion:@nestjs/common:catchDecorator',\n NESTJS_SCHEDULE_CRON: 'orchestrion:@nestjs/schedule:cronDecorator',\n NESTJS_SCHEDULE_INTERVAL: 'orchestrion:@nestjs/schedule:intervalDecorator',\n NESTJS_SCHEDULE_TIMEOUT: 'orchestrion:@nestjs/schedule:timeoutDecorator',\n NESTJS_ONEVENT: 'orchestrion:@nestjs/event-emitter:onEventDecorator',\n NESTJS_PROCESSOR: 'orchestrion:@nestjs/bullmq:processorDecorator',\n} as const;\n\nexport const nestjsSubscribeInjection = toSubscribeInjections(nestjsConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAWA,SAAS,wBAAwB,MAAA,EAKP;AACxB,EAAA,OAAO,MAAA;AACT;AAYO,MAAM,YAAA,GAAe;AAAA,EAC1B;AAAA,IACE,WAAA,EAAa,mBAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,aAAA,EAAe,UAAU,iBAAA,EAAkB;AAAA,IACzF,eAAe,EAAE,SAAA,EAAW,qBAAqB,UAAA,EAAY,QAAA,EAAU,MAAM,OAAA;AAAQ,GACvF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,8BAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,gBAAgB,YAAA,EAAc,aAAA,EAAe,UAAU,oCAAA,EAAqC;AAAA,IAC5G,eAAe,EAAE,SAAA,EAAW,0BAA0B,UAAA,EAAY,QAAA,EAAU,MAAM,MAAA;AAAO,GAC3F;AAAA,EACA,uBAAA,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAStB,WAAA,EAAa,qBAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,gBAAA;AAAA,MACN,YAAA,EAAc,aAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,QAAA,EAAU,qFAAA;AAAA,IACV,aAAA,EAAe,EAAE,IAAA,EAAM,MAAA;AAAO,GAC/B,CAAA;AAAA,EACD,uBAAA,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQtB,WAAA,EAAa,gBAAA;AAAA,IACb,QAAQ,EAAE,IAA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,IACb,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,gBAAA;AAAA,MACN,YAAA,EAAc,UAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,aAAA,EAAe,EAAE,YAAA,EAAc,WAAA,EAAa,MAAM,MAAA;AAAO;AAE7D;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,mBAAA,EAAqB,4CAAA;AAAA,EACrB,qBAAA,EAAuB,uDAAA;AAAA,EACvB,iBAAA,EAAmB,gDAAA;AAAA,EACnB,YAAA,EAAc,2CAAA;AAAA,EACd,oBAAA,EAAsB,4CAAA;AAAA,EACtB,wBAAA,EAA0B,gDAAA;AAAA,EAC1B,uBAAA,EAAyB,+CAAA;AAAA,EACzB,cAAA,EAAgB,oDAAA;AAAA,EAChB,gBAAA,EAAkB;AACpB;AAEO,MAAM,wBAAA,GAA2BA,yCAAsB,YAAY;;;;;;"}
@@ -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 openaiConfig = [
4
6
  // OpenAI chat completions. `Completions.create` returns a thenable `APIPromise` with no callback arg,
5
7
  // so `kind: 'Auto'` resolves to `wrapPromise`. openai ships dual CJS/ESM and the matcher compares
@@ -34,7 +36,9 @@ const openaiChannels = {
34
36
  OPENAI_CHAT: "orchestrion:openai:chat",
35
37
  OPENAI_EMBEDDINGS: "orchestrion:openai:embeddings"
36
38
  };
39
+ const openaiSubscribeInjection = subscribeInjection.toSubscribeInjections(openaiConfig);
37
40
 
38
41
  exports.openaiChannels = openaiChannels;
39
42
  exports.openaiConfig = openaiConfig;
43
+ exports.openaiSubscribeInjection = openaiSubscribeInjection;
40
44
  //# sourceMappingURL=openai.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openai.js","sources":["../../../../src/orchestrion/config/openai.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nexport const openaiConfig = [\n // OpenAI chat completions. `Completions.create` returns a thenable `APIPromise` with no callback arg,\n // so `kind: 'Auto'` resolves to `wrapPromise`. openai ships dual CJS/ESM and the matcher compares\n // `filePath` exactly, hence one entry per built file (`.js` for `require`, `.mjs` for `import`).\n ...['resources/chat/completions/completions.js', 'resources/chat/completions/completions.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Completions', methodName: 'create', kind: 'Auto' as const },\n })),\n // OpenAI responses API — same `create(body, options)` shape as chat completions.\n ...['resources/responses/responses.js', 'resources/responses/responses.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Responses', methodName: 'create', kind: 'Auto' as const },\n })),\n // OpenAI embeddings API — same `create(body, options)` shape as chat completions.\n ...['resources/embeddings.js', 'resources/embeddings.mjs'].map(filePath => ({\n channelName: 'embeddings',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Embeddings', methodName: 'create', kind: 'Auto' as const },\n })),\n // OpenAI conversations API — same `create(body, options)` shape as chat completions.\n ...['resources/conversations/conversations.js', 'resources/conversations/conversations.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Conversations', methodName: 'create', kind: 'Auto' as const },\n })),\n] satisfies InstrumentationConfig[];\n\nexport const openaiChannels = {\n // Chat completions, the responses API, and the conversations API all report a `chat` operation with\n // identical span handling, so they share one channel.\n OPENAI_CHAT: 'orchestrion:openai:chat',\n OPENAI_EMBEDDINGS: 'orchestrion:openai:embeddings',\n} as const;\n"],"names":[],"mappings":";;AAEO,MAAM,YAAA,GAAe;AAAA;AAAA;AAAA;AAAA,EAI1B,GAAG,CAAC,2CAAA,EAA6C,4CAA4C,CAAA,CAAE,IAAI,CAAA,QAAA,MAAa;AAAA,IAC9G,WAAA,EAAa,MAAA;AAA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../../src/orchestrion/config/openai.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nexport const openaiConfig = [\n // OpenAI chat completions. `Completions.create` returns a thenable `APIPromise` with no callback arg,\n // so `kind: 'Auto'` resolves to `wrapPromise`. openai ships dual CJS/ESM and the matcher compares\n // `filePath` exactly, hence one entry per built file (`.js` for `require`, `.mjs` for `import`).\n ...['resources/chat/completions/completions.js', 'resources/chat/completions/completions.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Completions', methodName: 'create', kind: 'Auto' as const },\n })),\n // OpenAI responses API — same `create(body, options)` shape as chat completions.\n ...['resources/responses/responses.js', 'resources/responses/responses.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Responses', methodName: 'create', kind: 'Auto' as const },\n })),\n // OpenAI embeddings API — same `create(body, options)` shape as chat completions.\n ...['resources/embeddings.js', 'resources/embeddings.mjs'].map(filePath => ({\n channelName: 'embeddings',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Embeddings', methodName: 'create', kind: 'Auto' as const },\n })),\n // OpenAI conversations API — same `create(body, options)` shape as chat completions.\n ...['resources/conversations/conversations.js', 'resources/conversations/conversations.mjs'].map(filePath => ({\n channelName: 'chat',\n module: { name: 'openai', versionRange: '>=4.0.0 <7', filePath },\n functionQuery: { className: 'Conversations', methodName: 'create', kind: 'Auto' as const },\n })),\n] satisfies InstrumentationConfig[];\n\nexport const openaiChannels = {\n // Chat completions, the responses API, and the conversations API all report a `chat` operation with\n // identical span handling, so they share one channel.\n OPENAI_CHAT: 'orchestrion:openai:chat',\n OPENAI_EMBEDDINGS: 'orchestrion:openai:embeddings',\n} as const;\n\nexport const openaiSubscribeInjection = toSubscribeInjections(openaiConfig);\n"],"names":["toSubscribeInjections"],"mappings":";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AAgB,GAC3F,CAAE;AACJ;AAEO,MAAM,cAAA,GAAiB;AAAA;AAAA;AAAA,EAG5B,WAAA,EAAa,yBAAA;AAAA,EACb,iBAAA,EAAmB;AACrB;AAEO,MAAM,wBAAA,GAA2BA,yCAAsB,YAAY;;;;;;"}
@@ -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 pgConfig = [
4
6
  // `pg` (node-postgres).
5
7
  // instruments `Client.prototype.query`/`connect` (both the JS and native
@@ -45,7 +47,9 @@ const pgChannels = {
45
47
  PG_CONNECT: "orchestrion:pg:connect",
46
48
  PGPOOL_CONNECT: "orchestrion:pg-pool:connect"
47
49
  };
50
+ const pgSubscribeInjection = subscribeInjection.toSubscribeInjections(pgConfig);
48
51
 
49
52
  exports.pgChannels = pgChannels;
50
53
  exports.pgConfig = pgConfig;
54
+ exports.pgSubscribeInjection = pgSubscribeInjection;
51
55
  //# sourceMappingURL=pg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pg.js","sources":["../../../../src/orchestrion/config/pg.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nexport const pgConfig = [\n // `pg` (node-postgres).\n // instruments `Client.prototype.query`/`connect` (both the JS and native\n // clients) plus `pg-pool`'s `Pool.prototype.connect`.\n // `Auto` covers the callback, promise, and streamable-`Submittable`\n // call shapes (like mysql).\n // `pg/lib/client.js` is `class Client { query() {...} connect() {...} }`,\n // so `className`+`methodName` matches directly.\n {\n channelName: 'query',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/client.js' },\n functionQuery: { className: 'Client', methodName: 'query', kind: 'Auto' },\n },\n {\n channelName: 'connect',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/client.js' },\n functionQuery: { className: 'Client', methodName: 'connect', kind: 'Auto' },\n },\n // The native client (`pg/lib/native/client.js`) is a constructor function,\n // not a class.\n // `Client.prototype.query = function (config, values, callback) {...}`\n // so it needs `expressionName` (the mysql shape), publishing to the SAME\n // `orchestrion:pg:query`/`:connect` channels as the JS client.\n {\n channelName: 'query',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/native/client.js' },\n functionQuery: { expressionName: 'query', kind: 'Auto' },\n },\n {\n channelName: 'connect',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/native/client.js' },\n functionQuery: { expressionName: 'connect', kind: 'Auto' },\n },\n // `pg-pool` is `class Pool extends EventEmitter { connect(cb) {...} }`.\n {\n channelName: 'connect',\n module: { name: 'pg-pool', versionRange: '>=2.0.0 <4', filePath: 'index.js' },\n functionQuery: { className: 'Pool', methodName: 'connect', kind: 'Auto' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const pgChannels = {\n PG_QUERY: 'orchestrion:pg:query',\n PG_CONNECT: 'orchestrion:pg:connect',\n PGPOOL_CONNECT: 'orchestrion:pg-pool:connect',\n} as const;\n"],"names":[],"mappings":";;AAEO,MAAM,QAAA,GAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQtB;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,eAAA,EAAgB;AAAA,IAC5E,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,OAAA,EAAS,MAAM,MAAA;AAAO,GAC1E;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,eAAA,EAAgB;AAAA,IAC5E,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO,GAC5E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,sBAAA,EAAuB;AAAA,IACnF,aAAA,EAAe,EAAE,cAAA,EAAgB,OAAA,EAAS,MAAM,MAAA;AAAO,GACzD;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,sBAAA,EAAuB;AAAA,IACnF,aAAA,EAAe,EAAE,cAAA,EAAgB,SAAA,EAAW,MAAM,MAAA;AAAO,GAC3D;AAAA;AAAA,EAEA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,WAAW,YAAA,EAAc,YAAA,EAAc,UAAU,UAAA,EAAW;AAAA,IAC5E,eAAe,EAAE,SAAA,EAAW,QAAQ,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO;AAE5E;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,QAAA,EAAU,sBAAA;AAAA,EACV,UAAA,EAAY,wBAAA;AAAA,EACZ,cAAA,EAAgB;AAClB;;;;;"}
1
+ {"version":3,"file":"pg.js","sources":["../../../../src/orchestrion/config/pg.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nexport const pgConfig = [\n // `pg` (node-postgres).\n // instruments `Client.prototype.query`/`connect` (both the JS and native\n // clients) plus `pg-pool`'s `Pool.prototype.connect`.\n // `Auto` covers the callback, promise, and streamable-`Submittable`\n // call shapes (like mysql).\n // `pg/lib/client.js` is `class Client { query() {...} connect() {...} }`,\n // so `className`+`methodName` matches directly.\n {\n channelName: 'query',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/client.js' },\n functionQuery: { className: 'Client', methodName: 'query', kind: 'Auto' },\n },\n {\n channelName: 'connect',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/client.js' },\n functionQuery: { className: 'Client', methodName: 'connect', kind: 'Auto' },\n },\n // The native client (`pg/lib/native/client.js`) is a constructor function,\n // not a class.\n // `Client.prototype.query = function (config, values, callback) {...}`\n // so it needs `expressionName` (the mysql shape), publishing to the SAME\n // `orchestrion:pg:query`/`:connect` channels as the JS client.\n {\n channelName: 'query',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/native/client.js' },\n functionQuery: { expressionName: 'query', kind: 'Auto' },\n },\n {\n channelName: 'connect',\n module: { name: 'pg', versionRange: '>=8.0.3 <9', filePath: 'lib/native/client.js' },\n functionQuery: { expressionName: 'connect', kind: 'Auto' },\n },\n // `pg-pool` is `class Pool extends EventEmitter { connect(cb) {...} }`.\n {\n channelName: 'connect',\n module: { name: 'pg-pool', versionRange: '>=2.0.0 <4', filePath: 'index.js' },\n functionQuery: { className: 'Pool', methodName: 'connect', kind: 'Auto' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const pgChannels = {\n PG_QUERY: 'orchestrion:pg:query',\n PG_CONNECT: 'orchestrion:pg:connect',\n PGPOOL_CONNECT: 'orchestrion:pg-pool:connect',\n} as const;\n\nexport const pgSubscribeInjection = toSubscribeInjections(pgConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAGO,MAAM,QAAA,GAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQtB;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,eAAA,EAAgB;AAAA,IAC5E,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,OAAA,EAAS,MAAM,MAAA;AAAO,GAC1E;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,eAAA,EAAgB;AAAA,IAC5E,eAAe,EAAE,SAAA,EAAW,UAAU,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO,GAC5E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,sBAAA,EAAuB;AAAA,IACnF,aAAA,EAAe,EAAE,cAAA,EAAgB,OAAA,EAAS,MAAM,MAAA;AAAO,GACzD;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,MAAM,YAAA,EAAc,YAAA,EAAc,UAAU,sBAAA,EAAuB;AAAA,IACnF,aAAA,EAAe,EAAE,cAAA,EAAgB,SAAA,EAAW,MAAM,MAAA;AAAO,GAC3D;AAAA;AAAA,EAEA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,WAAW,YAAA,EAAc,YAAA,EAAc,UAAU,UAAA,EAAW;AAAA,IAC5E,eAAe,EAAE,SAAA,EAAW,QAAQ,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO;AAE5E;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,QAAA,EAAU,sBAAA;AAAA,EACV,UAAA,EAAY,wBAAA;AAAA,EACZ,cAAA,EAAgB;AAClB;AAEO,MAAM,oBAAA,GAAuBA,yCAAsB,QAAQ;;;;;;"}
@@ -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 postgresJsInstrumentationConfig = (dir) => [
4
6
  // `Query.prototype.handle` (`class Query extends Promise`) is the single
5
7
  // funnel every query passes through (`then`/`catch`/`finally`/`.execute()`/
@@ -44,7 +46,9 @@ const postgresJsChannels = {
44
46
  POSTGRESJS_EXECUTE: "orchestrion:postgres:execute",
45
47
  POSTGRESJS_CONNECT: "orchestrion:postgres:connect"
46
48
  };
49
+ const postgresJsSubscribeInjection = subscribeInjection.toSubscribeInjections(postgresJsConfig);
47
50
 
48
51
  exports.postgresJsChannels = postgresJsChannels;
49
52
  exports.postgresJsConfig = postgresJsConfig;
53
+ exports.postgresJsSubscribeInjection = postgresJsSubscribeInjection;
50
54
  //# sourceMappingURL=postgres.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postgres.js","sources":["../../../../src/orchestrion/config/postgres.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\n// postgres.js (`postgres` npm package, v3.x). Named after the npm package;\n// `postgres` doesn't collide with `pg.ts` (that file instruments `pg`/`pg-pool`).\n//\n// The ESM build lives under `src/*`, the CJS build under `cjs/src/*` (the\n// `cf/*` workerd build has no channel subscribers, see the integration).\n// Both builds share the same class/function shapes, so a single `flatMap`\n// over the two dirs emits one entry per (dir, target).\nconst postgresJsInstrumentationConfig = (dir: string): InstrumentationConfig[] => [\n // `Query.prototype.handle` (`class Query extends Promise`) is the single\n // funnel every query passes through (`then`/`catch`/`finally`/`.execute()`/\n // `.forEach()`/cursor all call it), guarded by `this.executed`. `Async`\n // because `handle` is `async`.\n {\n channelName: 'handle',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/query.js` },\n functionQuery: { className: 'Query', methodName: 'handle', kind: 'Async' },\n },\n // `function Connection(options, ...)` (default export of `connection.js`)\n // returns the connection object; used to build the endpoint registry that\n // resolves `server.address`/`server.port`/`db.namespace`.\n {\n channelName: 'connection',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/connection.js` },\n functionQuery: { functionName: 'Connection', kind: 'Sync' },\n },\n // The nested `function execute(q)` inside `Connection`; the per-connection\n // hook that attaches connection attributes to the query's span.\n {\n channelName: 'execute',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/connection.js` },\n functionQuery: { functionName: 'execute', kind: 'Sync' },\n },\n // The connection object's `connect(query)` method. Matched by `methodName`\n // (an object-literal method): `functionName` would hit the unrelated\n // socket-level `async function connect()` in the same file. `self` is the\n // connection object and `arguments[0]` the query, so the first query that\n // opens a connection (dispatched via a bare `execute` with no `self`) still\n // gets connection attributes in multi-endpoint apps.\n {\n channelName: 'connect',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/connection.js` },\n functionQuery: { methodName: 'connect', kind: 'Sync' },\n },\n];\n\nexport const postgresJsConfig = ['src', 'cjs/src'].flatMap(postgresJsInstrumentationConfig);\n\nexport const postgresJsChannels = {\n POSTGRESJS_HANDLE: 'orchestrion:postgres:handle',\n POSTGRESJS_CONNECTION: 'orchestrion:postgres:connection',\n POSTGRESJS_EXECUTE: 'orchestrion:postgres:execute',\n POSTGRESJS_CONNECT: 'orchestrion:postgres:connect',\n} as const;\n"],"names":[],"mappings":";;AASA,MAAM,+BAAA,GAAkC,CAAC,GAAA,KAAyC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhF;AAAA,IACE,WAAA,EAAa,QAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,UAAA,EAAY,cAAc,YAAA,EAAc,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,SAAA,CAAA,EAAY;AAAA,IACpF,eAAe,EAAE,SAAA,EAAW,SAAS,UAAA,EAAY,QAAA,EAAU,MAAM,OAAA;AAAQ,GAC3E;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA,IACE,WAAA,EAAa,YAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,UAAA,EAAY,cAAc,YAAA,EAAc,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,cAAA,CAAA,EAAiB;AAAA,IACzF,aAAA,EAAe,EAAE,YAAA,EAAc,YAAA,EAAc,MAAM,MAAA;AAAO,GAC5D;AAAA;AAAA;AAAA,EAGA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,UAAA,EAAY,cAAc,YAAA,EAAc,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,cAAA,CAAA,EAAiB;AAAA,IACzF,aAAA,EAAe,EAAE,YAAA,EAAc,SAAA,EAAW,MAAM,MAAA;AAAO,GACzD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,UAAA,EAAY,cAAc,YAAA,EAAc,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,cAAA,CAAA,EAAiB;AAAA,IACzF,aAAA,EAAe,EAAE,UAAA,EAAY,SAAA,EAAW,MAAM,MAAA;AAAO;AAEzD,CAAA;AAEO,MAAM,mBAAmB,CAAC,KAAA,EAAO,SAAS,CAAA,CAAE,QAAQ,+BAA+B;AAEnF,MAAM,kBAAA,GAAqB;AAAA,EAChC,iBAAA,EAAmB,6BAAA;AAAA,EACnB,qBAAA,EAAuB,iCAAA;AAAA,EACvB,kBAAA,EAAoB,8BAAA;AAAA,EACpB,kBAAA,EAAoB;AACtB;;;;;"}
1
+ {"version":3,"file":"postgres.js","sources":["../../../../src/orchestrion/config/postgres.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n// postgres.js (`postgres` npm package, v3.x). Named after the npm package;\n// `postgres` doesn't collide with `pg.ts` (that file instruments `pg`/`pg-pool`).\n//\n// The ESM build lives under `src/*`, the CJS build under `cjs/src/*` (the\n// `cf/*` workerd build has no channel subscribers, see the integration).\n// Both builds share the same class/function shapes, so a single `flatMap`\n// over the two dirs emits one entry per (dir, target).\nconst postgresJsInstrumentationConfig = (dir: string): InstrumentationConfig[] => [\n // `Query.prototype.handle` (`class Query extends Promise`) is the single\n // funnel every query passes through (`then`/`catch`/`finally`/`.execute()`/\n // `.forEach()`/cursor all call it), guarded by `this.executed`. `Async`\n // because `handle` is `async`.\n {\n channelName: 'handle',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/query.js` },\n functionQuery: { className: 'Query', methodName: 'handle', kind: 'Async' },\n },\n // `function Connection(options, ...)` (default export of `connection.js`)\n // returns the connection object; used to build the endpoint registry that\n // resolves `server.address`/`server.port`/`db.namespace`.\n {\n channelName: 'connection',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/connection.js` },\n functionQuery: { functionName: 'Connection', kind: 'Sync' },\n },\n // The nested `function execute(q)` inside `Connection`; the per-connection\n // hook that attaches connection attributes to the query's span.\n {\n channelName: 'execute',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/connection.js` },\n functionQuery: { functionName: 'execute', kind: 'Sync' },\n },\n // The connection object's `connect(query)` method. Matched by `methodName`\n // (an object-literal method): `functionName` would hit the unrelated\n // socket-level `async function connect()` in the same file. `self` is the\n // connection object and `arguments[0]` the query, so the first query that\n // opens a connection (dispatched via a bare `execute` with no `self`) still\n // gets connection attributes in multi-endpoint apps.\n {\n channelName: 'connect',\n module: { name: 'postgres', versionRange: '>=3.0.0 <4', filePath: `${dir}/connection.js` },\n functionQuery: { methodName: 'connect', kind: 'Sync' },\n },\n];\n\nexport const postgresJsConfig = ['src', 'cjs/src'].flatMap(postgresJsInstrumentationConfig);\n\nexport const postgresJsChannels = {\n POSTGRESJS_HANDLE: 'orchestrion:postgres:handle',\n POSTGRESJS_CONNECTION: 'orchestrion:postgres:connection',\n POSTGRESJS_EXECUTE: 'orchestrion:postgres:execute',\n POSTGRESJS_CONNECT: 'orchestrion:postgres:connect',\n} as const;\n\nexport const postgresJsSubscribeInjection = toSubscribeInjections(postgresJsConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAUA,MAAM,+BAAA,GAAkC,CAAC,GAAA,KAAyC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhF;AAAA,IACE,WAAA,EAAa,QAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,UAAA,EAAY,cAAc,YAAA,EAAc,QAAA,EAAU,CAAA,EAA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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 redisConfig = [
4
6
  // redis `>=2.6.0 <4` (standalone `redis`). `internal_send_command` is an
5
7
  // anonymous prototype assignment (`expressionName`); it settles via the nested
@@ -70,7 +72,9 @@ const redisChannels = {
70
72
  NODE_REDIS_PIPELINE: "orchestrion:@redis/client:pipeline",
71
73
  NODE_REDIS_BATCH: "orchestrion:@redis/client:batch"
72
74
  };
75
+ const redisSubscribeInjection = subscribeInjection.toSubscribeInjections(redisConfig);
73
76
 
74
77
  exports.redisChannels = redisChannels;
75
78
  exports.redisConfig = redisConfig;
79
+ exports.redisSubscribeInjection = redisSubscribeInjection;
76
80
  //# sourceMappingURL=redis.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"redis.js","sources":["../../../../src/orchestrion/config/redis.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nexport const redisConfig = [\n // redis `>=2.6.0 <4` (standalone `redis`). `internal_send_command` is an\n // anonymous prototype assignment (`expressionName`); it settles via the nested\n // `command_obj.callback`, so `kind: 'Sync'` and the subscriber wraps that callback.\n {\n channelName: 'command',\n module: { name: 'redis', versionRange: '>=2.6.0 <4', filePath: 'index.js' },\n functionQuery: { expressionName: 'internal_send_command', kind: 'Sync' },\n },\n // node-redis v4 (`@redis/client` v1). The real chokepoint (private `#sendCommand`)\n // isn't matchable, so wrap both public entry points: `commandsExecutor` (friendly\n // commands) and `sendCommand` (direct calls). They never overlap, so no double span.\n {\n channelName: 'executor',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'commandsExecutor', kind: 'Async' },\n },\n {\n channelName: 'command',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'sendCommand', kind: 'Async' },\n },\n {\n channelName: 'connect',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'connect', kind: 'Async' },\n },\n // node-redis `>=5.0.0 <5.12.0` (`@redis/client` v5; >=5.12.0 has its own\n // `node-redis:*` diagnostics_channel, see `redis-dc-subscriber.ts`). Friendly\n // commands route through the public `sendCommand`, so it covers them all — no\n // `executor` entry (would double-count).\n {\n channelName: 'command',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'sendCommand', kind: 'Async' },\n },\n {\n channelName: 'connect',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'connect', kind: 'Async' },\n },\n // Batch (multi/pipeline) — one span per `exec`. Batched commands bypass `sendCommand`,\n // so they go through the client's batch executors, which receive the queued commands\n // array (→ batch size). v5 splits MULTI/PIPELINE into two methods; v4's single\n // `multiExecutor` is MULTI when a `chainId` arg is present, PIPELINE otherwise.\n {\n channelName: 'multi',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: '_executeMulti', kind: 'Async' },\n },\n {\n channelName: 'pipeline',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: '_executePipeline', kind: 'Async' },\n },\n {\n channelName: 'batch',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'multiExecutor', kind: 'Async' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const redisChannels = {\n REDIS_COMMAND: 'orchestrion:redis:command',\n NODE_REDIS_COMMAND: 'orchestrion:@redis/client:command',\n NODE_REDIS_EXECUTOR: 'orchestrion:@redis/client:executor',\n NODE_REDIS_CONNECT: 'orchestrion:@redis/client:connect',\n NODE_REDIS_MULTI: 'orchestrion:@redis/client:multi',\n NODE_REDIS_PIPELINE: 'orchestrion:@redis/client:pipeline',\n NODE_REDIS_BATCH: 'orchestrion:@redis/client:batch',\n} as const;\n"],"names":[],"mappings":";;AAEO,MAAM,WAAA,GAAc;AAAA;AAAA;AAAA;AAAA,EAIzB;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,SAAS,YAAA,EAAc,YAAA,EAAc,UAAU,UAAA,EAAW;AAAA,IAC1E,aAAA,EAAe,EAAE,cAAA,EAAgB,uBAAA,EAAyB,MAAM,MAAA;AAAO,GACzE;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA,IACE,WAAA,EAAa,UAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,iBAAiB,YAAA,EAAc,QAAA,EAAU,UAAU,0BAAA,EAA2B;AAAA,IAC9F,eAAe,EAAE,SAAA,EAAW,eAAe,UAAA,EAAY,kBAAA,EAAoB,MAAM,OAAA;AAAQ,GAC3F;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,iBAAiB,YAAA,EAAc,QAAA,EAAU,UAAU,0BAAA,EAA2B;AAAA,IAC9F,eAAe,EAAE,SAAA,EAAW,eAAe,UAAA,EAAY,aAAA,EAAe,MAAM,OAAA;AAAQ,GACtF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,iBAAiB,YAAA,EAAc,QAAA,EAAU,UAAU,0BAAA,EAA2B;AAAA,IAC9F,eAAe,EAAE,SAAA,EAAW,eAAe,UAAA,EAAY,SAAA,EAAW,MAAM,OAAA;AAAQ,GAClF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAA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A;AAAA,EACpB,gBAAA,EAAkB,iCAAA;AAAA,EAClB,mBAAA,EAAqB,oCAAA;AAAA,EACrB,gBAAA,EAAkB;AACpB;;;;;"}
1
+ {"version":3,"file":"redis.js","sources":["../../../../src/orchestrion/config/redis.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nexport const redisConfig = [\n // redis `>=2.6.0 <4` (standalone `redis`). `internal_send_command` is an\n // anonymous prototype assignment (`expressionName`); it settles via the nested\n // `command_obj.callback`, so `kind: 'Sync'` and the subscriber wraps that callback.\n {\n channelName: 'command',\n module: { name: 'redis', versionRange: '>=2.6.0 <4', filePath: 'index.js' },\n functionQuery: { expressionName: 'internal_send_command', kind: 'Sync' },\n },\n // node-redis v4 (`@redis/client` v1). The real chokepoint (private `#sendCommand`)\n // isn't matchable, so wrap both public entry points: `commandsExecutor` (friendly\n // commands) and `sendCommand` (direct calls). They never overlap, so no double span.\n {\n channelName: 'executor',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'commandsExecutor', kind: 'Async' },\n },\n {\n channelName: 'command',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'sendCommand', kind: 'Async' },\n },\n {\n channelName: 'connect',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'connect', kind: 'Async' },\n },\n // node-redis `>=5.0.0 <5.12.0` (`@redis/client` v5; >=5.12.0 has its own\n // `node-redis:*` diagnostics_channel, see `redis-dc-subscriber.ts`). Friendly\n // commands route through the public `sendCommand`, so it covers them all — no\n // `executor` entry (would double-count).\n {\n channelName: 'command',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'sendCommand', kind: 'Async' },\n },\n {\n channelName: 'connect',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'connect', kind: 'Async' },\n },\n // Batch (multi/pipeline) — one span per `exec`. Batched commands bypass `sendCommand`,\n // so they go through the client's batch executors, which receive the queued commands\n // array (→ batch size). v5 splits MULTI/PIPELINE into two methods; v4's single\n // `multiExecutor` is MULTI when a `chainId` arg is present, PIPELINE otherwise.\n {\n channelName: 'multi',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: '_executeMulti', kind: 'Async' },\n },\n {\n channelName: 'pipeline',\n module: { name: '@redis/client', versionRange: '>=5.0.0 <5.12.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: '_executePipeline', kind: 'Async' },\n },\n {\n channelName: 'batch',\n module: { name: '@redis/client', versionRange: '^1.0.0', filePath: 'dist/lib/client/index.js' },\n functionQuery: { className: 'RedisClient', methodName: 'multiExecutor', kind: 'Async' },\n },\n] satisfies InstrumentationConfig[];\n\nexport const redisChannels = {\n REDIS_COMMAND: 'orchestrion:redis:command',\n NODE_REDIS_COMMAND: 'orchestrion:@redis/client:command',\n NODE_REDIS_EXECUTOR: 'orchestrion:@redis/client:executor',\n NODE_REDIS_CONNECT: 'orchestrion:@redis/client:connect',\n NODE_REDIS_MULTI: 'orchestrion:@redis/client:multi',\n NODE_REDIS_PIPELINE: 'orchestrion:@redis/client:pipeline',\n NODE_REDIS_BATCH: 'orchestrion:@redis/client:batch',\n} as const;\n\nexport const redisSubscribeInjection = toSubscribeInjections(redisConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAGO,MAAM,WAAA,GAAc;AAAA;AAAA;AAAA;AAAA,EAIzB;AAAA,IACE,WAAA,EAAa,SAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,SAAS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e,UAAA,EAAY,SAAA,EAAW,MAAM,OAAA;AAAQ,GAClF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,iBAAiB,YAAA,EAAc,iBAAA,EAAmB,UAAU,0BAAA,EAA2B;AAAA,IACvG,eAAe,EAAE,SAAA,EAAW,eAAe,UAAA,EAAY,eAAA,EAAiB,MAAM,OAAA;AAAQ,GACxF;AAAA,EACA;AAAA,IACE,WAAA,EAAa,UAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,iBAAiB,YAAA,EAAc,iBAAA,EAAmB,UAAU,0BAAA,EAA2B;AAAA,IACvG,eAAe,EAAE,SAAA,EAAW,eAAe,UAAA,EAAY,kBAAA,EAAoB,MAAM,OAAA;AAAQ,GAC3F;AAAA,EACA;AAAA,IACE,WAAA,EAAa,OAAA;AAAA,IACb,QAAQ,EAAE,IAAA,EAAM,iBAAiB,YAAA,EAAc,QAAA,EAAU,UAAU,0BAAA,EAA2B;AAAA,IAC9F,eAAe,EAAE,SAAA,EAAW,eAAe,UAAA,EAAY,eAAA,EAAiB,MAAM,OAAA;AAAQ;AAE1F;AAEO,MAAM,aAAA,GAAgB;AAAA,EAC3B,aAAA,EAAe,2BAAA;AAAA,EACf,kBAAA,EAAoB,mCAAA;AAAA,EACpB,mBAAA,EAAqB,oCAAA;AAAA,EACrB,kBAAA,EAAoB,mCAAA;AAAA,EACpB,gBAAA,EAAkB,iCAAA;AAAA,EAClB,mBAAA,EAAqB,oCAAA;AAAA,EACrB,gBAAA,EAAkB;AACpB;AAEO,MAAM,uBAAA,GAA0BA,yCAAsB,WAAW;;;;;;"}
@@ -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 remixInstrumentationConfig = (dir) => [
4
6
  // `createRequestHandler` returns `async function requestHandler(request, loadContext)` — the main
5
7
  // server span. We target the returned handler (so the span wraps each request, not the one-time
@@ -48,7 +50,9 @@ const remixChannels = {
48
50
  REMIX_CALL_ROUTE_LOADER: "orchestrion:@remix-run/server-runtime:callRouteLoader",
49
51
  REMIX_CALL_ROUTE_ACTION: "orchestrion:@remix-run/server-runtime:callRouteAction"
50
52
  };
53
+ const remixSubscribeInjection = subscribeInjection.toSubscribeInjections(remixConfig);
51
54
 
52
55
  exports.remixChannels = remixChannels;
53
56
  exports.remixConfig = remixConfig;
57
+ exports.remixSubscribeInjection = remixSubscribeInjection;
54
58
  //# sourceMappingURL=remix.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"remix.js","sources":["../../../../src/orchestrion/config/remix.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\n// Four concepts, one channel each:\n// - `requestHandler` → the async handler returned by `createRequestHandler` (the server span)\n// - `matchServerRoutes` → sync route match; enriches the active span (creates no span of its own)\n// - `callRouteLoader` → LOADER span. Remix 2.0–2.8 named it `callRouteLoaderRR`\n// - `callRouteAction` → ACTION span. Remix 2.0–2.8 named it `callRouteActionRR`\n//\n// Emitted for both the CJS (`dist/*`) and ESM (`dist/esm/*`) builds, which share function shapes.\nconst remixInstrumentationConfig = (dir: string): InstrumentationConfig[] => [\n // `createRequestHandler` returns `async function requestHandler(request, loadContext)` — the main\n // server span. We target the returned handler (so the span wraps each request, not the one-time\n // handler construction). It's a *named function expression*, which name-based `functionQuery`\n // can't match (that only sees declarations), so we select it with `astQuery`; `functionQuery`\n // then just carries the behaviour (`kind: 'Async'`).\n {\n channelName: 'requestHandler',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <3', filePath: `${dir}/server.js` },\n astQuery: 'FunctionExpression[id.name=\"requestHandler\"]',\n functionQuery: { kind: 'Async' },\n },\n // Sync; the subscriber reads its result to set `http.route` on the active request span.\n {\n channelName: 'matchServerRoutes',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <3', filePath: `${dir}/routeMatching.js` },\n functionQuery: { functionName: 'matchServerRoutes', kind: 'Sync' },\n },\n // Remix >= 2.9.0\n {\n channelName: 'callRouteLoader',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.9.0 <3', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteLoader', kind: 'Async' },\n },\n {\n channelName: 'callRouteAction',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.9.0 <3', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteAction', kind: 'Async' },\n },\n // Remix 2.0.0 – 2.8.x: the same functions were suffixed `…RR`. Same channels as above.\n {\n channelName: 'callRouteLoader',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <2.9.0', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteLoaderRR', kind: 'Async' },\n },\n {\n channelName: 'callRouteAction',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <2.9.0', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteActionRR', kind: 'Async' },\n },\n];\n\nexport const remixConfig = ['dist', 'dist/esm'].flatMap(remixInstrumentationConfig);\n\nexport const remixChannels = {\n REMIX_REQUEST_HANDLER: 'orchestrion:@remix-run/server-runtime:requestHandler',\n REMIX_MATCH_SERVER_ROUTES: 'orchestrion:@remix-run/server-runtime:matchServerRoutes',\n REMIX_CALL_ROUTE_LOADER: 'orchestrion:@remix-run/server-runtime:callRouteLoader',\n REMIX_CALL_ROUTE_ACTION: 'orchestrion:@remix-run/server-runtime:callRouteAction',\n} as const;\n"],"names":[],"mappings":";;AASA,MAAM,0BAAA,GAA6B,CAAC,GAAA,KAAyC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3E;AAAA,IACE,WAAA,EAAa,gBAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,2BAAA,EAA6B,cAAc,YAAA,EAAc,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,UAAA,CAAA,EAAa;A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,EAAkB,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,QAAA,CAAA,EAAW;AAAA,IACxG,aAAA,EAAe,EAAE,YAAA,EAAc,mBAAA,EAAqB,MAAM,OAAA;AAAQ;AAEtE,CAAA;AAEO,MAAM,cAAc,CAAC,MAAA,EAAQ,UAAU,CAAA,CAAE,QAAQ,0BAA0B;AAE3E,MAAM,aAAA,GAAgB;AAAA,EAC3B,qBAAA,EAAuB,sDAAA;AAAA,EACvB,yBAAA,EAA2B,yDAAA;AAAA,EAC3B,uBAAA,EAAyB,uDAAA;AAAA,EACzB,uBAAA,EAAyB;AAC3B;;;;;"}
1
+ {"version":3,"file":"remix.js","sources":["../../../../src/orchestrion/config/remix.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\n// Four concepts, one channel each:\n// - `requestHandler` → the async handler returned by `createRequestHandler` (the server span)\n// - `matchServerRoutes` → sync route match; enriches the active span (creates no span of its own)\n// - `callRouteLoader` → LOADER span. Remix 2.0–2.8 named it `callRouteLoaderRR`\n// - `callRouteAction` → ACTION span. Remix 2.0–2.8 named it `callRouteActionRR`\n//\n// Emitted for both the CJS (`dist/*`) and ESM (`dist/esm/*`) builds, which share function shapes.\nconst remixInstrumentationConfig = (dir: string): InstrumentationConfig[] => [\n // `createRequestHandler` returns `async function requestHandler(request, loadContext)` — the main\n // server span. We target the returned handler (so the span wraps each request, not the one-time\n // handler construction). It's a *named function expression*, which name-based `functionQuery`\n // can't match (that only sees declarations), so we select it with `astQuery`; `functionQuery`\n // then just carries the behaviour (`kind: 'Async'`).\n {\n channelName: 'requestHandler',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <3', filePath: `${dir}/server.js` },\n astQuery: 'FunctionExpression[id.name=\"requestHandler\"]',\n functionQuery: { kind: 'Async' },\n },\n // Sync; the subscriber reads its result to set `http.route` on the active request span.\n {\n channelName: 'matchServerRoutes',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <3', filePath: `${dir}/routeMatching.js` },\n functionQuery: { functionName: 'matchServerRoutes', kind: 'Sync' },\n },\n // Remix >= 2.9.0\n {\n channelName: 'callRouteLoader',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.9.0 <3', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteLoader', kind: 'Async' },\n },\n {\n channelName: 'callRouteAction',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.9.0 <3', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteAction', kind: 'Async' },\n },\n // Remix 2.0.0 – 2.8.x: the same functions were suffixed `…RR`. Same channels as above.\n {\n channelName: 'callRouteLoader',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <2.9.0', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteLoaderRR', kind: 'Async' },\n },\n {\n channelName: 'callRouteAction',\n module: { name: '@remix-run/server-runtime', versionRange: '>=2.0.0 <2.9.0', filePath: `${dir}/data.js` },\n functionQuery: { functionName: 'callRouteActionRR', kind: 'Async' },\n },\n];\n\nexport const remixConfig = ['dist', 'dist/esm'].flatMap(remixInstrumentationConfig);\n\nexport const remixChannels = {\n REMIX_REQUEST_HANDLER: 'orchestrion:@remix-run/server-runtime:requestHandler',\n REMIX_MATCH_SERVER_ROUTES: 'orchestrion:@remix-run/server-runtime:matchServerRoutes',\n REMIX_CALL_ROUTE_LOADER: 'orchestrion:@remix-run/server-runtime:callRouteLoader',\n REMIX_CALL_ROUTE_ACTION: 'orchestrion:@remix-run/server-runtime:callRouteAction',\n} as const;\n\nexport const remixSubscribeInjection = toSubscribeInjections(remixConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAUA,MAAM,0BAAA,GAA6B,CAAC,GAAA,KAAyC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3E;AAAA,IACE,WAAA,EAAa,gBAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,2BAAA,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AAa,iBAAA;AAAA,IACb,MAAA,EAAQ,EAAE,IAAA,EAAM,2BAAA,EAA6B,cAAc,gBAAA,EAAkB,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,QAAA,CAAA,EAAW;AAAA,IACxG,aAAA,EAAe,EAAE,YAAA,EAAc,mBAAA,EAAqB,MAAM,OAAA;AAAQ;AAEtE,CAAA;AAEO,MAAM,cAAc,CAAC,MAAA,EAAQ,UAAU,CAAA,CAAE,QAAQ,0BAA0B;AAE3E,MAAM,aAAA,GAAgB;AAAA,EAC3B,qBAAA,EAAuB,sDAAA;AAAA,EACvB,yBAAA,EAA2B,yDAAA;AAAA,EAC3B,uBAAA,EAAyB,uDAAA;AAAA,EACzB,uBAAA,EAAyB;AAC3B;AAEO,MAAM,uBAAA,GAA0BA,yCAAsB,WAAW;;;;;;"}
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const SUBSCRIBE_TRANSFORM_NAME = "sentrySubscribeOrchestrionChannel";
4
+ function toSubscribeInjections(configs) {
5
+ const seen = /* @__PURE__ */ new Set();
6
+ const injections = [];
7
+ for (const { module } of configs) {
8
+ const key = `${module.name}\0${module.versionRange}\0${String(module.filePath)}`;
9
+ if (seen.has(key)) {
10
+ continue;
11
+ }
12
+ seen.add(key);
13
+ injections.push({
14
+ channelName: module.name,
15
+ module,
16
+ astQuery: "Program",
17
+ transform: SUBSCRIBE_TRANSFORM_NAME
18
+ });
19
+ }
20
+ return injections;
21
+ }
22
+
23
+ exports.SUBSCRIBE_TRANSFORM_NAME = SUBSCRIBE_TRANSFORM_NAME;
24
+ exports.toSubscribeInjections = toSubscribeInjections;
25
+ //# sourceMappingURL=subscribe-injection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscribe-injection.js","sources":["../../../../src/orchestrion/config/subscribe-injection.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\n\n/**\n * Name shared by the `Program` injection configs (their `transform` field) and\n * the custom transform registered on the bundler plugin (its `customTransforms`\n * key). Any unique string works — it only has to match on both sides.\n *\n * Lives in this dependency-free leaf so the per-library config files can build\n * their injection configs without importing the transform implementation (which\n * pulls in `meriyah` and must never reach the runtime `--import` path).\n */\nexport const SUBSCRIBE_TRANSFORM_NAME = 'sentrySubscribeOrchestrionChannel';\n\n/**\n * Turn a library's channel-publishing configs into the `Program`-matching\n * injection configs that make each instrumented file self-register its channel\n * subscriber (via the {@link SUBSCRIBE_TRANSFORM_NAME} custom transform).\n *\n * Emits one injection per distinct instrumented file (deduped by module\n * matcher), so the subscribe snippet lands in exactly the files that receive\n * channels and inherits their precise version ranges. `channelName` carries the\n * package name (not a real channel — nothing is wrapped here) so the transform\n * can look up which subscriber to import.\n *\n * Co-located with each library's config (e.g. `mysqlSubscribeInjection`) but\n * kept OUT of `SENTRY_INSTRUMENTATIONS`: the runtime `--import` hook consumes\n * that list and can't register the custom transform, and an unregistered\n * `transform` makes the code-transformer drop the whole file. They are\n * aggregated separately into `SUBSCRIBE_INJECTIONS` and only handed to a bundler\n * plugin that opts in (and registers the transform).\n */\nexport function toSubscribeInjections(configs: InstrumentationConfig[]): InstrumentationConfig[] {\n const seen = new Set<string>();\n const injections: InstrumentationConfig[] = [];\n\n for (const { module } of configs) {\n const key = `${module.name}\\0${module.versionRange}\\0${String(module.filePath)}`;\n\n if (seen.has(key)) {\n continue;\n }\n\n seen.add(key);\n\n injections.push({\n channelName: module.name,\n module,\n astQuery: 'Program',\n transform: SUBSCRIBE_TRANSFORM_NAME,\n });\n }\n\n return injections;\n}\n"],"names":[],"mappings":";;AAWO,MAAM,wBAAA,GAA2B;AAoBjC,SAAS,sBAAsB,OAAA,EAA2D;AAC/F,EAAA,MAAM,IAAA,uBAAW,GAAA,EAAY;AAC7B,EAAA,MAAM,aAAsC,EAAC;AAE7C,EAAA,KAAA,MAAW,EAAE,MAAA,EAAO,IAAK,OAAA,EAAS;AAChC,IAAA,MAAM,GAAA,GAAM,CAAA,EAAG,MAAA,CAAO,IAAI,CAAA,EAAA,EAAK,MAAA,CAAO,YAAY,CAAA,EAAA,EAAK,MAAA,CAAO,MAAA,CAAO,QAAQ,CAAC,CAAA,CAAA;AAE9E,IAAA,IAAI,IAAA,CAAK,GAAA,CAAI,GAAG,CAAA,EAAG;AACjB,MAAA;AAAA,IACF;AAEA,IAAA,IAAA,CAAK,IAAI,GAAG,CAAA;AAEZ,IAAA,UAAA,CAAW,IAAA,CAAK;AAAA,MACd,aAAa,MAAA,CAAO,IAAA;AAAA,MACpB,MAAA;AAAA,MACA,QAAA,EAAU,SAAA;AAAA,MACV,SAAA,EAAW;AAAA,KACZ,CAAA;AAAA,EACH;AAEA,EAAA,OAAO,UAAA;AACT;;;;;"}
@@ -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_NAME = "tedious";
4
6
  const FILE_PATH = "lib/connection.js";
5
7
  const VERSION_RANGE = ">=1.11.0 <20";
@@ -18,7 +20,9 @@ const tediousChannels = {
18
20
  TEDIOUS_PREPARE: "orchestrion:tedious:prepare",
19
21
  TEDIOUS_EXECUTE: "orchestrion:tedious:execute"
20
22
  };
23
+ const tediousSubscribeInjection = subscribeInjection.toSubscribeInjections(tediousConfig);
21
24
 
22
25
  exports.tediousChannels = tediousChannels;
23
26
  exports.tediousConfig = tediousConfig;
27
+ exports.tediousSubscribeInjection = tediousSubscribeInjection;
24
28
  //# sourceMappingURL=tedious.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tedious.js","sources":["../../../../src/orchestrion/config/tedious.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\n\nconst MODULE_NAME = 'tedious';\n\n// `Connection` has lived in `lib/connection.js` across the whole supported range (matches the vendored\n// OTel `supportedVersions`). Orchestrion never matches a file that doesn't exist, so a single entry is\n// safe even for versions that shipped extra layouts.\nconst FILE_PATH = 'lib/connection.js';\nconst VERSION_RANGE = '>=1.11.0 <20';\n\n// `Connection` methods that dispatch a request (each traced as one db span) plus `connect`, which the\n// subscriber wraps for bookkeeping only (tracking the connection's active database, read into `db.name`).\n// All return synchronously; the request completes later via its callback/events, so the subscriber owns\n// span-ending rather than the channel lifecycle.\nconst METHODS = ['connect', 'execSql', 'execSqlBatch', 'callProcedure', 'execBulkLoad', 'prepare', 'execute'] as const;\n\nexport const tediousConfig: InstrumentationConfig[] = METHODS.map(methodName => ({\n channelName: methodName,\n module: { name: MODULE_NAME, versionRange: VERSION_RANGE, filePath: FILE_PATH },\n functionQuery: { className: 'Connection', methodName, kind: 'Sync' },\n}));\n\nexport const tediousChannels = {\n TEDIOUS_CONNECT: 'orchestrion:tedious:connect',\n TEDIOUS_EXEC_SQL: 'orchestrion:tedious:execSql',\n TEDIOUS_EXEC_SQL_BATCH: 'orchestrion:tedious:execSqlBatch',\n TEDIOUS_CALL_PROCEDURE: 'orchestrion:tedious:callProcedure',\n TEDIOUS_EXEC_BULK_LOAD: 'orchestrion:tedious:execBulkLoad',\n TEDIOUS_PREPARE: 'orchestrion:tedious:prepare',\n TEDIOUS_EXECUTE: 'orchestrion:tedious:execute',\n} as const;\n"],"names":[],"mappings":";;AAEA,MAAM,WAAA,GAAc,SAAA;AAKpB,MAAM,SAAA,GAAY,mBAAA;AAClB,MAAM,aAAA,GAAgB,cAAA;AAMtB,MAAM,OAAA,GAAU,CAAC,SAAA,EAAW,SAAA,EAAW,gBAAgB,eAAA,EAAiB,cAAA,EAAgB,WAAW,SAAS,CAAA;AAErG,MAAM,aAAA,GAAyC,OAAA,CAAQ,GAAA,CAAI,CAAA,UAAA,MAAe;AAAA,EAC/E,WAAA,EAAa,UAAA;AAAA,EACb,QAAQ,EAAE,IAAA,EAAM,aAAa,YAAA,EAAc,aAAA,EAAe,UAAU,SAAA,EAAU;AAAA,EAC9E,eAAe,EAAE,SAAA,EAAW,YAAA,EAAc,UAAA,EAAY,MAAM,MAAA;AAC9D,CAAA,CAAE;AAEK,MAAM,eAAA,GAAkB;AAAA,EAC7B,eAAA,EAAiB,6BAAA;AAAA,EACjB,gBAAA,EAAkB,6BAAA;AAAA,EAClB,sBAAA,EAAwB,kCAAA;AAAA,EACxB,sBAAA,EAAwB,mCAAA;AAAA,EACxB,sBAAA,EAAwB,kCAAA;AAAA,EACxB,eAAA,EAAiB,6BAAA;AAAA,EACjB,eAAA,EAAiB;AACnB;;;;;"}
1
+ {"version":3,"file":"tedious.js","sources":["../../../../src/orchestrion/config/tedious.ts"],"sourcesContent":["import type { InstrumentationConfig } from '..';\nimport { toSubscribeInjections } from './subscribe-injection';\n\nconst MODULE_NAME = 'tedious';\n\n// `Connection` has lived in `lib/connection.js` across the whole supported range (matches the vendored\n// OTel `supportedVersions`). Orchestrion never matches a file that doesn't exist, so a single entry is\n// safe even for versions that shipped extra layouts.\nconst FILE_PATH = 'lib/connection.js';\nconst VERSION_RANGE = '>=1.11.0 <20';\n\n// `Connection` methods that dispatch a request (each traced as one db span) plus `connect`, which the\n// subscriber wraps for bookkeeping only (tracking the connection's active database, read into `db.name`).\n// All return synchronously; the request completes later via its callback/events, so the subscriber owns\n// span-ending rather than the channel lifecycle.\nconst METHODS = ['connect', 'execSql', 'execSqlBatch', 'callProcedure', 'execBulkLoad', 'prepare', 'execute'] as const;\n\nexport const tediousConfig: InstrumentationConfig[] = METHODS.map(methodName => ({\n channelName: methodName,\n module: { name: MODULE_NAME, versionRange: VERSION_RANGE, filePath: FILE_PATH },\n functionQuery: { className: 'Connection', methodName, kind: 'Sync' },\n}));\n\nexport const tediousChannels = {\n TEDIOUS_CONNECT: 'orchestrion:tedious:connect',\n TEDIOUS_EXEC_SQL: 'orchestrion:tedious:execSql',\n TEDIOUS_EXEC_SQL_BATCH: 'orchestrion:tedious:execSqlBatch',\n TEDIOUS_CALL_PROCEDURE: 'orchestrion:tedious:callProcedure',\n TEDIOUS_EXEC_BULK_LOAD: 'orchestrion:tedious:execBulkLoad',\n TEDIOUS_PREPARE: 'orchestrion:tedious:prepare',\n TEDIOUS_EXECUTE: 'orchestrion:tedious:execute',\n} as const;\n\nexport const tediousSubscribeInjection = toSubscribeInjections(tediousConfig);\n"],"names":["toSubscribeInjections"],"mappings":";;;;AAGA,MAAM,WAAA,GAAc,SAAA;AAKpB,MAAM,SAAA,GAAY,mBAAA;AAClB,MAAM,aAAA,GAAgB,cAAA;AAMtB,MAAM,OAAA,GAAU,CAAC,SAAA,EAAW,SAAA,EAAW,gBAAgB,eAAA,EAAiB,cAAA,EAAgB,WAAW,SAAS,CAAA;AAErG,MAAM,aAAA,GAAyC,OAAA,CAAQ,GAAA,CAAI,CAAA,UAAA,MAAe;AAAA,EAC/E,WAAA,EAAa,UAAA;AAAA,EACb,QAAQ,EAAE,IAAA,EAAM,aAAa,YAAA,EAAc,aAAA,EAAe,UAAU,SAAA,EAAU;AAAA,EAC9E,eAAe,EAAE,SAAA,EAAW,YAAA,EAAc,UAAA,EAAY,MAAM,MAAA;AAC9D,CAAA,CAAE;AAEK,MAAM,eAAA,GAAkB;AAAA,EAC7B,eAAA,EAAiB,6BAAA;AAAA,EACjB,gBAAA,EAAkB,6BAAA;AAAA,EAClB,sBAAA,EAAwB,kCAAA;AAAA,EACxB,sBAAA,EAAwB,mCAAA;AAAA,EACxB,sBAAA,EAAwB,kCAAA;AAAA,EACxB,eAAA,EAAiB,6BAAA;AAAA,EACjB,eAAA,EAAiB;AACnB;AAEO,MAAM,yBAAA,GAA4BA,yCAAsB,aAAa;;;;;;"}