@sentry/server-utils 10.70.0 → 11.0.0-alpha.1

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 (1235) hide show
  1. package/README.md +1 -1
  2. package/build/THIRD-PARTY-LICENSES.txt +976 -0
  3. package/build/cjs/_virtual/_commonjsHelpers.js +8 -0
  4. package/build/cjs/_virtual/_commonjsHelpers.js.map +1 -0
  5. package/build/cjs/_virtual/array-set.js +6 -0
  6. package/build/cjs/_virtual/array-set.js.map +1 -0
  7. package/build/cjs/_virtual/astring.js +6 -0
  8. package/build/cjs/_virtual/astring.js.map +1 -0
  9. package/build/cjs/_virtual/base64-vlq.js +6 -0
  10. package/build/cjs/_virtual/base64-vlq.js.map +1 -0
  11. package/build/cjs/_virtual/base64.js +6 -0
  12. package/build/cjs/_virtual/base64.js.map +1 -0
  13. package/build/cjs/_virtual/binary-search.js +6 -0
  14. package/build/cjs/_virtual/binary-search.js.map +1 -0
  15. package/build/cjs/_virtual/mapping-list.js +6 -0
  16. package/build/cjs/_virtual/mapping-list.js.map +1 -0
  17. package/build/cjs/_virtual/meriyah.js +6 -0
  18. package/build/cjs/_virtual/meriyah.js.map +1 -0
  19. package/build/cjs/_virtual/node.js +6 -0
  20. package/build/cjs/_virtual/node.js.map +1 -0
  21. package/build/cjs/_virtual/quick-sort.js +6 -0
  22. package/build/cjs/_virtual/quick-sort.js.map +1 -0
  23. package/build/cjs/_virtual/source-map-consumer.js +6 -0
  24. package/build/cjs/_virtual/source-map-consumer.js.map +1 -0
  25. package/build/cjs/_virtual/source-map-generator.js +6 -0
  26. package/build/cjs/_virtual/source-map-generator.js.map +1 -0
  27. package/build/cjs/_virtual/source-map.js +6 -0
  28. package/build/cjs/_virtual/source-map.js.map +1 -0
  29. package/build/cjs/_virtual/source-node.js +6 -0
  30. package/build/cjs/_virtual/source-node.js.map +1 -0
  31. package/build/cjs/_virtual/util.js +6 -0
  32. package/build/cjs/_virtual/util.js.map +1 -0
  33. package/build/cjs/ai/anthropic-ai/constants.js +13 -0
  34. package/build/cjs/ai/anthropic-ai/constants.js.map +1 -0
  35. package/build/cjs/ai/anthropic-ai/index.js +245 -0
  36. package/build/cjs/ai/anthropic-ai/index.js.map +1 -0
  37. package/build/cjs/ai/anthropic-ai/streaming.js +154 -0
  38. package/build/cjs/ai/anthropic-ai/streaming.js.map +1 -0
  39. package/build/cjs/ai/anthropic-ai/utils.js +61 -0
  40. package/build/cjs/ai/anthropic-ai/utils.js.map +1 -0
  41. package/build/cjs/ai/core/gen-ai-attributes.js +20 -0
  42. package/build/cjs/ai/core/gen-ai-attributes.js.map +1 -0
  43. package/build/cjs/ai/core/utils.js +134 -0
  44. package/build/cjs/ai/core/utils.js.map +1 -0
  45. package/build/cjs/ai/google-genai/constants.js +17 -0
  46. package/build/cjs/ai/google-genai/constants.js.map +1 -0
  47. package/build/cjs/ai/google-genai/index.js +251 -0
  48. package/build/cjs/ai/google-genai/index.js.map +1 -0
  49. package/build/cjs/ai/google-genai/streaming.js +71 -0
  50. package/build/cjs/ai/google-genai/streaming.js.map +1 -0
  51. package/build/cjs/ai/google-genai/utils.js +21 -0
  52. package/build/cjs/ai/google-genai/utils.js.map +1 -0
  53. package/build/cjs/ai/langchain/constants.js +17 -0
  54. package/build/cjs/ai/langchain/constants.js.map +1 -0
  55. package/build/cjs/ai/langchain/embeddings.js +85 -0
  56. package/build/cjs/ai/langchain/embeddings.js.map +1 -0
  57. package/build/cjs/ai/langchain/index.js +257 -0
  58. package/build/cjs/ai/langchain/index.js.map +1 -0
  59. package/build/cjs/ai/langchain/utils.js +272 -0
  60. package/build/cjs/ai/langchain/utils.js.map +1 -0
  61. package/build/cjs/ai/langgraph/constants.js +8 -0
  62. package/build/cjs/ai/langgraph/constants.js.map +1 -0
  63. package/build/cjs/ai/langgraph/index.js +176 -0
  64. package/build/cjs/ai/langgraph/index.js.map +1 -0
  65. package/build/cjs/ai/langgraph/utils.js +231 -0
  66. package/build/cjs/ai/langgraph/utils.js.map +1 -0
  67. package/build/cjs/ai/openai/constants.js +33 -0
  68. package/build/cjs/ai/openai/constants.js.map +1 -0
  69. package/build/cjs/ai/openai/index.js +173 -0
  70. package/build/cjs/ai/openai/index.js.map +1 -0
  71. package/build/cjs/ai/openai/streaming.js +126 -0
  72. package/build/cjs/ai/openai/streaming.js.map +1 -0
  73. package/build/cjs/ai/openai/utils.js +111 -0
  74. package/build/cjs/ai/openai/utils.js.map +1 -0
  75. package/build/cjs/ai/vercel-ai/constants.js +21 -0
  76. package/build/cjs/ai/vercel-ai/constants.js.map +1 -0
  77. package/build/cjs/ai/vercel-ai/index.js +339 -0
  78. package/build/cjs/ai/vercel-ai/index.js.map +1 -0
  79. package/build/cjs/ai/vercel-ai/utils.js +171 -0
  80. package/build/cjs/ai/vercel-ai/utils.js.map +1 -0
  81. package/build/cjs/ai/vercel-ai/vercel-ai-attributes.js +50 -0
  82. package/build/cjs/ai/vercel-ai/vercel-ai-attributes.js.map +1 -0
  83. package/build/cjs/ai/workers-ai/constants.js +10 -0
  84. package/build/cjs/ai/workers-ai/constants.js.map +1 -0
  85. package/build/cjs/ai/workers-ai/index.js +83 -0
  86. package/build/cjs/ai/workers-ai/index.js.map +1 -0
  87. package/build/cjs/ai/workers-ai/streaming.js +150 -0
  88. package/build/cjs/ai/workers-ai/streaming.js.map +1 -0
  89. package/build/cjs/ai/workers-ai/utils.js +132 -0
  90. package/build/cjs/ai/workers-ai/utils.js.map +1 -0
  91. package/build/cjs/async-context.js +68 -0
  92. package/build/cjs/async-context.js.map +1 -0
  93. package/build/cjs/debug-build.js.map +1 -1
  94. package/build/cjs/graphql/graphql-dc-subscriber.js.map +1 -1
  95. package/build/cjs/graphql/index.js +15 -2
  96. package/build/cjs/graphql/index.js.map +1 -1
  97. package/build/cjs/graphql/utils.js +5 -3
  98. package/build/cjs/graphql/utils.js.map +1 -1
  99. package/build/cjs/index.js +42 -17
  100. package/build/cjs/index.js.map +1 -1
  101. package/build/cjs/index.no-diagnostic-channels.js +31 -0
  102. package/build/cjs/index.no-diagnostic-channels.js.map +1 -0
  103. package/build/cjs/integrations/tracing-channel/amqplib.js +46 -35
  104. package/build/cjs/integrations/tracing-channel/amqplib.js.map +1 -1
  105. package/build/cjs/integrations/tracing-channel/anthropic.js +55 -45
  106. package/build/cjs/integrations/tracing-channel/anthropic.js.map +1 -1
  107. package/build/cjs/integrations/tracing-channel/aws-sdk/constants.js +3 -1
  108. package/build/cjs/integrations/tracing-channel/aws-sdk/constants.js.map +1 -1
  109. package/build/cjs/integrations/tracing-channel/aws-sdk/index.js +115 -115
  110. package/build/cjs/integrations/tracing-channel/aws-sdk/index.js.map +1 -1
  111. package/build/cjs/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js.map +1 -1
  112. package/build/cjs/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.js.map +1 -1
  113. package/build/cjs/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js +8 -4
  114. package/build/cjs/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js.map +1 -1
  115. package/build/cjs/integrations/tracing-channel/aws-sdk/services/dynamodb.js +0 -2
  116. package/build/cjs/integrations/tracing-channel/aws-sdk/services/dynamodb.js.map +1 -1
  117. package/build/cjs/integrations/tracing-channel/aws-sdk/services/kinesis.js +1 -3
  118. package/build/cjs/integrations/tracing-channel/aws-sdk/services/kinesis.js.map +1 -1
  119. package/build/cjs/integrations/tracing-channel/aws-sdk/services/lambda.js +0 -1
  120. package/build/cjs/integrations/tracing-channel/aws-sdk/services/lambda.js.map +1 -1
  121. package/build/cjs/integrations/tracing-channel/aws-sdk/services/s3.js +1 -3
  122. package/build/cjs/integrations/tracing-channel/aws-sdk/services/s3.js.map +1 -1
  123. package/build/cjs/integrations/tracing-channel/aws-sdk/services/secretsmanager.js +1 -3
  124. package/build/cjs/integrations/tracing-channel/aws-sdk/services/secretsmanager.js.map +1 -1
  125. package/build/cjs/integrations/tracing-channel/aws-sdk/services/sns.js +3 -4
  126. package/build/cjs/integrations/tracing-channel/aws-sdk/services/sns.js.map +1 -1
  127. package/build/cjs/integrations/tracing-channel/aws-sdk/services/sqs.js +5 -5
  128. package/build/cjs/integrations/tracing-channel/aws-sdk/services/sqs.js.map +1 -1
  129. package/build/cjs/integrations/tracing-channel/aws-sdk/services/stepfunctions.js +1 -3
  130. package/build/cjs/integrations/tracing-channel/aws-sdk/services/stepfunctions.js.map +1 -1
  131. package/build/cjs/integrations/tracing-channel/aws-sdk/utils.js.map +1 -1
  132. package/build/cjs/integrations/tracing-channel/dataloader.js +37 -16
  133. package/build/cjs/integrations/tracing-channel/dataloader.js.map +1 -1
  134. package/build/cjs/integrations/tracing-channel/express/index.js +24 -11
  135. package/build/cjs/integrations/tracing-channel/express/index.js.map +1 -1
  136. package/build/cjs/integrations/tracing-channel/express/instrumentation.js +11 -16
  137. package/build/cjs/integrations/tracing-channel/express/instrumentation.js.map +1 -1
  138. package/build/cjs/integrations/tracing-channel/express/route.js.map +1 -1
  139. package/build/cjs/integrations/tracing-channel/fastify/errors.js +14 -1
  140. package/build/cjs/integrations/tracing-channel/fastify/errors.js.map +1 -1
  141. package/build/cjs/integrations/tracing-channel/fastify/index.js.map +1 -1
  142. package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js +25 -10
  143. package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js.map +1 -1
  144. package/build/cjs/integrations/tracing-channel/fastify/utils.js.map +1 -1
  145. package/build/cjs/integrations/tracing-channel/firebase/firestore.js +16 -3
  146. package/build/cjs/integrations/tracing-channel/firebase/firestore.js.map +1 -1
  147. package/build/cjs/integrations/tracing-channel/firebase/functions.js +6 -4
  148. package/build/cjs/integrations/tracing-channel/firebase/functions.js.map +1 -1
  149. package/build/cjs/integrations/tracing-channel/firebase/index.js +8 -12
  150. package/build/cjs/integrations/tracing-channel/firebase/index.js.map +1 -1
  151. package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js +17 -14
  152. package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js.map +1 -1
  153. package/build/cjs/integrations/tracing-channel/generic-pool.js +25 -10
  154. package/build/cjs/integrations/tracing-channel/generic-pool.js.map +1 -1
  155. package/build/cjs/integrations/tracing-channel/google-genai.js +57 -43
  156. package/build/cjs/integrations/tracing-channel/google-genai.js.map +1 -1
  157. package/build/cjs/integrations/tracing-channel/graphql/constants.js.map +1 -1
  158. package/build/cjs/integrations/tracing-channel/graphql/index.js +40 -36
  159. package/build/cjs/integrations/tracing-channel/graphql/index.js.map +1 -1
  160. package/build/cjs/integrations/tracing-channel/graphql/resolvers.js.map +1 -1
  161. package/build/cjs/integrations/tracing-channel/graphql/spans.js.map +1 -1
  162. package/build/cjs/integrations/tracing-channel/hapi-types.js.map +1 -1
  163. package/build/cjs/integrations/tracing-channel/hapi-utils.js +13 -21
  164. package/build/cjs/integrations/tracing-channel/hapi-utils.js.map +1 -1
  165. package/build/cjs/integrations/tracing-channel/hapi.js +51 -36
  166. package/build/cjs/integrations/tracing-channel/hapi.js.map +1 -1
  167. package/build/cjs/integrations/tracing-channel/ioredis.js +52 -41
  168. package/build/cjs/integrations/tracing-channel/ioredis.js.map +1 -1
  169. package/build/cjs/integrations/tracing-channel/kafkajs/consumer.js.map +1 -1
  170. package/build/cjs/integrations/tracing-channel/kafkajs/index.js +28 -15
  171. package/build/cjs/integrations/tracing-channel/kafkajs/index.js.map +1 -1
  172. package/build/cjs/integrations/tracing-channel/kafkajs/semconv.js.map +1 -1
  173. package/build/cjs/integrations/tracing-channel/kafkajs/spans.js +8 -7
  174. package/build/cjs/integrations/tracing-channel/kafkajs/spans.js.map +1 -1
  175. package/build/cjs/integrations/tracing-channel/knex.js +24 -10
  176. package/build/cjs/integrations/tracing-channel/knex.js.map +1 -1
  177. package/build/cjs/integrations/tracing-channel/koa.js +42 -39
  178. package/build/cjs/integrations/tracing-channel/koa.js.map +1 -1
  179. package/build/cjs/integrations/tracing-channel/langchain.js +59 -40
  180. package/build/cjs/integrations/tracing-channel/langchain.js.map +1 -1
  181. package/build/cjs/integrations/tracing-channel/langgraph.js +64 -64
  182. package/build/cjs/integrations/tracing-channel/langgraph.js.map +1 -1
  183. package/build/cjs/integrations/tracing-channel/lru-memoizer.js +27 -16
  184. package/build/cjs/integrations/tracing-channel/lru-memoizer.js.map +1 -1
  185. package/build/cjs/integrations/tracing-channel/mongodb.js +29 -16
  186. package/build/cjs/integrations/tracing-channel/mongodb.js.map +1 -1
  187. package/build/cjs/integrations/tracing-channel/mongoose.js +25 -13
  188. package/build/cjs/integrations/tracing-channel/mongoose.js.map +1 -1
  189. package/build/cjs/integrations/tracing-channel/mysql.js +65 -53
  190. package/build/cjs/integrations/tracing-channel/mysql.js.map +1 -1
  191. package/build/cjs/integrations/tracing-channel/mysql2.js +27 -10
  192. package/build/cjs/integrations/tracing-channel/mysql2.js.map +1 -1
  193. package/build/cjs/integrations/tracing-channel/openai.js +46 -34
  194. package/build/cjs/integrations/tracing-channel/openai.js.map +1 -1
  195. package/build/cjs/integrations/tracing-channel/postgres-js.js +96 -84
  196. package/build/cjs/integrations/tracing-channel/postgres-js.js.map +1 -1
  197. package/build/cjs/integrations/tracing-channel/postgres.js +35 -19
  198. package/build/cjs/integrations/tracing-channel/postgres.js.map +1 -1
  199. package/build/cjs/integrations/tracing-channel/redis.js +52 -31
  200. package/build/cjs/integrations/tracing-channel/redis.js.map +1 -1
  201. package/build/cjs/integrations/tracing-channel/tedious.js +35 -22
  202. package/build/cjs/integrations/tracing-channel/tedious.js.map +1 -1
  203. package/build/cjs/integrations/tracing-channel/vercel-ai.js +23 -10
  204. package/build/cjs/integrations/tracing-channel/vercel-ai.js.map +1 -1
  205. package/build/cjs/mongodb/mongodb-span.js +15 -18
  206. package/build/cjs/mongodb/mongodb-span.js.map +1 -1
  207. package/build/cjs/mongoose/index.js +15 -2
  208. package/build/cjs/mongoose/index.js.map +1 -1
  209. package/build/cjs/mongoose/mongoose-dc-subscriber.js.map +1 -1
  210. package/build/cjs/mongoose/mongoose-legacy-span.js +4 -3
  211. package/build/cjs/mongoose/mongoose-legacy-span.js.map +1 -1
  212. package/build/cjs/mysql2/index.js +15 -2
  213. package/build/cjs/mysql2/index.js.map +1 -1
  214. package/build/cjs/mysql2/mysql2-dc-subscriber.js.map +1 -1
  215. package/build/cjs/orchestrion/bundler/esbuild.js +22 -6
  216. package/build/cjs/orchestrion/bundler/esbuild.js.map +1 -1
  217. package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js +43 -0
  218. package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js.map +1 -0
  219. package/build/cjs/orchestrion/bundler/options.js +5 -19
  220. package/build/cjs/orchestrion/bundler/options.js.map +1 -1
  221. package/build/cjs/orchestrion/bundler/resolve.js +23 -0
  222. package/build/cjs/orchestrion/bundler/resolve.js.map +1 -0
  223. package/build/cjs/orchestrion/bundler/rollup.js +21 -6
  224. package/build/cjs/orchestrion/bundler/rollup.js.map +1 -1
  225. package/build/cjs/orchestrion/bundler/vite.js +42 -7
  226. package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
  227. package/build/cjs/orchestrion/bundler/webpack-loader.js +22 -0
  228. package/build/cjs/orchestrion/bundler/webpack-loader.js.map +1 -0
  229. package/build/cjs/orchestrion/bundler/webpack.js +45 -24
  230. package/build/cjs/orchestrion/bundler/webpack.js.map +1 -1
  231. package/build/cjs/orchestrion/channels.js.map +1 -1
  232. package/build/cjs/orchestrion/config/amqplib.js +3 -3
  233. package/build/cjs/orchestrion/config/amqplib.js.map +1 -1
  234. package/build/cjs/orchestrion/config/anthropic-ai.js +8 -16
  235. package/build/cjs/orchestrion/config/anthropic-ai.js.map +1 -1
  236. package/build/cjs/orchestrion/config/aws-sdk.js +3 -3
  237. package/build/cjs/orchestrion/config/aws-sdk.js.map +1 -1
  238. package/build/cjs/orchestrion/config/channel-integration-definitions.js +16 -16
  239. package/build/cjs/orchestrion/config/channel-integration-definitions.js.map +1 -1
  240. package/build/cjs/orchestrion/config/dataloader.js +0 -4
  241. package/build/cjs/orchestrion/config/dataloader.js.map +1 -1
  242. package/build/cjs/orchestrion/config/express.js +4 -4
  243. package/build/cjs/orchestrion/config/express.js.map +1 -1
  244. package/build/cjs/orchestrion/config/firebase.js +3 -3
  245. package/build/cjs/orchestrion/config/firebase.js.map +1 -1
  246. package/build/cjs/orchestrion/config/generic-pool.js +3 -3
  247. package/build/cjs/orchestrion/config/generic-pool.js.map +1 -1
  248. package/build/cjs/orchestrion/config/google-genai.js +8 -7
  249. package/build/cjs/orchestrion/config/google-genai.js.map +1 -1
  250. package/build/cjs/orchestrion/config/graphql.js +3 -3
  251. package/build/cjs/orchestrion/config/graphql.js.map +1 -1
  252. package/build/cjs/orchestrion/config/hapi.js +3 -3
  253. package/build/cjs/orchestrion/config/hapi.js.map +1 -1
  254. package/build/cjs/orchestrion/config/index.js +3 -32
  255. package/build/cjs/orchestrion/config/index.js.map +1 -1
  256. package/build/cjs/orchestrion/config/ioredis.js +3 -3
  257. package/build/cjs/orchestrion/config/ioredis.js.map +1 -1
  258. package/build/cjs/orchestrion/config/kafkajs.js +3 -3
  259. package/build/cjs/orchestrion/config/kafkajs.js.map +1 -1
  260. package/build/cjs/orchestrion/config/knex.js +0 -4
  261. package/build/cjs/orchestrion/config/knex.js.map +1 -1
  262. package/build/cjs/orchestrion/config/koa.js +3 -3
  263. package/build/cjs/orchestrion/config/koa.js.map +1 -1
  264. package/build/cjs/orchestrion/config/langchain.js +3 -3
  265. package/build/cjs/orchestrion/config/langchain.js.map +1 -1
  266. package/build/cjs/orchestrion/config/langgraph.js +3 -3
  267. package/build/cjs/orchestrion/config/langgraph.js.map +1 -1
  268. package/build/cjs/orchestrion/config/lru-memoizer.js +3 -3
  269. package/build/cjs/orchestrion/config/lru-memoizer.js.map +1 -1
  270. package/build/cjs/orchestrion/config/module-names.js +8 -0
  271. package/build/cjs/orchestrion/config/module-names.js.map +1 -0
  272. package/build/cjs/orchestrion/config/mongodb.js +3 -3
  273. package/build/cjs/orchestrion/config/mongodb.js.map +1 -1
  274. package/build/cjs/orchestrion/config/mongoose.js +3 -3
  275. package/build/cjs/orchestrion/config/mongoose.js.map +1 -1
  276. package/build/cjs/orchestrion/config/mysql.js +3 -3
  277. package/build/cjs/orchestrion/config/mysql.js.map +1 -1
  278. package/build/cjs/orchestrion/config/mysql2.js +3 -3
  279. package/build/cjs/orchestrion/config/mysql2.js.map +1 -1
  280. package/build/cjs/orchestrion/config/nestjs.js +0 -4
  281. package/build/cjs/orchestrion/config/nestjs.js.map +1 -1
  282. package/build/cjs/orchestrion/config/openai.js +3 -3
  283. package/build/cjs/orchestrion/config/openai.js.map +1 -1
  284. package/build/cjs/orchestrion/config/pg.js +3 -3
  285. package/build/cjs/orchestrion/config/pg.js.map +1 -1
  286. package/build/cjs/orchestrion/config/postgres.js +3 -3
  287. package/build/cjs/orchestrion/config/postgres.js.map +1 -1
  288. package/build/cjs/orchestrion/config/redis.js +3 -3
  289. package/build/cjs/orchestrion/config/redis.js.map +1 -1
  290. package/build/cjs/orchestrion/config/remix.js +0 -4
  291. package/build/cjs/orchestrion/config/remix.js.map +1 -1
  292. package/build/cjs/orchestrion/config/tedious.js +3 -3
  293. package/build/cjs/orchestrion/config/tedious.js.map +1 -1
  294. package/build/cjs/orchestrion/config/vercel-ai.js +3 -3
  295. package/build/cjs/orchestrion/config/vercel-ai.js.map +1 -1
  296. package/build/cjs/orchestrion/detect.js +7 -1
  297. package/build/cjs/orchestrion/detect.js.map +1 -1
  298. package/build/cjs/orchestrion/index.js +51 -50
  299. package/build/cjs/orchestrion/index.js.map +1 -1
  300. package/build/cjs/orchestrion/instrumentation.js +86 -0
  301. package/build/cjs/orchestrion/instrumentation.js.map +1 -0
  302. package/build/cjs/orchestrion/moduleInjected.js +21 -0
  303. package/build/cjs/orchestrion/moduleInjected.js.map +1 -0
  304. package/build/cjs/orchestrion/runtime/hook.js +17 -0
  305. package/build/cjs/orchestrion/runtime/hook.js.map +1 -0
  306. package/build/cjs/orchestrion/runtime/register.js +46 -43
  307. package/build/cjs/orchestrion/runtime/register.js.map +1 -1
  308. package/build/cjs/otlp.js +45 -0
  309. package/build/cjs/otlp.js.map +1 -0
  310. package/build/cjs/prisma/global.js.map +1 -1
  311. package/build/cjs/prisma/index.js.map +1 -1
  312. package/build/cjs/prisma/tracing-helper.js +21 -10
  313. package/build/cjs/prisma/tracing-helper.js.map +1 -1
  314. package/build/cjs/redis/index.js +15 -2
  315. package/build/cjs/redis/index.js.map +1 -1
  316. package/build/cjs/redis/redis-dc-subscriber.js +5 -3
  317. package/build/cjs/redis/redis-dc-subscriber.js.map +1 -1
  318. package/build/cjs/redis/redis-statement-serializer.js.map +1 -1
  319. package/build/cjs/tracing-channel.js +18 -1
  320. package/build/cjs/tracing-channel.js.map +1 -1
  321. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +26 -0
  322. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  323. package/build/cjs/vendored/@apm-js-collab/code-transformer/index.js +8 -0
  324. package/build/cjs/vendored/@apm-js-collab/code-transformer/index.js.map +1 -0
  325. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/index.js +12 -0
  326. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/index.js.map +1 -0
  327. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/matcher.js +86 -0
  328. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/matcher.js.map +1 -0
  329. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transformer.js +316 -0
  330. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transformer.js.map +1 -0
  331. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transforms.js +442 -0
  332. package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transforms.js.map +1 -0
  333. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js +219 -0
  334. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js.map +1 -0
  335. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js +98 -0
  336. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js.map +1 -0
  337. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js +52 -0
  338. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js.map +1 -0
  339. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js +1069 -0
  340. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js.map +1 -0
  341. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js +14 -0
  342. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js.map +1 -0
  343. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js +117 -0
  344. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js.map +1 -0
  345. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js +104 -0
  346. package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js.map +1 -0
  347. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/hook.js +166 -0
  348. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/hook.js.map +1 -0
  349. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/index.js +88 -0
  350. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/index.js.map +1 -0
  351. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js +15 -0
  352. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js.map +1 -0
  353. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js +30 -0
  354. package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js.map +1 -0
  355. package/build/cjs/vendored/astring/dist/astring.js +1068 -0
  356. package/build/cjs/vendored/astring/dist/astring.js.map +1 -0
  357. package/build/cjs/vendored/debug/src/common.js +178 -0
  358. package/build/cjs/vendored/debug/src/common.js.map +1 -0
  359. package/build/cjs/vendored/debug/src/node.js +186 -0
  360. package/build/cjs/vendored/debug/src/node.js.map +1 -0
  361. package/build/cjs/vendored/esquery/dist/esquery.esm.min.js +847 -0
  362. package/build/cjs/vendored/esquery/dist/esquery.esm.min.js.map +1 -0
  363. package/build/cjs/vendored/has-flag/index.js +11 -0
  364. package/build/cjs/vendored/has-flag/index.js.map +1 -0
  365. package/build/cjs/vendored/meriyah/dist/meriyah.js +9192 -0
  366. package/build/cjs/vendored/meriyah/dist/meriyah.js.map +1 -0
  367. package/build/cjs/vendored/meriyah/dist/meriyah2.js +9209 -0
  368. package/build/cjs/vendored/meriyah/dist/meriyah2.js.map +1 -0
  369. package/build/cjs/vendored/module-details-from-path/index.js +44 -0
  370. package/build/cjs/vendored/module-details-from-path/index.js.map +1 -0
  371. package/build/cjs/vendored/ms/index.js +115 -0
  372. package/build/cjs/vendored/ms/index.js.map +1 -0
  373. package/build/cjs/vendored/semifies/index.js +111 -0
  374. package/build/cjs/vendored/semifies/index.js.map +1 -0
  375. package/build/cjs/vendored/source-map/lib/array-set.js +73 -0
  376. package/build/cjs/vendored/source-map/lib/array-set.js.map +1 -0
  377. package/build/cjs/vendored/source-map/lib/base64-vlq.js +57 -0
  378. package/build/cjs/vendored/source-map/lib/base64-vlq.js.map +1 -0
  379. package/build/cjs/vendored/source-map/lib/base64.js +42 -0
  380. package/build/cjs/vendored/source-map/lib/base64.js.map +1 -0
  381. package/build/cjs/vendored/source-map/lib/binary-search.js +55 -0
  382. package/build/cjs/vendored/source-map/lib/binary-search.js.map +1 -0
  383. package/build/cjs/vendored/source-map/lib/mapping-list.js +42 -0
  384. package/build/cjs/vendored/source-map/lib/mapping-list.js.map +1 -0
  385. package/build/cjs/vendored/source-map/lib/quick-sort.js +36 -0
  386. package/build/cjs/vendored/source-map/lib/quick-sort.js.map +1 -0
  387. package/build/cjs/vendored/source-map/lib/source-map-consumer.js +612 -0
  388. package/build/cjs/vendored/source-map/lib/source-map-consumer.js.map +1 -0
  389. package/build/cjs/vendored/source-map/lib/source-map-generator.js +285 -0
  390. package/build/cjs/vendored/source-map/lib/source-map-generator.js.map +1 -0
  391. package/build/cjs/vendored/source-map/lib/source-node.js +270 -0
  392. package/build/cjs/vendored/source-map/lib/source-node.js.map +1 -0
  393. package/build/cjs/vendored/source-map/lib/util.js +300 -0
  394. package/build/cjs/vendored/source-map/lib/util.js.map +1 -0
  395. package/build/cjs/vendored/source-map/source-map.js +16 -0
  396. package/build/cjs/vendored/source-map/source-map.js.map +1 -0
  397. package/build/cjs/vendored/supports-color/index.js +104 -0
  398. package/build/cjs/vendored/supports-color/index.js.map +1 -0
  399. package/build/cjs/vercel-ai/index.js +15 -2
  400. package/build/cjs/vercel-ai/index.js.map +1 -1
  401. package/build/cjs/vercel-ai/util.js.map +1 -1
  402. package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js +26 -27
  403. package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
  404. package/build/cjs/vercel-ai/vercel-ai-orchestrion-subscriber.js +1 -1
  405. package/build/cjs/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
  406. package/build/esm/_virtual/_commonjsHelpers.js +6 -0
  407. package/build/esm/_virtual/_commonjsHelpers.js.map +1 -0
  408. package/build/esm/_virtual/array-set.js +4 -0
  409. package/build/esm/_virtual/array-set.js.map +1 -0
  410. package/build/esm/_virtual/astring.js +4 -0
  411. package/build/esm/_virtual/astring.js.map +1 -0
  412. package/build/esm/_virtual/base64-vlq.js +4 -0
  413. package/build/esm/_virtual/base64-vlq.js.map +1 -0
  414. package/build/esm/_virtual/base64.js +4 -0
  415. package/build/esm/_virtual/base64.js.map +1 -0
  416. package/build/esm/_virtual/binary-search.js +4 -0
  417. package/build/esm/_virtual/binary-search.js.map +1 -0
  418. package/build/esm/_virtual/mapping-list.js +4 -0
  419. package/build/esm/_virtual/mapping-list.js.map +1 -0
  420. package/build/esm/_virtual/meriyah.js +4 -0
  421. package/build/esm/_virtual/meriyah.js.map +1 -0
  422. package/build/esm/_virtual/node.js +4 -0
  423. package/build/esm/_virtual/node.js.map +1 -0
  424. package/build/esm/_virtual/quick-sort.js +4 -0
  425. package/build/esm/_virtual/quick-sort.js.map +1 -0
  426. package/build/esm/_virtual/source-map-consumer.js +4 -0
  427. package/build/esm/_virtual/source-map-consumer.js.map +1 -0
  428. package/build/esm/_virtual/source-map-generator.js +4 -0
  429. package/build/esm/_virtual/source-map-generator.js.map +1 -0
  430. package/build/esm/_virtual/source-map.js +4 -0
  431. package/build/esm/_virtual/source-map.js.map +1 -0
  432. package/build/esm/_virtual/source-node.js +4 -0
  433. package/build/esm/_virtual/source-node.js.map +1 -0
  434. package/build/esm/_virtual/util.js +4 -0
  435. package/build/esm/_virtual/util.js.map +1 -0
  436. package/build/esm/ai/anthropic-ai/constants.js +10 -0
  437. package/build/esm/ai/anthropic-ai/constants.js.map +1 -0
  438. package/build/esm/ai/anthropic-ai/index.js +240 -0
  439. package/build/esm/ai/anthropic-ai/index.js.map +1 -0
  440. package/build/esm/ai/anthropic-ai/streaming.js +151 -0
  441. package/build/esm/ai/anthropic-ai/streaming.js.map +1 -0
  442. package/build/esm/ai/anthropic-ai/utils.js +56 -0
  443. package/build/esm/ai/anthropic-ai/utils.js.map +1 -0
  444. package/build/esm/ai/core/gen-ai-attributes.js +11 -0
  445. package/build/esm/ai/core/gen-ai-attributes.js.map +1 -0
  446. package/build/esm/ai/core/utils.js +126 -0
  447. package/build/esm/ai/core/utils.js.map +1 -0
  448. package/build/esm/ai/google-genai/constants.js +13 -0
  449. package/build/esm/ai/google-genai/constants.js.map +1 -0
  450. package/build/esm/ai/google-genai/index.js +245 -0
  451. package/build/esm/ai/google-genai/index.js.map +1 -0
  452. package/build/esm/ai/google-genai/streaming.js +69 -0
  453. package/build/esm/ai/google-genai/streaming.js.map +1 -0
  454. package/build/esm/ai/google-genai/utils.js +19 -0
  455. package/build/esm/ai/google-genai/utils.js.map +1 -0
  456. package/build/esm/ai/langchain/constants.js +13 -0
  457. package/build/esm/ai/langchain/constants.js.map +1 -0
  458. package/build/esm/ai/langchain/embeddings.js +81 -0
  459. package/build/esm/ai/langchain/embeddings.js.map +1 -0
  460. package/build/esm/ai/langchain/index.js +255 -0
  461. package/build/esm/ai/langchain/index.js.map +1 -0
  462. package/build/esm/ai/langchain/utils.js +263 -0
  463. package/build/esm/ai/langchain/utils.js.map +1 -0
  464. package/build/esm/ai/langgraph/constants.js +5 -0
  465. package/build/esm/ai/langgraph/constants.js.map +1 -0
  466. package/build/esm/ai/langgraph/index.js +171 -0
  467. package/build/esm/ai/langgraph/index.js.map +1 -0
  468. package/build/esm/ai/langgraph/utils.js +222 -0
  469. package/build/esm/ai/langgraph/utils.js.map +1 -0
  470. package/build/esm/ai/openai/constants.js +28 -0
  471. package/build/esm/ai/openai/constants.js.map +1 -0
  472. package/build/esm/ai/openai/index.js +169 -0
  473. package/build/esm/ai/openai/index.js.map +1 -0
  474. package/build/esm/ai/openai/streaming.js +124 -0
  475. package/build/esm/ai/openai/streaming.js.map +1 -0
  476. package/build/esm/ai/openai/utils.js +106 -0
  477. package/build/esm/ai/openai/utils.js.map +1 -0
  478. package/build/esm/ai/vercel-ai/constants.js +18 -0
  479. package/build/esm/ai/vercel-ai/constants.js.map +1 -0
  480. package/build/esm/ai/vercel-ai/index.js +335 -0
  481. package/build/esm/ai/vercel-ai/index.js.map +1 -0
  482. package/build/esm/ai/vercel-ai/utils.js +164 -0
  483. package/build/esm/ai/vercel-ai/utils.js.map +1 -0
  484. package/build/esm/ai/vercel-ai/vercel-ai-attributes.js +26 -0
  485. package/build/esm/ai/vercel-ai/vercel-ai-attributes.js.map +1 -0
  486. package/build/esm/ai/workers-ai/constants.js +6 -0
  487. package/build/esm/ai/workers-ai/constants.js.map +1 -0
  488. package/build/esm/ai/workers-ai/index.js +81 -0
  489. package/build/esm/ai/workers-ai/index.js.map +1 -0
  490. package/build/esm/ai/workers-ai/streaming.js +148 -0
  491. package/build/esm/ai/workers-ai/streaming.js.map +1 -0
  492. package/build/esm/ai/workers-ai/utils.js +126 -0
  493. package/build/esm/ai/workers-ai/utils.js.map +1 -0
  494. package/build/esm/async-context.js +66 -0
  495. package/build/esm/async-context.js.map +1 -0
  496. package/build/esm/debug-build.js.map +1 -1
  497. package/build/esm/graphql/graphql-dc-subscriber.js.map +1 -1
  498. package/build/esm/graphql/index.js.map +1 -1
  499. package/build/esm/graphql/utils.js +6 -4
  500. package/build/esm/graphql/utils.js.map +1 -1
  501. package/build/esm/index.js +11 -0
  502. package/build/esm/index.js.map +1 -1
  503. package/build/esm/index.no-diagnostic-channels.js +12 -0
  504. package/build/esm/index.no-diagnostic-channels.js.map +1 -0
  505. package/build/esm/integrations/tracing-channel/amqplib.js +25 -27
  506. package/build/esm/integrations/tracing-channel/amqplib.js.map +1 -1
  507. package/build/esm/integrations/tracing-channel/anthropic.js +37 -40
  508. package/build/esm/integrations/tracing-channel/anthropic.js.map +1 -1
  509. package/build/esm/integrations/tracing-channel/aws-sdk/constants.js +3 -2
  510. package/build/esm/integrations/tracing-channel/aws-sdk/constants.js.map +1 -1
  511. package/build/esm/integrations/tracing-channel/aws-sdk/index.js +106 -119
  512. package/build/esm/integrations/tracing-channel/aws-sdk/index.js.map +1 -1
  513. package/build/esm/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js.map +1 -1
  514. package/build/esm/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.js.map +1 -1
  515. package/build/esm/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js +10 -6
  516. package/build/esm/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js.map +1 -1
  517. package/build/esm/integrations/tracing-channel/aws-sdk/services/dynamodb.js +0 -2
  518. package/build/esm/integrations/tracing-channel/aws-sdk/services/dynamodb.js.map +1 -1
  519. package/build/esm/integrations/tracing-channel/aws-sdk/services/kinesis.js +1 -3
  520. package/build/esm/integrations/tracing-channel/aws-sdk/services/kinesis.js.map +1 -1
  521. package/build/esm/integrations/tracing-channel/aws-sdk/services/lambda.js +1 -2
  522. package/build/esm/integrations/tracing-channel/aws-sdk/services/lambda.js.map +1 -1
  523. package/build/esm/integrations/tracing-channel/aws-sdk/services/s3.js +1 -3
  524. package/build/esm/integrations/tracing-channel/aws-sdk/services/s3.js.map +1 -1
  525. package/build/esm/integrations/tracing-channel/aws-sdk/services/secretsmanager.js +1 -3
  526. package/build/esm/integrations/tracing-channel/aws-sdk/services/secretsmanager.js.map +1 -1
  527. package/build/esm/integrations/tracing-channel/aws-sdk/services/sns.js +5 -6
  528. package/build/esm/integrations/tracing-channel/aws-sdk/services/sns.js.map +1 -1
  529. package/build/esm/integrations/tracing-channel/aws-sdk/services/sqs.js +7 -7
  530. package/build/esm/integrations/tracing-channel/aws-sdk/services/sqs.js.map +1 -1
  531. package/build/esm/integrations/tracing-channel/aws-sdk/services/stepfunctions.js +1 -3
  532. package/build/esm/integrations/tracing-channel/aws-sdk/services/stepfunctions.js.map +1 -1
  533. package/build/esm/integrations/tracing-channel/aws-sdk/utils.js.map +1 -1
  534. package/build/esm/integrations/tracing-channel/dataloader.js +22 -14
  535. package/build/esm/integrations/tracing-channel/dataloader.js.map +1 -1
  536. package/build/esm/integrations/tracing-channel/express/index.js +11 -11
  537. package/build/esm/integrations/tracing-channel/express/index.js.map +1 -1
  538. package/build/esm/integrations/tracing-channel/express/instrumentation.js +13 -18
  539. package/build/esm/integrations/tracing-channel/express/instrumentation.js.map +1 -1
  540. package/build/esm/integrations/tracing-channel/express/route.js.map +1 -1
  541. package/build/esm/integrations/tracing-channel/fastify/errors.js.map +1 -1
  542. package/build/esm/integrations/tracing-channel/fastify/index.js.map +1 -1
  543. package/build/esm/integrations/tracing-channel/fastify/instrumentation.js +13 -11
  544. package/build/esm/integrations/tracing-channel/fastify/instrumentation.js.map +1 -1
  545. package/build/esm/integrations/tracing-channel/fastify/utils.js.map +1 -1
  546. package/build/esm/integrations/tracing-channel/firebase/firestore.js +4 -4
  547. package/build/esm/integrations/tracing-channel/firebase/firestore.js.map +1 -1
  548. package/build/esm/integrations/tracing-channel/firebase/functions.js +8 -6
  549. package/build/esm/integrations/tracing-channel/firebase/functions.js.map +1 -1
  550. package/build/esm/integrations/tracing-channel/firebase/index.js +8 -12
  551. package/build/esm/integrations/tracing-channel/firebase/index.js.map +1 -1
  552. package/build/esm/integrations/tracing-channel/firebase/instrumentation.js +3 -13
  553. package/build/esm/integrations/tracing-channel/firebase/instrumentation.js.map +1 -1
  554. package/build/esm/integrations/tracing-channel/generic-pool.js +12 -10
  555. package/build/esm/integrations/tracing-channel/generic-pool.js.map +1 -1
  556. package/build/esm/integrations/tracing-channel/google-genai.js +41 -40
  557. package/build/esm/integrations/tracing-channel/google-genai.js.map +1 -1
  558. package/build/esm/integrations/tracing-channel/graphql/constants.js.map +1 -1
  559. package/build/esm/integrations/tracing-channel/graphql/index.js +30 -39
  560. package/build/esm/integrations/tracing-channel/graphql/index.js.map +1 -1
  561. package/build/esm/integrations/tracing-channel/graphql/resolvers.js.map +1 -1
  562. package/build/esm/integrations/tracing-channel/graphql/spans.js.map +1 -1
  563. package/build/esm/integrations/tracing-channel/hapi-types.js.map +1 -1
  564. package/build/esm/integrations/tracing-channel/hapi-utils.js +14 -22
  565. package/build/esm/integrations/tracing-channel/hapi-utils.js.map +1 -1
  566. package/build/esm/integrations/tracing-channel/hapi.js +39 -37
  567. package/build/esm/integrations/tracing-channel/hapi.js.map +1 -1
  568. package/build/esm/integrations/tracing-channel/ioredis.js +40 -42
  569. package/build/esm/integrations/tracing-channel/ioredis.js.map +1 -1
  570. package/build/esm/integrations/tracing-channel/kafkajs/consumer.js.map +1 -1
  571. package/build/esm/integrations/tracing-channel/kafkajs/index.js +14 -14
  572. package/build/esm/integrations/tracing-channel/kafkajs/index.js.map +1 -1
  573. package/build/esm/integrations/tracing-channel/kafkajs/semconv.js.map +1 -1
  574. package/build/esm/integrations/tracing-channel/kafkajs/spans.js +10 -9
  575. package/build/esm/integrations/tracing-channel/kafkajs/spans.js.map +1 -1
  576. package/build/esm/integrations/tracing-channel/knex.js +10 -9
  577. package/build/esm/integrations/tracing-channel/knex.js.map +1 -1
  578. package/build/esm/integrations/tracing-channel/koa.js +30 -40
  579. package/build/esm/integrations/tracing-channel/koa.js.map +1 -1
  580. package/build/esm/integrations/tracing-channel/langchain.js +45 -39
  581. package/build/esm/integrations/tracing-channel/langchain.js.map +1 -1
  582. package/build/esm/integrations/tracing-channel/langgraph.js +50 -63
  583. package/build/esm/integrations/tracing-channel/langgraph.js.map +1 -1
  584. package/build/esm/integrations/tracing-channel/lru-memoizer.js +15 -17
  585. package/build/esm/integrations/tracing-channel/lru-memoizer.js.map +1 -1
  586. package/build/esm/integrations/tracing-channel/mongodb.js +14 -14
  587. package/build/esm/integrations/tracing-channel/mongodb.js.map +1 -1
  588. package/build/esm/integrations/tracing-channel/mongoose.js +11 -12
  589. package/build/esm/integrations/tracing-channel/mongoose.js.map +1 -1
  590. package/build/esm/integrations/tracing-channel/mysql.js +53 -54
  591. package/build/esm/integrations/tracing-channel/mysql.js.map +1 -1
  592. package/build/esm/integrations/tracing-channel/mysql2.js +14 -10
  593. package/build/esm/integrations/tracing-channel/mysql2.js.map +1 -1
  594. package/build/esm/integrations/tracing-channel/openai.js +32 -33
  595. package/build/esm/integrations/tracing-channel/openai.js.map +1 -1
  596. package/build/esm/integrations/tracing-channel/postgres-js.js +85 -86
  597. package/build/esm/integrations/tracing-channel/postgres-js.js.map +1 -1
  598. package/build/esm/integrations/tracing-channel/postgres.js +22 -19
  599. package/build/esm/integrations/tracing-channel/postgres.js.map +1 -1
  600. package/build/esm/integrations/tracing-channel/redis.js +37 -29
  601. package/build/esm/integrations/tracing-channel/redis.js.map +1 -1
  602. package/build/esm/integrations/tracing-channel/tedious.js +22 -22
  603. package/build/esm/integrations/tracing-channel/tedious.js.map +1 -1
  604. package/build/esm/integrations/tracing-channel/vercel-ai.js +13 -13
  605. package/build/esm/integrations/tracing-channel/vercel-ai.js.map +1 -1
  606. package/build/esm/mongodb/mongodb-span.js +13 -16
  607. package/build/esm/mongodb/mongodb-span.js.map +1 -1
  608. package/build/esm/mongoose/index.js.map +1 -1
  609. package/build/esm/mongoose/mongoose-dc-subscriber.js.map +1 -1
  610. package/build/esm/mongoose/mongoose-legacy-span.js +3 -2
  611. package/build/esm/mongoose/mongoose-legacy-span.js.map +1 -1
  612. package/build/esm/mysql2/index.js.map +1 -1
  613. package/build/esm/mysql2/mysql2-dc-subscriber.js.map +1 -1
  614. package/build/esm/orchestrion/bundler/esbuild.js +22 -2
  615. package/build/esm/orchestrion/bundler/esbuild.js.map +1 -1
  616. package/build/esm/orchestrion/bundler/moduleInjectedTransform.js +40 -0
  617. package/build/esm/orchestrion/bundler/moduleInjectedTransform.js.map +1 -0
  618. package/build/esm/orchestrion/bundler/options.js +5 -20
  619. package/build/esm/orchestrion/bundler/options.js.map +1 -1
  620. package/build/esm/orchestrion/bundler/resolve.js +20 -0
  621. package/build/esm/orchestrion/bundler/resolve.js.map +1 -0
  622. package/build/esm/orchestrion/bundler/rollup.js +21 -2
  623. package/build/esm/orchestrion/bundler/rollup.js.map +1 -1
  624. package/build/esm/orchestrion/bundler/vite.js +43 -4
  625. package/build/esm/orchestrion/bundler/vite.js.map +1 -1
  626. package/build/esm/orchestrion/bundler/webpack-loader.js +20 -0
  627. package/build/esm/orchestrion/bundler/webpack-loader.js.map +1 -0
  628. package/build/esm/orchestrion/bundler/webpack.js +43 -18
  629. package/build/esm/orchestrion/bundler/webpack.js.map +1 -1
  630. package/build/esm/orchestrion/channels.js.map +1 -1
  631. package/build/esm/orchestrion/config/amqplib.js +3 -3
  632. package/build/esm/orchestrion/config/amqplib.js.map +1 -1
  633. package/build/esm/orchestrion/config/anthropic-ai.js +8 -16
  634. package/build/esm/orchestrion/config/anthropic-ai.js.map +1 -1
  635. package/build/esm/orchestrion/config/aws-sdk.js +3 -3
  636. package/build/esm/orchestrion/config/aws-sdk.js.map +1 -1
  637. package/build/esm/orchestrion/config/channel-integration-definitions.js +16 -16
  638. package/build/esm/orchestrion/config/channel-integration-definitions.js.map +1 -1
  639. package/build/esm/orchestrion/config/dataloader.js +1 -4
  640. package/build/esm/orchestrion/config/dataloader.js.map +1 -1
  641. package/build/esm/orchestrion/config/express.js +4 -4
  642. package/build/esm/orchestrion/config/express.js.map +1 -1
  643. package/build/esm/orchestrion/config/firebase.js +3 -3
  644. package/build/esm/orchestrion/config/firebase.js.map +1 -1
  645. package/build/esm/orchestrion/config/generic-pool.js +3 -3
  646. package/build/esm/orchestrion/config/generic-pool.js.map +1 -1
  647. package/build/esm/orchestrion/config/google-genai.js +8 -7
  648. package/build/esm/orchestrion/config/google-genai.js.map +1 -1
  649. package/build/esm/orchestrion/config/graphql.js +3 -3
  650. package/build/esm/orchestrion/config/graphql.js.map +1 -1
  651. package/build/esm/orchestrion/config/hapi.js +3 -3
  652. package/build/esm/orchestrion/config/hapi.js.map +1 -1
  653. package/build/esm/orchestrion/config/index.js +31 -61
  654. package/build/esm/orchestrion/config/index.js.map +1 -1
  655. package/build/esm/orchestrion/config/ioredis.js +3 -3
  656. package/build/esm/orchestrion/config/ioredis.js.map +1 -1
  657. package/build/esm/orchestrion/config/kafkajs.js +3 -3
  658. package/build/esm/orchestrion/config/kafkajs.js.map +1 -1
  659. package/build/esm/orchestrion/config/knex.js +1 -4
  660. package/build/esm/orchestrion/config/knex.js.map +1 -1
  661. package/build/esm/orchestrion/config/koa.js +3 -3
  662. package/build/esm/orchestrion/config/koa.js.map +1 -1
  663. package/build/esm/orchestrion/config/langchain.js +3 -3
  664. package/build/esm/orchestrion/config/langchain.js.map +1 -1
  665. package/build/esm/orchestrion/config/langgraph.js +3 -3
  666. package/build/esm/orchestrion/config/langgraph.js.map +1 -1
  667. package/build/esm/orchestrion/config/lru-memoizer.js +3 -3
  668. package/build/esm/orchestrion/config/lru-memoizer.js.map +1 -1
  669. package/build/esm/orchestrion/config/module-names.js +6 -0
  670. package/build/esm/orchestrion/config/module-names.js.map +1 -0
  671. package/build/esm/orchestrion/config/mongodb.js +3 -3
  672. package/build/esm/orchestrion/config/mongodb.js.map +1 -1
  673. package/build/esm/orchestrion/config/mongoose.js +3 -3
  674. package/build/esm/orchestrion/config/mongoose.js.map +1 -1
  675. package/build/esm/orchestrion/config/mysql.js +3 -3
  676. package/build/esm/orchestrion/config/mysql.js.map +1 -1
  677. package/build/esm/orchestrion/config/mysql2.js +3 -3
  678. package/build/esm/orchestrion/config/mysql2.js.map +1 -1
  679. package/build/esm/orchestrion/config/nestjs.js +1 -4
  680. package/build/esm/orchestrion/config/nestjs.js.map +1 -1
  681. package/build/esm/orchestrion/config/openai.js +3 -3
  682. package/build/esm/orchestrion/config/openai.js.map +1 -1
  683. package/build/esm/orchestrion/config/pg.js +3 -3
  684. package/build/esm/orchestrion/config/pg.js.map +1 -1
  685. package/build/esm/orchestrion/config/postgres.js +3 -3
  686. package/build/esm/orchestrion/config/postgres.js.map +1 -1
  687. package/build/esm/orchestrion/config/redis.js +3 -3
  688. package/build/esm/orchestrion/config/redis.js.map +1 -1
  689. package/build/esm/orchestrion/config/remix.js +1 -4
  690. package/build/esm/orchestrion/config/remix.js.map +1 -1
  691. package/build/esm/orchestrion/config/tedious.js +3 -3
  692. package/build/esm/orchestrion/config/tedious.js.map +1 -1
  693. package/build/esm/orchestrion/config/vercel-ai.js +3 -3
  694. package/build/esm/orchestrion/config/vercel-ai.js.map +1 -1
  695. package/build/esm/orchestrion/detect.js +7 -2
  696. package/build/esm/orchestrion/detect.js.map +1 -1
  697. package/build/esm/orchestrion/index.js +51 -51
  698. package/build/esm/orchestrion/index.js.map +1 -1
  699. package/build/esm/orchestrion/instrumentation.js +71 -0
  700. package/build/esm/orchestrion/instrumentation.js.map +1 -0
  701. package/build/esm/orchestrion/moduleInjected.js +19 -0
  702. package/build/esm/orchestrion/moduleInjected.js.map +1 -0
  703. package/build/esm/orchestrion/runtime/hook.js +8 -0
  704. package/build/esm/orchestrion/runtime/hook.js.map +1 -0
  705. package/build/esm/orchestrion/runtime/register.js +34 -45
  706. package/build/esm/orchestrion/runtime/register.js.map +1 -1
  707. package/build/esm/otlp.js +42 -0
  708. package/build/esm/otlp.js.map +1 -0
  709. package/build/esm/package.json +1 -1
  710. package/build/esm/prisma/global.js.map +1 -1
  711. package/build/esm/prisma/index.js.map +1 -1
  712. package/build/esm/prisma/tracing-helper.js +17 -6
  713. package/build/esm/prisma/tracing-helper.js.map +1 -1
  714. package/build/esm/redis/index.js.map +1 -1
  715. package/build/esm/redis/redis-dc-subscriber.js +7 -5
  716. package/build/esm/redis/redis-dc-subscriber.js.map +1 -1
  717. package/build/esm/redis/redis-statement-serializer.js.map +1 -1
  718. package/build/esm/tracing-channel.js +19 -3
  719. package/build/esm/tracing-channel.js.map +1 -1
  720. package/build/esm/utils/setHttpServerSpanRouteAttribute.js +24 -0
  721. package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  722. package/build/esm/vendored/@apm-js-collab/code-transformer/index.js +6 -0
  723. package/build/esm/vendored/@apm-js-collab/code-transformer/index.js.map +1 -0
  724. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/index.js +10 -0
  725. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/index.js.map +1 -0
  726. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/matcher.js +84 -0
  727. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/matcher.js.map +1 -0
  728. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transformer.js +314 -0
  729. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transformer.js.map +1 -0
  730. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transforms.js +440 -0
  731. package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transforms.js.map +1 -0
  732. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js +213 -0
  733. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js.map +1 -0
  734. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js +96 -0
  735. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js.map +1 -0
  736. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js +49 -0
  737. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js.map +1 -0
  738. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js +1067 -0
  739. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js.map +1 -0
  740. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js +12 -0
  741. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js.map +1 -0
  742. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js +116 -0
  743. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js.map +1 -0
  744. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js +101 -0
  745. package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js.map +1 -0
  746. package/build/esm/vendored/@apm-js-collab/tracing-hooks/hook.js +157 -0
  747. package/build/esm/vendored/@apm-js-collab/tracing-hooks/hook.js.map +1 -0
  748. package/build/esm/vendored/@apm-js-collab/tracing-hooks/index.js +86 -0
  749. package/build/esm/vendored/@apm-js-collab/tracing-hooks/index.js.map +1 -0
  750. package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js +13 -0
  751. package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js.map +1 -0
  752. package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js +27 -0
  753. package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js.map +1 -0
  754. package/build/esm/vendored/astring/dist/astring.js +1066 -0
  755. package/build/esm/vendored/astring/dist/astring.js.map +1 -0
  756. package/build/esm/vendored/debug/src/common.js +176 -0
  757. package/build/esm/vendored/debug/src/common.js.map +1 -0
  758. package/build/esm/vendored/debug/src/node.js +183 -0
  759. package/build/esm/vendored/debug/src/node.js.map +1 -0
  760. package/build/esm/vendored/esquery/dist/esquery.esm.min.js +845 -0
  761. package/build/esm/vendored/esquery/dist/esquery.esm.min.js.map +1 -0
  762. package/build/esm/vendored/has-flag/index.js +9 -0
  763. package/build/esm/vendored/has-flag/index.js.map +1 -0
  764. package/build/esm/vendored/meriyah/dist/meriyah.js +9190 -0
  765. package/build/esm/vendored/meriyah/dist/meriyah.js.map +1 -0
  766. package/build/esm/vendored/meriyah/dist/meriyah2.js +9207 -0
  767. package/build/esm/vendored/meriyah/dist/meriyah2.js.map +1 -0
  768. package/build/esm/vendored/module-details-from-path/index.js +41 -0
  769. package/build/esm/vendored/module-details-from-path/index.js.map +1 -0
  770. package/build/esm/vendored/ms/index.js +113 -0
  771. package/build/esm/vendored/ms/index.js.map +1 -0
  772. package/build/esm/vendored/semifies/index.js +109 -0
  773. package/build/esm/vendored/semifies/index.js.map +1 -0
  774. package/build/esm/vendored/source-map/lib/array-set.js +71 -0
  775. package/build/esm/vendored/source-map/lib/array-set.js.map +1 -0
  776. package/build/esm/vendored/source-map/lib/base64-vlq.js +55 -0
  777. package/build/esm/vendored/source-map/lib/base64-vlq.js.map +1 -0
  778. package/build/esm/vendored/source-map/lib/base64.js +40 -0
  779. package/build/esm/vendored/source-map/lib/base64.js.map +1 -0
  780. package/build/esm/vendored/source-map/lib/binary-search.js +55 -0
  781. package/build/esm/vendored/source-map/lib/binary-search.js.map +1 -0
  782. package/build/esm/vendored/source-map/lib/mapping-list.js +40 -0
  783. package/build/esm/vendored/source-map/lib/mapping-list.js.map +1 -0
  784. package/build/esm/vendored/source-map/lib/quick-sort.js +34 -0
  785. package/build/esm/vendored/source-map/lib/quick-sort.js.map +1 -0
  786. package/build/esm/vendored/source-map/lib/source-map-consumer.js +610 -0
  787. package/build/esm/vendored/source-map/lib/source-map-consumer.js.map +1 -0
  788. package/build/esm/vendored/source-map/lib/source-map-generator.js +283 -0
  789. package/build/esm/vendored/source-map/lib/source-map-generator.js.map +1 -0
  790. package/build/esm/vendored/source-map/lib/source-node.js +268 -0
  791. package/build/esm/vendored/source-map/lib/source-node.js.map +1 -0
  792. package/build/esm/vendored/source-map/lib/util.js +300 -0
  793. package/build/esm/vendored/source-map/lib/util.js.map +1 -0
  794. package/build/esm/vendored/source-map/source-map.js +14 -0
  795. package/build/esm/vendored/source-map/source-map.js.map +1 -0
  796. package/build/esm/vendored/supports-color/index.js +102 -0
  797. package/build/esm/vendored/supports-color/index.js.map +1 -0
  798. package/build/esm/vercel-ai/index.js.map +1 -1
  799. package/build/esm/vercel-ai/util.js.map +1 -1
  800. package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js +26 -27
  801. package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
  802. package/build/esm/vercel-ai/vercel-ai-orchestrion-subscriber.js +1 -1
  803. package/build/esm/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
  804. package/build/orchestrion/import-hook.mjs +1 -1
  805. package/build/types/ai/anthropic-ai/constants.d.ts +17 -0
  806. package/build/types/ai/anthropic-ai/constants.d.ts.map +1 -0
  807. package/build/types/ai/anthropic-ai/index.d.ts +26 -0
  808. package/build/types/ai/anthropic-ai/index.d.ts.map +1 -0
  809. package/build/types/ai/anthropic-ai/streaming.d.ts +15 -0
  810. package/build/types/ai/anthropic-ai/streaming.d.ts.map +1 -0
  811. package/build/types/ai/anthropic-ai/types.d.ts +89 -0
  812. package/build/types/ai/anthropic-ai/types.d.ts.map +1 -0
  813. package/build/types/ai/anthropic-ai/utils.d.ts +21 -0
  814. package/build/types/ai/anthropic-ai/utils.d.ts.map +1 -0
  815. package/build/types/ai/core/gen-ai-attributes.d.ts +44 -0
  816. package/build/types/ai/core/gen-ai-attributes.d.ts.map +1 -0
  817. package/build/types/ai/core/utils.d.ts +92 -0
  818. package/build/types/ai/core/utils.d.ts.map +1 -0
  819. package/build/types/ai/google-genai/constants.d.ts +25 -0
  820. package/build/types/ai/google-genai/constants.d.ts.map +1 -0
  821. package/build/types/ai/google-genai/index.d.ts +47 -0
  822. package/build/types/ai/google-genai/index.d.ts.map +1 -0
  823. package/build/types/ai/google-genai/streaming.d.ts +9 -0
  824. package/build/types/ai/google-genai/streaming.d.ts.map +1 -0
  825. package/build/types/ai/google-genai/types.d.ts +141 -0
  826. package/build/types/ai/google-genai/types.d.ts.map +1 -0
  827. package/build/types/ai/google-genai/utils.d.ts +26 -0
  828. package/build/types/ai/google-genai/utils.d.ts.map +1 -0
  829. package/build/types/ai/index.d.ts +13 -0
  830. package/build/types/ai/index.d.ts.map +1 -0
  831. package/build/types/ai/langchain/constants.d.ts +4 -0
  832. package/build/types/ai/langchain/constants.d.ts.map +1 -0
  833. package/build/types/ai/langchain/embeddings.d.ts +39 -0
  834. package/build/types/ai/langchain/embeddings.d.ts.map +1 -0
  835. package/build/types/ai/langchain/index.d.ts +10 -0
  836. package/build/types/ai/langchain/index.d.ts.map +1 -0
  837. package/build/types/ai/langchain/types.d.ts +136 -0
  838. package/build/types/ai/langchain/types.d.ts.map +1 -0
  839. package/build/types/ai/langchain/utils.d.ts +67 -0
  840. package/build/types/ai/langchain/utils.d.ts.map +1 -0
  841. package/build/types/ai/langgraph/constants.d.ts +3 -0
  842. package/build/types/ai/langgraph/constants.d.ts.map +1 -0
  843. package/build/types/ai/langgraph/index.d.ts +44 -0
  844. package/build/types/ai/langgraph/index.d.ts.map +1 -0
  845. package/build/types/ai/langgraph/types.d.ts +64 -0
  846. package/build/types/ai/langgraph/types.d.ts.map +1 -0
  847. package/build/types/ai/langgraph/utils.d.ts +45 -0
  848. package/build/types/ai/langgraph/utils.d.ts.map +1 -0
  849. package/build/types/ai/openai/constants.d.ts +18 -0
  850. package/build/types/ai/openai/constants.d.ts.map +1 -0
  851. package/build/types/ai/openai/index.d.ts +13 -0
  852. package/build/types/ai/openai/index.d.ts.map +1 -0
  853. package/build/types/ai/openai/streaming.d.ts +13 -0
  854. package/build/types/ai/openai/streaming.d.ts.map +1 -0
  855. package/build/types/ai/openai/types.d.ts +217 -0
  856. package/build/types/ai/openai/types.d.ts.map +1 -0
  857. package/build/types/ai/openai/utils.d.ts +20 -0
  858. package/build/types/ai/openai/utils.d.ts.map +1 -0
  859. package/build/types/ai/vercel-ai/constants.d.ts +4 -0
  860. package/build/types/ai/vercel-ai/constants.d.ts.map +1 -0
  861. package/build/types/ai/vercel-ai/index.d.ts +24 -0
  862. package/build/types/ai/vercel-ai/index.d.ts.map +1 -0
  863. package/build/types/ai/vercel-ai/types.d.ts +5 -0
  864. package/build/types/ai/vercel-ai/types.d.ts.map +1 -0
  865. package/build/types/ai/vercel-ai/utils.d.ts +39 -0
  866. package/build/types/ai/vercel-ai/utils.d.ts.map +1 -0
  867. package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts +432 -0
  868. package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts.map +1 -0
  869. package/build/types/ai/workers-ai/constants.d.ts +16 -0
  870. package/build/types/ai/workers-ai/constants.d.ts.map +1 -0
  871. package/build/types/ai/workers-ai/index.d.ts +18 -0
  872. package/build/types/ai/workers-ai/index.d.ts.map +1 -0
  873. package/build/types/ai/workers-ai/streaming.d.ts +9 -0
  874. package/build/types/ai/workers-ai/streaming.d.ts.map +1 -0
  875. package/build/types/ai/workers-ai/types.d.ts +41 -0
  876. package/build/types/ai/workers-ai/types.d.ts.map +1 -0
  877. package/build/types/ai/workers-ai/utils.d.ts +34 -0
  878. package/build/types/ai/workers-ai/utils.d.ts.map +1 -0
  879. package/build/types/async-context.d.ts +15 -0
  880. package/build/types/async-context.d.ts.map +1 -0
  881. package/build/types/exports.d.ts +5 -0
  882. package/build/types/exports.d.ts.map +1 -0
  883. package/build/types/graphql/utils.d.ts +0 -2
  884. package/build/types/graphql/utils.d.ts.map +1 -1
  885. package/build/types/index.d.ts +2 -5
  886. package/build/types/index.d.ts.map +1 -1
  887. package/build/types/index.no-diagnostic-channels.d.ts +2 -0
  888. package/build/types/index.no-diagnostic-channels.d.ts.map +1 -0
  889. package/build/types/integrations/tracing-channel/amqplib.d.ts +2 -2
  890. package/build/types/integrations/tracing-channel/amqplib.d.ts.map +1 -1
  891. package/build/types/integrations/tracing-channel/anthropic.d.ts +3 -4
  892. package/build/types/integrations/tracing-channel/anthropic.d.ts.map +1 -1
  893. package/build/types/integrations/tracing-channel/aws-sdk/constants.d.ts +3 -2
  894. package/build/types/integrations/tracing-channel/aws-sdk/constants.d.ts.map +1 -1
  895. package/build/types/integrations/tracing-channel/aws-sdk/index.d.ts +4 -7
  896. package/build/types/integrations/tracing-channel/aws-sdk/index.d.ts.map +1 -1
  897. package/build/types/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.d.ts.map +1 -1
  898. package/build/types/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.d.ts.map +1 -1
  899. package/build/types/integrations/tracing-channel/aws-sdk/services/dynamodb.d.ts.map +1 -1
  900. package/build/types/integrations/tracing-channel/aws-sdk/services/kinesis.d.ts.map +1 -1
  901. package/build/types/integrations/tracing-channel/aws-sdk/services/lambda.d.ts.map +1 -1
  902. package/build/types/integrations/tracing-channel/aws-sdk/services/s3.d.ts.map +1 -1
  903. package/build/types/integrations/tracing-channel/aws-sdk/services/secretsmanager.d.ts.map +1 -1
  904. package/build/types/integrations/tracing-channel/aws-sdk/services/sns.d.ts.map +1 -1
  905. package/build/types/integrations/tracing-channel/aws-sdk/services/sqs.d.ts.map +1 -1
  906. package/build/types/integrations/tracing-channel/aws-sdk/services/stepfunctions.d.ts.map +1 -1
  907. package/build/types/integrations/tracing-channel/aws-sdk/types.d.ts +0 -2
  908. package/build/types/integrations/tracing-channel/aws-sdk/types.d.ts.map +1 -1
  909. package/build/types/integrations/tracing-channel/dataloader.d.ts +2 -2
  910. package/build/types/integrations/tracing-channel/dataloader.d.ts.map +1 -1
  911. package/build/types/integrations/tracing-channel/express/index.d.ts +3 -4
  912. package/build/types/integrations/tracing-channel/express/index.d.ts.map +1 -1
  913. package/build/types/integrations/tracing-channel/express/instrumentation.d.ts.map +1 -1
  914. package/build/types/integrations/tracing-channel/fastify/instrumentation.d.ts.map +1 -1
  915. package/build/types/integrations/tracing-channel/fastify/utils.d.ts +1 -1
  916. package/build/types/integrations/tracing-channel/firebase/firestore.d.ts +1 -2
  917. package/build/types/integrations/tracing-channel/firebase/firestore.d.ts.map +1 -1
  918. package/build/types/integrations/tracing-channel/firebase/functions.d.ts.map +1 -1
  919. package/build/types/integrations/tracing-channel/firebase/index.d.ts +3 -6
  920. package/build/types/integrations/tracing-channel/firebase/index.d.ts.map +1 -1
  921. package/build/types/integrations/tracing-channel/firebase/instrumentation.d.ts.map +1 -1
  922. package/build/types/integrations/tracing-channel/generic-pool.d.ts +2 -2
  923. package/build/types/integrations/tracing-channel/generic-pool.d.ts.map +1 -1
  924. package/build/types/integrations/tracing-channel/google-genai.d.ts +2 -3
  925. package/build/types/integrations/tracing-channel/google-genai.d.ts.map +1 -1
  926. package/build/types/integrations/tracing-channel/graphql/index.d.ts +7 -8
  927. package/build/types/integrations/tracing-channel/graphql/index.d.ts.map +1 -1
  928. package/build/types/integrations/tracing-channel/hapi-types.d.ts +4 -4
  929. package/build/types/integrations/tracing-channel/hapi-types.d.ts.map +1 -1
  930. package/build/types/integrations/tracing-channel/hapi-utils.d.ts.map +1 -1
  931. package/build/types/integrations/tracing-channel/hapi.d.ts +2 -2
  932. package/build/types/integrations/tracing-channel/hapi.d.ts.map +1 -1
  933. package/build/types/integrations/tracing-channel/ioredis.d.ts +1 -1
  934. package/build/types/integrations/tracing-channel/ioredis.d.ts.map +1 -1
  935. package/build/types/integrations/tracing-channel/kafkajs/index.d.ts +3 -4
  936. package/build/types/integrations/tracing-channel/kafkajs/index.d.ts.map +1 -1
  937. package/build/types/integrations/tracing-channel/kafkajs/semconv.d.ts +9 -9
  938. package/build/types/integrations/tracing-channel/kafkajs/spans.d.ts.map +1 -1
  939. package/build/types/integrations/tracing-channel/knex.d.ts +2 -2
  940. package/build/types/integrations/tracing-channel/knex.d.ts.map +1 -1
  941. package/build/types/integrations/tracing-channel/koa.d.ts +3 -3
  942. package/build/types/integrations/tracing-channel/koa.d.ts.map +1 -1
  943. package/build/types/integrations/tracing-channel/langchain.d.ts +2 -3
  944. package/build/types/integrations/tracing-channel/langchain.d.ts.map +1 -1
  945. package/build/types/integrations/tracing-channel/langgraph.d.ts +2 -3
  946. package/build/types/integrations/tracing-channel/langgraph.d.ts.map +1 -1
  947. package/build/types/integrations/tracing-channel/lru-memoizer.d.ts +2 -2
  948. package/build/types/integrations/tracing-channel/lru-memoizer.d.ts.map +1 -1
  949. package/build/types/integrations/tracing-channel/mongodb.d.ts +2 -2
  950. package/build/types/integrations/tracing-channel/mongodb.d.ts.map +1 -1
  951. package/build/types/integrations/tracing-channel/mongoose.d.ts +2 -2
  952. package/build/types/integrations/tracing-channel/mongoose.d.ts.map +1 -1
  953. package/build/types/integrations/tracing-channel/mysql.d.ts +3 -3
  954. package/build/types/integrations/tracing-channel/mysql.d.ts.map +1 -1
  955. package/build/types/integrations/tracing-channel/mysql2.d.ts +9 -7
  956. package/build/types/integrations/tracing-channel/mysql2.d.ts.map +1 -1
  957. package/build/types/integrations/tracing-channel/openai.d.ts +2 -3
  958. package/build/types/integrations/tracing-channel/openai.d.ts.map +1 -1
  959. package/build/types/integrations/tracing-channel/postgres-js.d.ts +3 -3
  960. package/build/types/integrations/tracing-channel/postgres-js.d.ts.map +1 -1
  961. package/build/types/integrations/tracing-channel/postgres.d.ts +2 -2
  962. package/build/types/integrations/tracing-channel/postgres.d.ts.map +1 -1
  963. package/build/types/integrations/tracing-channel/redis.d.ts +1 -1
  964. package/build/types/integrations/tracing-channel/redis.d.ts.map +1 -1
  965. package/build/types/integrations/tracing-channel/tedious.d.ts +2 -2
  966. package/build/types/integrations/tracing-channel/tedious.d.ts.map +1 -1
  967. package/build/types/integrations/tracing-channel/vercel-ai.d.ts +1 -1
  968. package/build/types/integrations/tracing-channel/vercel-ai.d.ts.map +1 -1
  969. package/build/types/mongodb/mongodb-span.d.ts.map +1 -1
  970. package/build/types/mongoose/mongoose-legacy-span.d.ts +0 -1
  971. package/build/types/mongoose/mongoose-legacy-span.d.ts.map +1 -1
  972. package/build/types/orchestrion/apmTypes.d.ts +173 -0
  973. package/build/types/orchestrion/apmTypes.d.ts.map +1 -0
  974. package/build/types/orchestrion/bundler/esbuild.d.ts +2 -2
  975. package/build/types/orchestrion/bundler/esbuild.d.ts.map +1 -1
  976. package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts +27 -0
  977. package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts.map +1 -0
  978. package/build/types/orchestrion/bundler/options.d.ts +19 -29
  979. package/build/types/orchestrion/bundler/options.d.ts.map +1 -1
  980. package/build/types/orchestrion/bundler/resolve.d.ts +24 -0
  981. package/build/types/orchestrion/bundler/resolve.d.ts.map +1 -0
  982. package/build/types/orchestrion/bundler/rollup.d.ts +2 -2
  983. package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -1
  984. package/build/types/orchestrion/bundler/vite.d.ts +2 -2
  985. package/build/types/orchestrion/bundler/vite.d.ts.map +1 -1
  986. package/build/types/orchestrion/bundler/webpack-loader.d.ts +28 -0
  987. package/build/types/orchestrion/bundler/webpack-loader.d.ts.map +1 -0
  988. package/build/types/orchestrion/bundler/webpack.d.ts +9 -13
  989. package/build/types/orchestrion/bundler/webpack.d.ts.map +1 -1
  990. package/build/types/orchestrion/channels.d.ts +124 -125
  991. package/build/types/orchestrion/channels.d.ts.map +1 -1
  992. package/build/types/orchestrion/config/amqplib.d.ts +21 -22
  993. package/build/types/orchestrion/config/amqplib.d.ts.map +1 -1
  994. package/build/types/orchestrion/config/anthropic-ai.d.ts +5 -7
  995. package/build/types/orchestrion/config/anthropic-ai.d.ts.map +1 -1
  996. package/build/types/orchestrion/config/aws-sdk.d.ts +4 -5
  997. package/build/types/orchestrion/config/aws-sdk.d.ts.map +1 -1
  998. package/build/types/orchestrion/config/channel-integration-definitions.d.ts +20 -20
  999. package/build/types/orchestrion/config/channel-integration-definitions.d.ts.map +1 -1
  1000. package/build/types/orchestrion/config/dataloader.d.ts +17 -19
  1001. package/build/types/orchestrion/config/dataloader.d.ts.map +1 -1
  1002. package/build/types/orchestrion/config/express.d.ts +5 -6
  1003. package/build/types/orchestrion/config/express.d.ts.map +1 -1
  1004. package/build/types/orchestrion/config/firebase.d.ts +23 -24
  1005. package/build/types/orchestrion/config/firebase.d.ts.map +1 -1
  1006. package/build/types/orchestrion/config/generic-pool.d.ts +4 -5
  1007. package/build/types/orchestrion/config/generic-pool.d.ts.map +1 -1
  1008. package/build/types/orchestrion/config/google-genai.d.ts +6 -7
  1009. package/build/types/orchestrion/config/google-genai.d.ts.map +1 -1
  1010. package/build/types/orchestrion/config/graphql.d.ts +4 -5
  1011. package/build/types/orchestrion/config/graphql.d.ts.map +1 -1
  1012. package/build/types/orchestrion/config/hapi.d.ts +3 -4
  1013. package/build/types/orchestrion/config/hapi.d.ts.map +1 -1
  1014. package/build/types/orchestrion/config/index.d.ts +1 -12
  1015. package/build/types/orchestrion/config/index.d.ts.map +1 -1
  1016. package/build/types/orchestrion/config/ioredis.d.ts +3 -3
  1017. package/build/types/orchestrion/config/ioredis.d.ts.map +1 -1
  1018. package/build/types/orchestrion/config/kafkajs.d.ts +3 -4
  1019. package/build/types/orchestrion/config/kafkajs.d.ts.map +1 -1
  1020. package/build/types/orchestrion/config/knex.d.ts +4 -5
  1021. package/build/types/orchestrion/config/knex.d.ts.map +1 -1
  1022. package/build/types/orchestrion/config/koa.d.ts +2 -3
  1023. package/build/types/orchestrion/config/koa.d.ts.map +1 -1
  1024. package/build/types/orchestrion/config/langchain.d.ts +4 -5
  1025. package/build/types/orchestrion/config/langchain.d.ts.map +1 -1
  1026. package/build/types/orchestrion/config/langgraph.d.ts +7 -8
  1027. package/build/types/orchestrion/config/langgraph.d.ts.map +1 -1
  1028. package/build/types/orchestrion/config/lru-memoizer.d.ts +2 -3
  1029. package/build/types/orchestrion/config/lru-memoizer.d.ts.map +1 -1
  1030. package/build/types/orchestrion/config/module-names.d.ts +8 -0
  1031. package/build/types/orchestrion/config/module-names.d.ts.map +1 -0
  1032. package/build/types/orchestrion/config/mongodb.d.ts +20 -21
  1033. package/build/types/orchestrion/config/mongodb.d.ts.map +1 -1
  1034. package/build/types/orchestrion/config/mongoose.d.ts +12 -13
  1035. package/build/types/orchestrion/config/mongoose.d.ts.map +1 -1
  1036. package/build/types/orchestrion/config/mysql.d.ts +2 -3
  1037. package/build/types/orchestrion/config/mysql.d.ts.map +1 -1
  1038. package/build/types/orchestrion/config/mysql2.d.ts +3 -4
  1039. package/build/types/orchestrion/config/mysql2.d.ts.map +1 -1
  1040. package/build/types/orchestrion/config/nestjs.d.ts +9 -10
  1041. package/build/types/orchestrion/config/nestjs.d.ts.map +1 -1
  1042. package/build/types/orchestrion/config/openai.d.ts +4 -5
  1043. package/build/types/orchestrion/config/openai.d.ts.map +1 -1
  1044. package/build/types/orchestrion/config/pg.d.ts +7 -8
  1045. package/build/types/orchestrion/config/pg.d.ts.map +1 -1
  1046. package/build/types/orchestrion/config/postgres.d.ts +5 -5
  1047. package/build/types/orchestrion/config/postgres.d.ts.map +1 -1
  1048. package/build/types/orchestrion/config/redis.d.ts +10 -11
  1049. package/build/types/orchestrion/config/redis.d.ts.map +1 -1
  1050. package/build/types/orchestrion/config/remix.d.ts +4 -5
  1051. package/build/types/orchestrion/config/remix.d.ts.map +1 -1
  1052. package/build/types/orchestrion/config/tedious.d.ts +8 -8
  1053. package/build/types/orchestrion/config/tedious.d.ts.map +1 -1
  1054. package/build/types/orchestrion/config/vercel-ai.d.ts +8 -8
  1055. package/build/types/orchestrion/config/vercel-ai.d.ts.map +1 -1
  1056. package/build/types/orchestrion/detect.d.ts +14 -1
  1057. package/build/types/orchestrion/detect.d.ts.map +1 -1
  1058. package/build/types/orchestrion/index.d.ts +42 -49
  1059. package/build/types/orchestrion/index.d.ts.map +1 -1
  1060. package/build/types/orchestrion/instrumentation.d.ts +37 -0
  1061. package/build/types/orchestrion/instrumentation.d.ts.map +1 -0
  1062. package/build/types/orchestrion/moduleInjected.d.ts +25 -0
  1063. package/build/types/orchestrion/moduleInjected.d.ts.map +1 -0
  1064. package/build/types/orchestrion/runtime/register.d.ts +1 -12
  1065. package/build/types/orchestrion/runtime/register.d.ts.map +1 -1
  1066. package/build/types/otlp.d.ts +49 -0
  1067. package/build/types/otlp.d.ts.map +1 -0
  1068. package/build/types/prisma/index.d.ts +0 -4
  1069. package/build/types/prisma/index.d.ts.map +1 -1
  1070. package/build/types/prisma/tracing-helper.d.ts.map +1 -1
  1071. package/build/types/prisma/types.d.ts +2 -2
  1072. package/build/types/prisma/types.d.ts.map +1 -1
  1073. package/build/types/redis/redis-dc-subscriber.d.ts.map +1 -1
  1074. package/build/types/redis/redis-statement-serializer.d.ts.map +1 -1
  1075. package/build/types/tracing-channel.d.ts +2 -0
  1076. package/build/types/tracing-channel.d.ts.map +1 -1
  1077. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  1078. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
  1079. package/build/types/vercel-ai/index.d.ts +4 -20
  1080. package/build/types/vercel-ai/index.d.ts.map +1 -1
  1081. package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts +2 -5
  1082. package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
  1083. package/package.json +23 -38
  1084. package/build/cjs/orchestrion/bundler/subscribeInjection.js +0 -40
  1085. package/build/cjs/orchestrion/bundler/subscribeInjection.js.map +0 -1
  1086. package/build/cjs/orchestrion/config/subscribe-injection.js +0 -25
  1087. package/build/cjs/orchestrion/config/subscribe-injection.js.map +0 -1
  1088. package/build/cjs/orchestrion/registerChannelIntegration.js +0 -13
  1089. package/build/cjs/orchestrion/registerChannelIntegration.js.map +0 -1
  1090. package/build/esm/orchestrion/bundler/subscribeInjection.js +0 -38
  1091. package/build/esm/orchestrion/bundler/subscribeInjection.js.map +0 -1
  1092. package/build/esm/orchestrion/config/subscribe-injection.js +0 -22
  1093. package/build/esm/orchestrion/config/subscribe-injection.js.map +0 -1
  1094. package/build/esm/orchestrion/registerChannelIntegration.js +0 -11
  1095. package/build/esm/orchestrion/registerChannelIntegration.js.map +0 -1
  1096. package/build/types/orchestrion/bundler/subscribeInjection.d.ts +0 -13
  1097. package/build/types/orchestrion/bundler/subscribeInjection.d.ts.map +0 -1
  1098. package/build/types/orchestrion/config/subscribe-injection.d.ts +0 -31
  1099. package/build/types/orchestrion/config/subscribe-injection.d.ts.map +0 -1
  1100. package/build/types/orchestrion/registerChannelIntegration.d.ts +0 -33
  1101. package/build/types/orchestrion/registerChannelIntegration.d.ts.map +0 -1
  1102. package/build/types-ts3.8/debug-build.d.ts +0 -7
  1103. package/build/types-ts3.8/graphql/graphql-dc-subscriber.d.ts +0 -94
  1104. package/build/types-ts3.8/graphql/index.d.ts +0 -12
  1105. package/build/types-ts3.8/graphql/utils.d.ts +0 -36
  1106. package/build/types-ts3.8/index.d.ts +0 -23
  1107. package/build/types-ts3.8/integrations/tracing-channel/amqplib.d.ts +0 -11
  1108. package/build/types-ts3.8/integrations/tracing-channel/anthropic.d.ts +0 -10
  1109. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/aws-sdk.types.d.ts +0 -43
  1110. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/constants.d.ts +0 -15
  1111. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/index.d.ts +0 -15
  1112. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/MessageAttributes.d.ts +0 -23
  1113. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/ServiceExtension.d.ts +0 -9
  1114. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.d.ts +0 -10
  1115. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.d.ts +0 -14
  1116. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/dynamodb.d.ts +0 -8
  1117. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/index.d.ts +0 -2
  1118. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/kinesis.d.ts +0 -6
  1119. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/lambda.d.ts +0 -9
  1120. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/s3.d.ts +0 -6
  1121. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/secretsmanager.d.ts +0 -8
  1122. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/sns.d.ts +0 -9
  1123. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/sqs.d.ts +0 -9
  1124. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/stepfunctions.d.ts +0 -6
  1125. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/types.d.ts +0 -26
  1126. package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/utils.d.ts +0 -5
  1127. package/build/types-ts3.8/integrations/tracing-channel/dataloader.d.ts +0 -11
  1128. package/build/types-ts3.8/integrations/tracing-channel/express/index.d.ts +0 -18
  1129. package/build/types-ts3.8/integrations/tracing-channel/express/instrumentation.d.ts +0 -4
  1130. package/build/types-ts3.8/integrations/tracing-channel/express/route.d.ts +0 -28
  1131. package/build/types-ts3.8/integrations/tracing-channel/express/types.d.ts +0 -64
  1132. package/build/types-ts3.8/integrations/tracing-channel/fastify/errors.d.ts +0 -12
  1133. package/build/types-ts3.8/integrations/tracing-channel/fastify/index.d.ts +0 -66
  1134. package/build/types-ts3.8/integrations/tracing-channel/fastify/instrumentation.d.ts +0 -10
  1135. package/build/types-ts3.8/integrations/tracing-channel/fastify/types.d.ts +0 -32
  1136. package/build/types-ts3.8/integrations/tracing-channel/fastify/utils.d.ts +0 -9
  1137. package/build/types-ts3.8/integrations/tracing-channel/firebase/firestore-types.d.ts +0 -38
  1138. package/build/types-ts3.8/integrations/tracing-channel/firebase/firestore.d.ts +0 -18
  1139. package/build/types-ts3.8/integrations/tracing-channel/firebase/functions.d.ts +0 -15
  1140. package/build/types-ts3.8/integrations/tracing-channel/firebase/index.d.ts +0 -15
  1141. package/build/types-ts3.8/integrations/tracing-channel/firebase/instrumentation.d.ts +0 -2
  1142. package/build/types-ts3.8/integrations/tracing-channel/generic-pool.d.ts +0 -10
  1143. package/build/types-ts3.8/integrations/tracing-channel/google-genai.d.ts +0 -12
  1144. package/build/types-ts3.8/integrations/tracing-channel/graphql/constants.d.ts +0 -12
  1145. package/build/types-ts3.8/integrations/tracing-channel/graphql/graphql-types.d.ts +0 -135
  1146. package/build/types-ts3.8/integrations/tracing-channel/graphql/index.d.ts +0 -30
  1147. package/build/types-ts3.8/integrations/tracing-channel/graphql/resolvers.d.ts +0 -13
  1148. package/build/types-ts3.8/integrations/tracing-channel/graphql/spans.d.ts +0 -17
  1149. package/build/types-ts3.8/integrations/tracing-channel/graphql/types.d.ts +0 -25
  1150. package/build/types-ts3.8/integrations/tracing-channel/hapi-types.d.ts +0 -65
  1151. package/build/types-ts3.8/integrations/tracing-channel/hapi-utils.d.ts +0 -25
  1152. package/build/types-ts3.8/integrations/tracing-channel/hapi.d.ts +0 -9
  1153. package/build/types-ts3.8/integrations/tracing-channel/ioredis.d.ts +0 -37
  1154. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/consumer.d.ts +0 -8
  1155. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/index.d.ts +0 -17
  1156. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/semconv.d.ts +0 -10
  1157. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/spans.d.ts +0 -38
  1158. package/build/types-ts3.8/integrations/tracing-channel/kafkajs/types.d.ts +0 -40
  1159. package/build/types-ts3.8/integrations/tracing-channel/knex.d.ts +0 -11
  1160. package/build/types-ts3.8/integrations/tracing-channel/koa.d.ts +0 -14
  1161. package/build/types-ts3.8/integrations/tracing-channel/langchain.d.ts +0 -10
  1162. package/build/types-ts3.8/integrations/tracing-channel/langgraph.d.ts +0 -10
  1163. package/build/types-ts3.8/integrations/tracing-channel/lru-memoizer.d.ts +0 -10
  1164. package/build/types-ts3.8/integrations/tracing-channel/mongodb.d.ts +0 -12
  1165. package/build/types-ts3.8/integrations/tracing-channel/mongoose.d.ts +0 -15
  1166. package/build/types-ts3.8/integrations/tracing-channel/mysql.d.ts +0 -12
  1167. package/build/types-ts3.8/integrations/tracing-channel/mysql2.d.ts +0 -15
  1168. package/build/types-ts3.8/integrations/tracing-channel/openai.d.ts +0 -10
  1169. package/build/types-ts3.8/integrations/tracing-channel/postgres-js.d.ts +0 -26
  1170. package/build/types-ts3.8/integrations/tracing-channel/postgres.d.ts +0 -15
  1171. package/build/types-ts3.8/integrations/tracing-channel/redis.d.ts +0 -16
  1172. package/build/types-ts3.8/integrations/tracing-channel/tedious.d.ts +0 -11
  1173. package/build/types-ts3.8/integrations/tracing-channel/vercel-ai.d.ts +0 -9
  1174. package/build/types-ts3.8/mongodb/mongodb-span.d.ts +0 -66
  1175. package/build/types-ts3.8/mongoose/index.d.ts +0 -13
  1176. package/build/types-ts3.8/mongoose/mongoose-dc-subscriber.d.ts +0 -63
  1177. package/build/types-ts3.8/mongoose/mongoose-legacy-span.d.ts +0 -29
  1178. package/build/types-ts3.8/mysql2/index.d.ts +0 -11
  1179. package/build/types-ts3.8/mysql2/mysql2-dc-subscriber.d.ts +0 -59
  1180. package/build/types-ts3.8/node-diagnostics-channel.d.ts +0 -19
  1181. package/build/types-ts3.8/orchestrion/bundler/esbuild.d.ts +0 -20
  1182. package/build/types-ts3.8/orchestrion/bundler/options.d.ts +0 -63
  1183. package/build/types-ts3.8/orchestrion/bundler/rollup.d.ts +0 -17
  1184. package/build/types-ts3.8/orchestrion/bundler/subscribeInjection.d.ts +0 -13
  1185. package/build/types-ts3.8/orchestrion/bundler/vite.d.ts +0 -18
  1186. package/build/types-ts3.8/orchestrion/bundler/webpack.d.ts +0 -24
  1187. package/build/types-ts3.8/orchestrion/channels.d.ts +0 -145
  1188. package/build/types-ts3.8/orchestrion/config/amqplib.d.ts +0 -68
  1189. package/build/types-ts3.8/orchestrion/config/anthropic-ai.d.ts +0 -33
  1190. package/build/types-ts3.8/orchestrion/config/aws-sdk.d.ts +0 -21
  1191. package/build/types-ts3.8/orchestrion/config/channel-integration-definitions.d.ts +0 -139
  1192. package/build/types-ts3.8/orchestrion/config/dataloader.d.ts +0 -48
  1193. package/build/types-ts3.8/orchestrion/config/express.d.ts +0 -32
  1194. package/build/types-ts3.8/orchestrion/config/firebase.d.ts +0 -43
  1195. package/build/types-ts3.8/orchestrion/config/generic-pool.d.ts +0 -33
  1196. package/build/types-ts3.8/orchestrion/config/google-genai.d.ts +0 -32
  1197. package/build/types-ts3.8/orchestrion/config/graphql.d.ts +0 -31
  1198. package/build/types-ts3.8/orchestrion/config/hapi.d.ts +0 -19
  1199. package/build/types-ts3.8/orchestrion/config/index.d.ts +0 -49
  1200. package/build/types-ts3.8/orchestrion/config/ioredis.d.ts +0 -8
  1201. package/build/types-ts3.8/orchestrion/config/kafkajs.d.ts +0 -19
  1202. package/build/types-ts3.8/orchestrion/config/knex.d.ts +0 -10
  1203. package/build/types-ts3.8/orchestrion/config/koa.d.ts +0 -19
  1204. package/build/types-ts3.8/orchestrion/config/langchain.d.ts +0 -20
  1205. package/build/types-ts3.8/orchestrion/config/langgraph.d.ts +0 -23
  1206. package/build/types-ts3.8/orchestrion/config/lru-memoizer.d.ts +0 -18
  1207. package/build/types-ts3.8/orchestrion/config/mongodb.d.ts +0 -61
  1208. package/build/types-ts3.8/orchestrion/config/mongoose.d.ts +0 -42
  1209. package/build/types-ts3.8/orchestrion/config/mysql.d.ts +0 -18
  1210. package/build/types-ts3.8/orchestrion/config/mysql2.d.ts +0 -20
  1211. package/build/types-ts3.8/orchestrion/config/nestjs.d.ts +0 -25
  1212. package/build/types-ts3.8/orchestrion/config/openai.d.ts +0 -20
  1213. package/build/types-ts3.8/orchestrion/config/pg.d.ts +0 -35
  1214. package/build/types-ts3.8/orchestrion/config/postgres.d.ts +0 -10
  1215. package/build/types-ts3.8/orchestrion/config/redis.d.ts +0 -39
  1216. package/build/types-ts3.8/orchestrion/config/remix.d.ts +0 -10
  1217. package/build/types-ts3.8/orchestrion/config/subscribe-injection.d.ts +0 -31
  1218. package/build/types-ts3.8/orchestrion/config/tedious.d.ts +0 -13
  1219. package/build/types-ts3.8/orchestrion/config/vercel-ai.d.ts +0 -13
  1220. package/build/types-ts3.8/orchestrion/detect.d.ts +0 -26
  1221. package/build/types-ts3.8/orchestrion/index.d.ts +0 -139
  1222. package/build/types-ts3.8/orchestrion/registerChannelIntegration.d.ts +0 -33
  1223. package/build/types-ts3.8/orchestrion/runtime/register.d.ts +0 -25
  1224. package/build/types-ts3.8/prisma/global.d.ts +0 -5
  1225. package/build/types-ts3.8/prisma/index.d.ts +0 -45
  1226. package/build/types-ts3.8/prisma/tracing-helper.d.ts +0 -52
  1227. package/build/types-ts3.8/prisma/types.d.ts +0 -40
  1228. package/build/types-ts3.8/redis/index.d.ts +0 -18
  1229. package/build/types-ts3.8/redis/redis-dc-subscriber.d.ts +0 -89
  1230. package/build/types-ts3.8/redis/redis-statement-serializer.d.ts +0 -6
  1231. package/build/types-ts3.8/tracing-channel.d.ts +0 -73
  1232. package/build/types-ts3.8/vercel-ai/index.d.ts +0 -26
  1233. package/build/types-ts3.8/vercel-ai/util.d.ts +0 -30
  1234. package/build/types-ts3.8/vercel-ai/vercel-ai-dc-subscriber.d.ts +0 -72
  1235. package/build/types-ts3.8/vercel-ai/vercel-ai-orchestrion-subscriber.d.ts +0 -12
@@ -2,62 +2,74 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const diagnosticsChannel = require('node:diagnostics_channel');
4
4
  const core = require('@sentry/core');
5
- const debugBuild = require('../../debug-build.js');
5
+ const utils$1 = require('../../ai/core/utils.js');
6
+ const index = require('../../ai/openai/index.js');
7
+ const streaming = require('../../ai/openai/streaming.js');
8
+ const utils = require('../../ai/openai/utils.js');
6
9
  const channels = require('../../orchestrion/channels.js');
7
10
  const tracingChannel = require('../../tracing-channel.js');
11
+ const openai = require('../../orchestrion/config/openai.js');
12
+ const instrumentation = require('../../orchestrion/instrumentation.js');
13
+
14
+ function _interopNamespaceDefault(e) {
15
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
16
+ if (e) {
17
+ for (const k in e) {
18
+ n[k] = e[k];
19
+ }
20
+ }
21
+ n.default = e;
22
+ return n;
23
+ }
24
+
25
+ const diagnosticsChannel__namespace = /*#__PURE__*/_interopNamespaceDefault(diagnosticsChannel);
8
26
 
9
27
  const INTEGRATION_NAME = "OpenAI";
10
- const ORIGIN = "auto.ai.orchestrion.openai";
28
+ const ORIGIN = "auto.ai.openai";
11
29
  const INSTRUMENTED_CHANNELS = [
12
30
  { channel: channels.CHANNELS.OPENAI_CHAT, operation: "chat" },
13
31
  { channel: channels.CHANNELS.OPENAI_EMBEDDINGS, operation: "embeddings" }
14
32
  ];
15
- let subscribed = false;
16
- const _openaiChannelIntegration = ((options = {}) => {
33
+ const _openaiIntegration = ((options = {}) => {
17
34
  return {
18
35
  name: INTEGRATION_NAME,
19
- setupOnce() {
20
- if (!diagnosticsChannel.tracingChannel || subscribed) {
21
- return;
22
- }
23
- subscribed = true;
24
- core.waitForTracingChannelBinding(() => {
25
- for (const { channel, operation } of INSTRUMENTED_CHANNELS) {
26
- debugBuild.DEBUG_BUILD && core.debug.log(`[orchestrion:openai] subscribing to channel "${channel}"`);
27
- tracingChannel.bindTracingChannelToSpan(
28
- diagnosticsChannel.tracingChannel(channel),
29
- (data) => createGenAiSpan(data, operation, options),
30
- {
31
- beforeSpanEnd: (span, data) => {
32
- core.addOpenAiResponseAttributes(span, data.result, core.resolveAIRecordingOptions(options).recordOutputs);
33
- },
34
- // Streaming: the result is a `Stream` consumed later, so instrument it and let it end the span.
35
- deferSpanEnd: ({ span, data }) => wrapStreamResult(span, data, options)
36
- }
37
- );
38
- }
39
- });
36
+ setup(client) {
37
+ instrumentation.invokeOrchestrionInstrumentation(client, openai.openaiModuleNames, instrumentOpenai, [options]);
40
38
  }
41
39
  };
42
40
  });
41
+ function instrumentOpenai(options) {
42
+ for (const { channel, operation } of INSTRUMENTED_CHANNELS) {
43
+ tracingChannel.bindTracingChannelToSpan(
44
+ diagnosticsChannel__namespace.tracingChannel(channel),
45
+ (data) => createGenAiSpan(data, operation, options),
46
+ {
47
+ beforeSpanEnd: (span, data) => {
48
+ utils.addResponseAttributes(span, data.result, utils$1.resolveAIRecordingOptions(options).recordOutputs);
49
+ },
50
+ // Streaming: the result is a `Stream` consumed later, so instrument it and let it end the span.
51
+ deferSpanEnd: ({ span, data }) => wrapStreamResult(span, data, options)
52
+ }
53
+ );
54
+ }
55
+ }
43
56
  function createGenAiSpan(data, operation, options) {
44
57
  if (core._INTERNAL_shouldSkipAiProviderWrapping(INTEGRATION_NAME)) {
45
58
  return void 0;
46
59
  }
47
60
  const args = data.arguments ?? [];
48
61
  const params = args[0];
49
- const { recordInputs } = core.resolveAIRecordingOptions(options);
50
- const enableTruncation = core.shouldEnableTruncation(options.enableTruncation);
51
- const attributes = core.extractOpenAiRequestAttributes(args, operation);
62
+ const { recordInputs } = utils$1.resolveAIRecordingOptions(options);
63
+ const attributes = index.extractRequestAttributes(args, operation);
52
64
  attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = ORIGIN;
53
65
  const model = params?.model || "unknown";
54
66
  const span = core.startInactiveSpan({
55
67
  name: `${operation} ${model}`,
56
- op: `gen_ai.${operation}`,
68
+ op: utils$1.getGenAiSpanOp(operation),
57
69
  attributes
58
70
  });
59
71
  if (recordInputs && params) {
60
- core.addOpenAiRequestAttributes(span, params, operation, enableTruncation);
72
+ index.addRequestAttributes(span, params, operation);
61
73
  }
62
74
  return span;
63
75
  }
@@ -69,13 +81,13 @@ function wrapStreamResult(span, data, options) {
69
81
  if (!isAsyncIterable(result)) {
70
82
  return false;
71
83
  }
72
- const { recordOutputs } = core.resolveAIRecordingOptions(options);
84
+ const { recordOutputs } = utils$1.resolveAIRecordingOptions(options);
73
85
  const iterate = result[Symbol.asyncIterator].bind(result);
74
- const instrumented = core.instrumentOpenAiStream({ [Symbol.asyncIterator]: iterate }, span, recordOutputs ?? false);
86
+ const instrumented = streaming.instrumentStream({ [Symbol.asyncIterator]: iterate }, span, recordOutputs ?? false);
75
87
  result[Symbol.asyncIterator] = () => instrumented;
76
88
  return true;
77
89
  }
78
- const openaiChannelIntegration = core.defineIntegration(_openaiChannelIntegration);
90
+ const openaiIntegration = core.defineIntegration(_openaiIntegration);
79
91
 
80
- exports.openaiChannelIntegration = openaiChannelIntegration;
92
+ exports.openaiIntegration = openaiIntegration;
81
93
  //# sourceMappingURL=openai.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openai.js","sources":["../../../../src/integrations/tracing-channel/openai.ts"],"sourcesContent":["import * as diagnosticsChannel from 'node:diagnostics_channel';\nimport type { IntegrationFn, OpenAiOptions, Span, SpanAttributeValue } from '@sentry/core';\nimport {\n _INTERNAL_shouldSkipAiProviderWrapping,\n addOpenAiRequestAttributes,\n addOpenAiResponseAttributes,\n debug,\n defineIntegration,\n extractOpenAiRequestAttributes,\n instrumentOpenAiStream,\n resolveAIRecordingOptions,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n shouldEnableTruncation,\n startInactiveSpan,\n waitForTracingChannelBinding,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { CHANNELS } from '../../orchestrion/channels';\nimport { bindTracingChannelToSpan } from '../../tracing-channel';\n\n// Same name as the OTel integration by design: when enabled, the OTel 'OpenAI'\n// integration is dropped from the default set (see the Node opt-in loader).\nconst INTEGRATION_NAME = 'OpenAI' as const;\n\n// Distinct from the proxy's `auto.ai.openai` so spans from the orchestrion path\n// are attributable separately from the OTel/proxy one.\nconst ORIGIN = 'auto.ai.orchestrion.openai';\n\n// Each instrumented `create` method maps to the gen_ai operation its span reports.\nconst INSTRUMENTED_CHANNELS = [\n { channel: CHANNELS.OPENAI_CHAT, operation: 'chat' },\n { channel: CHANNELS.OPENAI_EMBEDDINGS, operation: 'embeddings' },\n] as const;\n\n/**\n * The context object orchestrion shares across the tracing-channel lifecycle hooks: `arguments` is the\n * live args array passed to `Completions.create(body, options)`, and Node's `tracingChannel` attaches\n * `result` when the returned promise settles.\n */\ninterface OpenAiChatChannelContext {\n arguments: unknown[];\n result?: unknown;\n}\n\nlet subscribed = false;\n\nconst _openaiChannelIntegration = ((options: OpenAiOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // `tracingChannel` is unavailable before Node 18.19, and a second `init()` would double-subscribe.\n if (!diagnosticsChannel.tracingChannel || subscribed) {\n return;\n }\n subscribed = true;\n\n // `bindTracingChannelToSpan` needs the async-context binding that `initOpenTelemetry()` registers\n // after `setupOnce` runs, so wait for it before subscribing.\n waitForTracingChannelBinding(() => {\n for (const { channel, operation } of INSTRUMENTED_CHANNELS) {\n DEBUG_BUILD && debug.log(`[orchestrion:openai] subscribing to channel \"${channel}\"`);\n bindTracingChannelToSpan(\n diagnosticsChannel.tracingChannel<OpenAiChatChannelContext>(channel),\n data => createGenAiSpan(data, operation, options),\n {\n beforeSpanEnd: (span, data) => {\n addOpenAiResponseAttributes(span, data.result, resolveAIRecordingOptions(options).recordOutputs);\n },\n // Streaming: the result is a `Stream` consumed later, so instrument it and let it end the span.\n deferSpanEnd: ({ span, data }) => wrapStreamResult(span, data, options),\n },\n );\n }\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Build the span for an instrumented `create` call.\n * Returning `undefined` opts the payload out so no span is opened.\n */\nfunction createGenAiSpan(data: OpenAiChatChannelContext, operation: string, options: OpenAiOptions): Span | undefined {\n // When another provider (e.g. LangChain) is driving the SDK, it records the spans itself and marks this\n // provider as skipped; skip here to avoid double spans.\n if (_INTERNAL_shouldSkipAiProviderWrapping(INTEGRATION_NAME)) {\n return undefined;\n }\n\n const args = data.arguments ?? [];\n const params = args[0] as Record<string, unknown> | undefined;\n\n const { recordInputs } = resolveAIRecordingOptions(options);\n const enableTruncation = shouldEnableTruncation(options.enableTruncation);\n\n const attributes = extractOpenAiRequestAttributes(args, operation);\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = ORIGIN;\n const model = (params?.model as string) || 'unknown';\n\n const span = startInactiveSpan({\n name: `${operation} ${model}`,\n op: `gen_ai.${operation}`,\n attributes: attributes as Record<string, SpanAttributeValue>,\n });\n\n if (recordInputs && params) {\n addOpenAiRequestAttributes(span, params, operation, enableTruncation);\n }\n\n return span;\n}\n\ntype AsyncIterableStream = { [Symbol.asyncIterator]: () => AsyncIterator<unknown> };\n\nfunction isAsyncIterable(value: unknown): value is AsyncIterableStream {\n return !!value && typeof (value as AsyncIterableStream)[Symbol.asyncIterator] === 'function';\n}\n\n/**\n * For a streaming `create({ stream: true })` the result is a `Stream` the caller consumes later. We can't\n * swap what `create` returns, but the `Stream` in `data.result` is the same instance the caller holds and\n * `asyncEnd` fires before the caller iterates — so we patch its async iterator in place to run through\n * `instrumentOpenAiStream`, which accumulates the streamed attributes and ends the span when iteration finishes.\n * Only a streaming call resolves to an async-iterable, so that check alone distinguishes it. Returns `true`\n * to hand span-ending ownership to `instrumentOpenAiStream`; `false` for non-streaming/errored results, which end\n * via the normal `beforeSpanEnd` path.\n */\nfunction wrapStreamResult(span: Span, data: OpenAiChatChannelContext, options: OpenAiOptions): boolean {\n const result = data.result;\n if (!isAsyncIterable(result)) {\n return false;\n }\n\n const { recordOutputs } = resolveAIRecordingOptions(options);\n const iterate = result[Symbol.asyncIterator].bind(result);\n const instrumented = instrumentOpenAiStream({ [Symbol.asyncIterator]: iterate }, span, recordOutputs ?? false);\n result[Symbol.asyncIterator] = () => instrumented;\n\n return true;\n}\n\n/**\n * EXPERIMENTAL — orchestrion-driven OpenAI integration. Subscribes to the `orchestrion:openai:*`\n * diagnostics_channels injected into `openai`'s `create` methods (chat completions, responses, embeddings,\n * conversations), so it requires the orchestrion runtime hook or bundler plugin.\n */\nexport const openaiChannelIntegration = defineIntegration(_openaiChannelIntegration);\n"],"names":["CHANNELS","waitForTracingChannelBinding","DEBUG_BUILD","debug","bindTracingChannelToSpan","addOpenAiResponseAttributes","resolveAIRecordingOptions","_INTERNAL_shouldSkipAiProviderWrapping","shouldEnableTruncation","extractOpenAiRequestAttributes","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","startInactiveSpan","addOpenAiRequestAttributes","instrumentOpenAiStream","defineIntegration"],"mappings":";;;;;;;;AAsBA,MAAM,gBAAA,GAAmB,QAAA;AAIzB,MAAM,MAAA,GAAS,4BAAA;AAGf,MAAM,qBAAA,GAAwB;AAAA,EAC5B,EAAE,OAAA,EAASA,iBAAA,CAAS,WAAA,EAAa,WAAW,MAAA,EAAO;AAAA,EACnD,EAAE,OAAA,EAASA,iBAAA,CAAS,iBAAA,EAAmB,WAAW,YAAA;AACpD,CAAA;AAYA,IAAI,UAAA,GAAa,KAAA;AAEjB,MAAM,yBAAA,IAA6B,CAAC,OAAA,GAAyB,EAAC,KAAM;AAClE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN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A,CAAO,MAAA,CAAO,aAAa,CAAA,GAAI,MAAM,YAAA;AAErC,EAAA,OAAO,IAAA;AACT;AAOO,MAAM,wBAAA,GAA2BC,uBAAkB,yBAAyB;;;;"}
1
+ {"version":3,"file":"openai.js","sources":["../../../../src/integrations/tracing-channel/openai.ts"],"sourcesContent":["import * as diagnosticsChannel from 'node:diagnostics_channel';\nimport type { IntegrationFn, Span, SpanAttributeValue } from '@sentry/core';\nimport {\n _INTERNAL_shouldSkipAiProviderWrapping,\n defineIntegration,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n startInactiveSpan,\n} from '@sentry/core';\nimport { getGenAiSpanOp, resolveAIRecordingOptions } from '../../ai/core/utils';\nimport { addRequestAttributes, extractRequestAttributes } from '../../ai/openai';\nimport { instrumentStream } from '../../ai/openai/streaming';\nimport type { OpenAiOptions } from '../../ai/openai/types';\nimport { addResponseAttributes } from '../../ai/openai/utils';\nimport { CHANNELS } from '../../orchestrion/channels';\nimport { bindTracingChannelToSpan } from '../../tracing-channel';\nimport { openaiModuleNames } from '../../orchestrion/config/openai';\nimport { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';\n\n// Same name as the OTel integration by design, so the OTel 'OpenAI'\n// integration is deduplicated out of the default set.\nconst INTEGRATION_NAME = 'OpenAI' as const;\n\nconst ORIGIN = 'auto.ai.openai';\n\n// Each instrumented `create` method maps to the gen_ai operation its span reports.\nconst INSTRUMENTED_CHANNELS = [\n { channel: CHANNELS.OPENAI_CHAT, operation: 'chat' },\n { channel: CHANNELS.OPENAI_EMBEDDINGS, operation: 'embeddings' },\n] as const;\n\n/**\n * The context object orchestrion shares across the tracing-channel lifecycle hooks: `arguments` is the\n * live args array passed to `Completions.create(body, options)`, and Node's `tracingChannel` attaches\n * `result` when the returned promise settles.\n */\ninterface OpenAiChatChannelContext {\n arguments: unknown[];\n result?: unknown;\n}\n\nconst _openaiIntegration = ((options: OpenAiOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n invokeOrchestrionInstrumentation(client, openaiModuleNames, instrumentOpenai, [options]);\n },\n };\n}) satisfies IntegrationFn;\n\nfunction instrumentOpenai(options: OpenAiOptions): void {\n for (const { channel, operation } of INSTRUMENTED_CHANNELS) {\n bindTracingChannelToSpan(\n diagnosticsChannel.tracingChannel<OpenAiChatChannelContext>(channel),\n data => createGenAiSpan(data, operation, options),\n {\n beforeSpanEnd: (span, data) => {\n addResponseAttributes(span, data.result, resolveAIRecordingOptions(options).recordOutputs);\n },\n // Streaming: the result is a `Stream` consumed later, so instrument it and let it end the span.\n deferSpanEnd: ({ span, data }) => wrapStreamResult(span, data, options),\n },\n );\n }\n}\n\n/**\n * Build the span for an instrumented `create` call.\n * Returning `undefined` opts the payload out so no span is opened.\n */\nfunction createGenAiSpan(data: OpenAiChatChannelContext, operation: string, options: OpenAiOptions): Span | undefined {\n // When another provider (e.g. LangChain) is driving the SDK, it records the spans itself and marks this\n // provider as skipped; skip here to avoid double spans.\n if (_INTERNAL_shouldSkipAiProviderWrapping(INTEGRATION_NAME)) {\n return undefined;\n }\n\n const args = data.arguments ?? [];\n const params = args[0] as Record<string, unknown> | undefined;\n\n const { recordInputs } = resolveAIRecordingOptions(options);\n\n const attributes = extractRequestAttributes(args, operation);\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = ORIGIN;\n const model = (params?.model as string) || 'unknown';\n\n const span = startInactiveSpan({\n name: `${operation} ${model}`,\n op: getGenAiSpanOp(operation),\n attributes: attributes as Record<string, SpanAttributeValue>,\n });\n\n if (recordInputs && params) {\n addRequestAttributes(span, params, operation);\n }\n\n return span;\n}\n\ntype AsyncIterableStream = { [Symbol.asyncIterator]: () => AsyncIterator<unknown> };\n\nfunction isAsyncIterable(value: unknown): value is AsyncIterableStream {\n return !!value && typeof (value as AsyncIterableStream)[Symbol.asyncIterator] === 'function';\n}\n\n/**\n * For a streaming `create({ stream: true })` the result is a `Stream` the caller consumes later. We can't\n * swap what `create` returns, but the `Stream` in `data.result` is the same instance the caller holds and\n * `asyncEnd` fires before the caller iterates — so we patch its async iterator in place to run through\n * `instrumentStream`, which accumulates the streamed attributes and ends the span when iteration finishes.\n * Only a streaming call resolves to an async-iterable, so that check alone distinguishes it. Returns `true`\n * to hand span-ending ownership to `instrumentStream`; `false` for non-streaming/errored results, which end\n * via the normal `beforeSpanEnd` path.\n */\nfunction wrapStreamResult(span: Span, data: OpenAiChatChannelContext, options: OpenAiOptions): boolean {\n const result = data.result;\n if (!isAsyncIterable(result)) {\n return false;\n }\n\n const { recordOutputs } = resolveAIRecordingOptions(options);\n const iterate = result[Symbol.asyncIterator].bind(result);\n const instrumented = instrumentStream({ [Symbol.asyncIterator]: iterate }, span, recordOutputs ?? false);\n result[Symbol.asyncIterator] = () => instrumented;\n\n return true;\n}\n\n/**\n * Orchestrion-driven OpenAI integration. Subscribes to the `orchestrion:openai:*`\n * diagnostics_channels injected into `openai`'s `create` methods (chat completions, responses, embeddings,\n * conversations), so it requires the orchestrion runtime hook or bundler plugin.\n */\nexport const openaiIntegration = defineIntegration(_openaiIntegration);\n"],"names":["CHANNELS","invokeOrchestrionInstrumentation","openaiModuleNames","bindTracingChannelToSpan","diagnosticsChannel","addResponseAttributes","resolveAIRecordingOptions","_INTERNAL_shouldSkipAiProviderWrapping","extractRequestAttributes","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","startInactiveSpan","getGenAiSpanOp","addRequestAttributes","instrumentStream","defineIntegration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEzB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAS,CAAA,CA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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,CAAA;;"}
@@ -6,9 +6,24 @@ const core = require('@sentry/core');
6
6
  const debugBuild = require('../../debug-build.js');
7
7
  const channels = require('../../orchestrion/channels.js');
8
8
  const tracingChannel = require('../../tracing-channel.js');
9
+ const postgres = require('../../orchestrion/config/postgres.js');
10
+ const instrumentation = require('../../orchestrion/instrumentation.js');
11
+
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ n[k] = e[k];
17
+ }
18
+ }
19
+ n.default = e;
20
+ return n;
21
+ }
22
+
23
+ const diagnosticsChannel__namespace = /*#__PURE__*/_interopNamespaceDefault(diagnosticsChannel);
9
24
 
10
25
  const INTEGRATION_NAME = "PostgresJs";
11
- const ORIGIN = "auto.db.orchestrion.postgresjs";
26
+ const ORIGIN = "auto.db.postgresjs";
12
27
  const DB_RESPONSE_STATUS_CODE = "db.response.status_code";
13
28
  const NOOP = () => {
14
29
  };
@@ -99,93 +114,90 @@ function wrapQuerySettlement(data, span, sanitizedSqlQuery) {
99
114
  };
100
115
  }
101
116
  }
102
- const _postgresJsChannelIntegration = ((options = {}) => {
103
- const { requireParentSpan, requestHook } = options;
117
+ const _postgresJsIntegration = ((options = {}) => {
104
118
  return {
105
119
  name: INTEGRATION_NAME,
106
- setupOnce() {
107
- if (!diagnosticsChannel.tracingChannel) {
108
- return;
109
- }
110
- debugBuild.DEBUG_BUILD && core.debug.log(`[orchestrion:postgresjs] subscribing to "${channels.CHANNELS.POSTGRESJS_HANDLE}"`);
111
- diagnosticsChannel.tracingChannel(channels.CHANNELS.POSTGRESJS_CONNECTION).subscribe({
112
- start: NOOP,
113
- asyncStart: NOOP,
114
- asyncEnd: NOOP,
115
- error: NOOP,
116
- end: recordConnectionFromChannel
117
- });
118
- diagnosticsChannel.tracingChannel(channels.CHANNELS.POSTGRESJS_EXECUTE).subscribe({
119
- end: NOOP,
120
- asyncStart: NOOP,
121
- asyncEnd: NOOP,
122
- error: NOOP,
123
- start: attachConnectionAttributesFromChannel
124
- });
125
- diagnosticsChannel.tracingChannel(channels.CHANNELS.POSTGRESJS_CONNECT).subscribe({
126
- end: NOOP,
127
- asyncStart: NOOP,
128
- asyncEnd: NOOP,
129
- error: NOOP,
130
- start: attachConnectionAttributesFromChannel
131
- });
132
- core.waitForTracingChannelBinding(() => {
133
- tracingChannel.bindTracingChannelToSpan(
134
- diagnosticsChannel.tracingChannel(channels.CHANNELS.POSTGRESJS_HANDLE),
135
- (data) => {
136
- const query = data.self;
137
- if (!query) {
138
- return void 0;
139
- }
140
- if (query.executed === true || query[QUERY_FROM_INSTRUMENTED_SQL]) {
141
- return void 0;
142
- }
143
- const fullQuery = core._INTERNAL_reconstructPostgresQuery(query.strings);
144
- const sanitizedSqlQuery = core._INTERNAL_sanitizeSqlQuery(fullQuery);
145
- const span = core.startInactiveSpan({
146
- name: sanitizedSqlQuery || "postgresjs.query",
147
- op: "db",
148
- kind: core.SPAN_KIND.CLIENT,
149
- attributes: {
150
- [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,
151
- [attributes.DB_SYSTEM_NAME]: "postgres",
152
- [attributes.DB_QUERY_TEXT]: sanitizedSqlQuery
153
- }
154
- });
155
- query[QUERY_SPAN] = span;
156
- const context = resolveSingleEndpoint();
157
- if (context) {
158
- setConnectionAttributes(span, query, context);
159
- }
160
- if (requestHook) {
161
- try {
162
- requestHook(span, sanitizedSqlQuery, context);
163
- } catch (e) {
164
- span.setAttribute("sentry.hook.error", "requestHook failed");
165
- debugBuild.DEBUG_BUILD && core.debug.error("[orchestrion:postgresjs] error in requestHook:", e);
166
- }
167
- }
168
- wrapQuerySettlement(data, span, sanitizedSqlQuery);
169
- return span;
170
- },
171
- {
172
- requiresParentSpan: requireParentSpan !== false,
173
- deferSpanEnd({ data }) {
174
- if (data[SPAN_ENDED]) {
175
- return true;
176
- }
177
- if ("error" in data) {
178
- return false;
179
- }
180
- return true;
181
- }
182
- }
183
- );
184
- });
120
+ setup(client) {
121
+ instrumentation.invokeOrchestrionInstrumentation(client, postgres.postgresJsModuleNames, instrumentPostgresJs, [options]);
185
122
  }
186
123
  };
187
124
  });
188
- const postgresJsChannelIntegration = core.defineIntegration(_postgresJsChannelIntegration);
125
+ function instrumentPostgresJs(options) {
126
+ const { requireParentSpan, requestHook } = options;
127
+ diagnosticsChannel__namespace.tracingChannel(channels.CHANNELS.POSTGRESJS_CONNECTION).subscribe({
128
+ start: NOOP,
129
+ asyncStart: NOOP,
130
+ asyncEnd: NOOP,
131
+ error: NOOP,
132
+ end: recordConnectionFromChannel
133
+ });
134
+ diagnosticsChannel__namespace.tracingChannel(channels.CHANNELS.POSTGRESJS_EXECUTE).subscribe({
135
+ end: NOOP,
136
+ asyncStart: NOOP,
137
+ asyncEnd: NOOP,
138
+ error: NOOP,
139
+ start: attachConnectionAttributesFromChannel
140
+ });
141
+ diagnosticsChannel__namespace.tracingChannel(channels.CHANNELS.POSTGRESJS_CONNECT).subscribe({
142
+ end: NOOP,
143
+ asyncStart: NOOP,
144
+ asyncEnd: NOOP,
145
+ error: NOOP,
146
+ start: attachConnectionAttributesFromChannel
147
+ });
148
+ tracingChannel.bindTracingChannelToSpan(
149
+ diagnosticsChannel__namespace.tracingChannel(channels.CHANNELS.POSTGRESJS_HANDLE),
150
+ (data) => {
151
+ const query = data.self;
152
+ if (!query) {
153
+ return void 0;
154
+ }
155
+ if (query.executed === true || query[QUERY_FROM_INSTRUMENTED_SQL]) {
156
+ return void 0;
157
+ }
158
+ const fullQuery = core._INTERNAL_reconstructPostgresQuery(query.strings);
159
+ const sanitizedSqlQuery = core._INTERNAL_sanitizeSqlQuery(fullQuery);
160
+ const span = core.startInactiveSpan({
161
+ name: sanitizedSqlQuery || "postgresjs.query",
162
+ op: "db",
163
+ attributes: {
164
+ [attributes.SENTRY_KIND]: "client",
165
+ [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,
166
+ [attributes.DB_SYSTEM_NAME]: "postgres",
167
+ [attributes.DB_QUERY_TEXT]: sanitizedSqlQuery
168
+ }
169
+ });
170
+ query[QUERY_SPAN] = span;
171
+ const context = resolveSingleEndpoint();
172
+ if (context) {
173
+ setConnectionAttributes(span, query, context);
174
+ }
175
+ if (requestHook) {
176
+ try {
177
+ requestHook(span, sanitizedSqlQuery, context);
178
+ } catch (e) {
179
+ span.setAttribute("sentry.hook.error", "requestHook failed");
180
+ debugBuild.DEBUG_BUILD && core.debug.error("[orchestrion:postgresjs] error in requestHook:", e);
181
+ }
182
+ }
183
+ wrapQuerySettlement(data, span, sanitizedSqlQuery);
184
+ return span;
185
+ },
186
+ {
187
+ requiresParentSpan: requireParentSpan !== false,
188
+ deferSpanEnd({ data }) {
189
+ if (data[SPAN_ENDED]) {
190
+ return true;
191
+ }
192
+ if ("error" in data) {
193
+ return false;
194
+ }
195
+ return true;
196
+ }
197
+ }
198
+ );
199
+ }
200
+ const postgresJsIntegration = core.defineIntegration(_postgresJsIntegration);
189
201
 
190
- exports.postgresJsChannelIntegration = postgresJsChannelIntegration;
202
+ exports.postgresJsIntegration = postgresJsIntegration;
191
203
  //# sourceMappingURL=postgres-js.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postgres-js.js","sources":["../../../../src/integrations/tracing-channel/postgres-js.ts"],"sourcesContent":["import * as diagnosticsChannel from 'node:diagnostics_channel';\nimport { DB_QUERY_TEXT, DB_SYSTEM_NAME, ERROR_TYPE } from '@sentry/conventions/attributes';\nimport type { IntegrationFn, PostgresConnectionContext, Span } from '@sentry/core';\nimport {\n _INTERNAL_buildPostgresConnectionContext,\n _INTERNAL_reconstructPostgresQuery,\n _INTERNAL_sanitizeSqlQuery,\n _INTERNAL_setPostgresConnectionAttributes,\n _INTERNAL_setPostgresOperationName,\n debug,\n defineIntegration,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_KIND,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n waitForTracingChannelBinding,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { CHANNELS } from '../../orchestrion/channels';\nimport { bindTracingChannelToSpan } from '../../tracing-channel';\n\n// Same name as the OTel `PostgresJs` integration by design: when this is\n// enabled, the OTel integration of the same name is dropped from the default\n// set (see `experimentalUseDiagnosticsChannelInjection`).\nconst INTEGRATION_NAME = 'PostgresJs' as const;\n\nconst ORIGIN = 'auto.db.orchestrion.postgresjs';\n\n// Not part of `@sentry/conventions`, so we keep it inline (matches the OTel `PostgresJsInstrumentation`).\nconst DB_RESPONSE_STATUS_CODE = 'db.response.status_code';\n\nconst NOOP = (): void => {};\n\n// Same `Symbol.for()` marker the core `instrumentPostgresJsSql` wrapper sets on\n// queries it manually instruments, so we skip them there and never double-span.\nconst QUERY_FROM_INSTRUMENTED_SQL = Symbol.for('sentry.query.from.instrumented.sql');\n// The query span, stashed on the `Query` so the `execute`/`connect` channels can\n// attach connection attributes to it.\nconst QUERY_SPAN = Symbol('sentryPostgresJsSpan');\n// Set once connection attributes are on the span, so the fallback and the\n// `execute`/`connect` channels don't both write them.\nconst CONNECTION_ATTRS_SET = Symbol('sentryPostgresJsConnectionAttrsSet');\n// Set on the channel context once the resolve/reject wrappers have ended the\n// span, so `deferSpanEnd` knows the wrappers own the lifecycle.\nconst SPAN_ENDED = Symbol('sentryPostgresJsSpanEnded');\n\nexport interface PostgresJsChannelIntegrationOptions {\n /**\n * Only create spans when there's already an active parent span. Defaults to\n * `true`, matching the OTel `postgresJsIntegration`.\n */\n requireParentSpan?: boolean;\n /**\n * Hook to modify the query span before the query runs. Receives the span, the\n * sanitized SQL, and (when resolvable) the connection context.\n */\n requestHook?: (span: Span, sanitizedSqlQuery: string, postgresConnectionContext?: PostgresConnectionContext) => void;\n}\n\n/** The `Query` instance postgres.js passes as `self` to `Query.prototype.handle`. */\ninterface PostgresQuery {\n strings?: string[];\n executed?: boolean;\n resolve?: (...args: unknown[]) => unknown;\n reject?: (...args: unknown[]) => unknown;\n}\n\ninterface PostgresJsQueryContext {\n arguments?: unknown[];\n self?: PostgresQuery;\n result?: unknown;\n error?: unknown;\n}\n\n// A connection object -> its resolved context, populated on the `connection`\n// channel and read on the `execute`/`connect` channels (keyed by the same object).\nconst connectionContexts = new WeakMap<object, PostgresConnectionContext>();\n// Distinct endpoints seen so far (value-compared, so N connections to one DB\n// count once). When exactly one endpoint exists — the common case, and the only\n// one the tests exercise — every query resolves to it at handle-start.\nconst endpointRegistry: PostgresConnectionContext[] = [];\n\nfunction registerEndpoint(context: PostgresConnectionContext): void {\n const alreadyKnown = endpointRegistry.some(\n e =>\n e.ATTR_SERVER_ADDRESS === context.ATTR_SERVER_ADDRESS &&\n e.ATTR_SERVER_PORT === context.ATTR_SERVER_PORT &&\n e.ATTR_DB_NAMESPACE === context.ATTR_DB_NAMESPACE,\n );\n if (!alreadyKnown) {\n endpointRegistry.push(context);\n }\n}\n\n/** The single known endpoint, or `undefined` when zero or multiple are known. */\nfunction resolveSingleEndpoint(): PostgresConnectionContext | undefined {\n return endpointRegistry.length === 1 ? endpointRegistry[0] : undefined;\n}\n\n/**\n * Record a connection from the `connection` channel `end` (`result` is the\n * connection object, `arguments[0]` the parsed options), keying its resolved\n * context by the connection object and tracking its endpoint.\n */\nfunction recordConnectionFromChannel(message: PostgresJsQueryContext): void {\n const connection = message.result;\n const options = message.arguments?.[0] as { host?: string[]; port?: number[]; database?: string } | undefined;\n if (!connection || typeof connection !== 'object' || !options) {\n return;\n }\n const context = _INTERNAL_buildPostgresConnectionContext(options);\n connectionContexts.set(connection, context);\n registerEndpoint(context);\n}\n\nfunction setConnectionAttributes(span: Span, query: PostgresQuery, context: PostgresConnectionContext): void {\n const queryRecord = query as Record<symbol, unknown>;\n if (queryRecord[CONNECTION_ATTRS_SET]) {\n return;\n }\n queryRecord[CONNECTION_ATTRS_SET] = true;\n _INTERNAL_setPostgresConnectionAttributes(span, context);\n}\n\n/**\n * Backfill connection attributes onto a query's span from a channel whose `self`\n * is the connection object and `arguments[0]` the query. Shared by the `execute`\n * and `connect` channels; both carry that shape and both resolve the context via\n * the `connectionContexts` WeakMap. Idempotent (guarded inside `setConnectionAttributes`).\n */\nfunction attachConnectionAttributesFromChannel(message: PostgresJsQueryContext): void {\n const connection = message.self as object | undefined;\n const query = message.arguments?.[0] as PostgresQuery | undefined;\n if (!connection || !query) {\n return;\n }\n const span = (query as Record<symbol, unknown>)[QUERY_SPAN] as Span | undefined;\n const context = connectionContexts.get(connection);\n if (span && context) {\n setConnectionAttributes(span, query, context);\n }\n}\n\n/**\n * Wrap `query.resolve`/`query.reject` so the span ends when the query settles.\n *\n * `Query extends Promise` and `async handle()` only dispatches — its promise\n * resolves immediately, long before the query completes. postgres.js signals\n * completion by calling `this.resolve`/`this.reject`, so we own the span end\n * there. Wrapping happens at handle-start because `reject` can fire\n * synchronously during dispatch and `cursor()` reassigns both before executing.\n */\nfunction wrapQuerySettlement(data: PostgresJsQueryContext, span: Span, sanitizedSqlQuery: string): void {\n const query = data.self;\n if (!query) {\n return;\n }\n\n // Claim ownership of ending the span up front, so `deferSpanEnd` defers to the\n // wrapper even if `span.end()` below throws.\n const markEnded = (): void => {\n (data as Record<symbol, unknown>)[SPAN_ENDED] = true;\n };\n\n const originalResolve = query.resolve;\n if (typeof originalResolve === 'function') {\n query.resolve = function (this: unknown, ...resolveArgs: unknown[]): unknown {\n markEnded();\n try {\n const command = (resolveArgs[0] as { command?: string } | undefined)?.command;\n _INTERNAL_setPostgresOperationName(span, sanitizedSqlQuery, command);\n span.end();\n } catch (e) {\n DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error ending span in resolve:', e);\n }\n return originalResolve.apply(this, resolveArgs);\n };\n }\n\n const originalReject = query.reject;\n if (typeof originalReject === 'function') {\n query.reject = function (this: unknown, ...rejectArgs: unknown[]): unknown {\n markEnded();\n try {\n const err = rejectArgs[0] as { message?: string; code?: string; name?: string } | undefined;\n span.setStatus({ code: SPAN_STATUS_ERROR, message: err?.message || 'unknown_error' });\n span.setAttribute(DB_RESPONSE_STATUS_CODE, err?.code || 'unknown');\n span.setAttribute(ERROR_TYPE, err?.name || 'unknown');\n _INTERNAL_setPostgresOperationName(span, sanitizedSqlQuery);\n span.end();\n } catch (e) {\n DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error ending span in reject:', e);\n }\n return originalReject.apply(this, rejectArgs);\n };\n }\n}\n\nconst _postgresJsChannelIntegration = ((options: PostgresJsChannelIntegrationOptions = {}) => {\n const { requireParentSpan, requestHook } = options;\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // `tracingChannel` is unavailable before Node 18.19.\n if (!diagnosticsChannel.tracingChannel) {\n return;\n }\n\n DEBUG_BUILD && debug.log(`[orchestrion:postgresjs] subscribing to \"${CHANNELS.POSTGRESJS_HANDLE}\"`);\n\n // Connection + execute are pure observers (no span, no async binding), so\n // subscribe immediately — factory-time `Connection()` calls happen before\n // `waitForTracingChannelBinding` resolves and must still be recorded.\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_CONNECTION).subscribe({\n start: NOOP,\n asyncStart: NOOP,\n asyncEnd: NOOP,\n error: NOOP,\n end: recordConnectionFromChannel,\n });\n\n // Per-connection attributes for queries reusing an already-open connection\n // (`c.execute(q)`, `self === c`). `execute` is also called bare\n // (`self === undefined`) for the first query on each connection, `fetchState`\n // and `retry`; those miss here (the `connect` channel below covers the first\n // user query, and the single-endpoint fallback covers the common case).\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_EXECUTE).subscribe({\n end: NOOP,\n asyncStart: NOOP,\n asyncEnd: NOOP,\n error: NOOP,\n start: attachConnectionAttributesFromChannel,\n });\n\n // The connection's `connect(query)` method (`self === c`, `arguments[0]` the\n // query) fires when a fresh connection is opened for a query. That first query\n // is later dispatched via a bare `execute` (no `self`), so this is where it\n // gets its connection attributes in multi-endpoint apps.\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_CONNECT).subscribe({\n end: NOOP,\n asyncStart: NOOP,\n asyncEnd: NOOP,\n error: NOOP,\n start: attachConnectionAttributesFromChannel,\n });\n\n // The span-creating `handle` subscription needs the async-context binding\n // that `initOpenTelemetry()` registers after integration setup.\n waitForTracingChannelBinding(() => {\n bindTracingChannelToSpan<PostgresJsQueryContext>(\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_HANDLE),\n data => {\n const query = data.self;\n if (!query) {\n return undefined;\n }\n\n // Opt out of re-entrant `handle()` calls (then/catch/finally re-invoke it, guarded by\n // `executed`) and queries already wrapped by the portable `instrumentPostgresJsSql`. The\n // parent-span requirement is applied via `requiresParentSpan` below.\n if (query.executed === true || (query as Record<symbol, unknown>)[QUERY_FROM_INSTRUMENTED_SQL]) {\n return undefined;\n }\n\n const fullQuery = _INTERNAL_reconstructPostgresQuery(query.strings);\n const sanitizedSqlQuery = _INTERNAL_sanitizeSqlQuery(fullQuery);\n\n // `kind: CLIENT` matches the mysql/pg channel subscribers.\n const span = startInactiveSpan({\n name: sanitizedSqlQuery || 'postgresjs.query',\n op: 'db',\n kind: SPAN_KIND.CLIENT,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n [DB_SYSTEM_NAME]: 'postgres',\n [DB_QUERY_TEXT]: sanitizedSqlQuery,\n },\n });\n\n // Stash for the `execute`/`connect` channels to attach per-connection attributes.\n (query as Record<symbol, unknown>)[QUERY_SPAN] = span;\n\n // Single-endpoint fallback: resolve context now so `requestHook` has it\n // and the first-query-per-connection (bare `execute`) path still gets attrs.\n const context = resolveSingleEndpoint();\n if (context) {\n setConnectionAttributes(span, query, context);\n }\n\n if (requestHook) {\n try {\n requestHook(span, sanitizedSqlQuery, context);\n } catch (e) {\n span.setAttribute('sentry.hook.error', 'requestHook failed');\n DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error in requestHook:', e);\n }\n }\n\n wrapQuerySettlement(data, span, sanitizedSqlQuery);\n\n return span;\n },\n {\n requiresParentSpan: requireParentSpan !== false,\n deferSpanEnd({ data }) {\n // `handle` is async: its promise settles on dispatch (asyncEnd), long\n // before the query does. The resolve/reject wrappers own the ending.\n if ((data as Record<symbol, unknown>)[SPAN_ENDED]) {\n return true; // wrappers already ended it\n }\n if ('error' in data) {\n return false; // `handle()` itself threw; the error subscriber annotated the span, let the helper end it\n }\n // NOTE: for a cursor consumed as an async iterator, only the first batch\n // reaches `handle` (the `executed` guard blocks the rest), so the span\n // ends on the first batch — a pre-existing flaw kept for parity.\n return true; // query in flight; the wrappers will end the span when it settles\n },\n },\n );\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * EXPERIMENTAL — orchestrion-driven postgres.js (`postgres` v3.x) integration.\n *\n * Subscribes to the `orchestrion:postgres:handle` / `:connection` / `:execute` /\n * `:connect` diagnostics channels injected into postgres.js' `Query.prototype.handle`\n * and `Connection`/`execute`/`connect` (in `src/*` and `cjs/src/*`) and creates db\n * spans matching the OTel `postgresJsIntegration`. Requires the orchestrion runtime\n * hook or bundler plugin.\n */\nexport const postgresJsChannelIntegration = defineIntegration(_postgresJsChannelIntegration);\n"],"names":["_INTERNAL_buildPostgresConnectionContext","_INTERNAL_setPostgresConnectionAttributes","_INTERNAL_setPostgresOperationName","DEBUG_BUILD","debug","SPAN_STATUS_ERROR","ERROR_TYPE","CHANNELS","waitForTracingChannelBinding","bindTracingChannelToSpan","_INTERNAL_reconstructPostgresQuery","_INTERNAL_sanitizeSqlQuery","startInactiveSpan","SPAN_KIND","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","DB_SYSTEM_NAME","DB_QUERY_TEXT","defineIntegration"],"mappings":";;;;;;;;;AAwBA,MAAM,gBAAA,GAAmB,YAAA;AAEzB,MAAM,MAAA,GAAS,gCAAA;AAGf,MAAM,uBAAA,GAA0B,yBAAA;AAEhC,MAAM,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,YAC1C,YAAA,CAAa,EAAE,IAAA,EAAK,EAAG;AAGrB,cAAA,IAAK,IAAA,CAAiC,UAAU,CAAA,EAAG;AACjD,gBAAA,OAAO,IAAA;AAAA,cACT;AACA,cAAA,IAAI,WAAW,IAAA,EAAM;AACnB,gBAAA,OAAO,KAAA;AAAA,cACT;AAIA,cAAA,OAAO,IAAA;AAAA,YACT;AAAA;AACF,SACF;AAAA,MACF,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAA,CAAA;AAWO,MAAM,4BAAA,GAA+Ba,uBAAkB,6BAA6B;;;;"}
1
+ {"version":3,"file":"postgres-js.js","sources":["../../../../src/integrations/tracing-channel/postgres-js.ts"],"sourcesContent":["import * as diagnosticsChannel from 'node:diagnostics_channel';\nimport { DB_QUERY_TEXT, DB_SYSTEM_NAME, ERROR_TYPE, SENTRY_KIND } from '@sentry/conventions/attributes';\nimport type { IntegrationFn, PostgresConnectionContext, Span } from '@sentry/core';\nimport {\n _INTERNAL_buildPostgresConnectionContext,\n _INTERNAL_reconstructPostgresQuery,\n _INTERNAL_sanitizeSqlQuery,\n _INTERNAL_setPostgresConnectionAttributes,\n _INTERNAL_setPostgresOperationName,\n debug,\n defineIntegration,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { CHANNELS } from '../../orchestrion/channels';\nimport { bindTracingChannelToSpan } from '../../tracing-channel';\nimport { postgresJsModuleNames } from '../../orchestrion/config/postgres';\nimport { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';\n\n// Same name as the OTel `PostgresJs` integration by design, so the OTel\n// integration of the same name is deduplicated out of the default set.\nconst INTEGRATION_NAME = 'PostgresJs' as const;\n\nconst ORIGIN = 'auto.db.postgresjs';\n\n// Not part of `@sentry/conventions`, so we keep it inline (matches older OTel\n// `PostgresJsInstrumentation`).\nconst DB_RESPONSE_STATUS_CODE = 'db.response.status_code';\n\nconst NOOP = (): void => {};\n\n// Same `Symbol.for()` marker the core `instrumentPostgresJsSql` wrapper sets on\n// queries it manually instruments, so we skip them there and never double-span.\nconst QUERY_FROM_INSTRUMENTED_SQL = Symbol.for('sentry.query.from.instrumented.sql');\n// The query span, stashed on the `Query` so the `execute`/`connect` channels can\n// attach connection attributes to it.\nconst QUERY_SPAN = Symbol('sentryPostgresJsSpan');\n// Set once connection attributes are on the span, so the fallback and the\n// `execute`/`connect` channels don't both write them.\nconst CONNECTION_ATTRS_SET = Symbol('sentryPostgresJsConnectionAttrsSet');\n// Set on the channel context once the resolve/reject wrappers have ended the\n// span, so `deferSpanEnd` knows the wrappers own the lifecycle.\nconst SPAN_ENDED = Symbol('sentryPostgresJsSpanEnded');\n\nexport interface PostgresJsIntegrationOptions {\n /**\n * Only create spans when there's already an active parent span. Defaults to\n * `true`, matching the OTel `postgresJsIntegration`.\n */\n requireParentSpan?: boolean;\n /**\n * Hook to modify the query span before the query runs. Receives the span, the\n * sanitized SQL, and (when resolvable) the connection context.\n */\n requestHook?: (span: Span, sanitizedSqlQuery: string, postgresConnectionContext?: PostgresConnectionContext) => void;\n}\n\n/** The `Query` instance postgres.js passes as `self` to `Query.prototype.handle`. */\ninterface PostgresQuery {\n strings?: string[];\n executed?: boolean;\n resolve?: (...args: unknown[]) => unknown;\n reject?: (...args: unknown[]) => unknown;\n}\n\ninterface PostgresJsQueryContext {\n arguments?: unknown[];\n self?: PostgresQuery;\n result?: unknown;\n error?: unknown;\n}\n\n// A connection object -> its resolved context, populated on the `connection`\n// channel and read on the `execute`/`connect` channels (keyed by the same object).\nconst connectionContexts = new WeakMap<object, PostgresConnectionContext>();\n// Distinct endpoints seen so far (value-compared, so N connections to one DB\n// count once). When exactly one endpoint exists — the common case, and the only\n// one the tests exercise — every query resolves to it at handle-start.\nconst endpointRegistry: PostgresConnectionContext[] = [];\n\nfunction registerEndpoint(context: PostgresConnectionContext): void {\n const alreadyKnown = endpointRegistry.some(\n e =>\n e.ATTR_SERVER_ADDRESS === context.ATTR_SERVER_ADDRESS &&\n e.ATTR_SERVER_PORT === context.ATTR_SERVER_PORT &&\n e.ATTR_DB_NAMESPACE === context.ATTR_DB_NAMESPACE,\n );\n if (!alreadyKnown) {\n endpointRegistry.push(context);\n }\n}\n\n/** The single known endpoint, or `undefined` when zero or multiple are known. */\nfunction resolveSingleEndpoint(): PostgresConnectionContext | undefined {\n return endpointRegistry.length === 1 ? endpointRegistry[0] : undefined;\n}\n\n/**\n * Record a connection from the `connection` channel `end` (`result` is the\n * connection object, `arguments[0]` the parsed options), keying its resolved\n * context by the connection object and tracking its endpoint.\n */\nfunction recordConnectionFromChannel(message: PostgresJsQueryContext): void {\n const connection = message.result;\n const options = message.arguments?.[0] as { host?: string[]; port?: number[]; database?: string } | undefined;\n if (!connection || typeof connection !== 'object' || !options) {\n return;\n }\n const context = _INTERNAL_buildPostgresConnectionContext(options);\n connectionContexts.set(connection, context);\n registerEndpoint(context);\n}\n\nfunction setConnectionAttributes(span: Span, query: PostgresQuery, context: PostgresConnectionContext): void {\n const queryRecord = query as Record<symbol, unknown>;\n if (queryRecord[CONNECTION_ATTRS_SET]) {\n return;\n }\n queryRecord[CONNECTION_ATTRS_SET] = true;\n _INTERNAL_setPostgresConnectionAttributes(span, context);\n}\n\n/**\n * Backfill connection attributes onto a query's span from a channel whose `self`\n * is the connection object and `arguments[0]` the query. Shared by the `execute`\n * and `connect` channels; both carry that shape and both resolve the context via\n * the `connectionContexts` WeakMap. Idempotent (guarded inside\n * `setConnectionAttributes`).\n */\nfunction attachConnectionAttributesFromChannel(message: PostgresJsQueryContext): void {\n const connection = message.self;\n const query = message.arguments?.[0] as PostgresQuery | undefined;\n if (!connection || !query) {\n return;\n }\n const span = (query as Record<symbol, unknown>)[QUERY_SPAN] as Span | undefined;\n const context = connectionContexts.get(connection);\n if (span && context) {\n setConnectionAttributes(span, query, context);\n }\n}\n\n/**\n * Wrap `query.resolve`/`query.reject` so the span ends when the query settles.\n *\n * `Query extends Promise` and `async handle()` only dispatches — its promise\n * resolves immediately, long before the query completes. postgres.js signals\n * completion by calling `this.resolve`/`this.reject`, so we own the span end\n * there. Wrapping happens at handle-start because `reject` can fire\n * synchronously during dispatch and `cursor()` reassigns both before executing.\n */\nfunction wrapQuerySettlement(data: PostgresJsQueryContext, span: Span, sanitizedSqlQuery: string): void {\n const query = data.self;\n if (!query) {\n return;\n }\n\n // Claim ownership of ending the span up front, so `deferSpanEnd` defers to the\n // wrapper even if `span.end()` below throws.\n const markEnded = (): void => {\n (data as Record<symbol, unknown>)[SPAN_ENDED] = true;\n };\n\n const originalResolve = query.resolve;\n if (typeof originalResolve === 'function') {\n query.resolve = function (this: unknown, ...resolveArgs: unknown[]): unknown {\n markEnded();\n try {\n const command = (resolveArgs[0] as { command?: string } | undefined)?.command;\n _INTERNAL_setPostgresOperationName(span, sanitizedSqlQuery, command);\n span.end();\n } catch (e) {\n DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error ending span in resolve:', e);\n }\n return originalResolve.apply(this, resolveArgs);\n };\n }\n\n const originalReject = query.reject;\n if (typeof originalReject === 'function') {\n query.reject = function (this: unknown, ...rejectArgs: unknown[]): unknown {\n markEnded();\n try {\n const err = rejectArgs[0] as { message?: string; code?: string; name?: string } | undefined;\n span.setStatus({ code: SPAN_STATUS_ERROR, message: err?.message || 'unknown_error' });\n span.setAttribute(DB_RESPONSE_STATUS_CODE, err?.code || 'unknown');\n span.setAttribute(ERROR_TYPE, err?.name || 'unknown');\n _INTERNAL_setPostgresOperationName(span, sanitizedSqlQuery);\n span.end();\n } catch (e) {\n DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error ending span in reject:', e);\n }\n return originalReject.apply(this, rejectArgs);\n };\n }\n}\n\nconst _postgresJsIntegration = ((options: PostgresJsIntegrationOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n invokeOrchestrionInstrumentation(client, postgresJsModuleNames, instrumentPostgresJs, [options]);\n },\n };\n}) satisfies IntegrationFn;\n\nfunction instrumentPostgresJs(options: PostgresJsIntegrationOptions): void {\n const { requireParentSpan, requestHook } = options;\n\n // Connection + execute are pure observers (no span, no async binding).\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_CONNECTION).subscribe({\n start: NOOP,\n asyncStart: NOOP,\n asyncEnd: NOOP,\n error: NOOP,\n end: recordConnectionFromChannel,\n });\n\n // Per-connection attributes for queries reusing an already-open connection\n // (`c.execute(q)`, `self === c`). `execute` is also called bare\n // (`self === undefined`) for the first query on each connection, `fetchState`\n // and `retry`; those miss here (the `connect` channel below covers the first\n // user query, and the single-endpoint fallback covers the common case).\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_EXECUTE).subscribe({\n end: NOOP,\n asyncStart: NOOP,\n asyncEnd: NOOP,\n error: NOOP,\n start: attachConnectionAttributesFromChannel,\n });\n\n // The connection's `connect(query)` method (`self === c`, `arguments[0]` the\n // query) fires when a fresh connection is opened for a query. That first query\n // is later dispatched via a bare `execute` (no `self`), so this is where it\n // gets its connection attributes in multi-endpoint apps.\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_CONNECT).subscribe({\n end: NOOP,\n asyncStart: NOOP,\n asyncEnd: NOOP,\n error: NOOP,\n start: attachConnectionAttributesFromChannel,\n });\n\n bindTracingChannelToSpan<PostgresJsQueryContext>(\n diagnosticsChannel.tracingChannel<PostgresJsQueryContext>(CHANNELS.POSTGRESJS_HANDLE),\n data => {\n const query = data.self;\n if (!query) {\n return undefined;\n }\n\n // Opt out of re-entrant `handle()` calls (then/catch/finally re-invoke\n // it, guarded by `executed`) and queries already wrapped by the portable\n // `instrumentPostgresJsSql`. The parent-span requirement is applied via\n // `requiresParentSpan` below.\n if (query.executed === true || (query as Record<symbol, unknown>)[QUERY_FROM_INSTRUMENTED_SQL]) {\n return undefined;\n }\n\n const fullQuery = _INTERNAL_reconstructPostgresQuery(query.strings);\n const sanitizedSqlQuery = _INTERNAL_sanitizeSqlQuery(fullQuery);\n\n // `sentry.kind: client` matches the mysql/pg channel subscribers.\n const span = startInactiveSpan({\n name: sanitizedSqlQuery || 'postgresjs.query',\n op: 'db',\n attributes: {\n [SENTRY_KIND]: 'client',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n [DB_SYSTEM_NAME]: 'postgres',\n [DB_QUERY_TEXT]: sanitizedSqlQuery,\n },\n });\n\n // Stash for the `execute`/`connect` channels to attach per-connection attributes.\n (query as Record<symbol, unknown>)[QUERY_SPAN] = span;\n\n // Single-endpoint fallback: resolve context now so `requestHook` has it\n // and the first-query-per-connection (bare `execute`) path still gets attrs.\n const context = resolveSingleEndpoint();\n if (context) {\n setConnectionAttributes(span, query, context);\n }\n\n if (requestHook) {\n try {\n requestHook(span, sanitizedSqlQuery, context);\n } catch (e) {\n span.setAttribute('sentry.hook.error', 'requestHook failed');\n DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error in requestHook:', e);\n }\n }\n\n wrapQuerySettlement(data, span, sanitizedSqlQuery);\n\n return span;\n },\n {\n requiresParentSpan: requireParentSpan !== false,\n deferSpanEnd({ data }) {\n // `handle` is async: its promise settles on dispatch (asyncEnd), long\n // before the query does. The resolve/reject wrappers own the ending.\n if ((data as Record<symbol, unknown>)[SPAN_ENDED]) {\n return true; // wrappers already ended it\n }\n if ('error' in data) {\n return false; // `handle()` itself threw; the error subscriber annotated the span, let the helper end it\n }\n // NOTE: for a cursor consumed as an async iterator, only the first batch\n // reaches `handle` (the `executed` guard blocks the rest), so the span\n // ends on the first batch — a pre-existing flaw kept for parity.\n return true; // query in flight; the wrappers will end the span when it settles\n },\n },\n );\n}\n\n/**\n * Orchestrion-driven postgres.js (`postgres` v3.x) integration.\n *\n * Subscribes to the `orchestrion:postgres:handle` / `:connection` / `:execute` /\n * `:connect` diagnostics channels injected into postgres.js' `Query.prototype.handle`\n * and `Connection`/`execute`/`connect` (in `src/*` and `cjs/src/*`) and creates db\n * spans matching the OTel `postgresJsIntegration`. Requires the orchestrion runtime\n * hook or bundler plugin.\n */\nexport const postgresJsIntegration = defineIntegration(_postgresJsIntegration);\n"],"names":["_INTERNAL_buildPostgresConnectionContext","_INTERNAL_setPostgresConnectionAttributes","_INTERNAL_setPostgresOperationName","DEBUG_BUILD","debug","SPAN_STATUS_ERROR","ERROR_TYPE","invokeOrchestrionInstrumentation","postgresJsModuleNames","diagnosticsChannel","CHANNELS","bindTracingChannelToSpan","_INTERNAL_reconstructPostgresQuery","_INTERNAL_sanitizeSqlQuery","startInactiveSpan","SENTRY_KIND","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","DB_SYSTEM_NAME","DB_QUERY_TEXT","defineIntegration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEzB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAIf,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACT;AAIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAO,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACT;AAAA,CAAA,CAAA,CAAA,CAAA;AACF,CAAA,CAAA,CACF;AACF;AAWO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwBe,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,CAAA;;"}
@@ -1,13 +1,28 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const diagnosticsChannel = require('node:diagnostics_channel');
4
+ const attributes = require('@sentry/conventions/attributes');
4
5
  const core = require('@sentry/core');
5
- const debugBuild = require('../../debug-build.js');
6
6
  const channels = require('../../orchestrion/channels.js');
7
7
  const tracingChannel = require('../../tracing-channel.js');
8
+ const pg = require('../../orchestrion/config/pg.js');
9
+ const instrumentation = require('../../orchestrion/instrumentation.js');
10
+
11
+ function _interopNamespaceDefault(e) {
12
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
13
+ if (e) {
14
+ for (const k in e) {
15
+ n[k] = e[k];
16
+ }
17
+ }
18
+ n.default = e;
19
+ return n;
20
+ }
21
+
22
+ const diagnosticsChannel__namespace = /*#__PURE__*/_interopNamespaceDefault(diagnosticsChannel);
8
23
 
9
24
  const INTEGRATION_NAME = "Postgres";
10
- const ORIGIN = "auto.db.orchestrion.postgres";
25
+ const ORIGIN = "auto.db.postgres";
11
26
  const ATTR_DB_SYSTEM = "db.system";
12
27
  const ATTR_DB_NAME = "db.name";
13
28
  const ATTR_DB_CONNECTION_STRING = "db.connection_string";
@@ -22,30 +37,31 @@ const DB_SYSTEM_POSTGRESQL = "postgresql";
22
37
  const SPAN_QUERY_FALLBACK = "pg.query";
23
38
  const SPAN_CONNECT = "pg.connect";
24
39
  const SPAN_POOL_CONNECT = "pg-pool.connect";
25
- const _postgresChannelIntegration = ((options = {}) => {
40
+ const _postgresIntegration = ((options = {}) => {
26
41
  return {
27
42
  name: INTEGRATION_NAME,
28
- setupOnce() {
29
- if (!diagnosticsChannel.tracingChannel) {
30
- return;
31
- }
32
- core.waitForTracingChannelBinding(() => {
33
- subscribeQueryLikeChannel(channels.CHANNELS.PG_QUERY, querySpanOptions, { deferStreamedResult: true });
34
- if (!options.ignoreConnectSpans) {
35
- subscribeQueryLikeChannel(channels.CHANNELS.PG_CONNECT, connectSpanOptions);
36
- subscribeQueryLikeChannel(channels.CHANNELS.PGPOOL_CONNECT, poolConnectSpanOptions);
37
- }
38
- });
43
+ setup(client) {
44
+ instrumentation.invokeOrchestrionInstrumentation(client, pg.pgModuleNames, instrumentPostgres, [options]);
39
45
  }
40
46
  };
41
47
  });
48
+ function instrumentPostgres(options) {
49
+ subscribeQueryLikeChannel(channels.CHANNELS.PG_QUERY, querySpanOptions, { deferStreamedResult: true });
50
+ if (!options.ignoreConnectSpans) {
51
+ subscribeQueryLikeChannel(channels.CHANNELS.PG_CONNECT, connectSpanOptions);
52
+ subscribeQueryLikeChannel(channels.CHANNELS.PGPOOL_CONNECT, poolConnectSpanOptions);
53
+ }
54
+ }
42
55
  function subscribeQueryLikeChannel(channelName, getSpanOptions, { deferStreamedResult = false } = {}) {
43
- debugBuild.DEBUG_BUILD && core.debug.log(`[orchestrion:pg] subscribing to channel "${channelName}"`);
44
56
  tracingChannel.bindTracingChannelToSpan(
45
- diagnosticsChannel.tracingChannel(channelName),
57
+ diagnosticsChannel__namespace.tracingChannel(channelName),
46
58
  (data) => {
47
59
  data._sentryCallerScope = core.getCurrentScope();
48
- return core.startInactiveSpan({ ...getSpanOptions(data), kind: core.SPAN_KIND.CLIENT });
60
+ const spanOptions = getSpanOptions(data);
61
+ return core.startInactiveSpan({
62
+ ...spanOptions,
63
+ attributes: { ...spanOptions.attributes, [attributes.SENTRY_KIND]: "client" }
64
+ });
49
65
  },
50
66
  // `connect`/`pool-connect` resolve with a persistent `Client` (itself an
51
67
  // `EventEmitter`), which is NOT a streamed result. Deferring their span
@@ -164,7 +180,7 @@ function getConnectionString(params) {
164
180
  const database = params.database || "";
165
181
  return `postgresql://${host}:${port}/${database}`;
166
182
  }
167
- const postgresChannelIntegration = core.defineIntegration(_postgresChannelIntegration);
183
+ const postgresIntegration = core.defineIntegration(_postgresIntegration);
168
184
 
169
- exports.postgresChannelIntegration = postgresChannelIntegration;
185
+ exports.postgresIntegration = postgresIntegration;
170
186
  //# sourceMappingURL=postgres.js.map