@depup/sentry__node 10.47.0-depup.1 → 10.67.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (989) hide show
  1. package/README.md +5 -4
  2. package/build/cjs/debug-build.js +0 -5
  3. package/build/cjs/debug-build.js.map +1 -1
  4. package/build/cjs/index.js +81 -68
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/init.js +0 -6
  7. package/build/cjs/init.js.map +1 -1
  8. package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
  9. package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
  10. package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
  11. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  12. package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
  13. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  14. package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
  15. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  16. package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
  17. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  18. package/build/cjs/integrations/fs/index.js +17 -0
  19. package/build/cjs/integrations/fs/index.js.map +1 -0
  20. package/build/cjs/integrations/fs/vendored/constants.js +138 -0
  21. package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
  22. package/build/cjs/integrations/fs/vendored/instrumentation.js +230 -0
  23. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
  24. package/build/cjs/integrations/fs/vendored/utils.js +31 -0
  25. package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
  26. package/build/cjs/integrations/http.js +19 -175
  27. package/build/cjs/integrations/http.js.map +1 -1
  28. package/build/cjs/integrations/node-fetch.js +10 -94
  29. package/build/cjs/integrations/node-fetch.js.map +1 -1
  30. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +15 -0
  31. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  32. package/build/cjs/integrations/tracing/amqplib/index.js +21 -0
  33. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
  34. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
  35. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  36. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
  37. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  38. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +26 -0
  39. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  40. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +17 -0
  41. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  42. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +129 -0
  43. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  44. package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
  45. package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
  46. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  47. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  48. package/build/cjs/integrations/tracing/connect/index.js +35 -0
  49. package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
  50. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +16 -0
  51. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  52. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +137 -0
  53. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  54. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
  55. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  56. package/build/cjs/integrations/tracing/connect/vendored/utils.js +36 -0
  57. package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
  58. package/build/cjs/integrations/tracing/dataloader/index.js +26 -0
  59. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
  60. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +217 -0
  61. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  62. package/build/cjs/integrations/tracing/express.js +44 -147
  63. package/build/cjs/integrations/tracing/express.js.map +1 -1
  64. package/build/cjs/integrations/tracing/fastify/index.js +19 -234
  65. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  66. package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
  67. package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
  68. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
  69. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  70. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +78 -162
  71. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  72. package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
  73. package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
  74. package/build/cjs/integrations/tracing/firebase/firebase.js +4 -33
  75. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  76. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  77. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  78. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +73 -215
  79. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  80. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  81. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  82. package/build/cjs/integrations/tracing/genericPool/index.js +21 -0
  83. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -0
  84. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +122 -0
  85. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  86. package/build/cjs/integrations/tracing/google-genai/index.js +3 -58
  87. package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
  88. package/build/cjs/integrations/tracing/google-genai/instrumentation.js +23 -43
  89. package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  90. package/build/cjs/integrations/tracing/graphql/index.js +34 -0
  91. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -0
  92. package/build/cjs/integrations/tracing/graphql/vendored/enum.js +47 -0
  93. package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  94. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
  95. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  96. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +329 -0
  97. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  98. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +6 -0
  99. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  100. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +8 -0
  101. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  102. package/build/cjs/integrations/tracing/graphql/vendored/utils.js +265 -0
  103. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  104. package/build/cjs/integrations/tracing/hapi/index.js +16 -91
  105. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  106. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +11 -0
  107. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  108. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +255 -0
  109. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  110. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +24 -0
  111. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  112. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +85 -0
  113. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  114. package/build/cjs/integrations/tracing/hono/constants.js +6 -7
  115. package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
  116. package/build/cjs/integrations/tracing/hono/index.js +26 -77
  117. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  118. package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
  119. package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
  120. package/build/cjs/integrations/tracing/index.js +74 -83
  121. package/build/cjs/integrations/tracing/index.js.map +1 -1
  122. package/build/cjs/integrations/tracing/kafka/index.js +21 -0
  123. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
  124. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +237 -0
  125. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  126. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +22 -0
  127. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  128. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +114 -0
  129. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  130. package/build/cjs/integrations/tracing/knex/index.js +26 -0
  131. package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
  132. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +135 -0
  133. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  134. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +10 -0
  135. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  136. package/build/cjs/integrations/tracing/knex/vendored/utils.js +84 -0
  137. package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
  138. package/build/cjs/integrations/tracing/koa/index.js +46 -0
  139. package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
  140. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
  141. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  142. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +127 -0
  143. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  144. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
  145. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  146. package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
  147. package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
  148. package/build/cjs/integrations/tracing/koa/vendored/utils.js +36 -0
  149. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
  150. package/build/cjs/integrations/tracing/langchain/index.js +3 -96
  151. package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
  152. package/build/cjs/integrations/tracing/langchain/instrumentation.js +80 -140
  153. package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
  154. package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
  155. package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
  156. package/build/cjs/integrations/tracing/langgraph/instrumentation.js +76 -40
  157. package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  158. package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
  159. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
  160. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +38 -0
  161. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  162. package/build/cjs/integrations/tracing/mongo/index.js +21 -0
  163. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
  164. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +129 -0
  165. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  166. package/build/cjs/integrations/tracing/mongo/vendored/patches.js +150 -0
  167. package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  168. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +40 -0
  169. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  170. package/build/cjs/integrations/tracing/mongoose/index.js +22 -0
  171. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
  172. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +240 -0
  173. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  174. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +41 -0
  175. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  176. package/build/cjs/integrations/tracing/mysql/index.js +21 -0
  177. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
  178. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +185 -0
  179. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  180. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +8 -0
  181. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  182. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +38 -0
  183. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  184. package/build/cjs/integrations/tracing/mysql2/index.js +22 -0
  185. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
  186. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +138 -0
  187. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  188. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +8 -0
  189. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  190. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +81 -0
  191. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  192. package/build/cjs/integrations/tracing/openai/index.js +3 -58
  193. package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
  194. package/build/cjs/integrations/tracing/openai/instrumentation.js +25 -49
  195. package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
  196. package/build/cjs/integrations/tracing/postgres/index.js +27 -0
  197. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
  198. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +11 -0
  199. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  200. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
  201. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  202. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +225 -0
  203. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  204. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +8 -0
  205. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  206. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +151 -0
  207. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  208. package/build/cjs/integrations/tracing/postgresjs.js +77 -190
  209. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  210. package/build/cjs/integrations/tracing/redis/cache.js +41 -0
  211. package/build/cjs/integrations/tracing/redis/cache.js.map +1 -0
  212. package/build/cjs/integrations/tracing/redis/index.js +50 -0
  213. package/build/cjs/integrations/tracing/redis/index.js.map +1 -0
  214. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +147 -0
  215. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  216. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +445 -0
  217. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  218. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +8 -0
  219. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  220. package/build/cjs/integrations/tracing/tedious/index.js +21 -0
  221. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
  222. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +154 -0
  223. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  224. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +8 -0
  225. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  226. package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
  227. package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  228. package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
  229. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
  230. package/build/cjs/integrations/tracing/vercelai/index.js +7 -53
  231. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  232. package/build/cjs/integrations/tracing/vercelai/instrumentation.js +60 -158
  233. package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  234. package/build/cjs/preload.js +1 -14
  235. package/build/cjs/preload.js.map +1 -1
  236. package/build/cjs/sdk/diagnosticsChannelInjection.js +21 -0
  237. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -0
  238. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +33 -0
  239. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  240. package/build/cjs/sdk/index.js +33 -35
  241. package/build/cjs/sdk/index.js.map +1 -1
  242. package/build/cjs/sdk/initOtel.js +74 -60
  243. package/build/cjs/sdk/initOtel.js.map +1 -1
  244. package/build/cjs/utils/redisCache.js +24 -52
  245. package/build/cjs/utils/redisCache.js.map +1 -1
  246. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +21 -0
  247. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  248. package/build/esm/debug-build.js +0 -5
  249. package/build/esm/debug-build.js.map +1 -1
  250. package/build/esm/index.js +24 -22
  251. package/build/esm/index.js.map +1 -1
  252. package/build/esm/init.js +0 -6
  253. package/build/esm/init.js.map +1 -1
  254. package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
  255. package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
  256. package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
  257. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  258. package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
  259. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  260. package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
  261. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  262. package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
  263. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  264. package/build/esm/integrations/fs/index.js +15 -0
  265. package/build/esm/integrations/fs/index.js.map +1 -0
  266. package/build/esm/integrations/fs/vendored/constants.js +134 -0
  267. package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
  268. package/build/esm/integrations/fs/vendored/instrumentation.js +228 -0
  269. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
  270. package/build/esm/integrations/fs/vendored/utils.js +28 -0
  271. package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
  272. package/build/esm/integrations/http.js +22 -176
  273. package/build/esm/integrations/http.js.map +1 -1
  274. package/build/esm/integrations/node-fetch.js +12 -95
  275. package/build/esm/integrations/node-fetch.js.map +1 -1
  276. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +13 -0
  277. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  278. package/build/esm/integrations/tracing/amqplib/index.js +18 -0
  279. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
  280. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
  281. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  282. package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
  283. package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  284. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +14 -0
  285. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  286. package/build/esm/integrations/tracing/amqplib/vendored/types.js +15 -0
  287. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  288. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +117 -0
  289. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  290. package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
  291. package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
  292. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  293. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  294. package/build/esm/integrations/tracing/connect/index.js +31 -0
  295. package/build/esm/integrations/tracing/connect/index.js.map +1 -0
  296. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +13 -0
  297. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  298. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +135 -0
  299. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  300. package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
  301. package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  302. package/build/esm/integrations/tracing/connect/vendored/utils.js +32 -0
  303. package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
  304. package/build/esm/integrations/tracing/dataloader/index.js +23 -0
  305. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
  306. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +215 -0
  307. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  308. package/build/esm/integrations/tracing/express.js +45 -148
  309. package/build/esm/integrations/tracing/express.js.map +1 -1
  310. package/build/esm/integrations/tracing/fastify/index.js +21 -235
  311. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  312. package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
  313. package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
  314. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
  315. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  316. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +74 -158
  317. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  318. package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
  319. package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
  320. package/build/esm/integrations/tracing/firebase/firebase.js +6 -35
  321. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  322. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  323. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  324. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +72 -214
  325. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  326. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  327. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  328. package/build/esm/integrations/tracing/genericPool/index.js +18 -0
  329. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
  330. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
  331. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  332. package/build/esm/integrations/tracing/google-genai/index.js +3 -58
  333. package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
  334. package/build/esm/integrations/tracing/google-genai/instrumentation.js +23 -43
  335. package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  336. package/build/esm/integrations/tracing/graphql/index.js +31 -0
  337. package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
  338. package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
  339. package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  340. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +13 -0
  341. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  342. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +327 -0
  343. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  344. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
  345. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  346. package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
  347. package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  348. package/build/esm/integrations/tracing/graphql/vendored/utils.js +257 -0
  349. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  350. package/build/esm/integrations/tracing/hapi/index.js +16 -91
  351. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  352. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
  353. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  354. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +253 -0
  355. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  356. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
  357. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  358. package/build/esm/integrations/tracing/hapi/vendored/utils.js +76 -0
  359. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  360. package/build/esm/integrations/tracing/hono/constants.js +6 -7
  361. package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
  362. package/build/esm/integrations/tracing/hono/index.js +22 -73
  363. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  364. package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
  365. package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
  366. package/build/esm/integrations/tracing/index.js +20 -29
  367. package/build/esm/integrations/tracing/index.js.map +1 -1
  368. package/build/esm/integrations/tracing/kafka/index.js +18 -0
  369. package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
  370. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +235 -0
  371. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  372. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +12 -0
  373. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  374. package/build/esm/integrations/tracing/kafka/vendored/utils.js +108 -0
  375. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  376. package/build/esm/integrations/tracing/knex/index.js +23 -0
  377. package/build/esm/integrations/tracing/knex/index.js.map +1 -0
  378. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +133 -0
  379. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  380. package/build/esm/integrations/tracing/knex/vendored/semconv.js +6 -0
  381. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  382. package/build/esm/integrations/tracing/knex/vendored/utils.js +75 -0
  383. package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
  384. package/build/esm/integrations/tracing/koa/index.js +42 -0
  385. package/build/esm/integrations/tracing/koa/index.js.map +1 -0
  386. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
  387. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  388. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +125 -0
  389. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  390. package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
  391. package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  392. package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
  393. package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
  394. package/build/esm/integrations/tracing/koa/vendored/utils.js +33 -0
  395. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
  396. package/build/esm/integrations/tracing/langchain/index.js +3 -96
  397. package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
  398. package/build/esm/integrations/tracing/langchain/instrumentation.js +80 -140
  399. package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
  400. package/build/esm/integrations/tracing/langgraph/index.js +3 -73
  401. package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
  402. package/build/esm/integrations/tracing/langgraph/instrumentation.js +78 -42
  403. package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  404. package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
  405. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
  406. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +36 -0
  407. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  408. package/build/esm/integrations/tracing/mongo/index.js +18 -0
  409. package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
  410. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +127 -0
  411. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  412. package/build/esm/integrations/tracing/mongo/vendored/patches.js +142 -0
  413. package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  414. package/build/esm/integrations/tracing/mongo/vendored/utils.js +34 -0
  415. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  416. package/build/esm/integrations/tracing/mongoose/index.js +19 -0
  417. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
  418. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +236 -0
  419. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  420. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +38 -0
  421. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  422. package/build/esm/integrations/tracing/mysql/index.js +18 -0
  423. package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
  424. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +183 -0
  425. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  426. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +5 -0
  427. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  428. package/build/esm/integrations/tracing/mysql/vendored/utils.js +33 -0
  429. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  430. package/build/esm/integrations/tracing/mysql2/index.js +19 -0
  431. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
  432. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +136 -0
  433. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  434. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +5 -0
  435. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  436. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +75 -0
  437. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  438. package/build/esm/integrations/tracing/openai/index.js +3 -58
  439. package/build/esm/integrations/tracing/openai/index.js.map +1 -1
  440. package/build/esm/integrations/tracing/openai/instrumentation.js +25 -49
  441. package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
  442. package/build/esm/integrations/tracing/postgres/index.js +24 -0
  443. package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
  444. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +9 -0
  445. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  446. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
  447. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  448. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +223 -0
  449. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  450. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +5 -0
  451. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  452. package/build/esm/integrations/tracing/postgres/vendored/utils.js +136 -0
  453. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  454. package/build/esm/integrations/tracing/postgresjs.js +77 -190
  455. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  456. package/build/esm/integrations/tracing/redis/cache.js +38 -0
  457. package/build/esm/integrations/tracing/redis/cache.js.map +1 -0
  458. package/build/esm/integrations/tracing/redis/index.js +43 -0
  459. package/build/esm/integrations/tracing/redis/index.js.map +1 -0
  460. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +145 -0
  461. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  462. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +443 -0
  463. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  464. package/build/esm/integrations/tracing/redis/vendored/semconv.js +5 -0
  465. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  466. package/build/esm/integrations/tracing/tedious/index.js +18 -0
  467. package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
  468. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +152 -0
  469. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  470. package/build/esm/integrations/tracing/tedious/vendored/semconv.js +5 -0
  471. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  472. package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
  473. package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  474. package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
  475. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
  476. package/build/esm/integrations/tracing/vercelai/index.js +8 -54
  477. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  478. package/build/esm/integrations/tracing/vercelai/instrumentation.js +60 -158
  479. package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  480. package/build/esm/package.json +1 -1
  481. package/build/esm/preload.js +1 -14
  482. package/build/esm/preload.js.map +1 -1
  483. package/build/esm/sdk/diagnosticsChannelInjection.js +17 -0
  484. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -0
  485. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +30 -0
  486. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  487. package/build/esm/sdk/index.js +33 -36
  488. package/build/esm/sdk/index.js.map +1 -1
  489. package/build/esm/sdk/initOtel.js +77 -63
  490. package/build/esm/sdk/initOtel.js.map +1 -1
  491. package/build/esm/utils/redisCache.js +24 -52
  492. package/build/esm/utils/redisCache.js.map +1 -1
  493. package/build/esm/utils/setHttpServerSpanRouteAttribute.js +19 -0
  494. package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  495. package/build/import-hook.mjs +6 -0
  496. package/build/types/index.d.ts +6 -4
  497. package/build/types/index.d.ts.map +1 -1
  498. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  499. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
  500. package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
  501. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  502. package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
  503. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
  504. package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
  505. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
  506. package/build/types/integrations/fs/index.d.ts +14 -0
  507. package/build/types/integrations/fs/index.d.ts.map +1 -0
  508. package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
  509. package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
  510. package/build/types/integrations/fs/vendored/instrumentation.d.ts +3 -0
  511. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
  512. package/build/types/integrations/fs/vendored/types.d.ts +23 -0
  513. package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
  514. package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
  515. package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
  516. package/build/types/integrations/http.d.ts +12 -17
  517. package/build/types/integrations/http.d.ts.map +1 -1
  518. package/build/types/integrations/node-fetch.d.ts +8 -35
  519. package/build/types/integrations/node-fetch.d.ts.map +1 -1
  520. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  521. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +1 -0
  522. package/build/types/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  523. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
  524. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  525. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
  526. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  527. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
  528. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  529. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
  530. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  531. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
  532. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  533. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
  534. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  535. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
  536. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  537. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
  538. package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  539. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
  540. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  541. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
  542. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  543. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
  544. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
  545. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
  546. package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  547. package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
  548. package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  549. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
  550. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  551. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
  552. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  553. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
  554. package/build/types/integrations/tracing/express.d.ts +15 -68
  555. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  556. package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
  557. package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
  558. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
  559. package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
  560. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  561. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  562. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
  563. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  564. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
  565. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  566. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
  567. package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
  568. package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
  569. package/build/types/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  570. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
  571. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  572. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
  573. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  574. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
  575. package/build/types/integrations/tracing/google-genai/index.d.ts +11 -8
  576. package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
  577. package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -1
  578. package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  579. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
  580. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  581. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
  582. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  583. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
  584. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  585. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
  586. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  587. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
  588. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  589. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
  590. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  591. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
  592. package/build/types/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  593. package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
  594. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  595. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
  596. package/build/types/integrations/tracing/hapi/index.d.ts +4 -2
  597. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  598. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  599. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
  600. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  601. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
  602. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  603. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
  604. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  605. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
  606. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  607. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
  608. package/build/types/integrations/tracing/hono/index.d.ts +9 -1
  609. package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
  610. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  611. package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  612. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
  613. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  614. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
  615. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  616. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
  617. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  618. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
  619. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  620. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -0
  621. package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  622. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
  623. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  624. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
  625. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  626. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
  627. package/build/types/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  628. package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
  629. package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  630. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
  631. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  632. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
  633. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  634. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
  635. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  636. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
  637. package/build/types/integrations/tracing/koa/vendored/types.d.ts +13 -0
  638. package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
  639. package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  640. package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
  641. package/build/types/integrations/tracing/langchain/index.d.ts +16 -12
  642. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  643. package/build/types/integrations/tracing/langchain/instrumentation.d.ts +10 -1
  644. package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
  645. package/build/types/integrations/tracing/langgraph/index.d.ts +11 -8
  646. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  647. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  648. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -1
  649. package/build/types/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  650. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
  651. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  652. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
  653. package/build/{types-ts3.8/integrations/tracing/mongo.d.ts → types/integrations/tracing/mongo/index.d.ts} +22 -24
  654. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
  655. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  656. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
  657. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  658. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
  659. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  660. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
  661. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  662. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
  663. package/build/types/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  664. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
  665. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  666. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
  667. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  668. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
  669. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  670. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
  671. package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  672. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
  673. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  674. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
  675. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  676. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
  677. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  678. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
  679. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  680. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
  681. package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  682. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
  683. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  684. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
  685. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  686. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
  687. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  688. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
  689. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  690. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
  691. package/build/types/integrations/tracing/openai/index.d.ts +11 -8
  692. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  693. package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  694. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
  695. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  696. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
  697. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  698. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
  699. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  700. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
  701. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  702. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
  703. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  704. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
  705. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  706. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
  707. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  708. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
  709. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  710. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
  711. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  712. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
  713. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  714. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  715. package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
  716. package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
  717. package/build/types/integrations/tracing/redis/index.d.ts +28 -0
  718. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -0
  719. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  720. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -0
  721. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  722. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -0
  723. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  724. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -0
  725. package/build/types/integrations/tracing/redis/vendored/types.d.ts +24 -0
  726. package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -0
  727. package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  728. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
  729. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  730. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
  731. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  732. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
  733. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  734. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
  735. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  736. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
  737. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  738. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  739. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
  740. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  741. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  742. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
  743. package/build/types/integrations/tracing/vercelai/types.d.ts +11 -4
  744. package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
  745. package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
  746. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
  747. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  748. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
  749. package/build/types/sdk/index.d.ts +18 -0
  750. package/build/types/sdk/index.d.ts.map +1 -1
  751. package/build/types/sdk/initOtel.d.ts +2 -3
  752. package/build/types/sdk/initOtel.d.ts.map +1 -1
  753. package/build/types/utils/redisCache.d.ts +1 -1
  754. package/build/types/utils/redisCache.d.ts.map +1 -1
  755. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  756. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
  757. package/build/types-ts3.8/index.d.ts +6 -4
  758. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  759. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  760. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  761. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  762. package/build/types-ts3.8/integrations/fs/index.d.ts +14 -0
  763. package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
  764. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +3 -0
  765. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +23 -0
  766. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
  767. package/build/types-ts3.8/integrations/http.d.ts +12 -17
  768. package/build/types-ts3.8/integrations/node-fetch.d.ts +8 -35
  769. package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  770. package/build/types-ts3.8/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  771. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  772. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  773. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  774. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  775. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  776. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  777. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  778. package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  779. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  780. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  781. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
  782. package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  783. package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  784. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  785. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  786. package/build/types-ts3.8/integrations/tracing/express.d.ts +15 -68
  787. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  788. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  789. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  790. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  791. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  792. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
  793. package/build/types-ts3.8/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  794. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  795. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  796. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +11 -8
  797. package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  798. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  799. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  800. package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  801. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  802. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  803. package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  804. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  805. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  806. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +4 -2
  807. package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  808. package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  809. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  810. package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  811. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  812. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +9 -1
  813. package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  814. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  815. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  816. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  817. package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  818. package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  819. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  820. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  821. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  822. package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  823. package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  824. package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  825. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  826. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +13 -0
  827. package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  828. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +16 -12
  829. package/build/types-ts3.8/integrations/tracing/langchain/instrumentation.d.ts +10 -1
  830. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +11 -8
  831. package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  832. package/build/types-ts3.8/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  833. package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  834. package/build/{types/integrations/tracing/mongo.d.ts → types-ts3.8/integrations/tracing/mongo/index.d.ts} +22 -24
  835. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  836. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  837. package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  838. package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  839. package/build/types-ts3.8/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  840. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  841. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  842. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  843. package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  844. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  845. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  846. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  847. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  848. package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  849. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  850. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  851. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  852. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  853. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +11 -8
  854. package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  855. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  856. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  857. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  858. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  859. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  860. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  861. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  862. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  863. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  864. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  865. package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
  866. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +28 -0
  867. package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  868. package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  869. package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  870. package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +24 -0
  871. package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  872. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  873. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  874. package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  875. package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  876. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  877. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
  878. package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  879. package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +11 -4
  880. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
  881. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  882. package/build/types-ts3.8/sdk/index.d.ts +18 -0
  883. package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
  884. package/build/types-ts3.8/utils/redisCache.d.ts +1 -1
  885. package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  886. package/changes.json +9 -5
  887. package/package.json +33 -41
  888. package/build/cjs/integrations/fs.js +0 -142
  889. package/build/cjs/integrations/fs.js.map +0 -1
  890. package/build/cjs/integrations/tracing/amqplib.js +0 -47
  891. package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
  892. package/build/cjs/integrations/tracing/connect.js +0 -110
  893. package/build/cjs/integrations/tracing/connect.js.map +0 -1
  894. package/build/cjs/integrations/tracing/dataloader.js +0 -72
  895. package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
  896. package/build/cjs/integrations/tracing/genericPool.js +0 -59
  897. package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
  898. package/build/cjs/integrations/tracing/graphql.js +0 -127
  899. package/build/cjs/integrations/tracing/graphql.js.map +0 -1
  900. package/build/cjs/integrations/tracing/kafka.js +0 -48
  901. package/build/cjs/integrations/tracing/kafka.js.map +0 -1
  902. package/build/cjs/integrations/tracing/knex.js +0 -57
  903. package/build/cjs/integrations/tracing/knex.js.map +0 -1
  904. package/build/cjs/integrations/tracing/koa.js +0 -138
  905. package/build/cjs/integrations/tracing/koa.js.map +0 -1
  906. package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
  907. package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
  908. package/build/cjs/integrations/tracing/mongo.js +0 -93
  909. package/build/cjs/integrations/tracing/mongo.js.map +0 -1
  910. package/build/cjs/integrations/tracing/mongoose.js +0 -46
  911. package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
  912. package/build/cjs/integrations/tracing/mysql.js +0 -38
  913. package/build/cjs/integrations/tracing/mysql.js.map +0 -1
  914. package/build/cjs/integrations/tracing/mysql2.js +0 -46
  915. package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
  916. package/build/cjs/integrations/tracing/postgres.js +0 -48
  917. package/build/cjs/integrations/tracing/postgres.js.map +0 -1
  918. package/build/cjs/integrations/tracing/prisma.js +0 -203
  919. package/build/cjs/integrations/tracing/prisma.js.map +0 -1
  920. package/build/cjs/integrations/tracing/redis.js +0 -121
  921. package/build/cjs/integrations/tracing/redis.js.map +0 -1
  922. package/build/cjs/integrations/tracing/tedious.js +0 -67
  923. package/build/cjs/integrations/tracing/tedious.js.map +0 -1
  924. package/build/esm/integrations/fs.js +0 -140
  925. package/build/esm/integrations/fs.js.map +0 -1
  926. package/build/esm/integrations/tracing/amqplib.js +0 -44
  927. package/build/esm/integrations/tracing/amqplib.js.map +0 -1
  928. package/build/esm/integrations/tracing/connect.js +0 -106
  929. package/build/esm/integrations/tracing/connect.js.map +0 -1
  930. package/build/esm/integrations/tracing/dataloader.js +0 -69
  931. package/build/esm/integrations/tracing/dataloader.js.map +0 -1
  932. package/build/esm/integrations/tracing/genericPool.js +0 -56
  933. package/build/esm/integrations/tracing/genericPool.js.map +0 -1
  934. package/build/esm/integrations/tracing/graphql.js +0 -124
  935. package/build/esm/integrations/tracing/graphql.js.map +0 -1
  936. package/build/esm/integrations/tracing/kafka.js +0 -45
  937. package/build/esm/integrations/tracing/kafka.js.map +0 -1
  938. package/build/esm/integrations/tracing/knex.js +0 -54
  939. package/build/esm/integrations/tracing/knex.js.map +0 -1
  940. package/build/esm/integrations/tracing/koa.js +0 -134
  941. package/build/esm/integrations/tracing/koa.js.map +0 -1
  942. package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
  943. package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
  944. package/build/esm/integrations/tracing/mongo.js +0 -89
  945. package/build/esm/integrations/tracing/mongo.js.map +0 -1
  946. package/build/esm/integrations/tracing/mongoose.js +0 -43
  947. package/build/esm/integrations/tracing/mongoose.js.map +0 -1
  948. package/build/esm/integrations/tracing/mysql.js +0 -35
  949. package/build/esm/integrations/tracing/mysql.js.map +0 -1
  950. package/build/esm/integrations/tracing/mysql2.js +0 -43
  951. package/build/esm/integrations/tracing/mysql2.js.map +0 -1
  952. package/build/esm/integrations/tracing/postgres.js +0 -45
  953. package/build/esm/integrations/tracing/postgres.js.map +0 -1
  954. package/build/esm/integrations/tracing/prisma.js +0 -200
  955. package/build/esm/integrations/tracing/prisma.js.map +0 -1
  956. package/build/esm/integrations/tracing/redis.js +0 -117
  957. package/build/esm/integrations/tracing/redis.js.map +0 -1
  958. package/build/esm/integrations/tracing/tedious.js +0 -64
  959. package/build/esm/integrations/tracing/tedious.js.map +0 -1
  960. package/build/types/integrations/fs.d.ts +0 -24
  961. package/build/types/integrations/fs.d.ts.map +0 -1
  962. package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
  963. package/build/types/integrations/tracing/connect.d.ts.map +0 -1
  964. package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
  965. package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
  966. package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
  967. package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
  968. package/build/types/integrations/tracing/knex.d.ts.map +0 -1
  969. package/build/types/integrations/tracing/koa.d.ts.map +0 -1
  970. package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
  971. package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
  972. package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
  973. package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
  974. package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
  975. package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
  976. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -38
  977. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
  978. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -31
  979. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
  980. package/build/types/integrations/tracing/prisma.d.ts +0 -50
  981. package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
  982. package/build/types/integrations/tracing/redis.d.ts +0 -41
  983. package/build/types/integrations/tracing/redis.d.ts.map +0 -1
  984. package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
  985. package/build/types-ts3.8/integrations/fs.d.ts +0 -24
  986. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -44
  987. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -34
  988. package/build/types-ts3.8/integrations/tracing/prisma.d.ts +0 -50
  989. package/build/types-ts3.8/integrations/tracing/redis.d.ts +0 -41
@@ -6,109 +6,16 @@ const instrumentation = require('./instrumentation.js');
6
6
 
7
7
  const instrumentLangChain = nodeCore.generateInstrumentOnce(
8
8
  core.LANGCHAIN_INTEGRATION_NAME,
9
- options => new instrumentation.SentryLangChainInstrumentation(options),
9
+ (options) => new instrumentation.SentryLangChainInstrumentation(options)
10
10
  );
11
-
12
11
  const _langChainIntegration = ((options = {}) => {
13
12
  return {
14
13
  name: core.LANGCHAIN_INTEGRATION_NAME,
15
14
  setupOnce() {
16
15
  instrumentLangChain(options);
17
- },
16
+ }
18
17
  };
19
- }) ;
20
-
21
- /**
22
- * Adds Sentry tracing instrumentation for LangChain.
23
- *
24
- * This integration is enabled by default.
25
- *
26
- * When configured, this integration automatically instruments LangChain runnable instances
27
- * to capture telemetry data by injecting Sentry callback handlers into all LangChain calls.
28
- *
29
- * **Important:** This integration automatically skips wrapping the OpenAI, Anthropic, and Google GenAI
30
- * providers to prevent duplicate spans when using LangChain with these AI providers.
31
- * LangChain handles the instrumentation for all underlying AI providers.
32
- *
33
- * @example
34
- * ```javascript
35
- * import * as Sentry from '@sentry/node';
36
- * import { ChatOpenAI } from '@langchain/openai';
37
- *
38
- * Sentry.init({
39
- * integrations: [Sentry.langChainIntegration()],
40
- * sendDefaultPii: true, // Enable to record inputs/outputs
41
- * });
42
- *
43
- * // LangChain calls are automatically instrumented
44
- * const model = new ChatOpenAI();
45
- * await model.invoke("What is the capital of France?");
46
- * ```
47
- *
48
- * ## Manual Callback Handler
49
- *
50
- * You can also manually add the Sentry callback handler alongside other callbacks:
51
- *
52
- * @example
53
- * ```javascript
54
- * import * as Sentry from '@sentry/node';
55
- * import { ChatOpenAI } from '@langchain/openai';
56
- *
57
- * const sentryHandler = Sentry.createLangChainCallbackHandler({
58
- * recordInputs: true,
59
- * recordOutputs: true
60
- * });
61
- *
62
- * const model = new ChatOpenAI();
63
- * await model.invoke(
64
- * "What is the capital of France?",
65
- * { callbacks: [sentryHandler, myOtherCallback] }
66
- * );
67
- * ```
68
- *
69
- * ## Options
70
- *
71
- * - `recordInputs`: Whether to record input messages/prompts (default: respects `sendDefaultPii` client option)
72
- * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
73
- *
74
- * ### Default Behavior
75
- *
76
- * By default, the integration will:
77
- * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
78
- * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
79
- *
80
- * @example
81
- * ```javascript
82
- * // Record inputs and outputs when sendDefaultPii is false
83
- * Sentry.init({
84
- * integrations: [
85
- * Sentry.langChainIntegration({
86
- * recordInputs: true,
87
- * recordOutputs: true
88
- * })
89
- * ],
90
- * });
91
- *
92
- * // Never record inputs/outputs regardless of sendDefaultPii
93
- * Sentry.init({
94
- * sendDefaultPii: true,
95
- * integrations: [
96
- * Sentry.langChainIntegration({
97
- * recordInputs: false,
98
- * recordOutputs: false
99
- * })
100
- * ],
101
- * });
102
- * ```
103
- *
104
- * ## Supported Events
105
- *
106
- * The integration captures the following LangChain lifecycle events:
107
- * - LLM/Chat Model: start, end, error
108
- * - Chain: start, end, error
109
- * - Tool: start, end, error
110
- *
111
- */
18
+ });
112
19
  const langChainIntegration = core.defineIntegration(_langChainIntegration);
113
20
 
114
21
  exports.instrumentLangChain = instrumentLangChain;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/langchain/index.ts"],"sourcesContent":["import type { IntegrationFn, LangChainOptions } from '@sentry/core';\nimport { defineIntegration, LANGCHAIN_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryLangChainInstrumentation } from './instrumentation';\n\nexport const instrumentLangChain = generateInstrumentOnce<LangChainOptions>(\n LANGCHAIN_INTEGRATION_NAME,\n options => new SentryLangChainInstrumentation(options),\n);\n\nconst _langChainIntegration = ((options: LangChainOptions = {}) => {\n return {\n name: LANGCHAIN_INTEGRATION_NAME,\n setupOnce() {\n instrumentLangChain(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for LangChain.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments LangChain runnable instances\n * to capture telemetry data by injecting Sentry callback handlers into all LangChain calls.\n *\n * **Important:** This integration automatically skips wrapping the OpenAI, Anthropic, and Google GenAI\n * providers to prevent duplicate spans when using LangChain with these AI providers.\n * LangChain handles the instrumentation for all underlying AI providers.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n * import { ChatOpenAI } from '@langchain/openai';\n *\n * Sentry.init({\n * integrations: [Sentry.langChainIntegration()],\n * sendDefaultPii: true, // Enable to record inputs/outputs\n * });\n *\n * // LangChain calls are automatically instrumented\n * const model = new ChatOpenAI();\n * await model.invoke(\"What is the capital of France?\");\n * ```\n *\n * ## Manual Callback Handler\n *\n * You can also manually add the Sentry callback handler alongside other callbacks:\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n * import { ChatOpenAI } from '@langchain/openai';\n *\n * const sentryHandler = Sentry.createLangChainCallbackHandler({\n * recordInputs: true,\n * recordOutputs: true\n * });\n *\n * const model = new ChatOpenAI();\n * await model.invoke(\n * \"What is the capital of France?\",\n * { callbacks: [sentryHandler, myOtherCallback] }\n * );\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record input messages/prompts (default: respects `sendDefaultPii` client option)\n * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options\n * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled\n *\n * @example\n * ```javascript\n * // Record inputs and outputs when sendDefaultPii is false\n * Sentry.init({\n * integrations: [\n * Sentry.langChainIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of sendDefaultPii\n * Sentry.init({\n * sendDefaultPii: true,\n * integrations: [\n * Sentry.langChainIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n * ## Supported Events\n *\n * The integration captures the following LangChain lifecycle events:\n * - LLM/Chat Model: start, end, error\n * - Chain: start, end, error\n * - Tool: start, end, error\n *\n */\nexport const langChainIntegration = defineIntegration(_langChainIntegration);\n"],"names":["generateInstrumentOnce","LANGCHAIN_INTEGRATION_NAME","SentryLangChainInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,mBAAA,GAAsBA,+BAAsB;AACzD,EAAEC,+BAA0B;AAC5B,EAAE,WAAW,IAAIC,8CAA8B,CAAC,OAAO,CAAC;AACxD;;AAEA,MAAM,qBAAA,IAAyB,CAAC,OAAO,GAAqB,EAAE,KAAK;AACnE,EAAE,OAAO;AACT,IAAI,IAAI,EAAED,+BAA0B;AACpC,IAAI,SAAS,GAAG;AAChB,MAAM,mBAAmB,CAAC,OAAO,CAAC;AAClC,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,oBAAA,GAAuBE,sBAAiB,CAAC,qBAAqB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/langchain/index.ts"],"sourcesContent":["import type { IntegrationFn, LangChainOptions } from '@sentry/core';\nimport { defineIntegration, LANGCHAIN_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryLangChainInstrumentation } from './instrumentation';\n\nexport const instrumentLangChain = generateInstrumentOnce<LangChainOptions>(\n LANGCHAIN_INTEGRATION_NAME,\n options => new SentryLangChainInstrumentation(options),\n);\n\nconst _langChainIntegration = ((options: LangChainOptions = {}) => {\n return {\n name: LANGCHAIN_INTEGRATION_NAME,\n setupOnce() {\n instrumentLangChain(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for LangChain.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments LangChain runnable instances\n * to capture telemetry data by injecting Sentry callback handlers into all LangChain calls.\n *\n * **Important:** This integration automatically skips wrapping the OpenAI, Anthropic, and Google GenAI\n * providers to prevent duplicate spans when using LangChain with these AI providers.\n * LangChain handles the instrumentation for all underlying AI providers.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n * import { ChatOpenAI } from '@langchain/openai';\n *\n * Sentry.init({\n * integrations: [Sentry.langChainIntegration()],\n * dataCollection: { genAI: { inputs: true, outputs: true } }, // Enable to record inputs/outputs\n * });\n *\n * // LangChain calls are automatically instrumented\n * const model = new ChatOpenAI();\n * await model.invoke(\"What is the capital of France?\");\n * ```\n *\n * ## Manual Callback Handler\n *\n * You can also manually add the Sentry callback handler alongside other callbacks:\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n * import { ChatOpenAI } from '@langchain/openai';\n *\n * const sentryHandler = Sentry.createLangChainCallbackHandler({\n * recordInputs: true,\n * recordOutputs: true\n * });\n *\n * const model = new ChatOpenAI();\n * await model.invoke(\n * \"What is the capital of France?\",\n * { callbacks: [sentryHandler, myOtherCallback] }\n * );\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record input messages/prompts (default: follows `dataCollection.genAI.inputs`, or the deprecated `sendDefaultPii` option)\n * - `recordOutputs`: Whether to record response text (default: follows `dataCollection.genAI.outputs`, or the deprecated `sendDefaultPii` option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs based on `dataCollection.genAI` in your Sentry client options\n * (or the deprecated `sendDefaultPii` option, for backwards compatibility)\n * - Integration-level `recordInputs`/`recordOutputs` options take precedence over global config\n *\n * @example\n * ```javascript\n * // Always record inputs and outputs regardless of global dataCollection config\n * Sentry.init({\n * integrations: [\n * Sentry.langChainIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of global dataCollection config\n * Sentry.init({\n * dataCollection: { genAI: { inputs: true, outputs: true } },\n * integrations: [\n * Sentry.langChainIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n * ## Supported Events\n *\n * The integration captures the following LangChain lifecycle events:\n * - LLM/Chat Model: start, end, error (via callbacks)\n * - Chain: start, end, error (via callbacks)\n * - Tool: start, end, error (via callbacks)\n * - Embeddings: embedQuery, embedDocuments (via direct method wrapping)\n *\n */\nexport const langChainIntegration = defineIntegration(_langChainIntegration);\n"],"names":["generateInstrumentOnce","LANGCHAIN_INTEGRATION_NAME","SentryLangChainInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,mBAAA,GAAsBA,+BAAA;AAAA,EACjCC,+BAAA;AAAA,EACA,CAAA,OAAA,KAAW,IAAIC,8CAAA,CAA+B,OAAO;AACvD;AAEA,MAAM,qBAAA,IAAyB,CAAC,OAAA,GAA4B,EAAC,KAAM;AACjE,EAAA,OAAO;AAAA,IACL,IAAA,EAAMD,+BAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,mBAAA,CAAoB,OAAO,CAAA;AAAA,IAC7B;AAAA,GACF;AACF,CAAA,CAAA;AA+FO,MAAM,oBAAA,GAAuBE,uBAAkB,qBAAqB;;;;;"}
@@ -1,83 +1,28 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const instrumentation = require('@opentelemetry/instrumentation');
4
+ const InstrumentationNodeModuleFile = require('../InstrumentationNodeModuleFile.js');
4
5
  const core = require('@sentry/core');
5
6
 
6
- const supportedVersions = ['>=0.1.0 <2.0.0'];
7
-
8
- /**
9
- * Augments a callback handler list with Sentry's handler if not already present
10
- */
11
- function augmentCallbackHandlers(handlers, sentryHandler) {
12
- // Handle null/undefined - return array with just our handler
13
- if (!handlers) {
14
- return [sentryHandler];
15
- }
16
-
17
- // If handlers is already an array
18
- if (Array.isArray(handlers)) {
19
- // Check if our handler is already in the list
20
- if (handlers.includes(sentryHandler)) {
21
- return handlers;
22
- }
23
- // Add our handler to the list
24
- return [...handlers, sentryHandler];
25
- }
26
-
27
- // If it's a single handler object, convert to array
28
- if (typeof handlers === 'object') {
29
- return [handlers, sentryHandler];
30
- }
31
-
32
- // Unknown type - return original
33
- return handlers;
34
- }
35
-
36
- /**
37
- * Wraps Runnable methods (invoke, stream, batch) to inject Sentry callbacks at request time
38
- * Uses a Proxy to intercept method calls and augment the options.callbacks
39
- */
40
- function wrapRunnableMethod(
41
- originalMethod,
42
- sentryHandler,
43
- _methodName,
44
- ) {
7
+ const supportedVersions = [">=0.1.0 <2.0.0"];
8
+ function wrapRunnableMethod(originalMethod, sentryHandler, _methodName) {
45
9
  return new Proxy(originalMethod, {
46
10
  apply(target, thisArg, args) {
47
- // LangChain Runnable method signatures:
48
- // invoke(input, options?) - options contains callbacks
49
- // stream(input, options?) - options contains callbacks
50
- // batch(inputs, options?) - options contains callbacks
51
-
52
- // Options is typically the second argument
53
11
  const optionsIndex = 1;
54
- let options = args[optionsIndex] ;
55
-
56
- // If options don't exist or aren't an object, create them
57
- if (!options || typeof options !== 'object' || Array.isArray(options)) {
12
+ let options = args[optionsIndex];
13
+ if (!options || typeof options !== "object" || Array.isArray(options)) {
58
14
  options = {};
59
15
  args[optionsIndex] = options;
60
16
  }
61
-
62
- // Inject our callback handler into options.callbacks (request time callbacks)
63
- const existingCallbacks = options.callbacks;
64
- const augmentedCallbacks = augmentCallbackHandlers(existingCallbacks, sentryHandler);
65
- options.callbacks = augmentedCallbacks;
66
-
67
- // Call original method with augmented options
17
+ options.callbacks = core._INTERNAL_mergeLangChainCallbackHandler(options.callbacks, sentryHandler);
68
18
  return Reflect.apply(target, thisArg, args);
69
- },
70
- }) ;
19
+ }
20
+ });
71
21
  }
72
-
73
- /**
74
- * Sentry LangChain instrumentation using OpenTelemetry.
75
- */
76
22
  class SentryLangChainInstrumentation extends instrumentation.InstrumentationBase {
77
- constructor(config = {}) {
78
- super('@sentry/instrumentation-langchain', core.SDK_VERSION, config);
23
+ constructor(config = {}) {
24
+ super("@sentry/instrumentation-langchain", core.SDK_VERSION, config);
79
25
  }
80
-
81
26
  /**
82
27
  * Initializes the instrumentation by defining the modules to be patched.
83
28
  * We patch the BaseChatModel class methods to inject callbacks
@@ -85,135 +30,130 @@ class SentryLangChainInstrumentation extends instrumentation.InstrumentationBase
85
30
  * We hook into provider packages (@langchain/anthropic, @langchain/openai, etc.)
86
31
  * because @langchain/core is often bundled and not loaded as a separate module
87
32
  */
88
- init() {
33
+ init() {
89
34
  const modules = [];
90
-
91
- // Hook into common LangChain provider packages
92
35
  const providerPackages = [
93
- '@langchain/anthropic',
94
- '@langchain/openai',
95
- '@langchain/google-genai',
96
- '@langchain/mistralai',
97
- '@langchain/google-vertexai',
98
- '@langchain/groq',
36
+ "@langchain/anthropic",
37
+ "@langchain/openai",
38
+ "@langchain/google-genai",
39
+ "@langchain/mistralai",
40
+ "@langchain/google-vertexai",
41
+ "@langchain/groq"
99
42
  ];
100
-
101
43
  for (const packageName of providerPackages) {
102
- // In CJS, LangChain packages re-export from dist/index.cjs files.
103
- // Patching only the root module sometimes misses the real implementation or
104
- // gets overwritten when that file is loaded. We add a file-level patch so that
105
- // _patch runs again on the concrete implementation
106
44
  modules.push(
107
45
  new instrumentation.InstrumentationNodeModuleDefinition(
108
46
  packageName,
109
47
  supportedVersions,
110
48
  this._patch.bind(this),
111
- exports$1 => exports$1,
49
+ (exports) => exports,
112
50
  [
113
- new instrumentation.InstrumentationNodeModuleFile(
51
+ new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
114
52
  `${packageName}/dist/index.cjs`,
115
53
  supportedVersions,
116
54
  this._patch.bind(this),
117
- exports$1 => exports$1,
118
- ),
119
- ],
120
- ),
55
+ (exports) => exports
56
+ )
57
+ ]
58
+ )
121
59
  );
122
60
  }
123
-
124
- // Hook into main 'langchain' package to catch initChatModel (v1+)
125
61
  modules.push(
126
62
  new instrumentation.InstrumentationNodeModuleDefinition(
127
- 'langchain',
63
+ "langchain",
128
64
  supportedVersions,
129
65
  this._patch.bind(this),
130
- exports$1 => exports$1,
66
+ (exports) => exports,
131
67
  [
132
68
  // To catch the CJS build that contains ConfigurableModel / initChatModel for v1
133
- new instrumentation.InstrumentationNodeModuleFile(
134
- 'langchain/dist/chat_models/universal.cjs',
69
+ new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
70
+ "langchain/dist/chat_models/universal.cjs",
135
71
  supportedVersions,
136
72
  this._patch.bind(this),
137
- exports$1 => exports$1,
138
- ),
139
- ],
140
- ),
73
+ (exports) => exports
74
+ )
75
+ ]
76
+ )
141
77
  );
142
-
143
78
  return modules;
144
79
  }
145
-
146
80
  /**
147
- * Core patch logic - patches chat model methods to inject Sentry callbacks
81
+ * Core patch logic - patches chat model and embedding methods
148
82
  * This is called when a LangChain provider package is loaded
149
83
  */
150
- _patch(exports$1) {
151
- // Skip AI provider wrapping now that LangChain is actually being used
152
- // This prevents duplicate spans from Anthropic/OpenAI/GoogleGenAI standalone integrations
84
+ _patch(exports) {
153
85
  core._INTERNAL_skipAiProviderWrapping([
154
86
  core.OPENAI_INTEGRATION_NAME,
155
87
  core.ANTHROPIC_AI_INTEGRATION_NAME,
156
- core.GOOGLE_GENAI_INTEGRATION_NAME,
88
+ core.GOOGLE_GENAI_INTEGRATION_NAME
157
89
  ]);
158
-
159
- // Create a shared handler instance
160
- const sentryHandler = core.createLangChainCallbackHandler(this.getConfig());
161
-
162
- // Patch Runnable methods to inject callbacks at request time
163
- // This directly manipulates options.callbacks that LangChain uses
164
- this._patchRunnableMethods(exports$1, sentryHandler);
165
-
166
- return exports$1;
90
+ const config = this.getConfig();
91
+ const sentryHandler = core.createLangChainCallbackHandler(config);
92
+ this._patchRunnableMethods(exports, sentryHandler);
93
+ this._patchEmbeddingsMethods(exports, config);
94
+ return exports;
167
95
  }
168
-
169
96
  /**
170
97
  * Patches chat model methods (invoke, stream, batch) to inject Sentry callbacks
171
98
  * Finds a chat model class from the provider package exports and patches its prototype methods
172
99
  */
173
- _patchRunnableMethods(exports$1, sentryHandler) {
174
- // Known chat model class names for each provider
100
+ _patchRunnableMethods(exports, sentryHandler) {
175
101
  const knownChatModelNames = [
176
- 'ChatAnthropic',
177
- 'ChatOpenAI',
178
- 'ChatGoogleGenerativeAI',
179
- 'ChatMistralAI',
180
- 'ChatVertexAI',
181
- 'ChatGroq',
182
- 'ConfigurableModel',
102
+ "ChatAnthropic",
103
+ "ChatOpenAI",
104
+ "ChatGoogleGenerativeAI",
105
+ "ChatMistralAI",
106
+ "ChatVertexAI",
107
+ "ChatGroq",
108
+ "ConfigurableModel"
183
109
  ];
184
-
185
- const exportsToPatch = (exports$1.universal_exports ?? exports$1) ;
186
-
187
- const chatModelClass = Object.values(exportsToPatch).find(exp => {
188
- return typeof exp === 'function' && knownChatModelNames.includes(exp.name);
189
- }) ;
190
-
110
+ const exportsToPatch = exports.universal_exports ?? exports;
111
+ const chatModelClass = Object.values(exportsToPatch).find((exp) => {
112
+ return typeof exp === "function" && knownChatModelNames.includes(exp.name);
113
+ });
191
114
  if (!chatModelClass) {
192
115
  return;
193
116
  }
194
-
195
- // Patch directly on chatModelClass.prototype
196
- const targetProto = chatModelClass.prototype ;
197
-
198
- // Skip if already patched (both file-level and module-level hooks resolve to the same prototype)
117
+ const targetProto = chatModelClass.prototype;
199
118
  if (targetProto.__sentry_patched__) {
200
119
  return;
201
120
  }
202
121
  targetProto.__sentry_patched__ = true;
203
-
204
- // Patch the methods (invoke, stream, batch)
205
- // All chat model instances will inherit these patched methods
206
- const methodsToPatch = ['invoke', 'stream', 'batch'] ;
207
-
122
+ const methodsToPatch = ["invoke", "stream", "batch"];
208
123
  for (const methodName of methodsToPatch) {
209
124
  const method = targetProto[methodName];
210
- if (typeof method === 'function') {
125
+ if (typeof method === "function") {
211
126
  targetProto[methodName] = wrapRunnableMethod(
212
- method ,
127
+ method,
213
128
  sentryHandler);
214
129
  }
215
130
  }
216
131
  }
132
+ /**
133
+ * Patches embedding class methods (embedQuery, embedDocuments) to create Sentry spans.
134
+ *
135
+ * Unlike chat models which use LangChain's callback system, the Embeddings base class
136
+ * has no callback support. We wrap the methods directly on the prototype.
137
+ *
138
+ * Instruments any exported class whose prototype has both embedQuery and embedDocuments as functions.
139
+ */
140
+ _patchEmbeddingsMethods(exports, options) {
141
+ const exportsToPatch = exports.universal_exports ?? exports;
142
+ for (const exp of Object.values(exportsToPatch)) {
143
+ if (typeof exp !== "function" || !exp.prototype) {
144
+ continue;
145
+ }
146
+ const proto = exp.prototype;
147
+ if (typeof proto.embedQuery !== "function" || typeof proto.embedDocuments !== "function") {
148
+ continue;
149
+ }
150
+ if (proto.__sentry_patched__) {
151
+ continue;
152
+ }
153
+ proto.__sentry_patched__ = true;
154
+ core.instrumentLangChainEmbeddings(proto, options);
155
+ }
156
+ }
217
157
  }
218
158
 
219
159
  exports.SentryLangChainInstrumentation = SentryLangChainInstrumentation;
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.js","sources":["../../../../../src/integrations/tracing/langchain/instrumentation.ts"],"sourcesContent":["import {\n InstrumentationBase,\n type InstrumentationConfig,\n type InstrumentationModuleDefinition,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n} from '@opentelemetry/instrumentation';\nimport type { LangChainOptions } from '@sentry/core';\nimport {\n _INTERNAL_skipAiProviderWrapping,\n ANTHROPIC_AI_INTEGRATION_NAME,\n createLangChainCallbackHandler,\n GOOGLE_GENAI_INTEGRATION_NAME,\n OPENAI_INTEGRATION_NAME,\n SDK_VERSION,\n} from '@sentry/core';\n\nconst supportedVersions = ['>=0.1.0 <2.0.0'];\n\ntype LangChainInstrumentationOptions = InstrumentationConfig & LangChainOptions;\n\n/**\n * Represents the patched shape of LangChain provider package exports\n */\ninterface PatchedLangChainExports {\n [key: string]: unknown;\n}\n\n/**\n * Augments a callback handler list with Sentry's handler if not already present\n */\nfunction augmentCallbackHandlers(handlers: unknown, sentryHandler: unknown): unknown {\n // Handle null/undefined - return array with just our handler\n if (!handlers) {\n return [sentryHandler];\n }\n\n // If handlers is already an array\n if (Array.isArray(handlers)) {\n // Check if our handler is already in the list\n if (handlers.includes(sentryHandler)) {\n return handlers;\n }\n // Add our handler to the list\n return [...handlers, sentryHandler];\n }\n\n // If it's a single handler object, convert to array\n if (typeof handlers === 'object') {\n return [handlers, sentryHandler];\n }\n\n // Unknown type - return original\n return handlers;\n}\n\n/**\n * Wraps Runnable methods (invoke, stream, batch) to inject Sentry callbacks at request time\n * Uses a Proxy to intercept method calls and augment the options.callbacks\n */\nfunction wrapRunnableMethod(\n originalMethod: (...args: unknown[]) => unknown,\n sentryHandler: unknown,\n _methodName: string,\n): (...args: unknown[]) => unknown {\n return new Proxy(originalMethod, {\n apply(target, thisArg, args: unknown[]): unknown {\n // LangChain Runnable method signatures:\n // invoke(input, options?) - options contains callbacks\n // stream(input, options?) - options contains callbacks\n // batch(inputs, options?) - options contains callbacks\n\n // Options is typically the second argument\n const optionsIndex = 1;\n let options = args[optionsIndex] as Record<string, unknown> | undefined;\n\n // If options don't exist or aren't an object, create them\n if (!options || typeof options !== 'object' || Array.isArray(options)) {\n options = {};\n args[optionsIndex] = options;\n }\n\n // Inject our callback handler into options.callbacks (request time callbacks)\n const existingCallbacks = options.callbacks;\n const augmentedCallbacks = augmentCallbackHandlers(existingCallbacks, sentryHandler);\n options.callbacks = augmentedCallbacks;\n\n // Call original method with augmented options\n return Reflect.apply(target, thisArg, args);\n },\n }) as (...args: unknown[]) => unknown;\n}\n\n/**\n * Sentry LangChain instrumentation using OpenTelemetry.\n */\nexport class SentryLangChainInstrumentation extends InstrumentationBase<LangChainInstrumentationOptions> {\n public constructor(config: LangChainInstrumentationOptions = {}) {\n super('@sentry/instrumentation-langchain', SDK_VERSION, config);\n }\n\n /**\n * Initializes the instrumentation by defining the modules to be patched.\n * We patch the BaseChatModel class methods to inject callbacks\n *\n * We hook into provider packages (@langchain/anthropic, @langchain/openai, etc.)\n * because @langchain/core is often bundled and not loaded as a separate module\n */\n public init(): InstrumentationModuleDefinition | InstrumentationModuleDefinition[] {\n const modules: InstrumentationModuleDefinition[] = [];\n\n // Hook into common LangChain provider packages\n const providerPackages = [\n '@langchain/anthropic',\n '@langchain/openai',\n '@langchain/google-genai',\n '@langchain/mistralai',\n '@langchain/google-vertexai',\n '@langchain/groq',\n ];\n\n for (const packageName of providerPackages) {\n // In CJS, LangChain packages re-export from dist/index.cjs files.\n // Patching only the root module sometimes misses the real implementation or\n // gets overwritten when that file is loaded. We add a file-level patch so that\n // _patch runs again on the concrete implementation\n modules.push(\n new InstrumentationNodeModuleDefinition(\n packageName,\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n [\n new InstrumentationNodeModuleFile(\n `${packageName}/dist/index.cjs`,\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n ),\n ],\n ),\n );\n }\n\n // Hook into main 'langchain' package to catch initChatModel (v1+)\n modules.push(\n new InstrumentationNodeModuleDefinition(\n 'langchain',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n [\n // To catch the CJS build that contains ConfigurableModel / initChatModel for v1\n new InstrumentationNodeModuleFile(\n 'langchain/dist/chat_models/universal.cjs',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n ),\n ],\n ),\n );\n\n return modules;\n }\n\n /**\n * Core patch logic - patches chat model methods to inject Sentry callbacks\n * This is called when a LangChain provider package is loaded\n */\n private _patch(exports: PatchedLangChainExports): PatchedLangChainExports | void {\n // Skip AI provider wrapping now that LangChain is actually being used\n // This prevents duplicate spans from Anthropic/OpenAI/GoogleGenAI standalone integrations\n _INTERNAL_skipAiProviderWrapping([\n OPENAI_INTEGRATION_NAME,\n ANTHROPIC_AI_INTEGRATION_NAME,\n GOOGLE_GENAI_INTEGRATION_NAME,\n ]);\n\n // Create a shared handler instance\n const sentryHandler = createLangChainCallbackHandler(this.getConfig());\n\n // Patch Runnable methods to inject callbacks at request time\n // This directly manipulates options.callbacks that LangChain uses\n this._patchRunnableMethods(exports, sentryHandler);\n\n return exports;\n }\n\n /**\n * Patches chat model methods (invoke, stream, batch) to inject Sentry callbacks\n * Finds a chat model class from the provider package exports and patches its prototype methods\n */\n private _patchRunnableMethods(exports: PatchedLangChainExports, sentryHandler: unknown): void {\n // Known chat model class names for each provider\n const knownChatModelNames = [\n 'ChatAnthropic',\n 'ChatOpenAI',\n 'ChatGoogleGenerativeAI',\n 'ChatMistralAI',\n 'ChatVertexAI',\n 'ChatGroq',\n 'ConfigurableModel',\n ];\n\n const exportsToPatch = (exports.universal_exports ?? exports) as Record<string, unknown>;\n\n const chatModelClass = Object.values(exportsToPatch).find(exp => {\n return typeof exp === 'function' && knownChatModelNames.includes(exp.name);\n }) as { prototype: unknown; name: string } | undefined;\n\n if (!chatModelClass) {\n return;\n }\n\n // Patch directly on chatModelClass.prototype\n const targetProto = chatModelClass.prototype as Record<string, unknown>;\n\n // Skip if already patched (both file-level and module-level hooks resolve to the same prototype)\n if (targetProto.__sentry_patched__) {\n return;\n }\n targetProto.__sentry_patched__ = true;\n\n // Patch the methods (invoke, stream, batch)\n // All chat model instances will inherit these patched methods\n const methodsToPatch = ['invoke', 'stream', 'batch'] as const;\n\n for (const methodName of methodsToPatch) {\n const method = targetProto[methodName];\n if (typeof method === 'function') {\n targetProto[methodName] = wrapRunnableMethod(\n method as (...args: unknown[]) => unknown,\n sentryHandler,\n methodName,\n );\n }\n }\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","exports","InstrumentationNodeModuleFile","_INTERNAL_skipAiProviderWrapping","OPENAI_INTEGRATION_NAME","ANTHROPIC_AI_INTEGRATION_NAME","GOOGLE_GENAI_INTEGRATION_NAME","createLangChainCallbackHandler"],"mappings":";;;;;AAiBA,MAAM,iBAAA,GAAoB,CAAC,gBAAgB,CAAC;;AAW5C;AACA;AACA;AACA,SAAS,uBAAuB,CAAC,QAAQ,EAAW,aAAa,EAAoB;AACrF;AACA,EAAE,IAAI,CAAC,QAAQ,EAAE;AACjB,IAAI,OAAO,CAAC,aAAa,CAAC;AAC1B,EAAE;;AAEF;AACA,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AAC/B;AACA,IAAI,IAAI,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;AAC1C,MAAM,OAAO,QAAQ;AACrB,IAAI;AACJ;AACA,IAAI,OAAO,CAAC,GAAG,QAAQ,EAAE,aAAa,CAAC;AACvC,EAAE;;AAEF;AACA,EAAE,IAAI,OAAO,QAAA,KAAa,QAAQ,EAAE;AACpC,IAAI,OAAO,CAAC,QAAQ,EAAE,aAAa,CAAC;AACpC,EAAE;;AAEF;AACA,EAAE,OAAO,QAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA,SAAS,kBAAkB;AAC3B,EAAE,cAAc;AAChB,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAmC;AACnC,EAAE,OAAO,IAAI,KAAK,CAAC,cAAc,EAAE;AACnC,IAAI,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAsB;AACrD;AACA;AACA;AACA;;AAEA;AACA,MAAM,MAAM,YAAA,GAAe,CAAC;AAC5B,MAAM,IAAI,OAAA,GAAU,IAAI,CAAC,YAAY,CAAA;;AAErC;AACA,MAAM,IAAI,CAAC,OAAA,IAAW,OAAO,OAAA,KAAY,QAAA,IAAY,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AAC7E,QAAQ,OAAA,GAAU,EAAE;AACpB,QAAQ,IAAI,CAAC,YAAY,CAAA,GAAI,OAAO;AACpC,MAAM;;AAEN;AACA,MAAM,MAAM,iBAAA,GAAoB,OAAO,CAAC,SAAS;AACjD,MAAM,MAAM,qBAAqB,uBAAuB,CAAC,iBAAiB,EAAE,aAAa,CAAC;AAC1F,MAAM,OAAO,CAAC,SAAA,GAAY,kBAAkB;;AAE5C;AACA,MAAM,OAAO,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AACjD,IAAI,CAAC;AACL,GAAG,CAAA;AACH;;AAEA;AACA;AACA;AACO,MAAM,8BAAA,SAAuCA,mCAAmB,CAAkC;AACzG,GAAS,WAAW,CAAC,MAAM,GAAoC,EAAE,EAAE;AACnE,IAAI,KAAK,CAAC,mCAAmC,EAAEC,gBAAW,EAAE,MAAM,CAAC;AACnE,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAS,IAAI,GAAwE;AACrF,IAAI,MAAM,OAAO,GAAsC,EAAE;;AAEzD;AACA,IAAI,MAAM,mBAAmB;AAC7B,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,yBAAyB;AAC/B,MAAM,sBAAsB;AAC5B,MAAM,4BAA4B;AAClC,MAAM,iBAAiB;AACvB,KAAK;;AAEL,IAAI,KAAK,MAAM,WAAA,IAAe,gBAAgB,EAAE;AAChD;AACA;AACA;AACA;AACA,MAAM,OAAO,CAAC,IAAI;AAClB,QAAQ,IAAIC,mDAAmC;AAC/C,UAAU,WAAW;AACrB,UAAU,iBAAiB;AAC3B,UAAU,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;AAChC,UAAUC,SAAA,IAAWA,SAAO;AAC5B,UAAU;AACV,YAAY,IAAIC,6CAA6B;AAC7C,cAAc,CAAC,EAAA,WAAA,CAAA,eAAA,CAAA;AACA,cAAA,iBAAA;AACA,cAAA,IAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA;AACA,cAAAD,SAAA,IAAAA,SAAA;AACA,aAAA;AACA,WAAA;AACA,SAAA;AACA,OAAA;AACA,IAAA;;AAEA;AACA,IAAA,OAAA,CAAA,IAAA;AACA,MAAA,IAAAD,mDAAA;AACA,QAAA,WAAA;AACA,QAAA,iBAAA;AACA,QAAA,IAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA;AACA,QAAAC,SAAA,IAAAA,SAAA;AACA,QAAA;AACA;AACA,UAAA,IAAAC,6CAAA;AACA,YAAA,0CAAA;AACA,YAAA,iBAAA;AACA,YAAA,IAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA;AACA,YAAAD,SAAA,IAAAA,SAAA;AACA,WAAA;AACA,SAAA;AACA,OAAA;AACA,KAAA;;AAEA,IAAA,OAAA,OAAA;AACA,EAAA;;AAEA;AACA;AACA;AACA;AACA,GAAA,MAAA,CAAAA,SAAA,EAAA;AACA;AACA;AACA,IAAAE,qCAAA,CAAA;AACA,MAAAC,4BAAA;AACA,MAAAC,kCAAA;AACA,MAAAC,kCAAA;AACA,KAAA,CAAA;;AAEA;AACA,IAAA,MAAA,aAAA,GAAAC,mCAAA,CAAA,IAAA,CAAA,SAAA,EAAA,CAAA;;AAEA;AACA;AACA,IAAA,IAAA,CAAA,qBAAA,CAAAN,SAAA,EAAA,aAAA,CAAA;;AAEA,IAAA,OAAAA,SAAA;AACA,EAAA;;AAEA;AACA;AACA;AACA;AACA,GAAA,qBAAA,CAAAA,SAAA,EAAA,aAAA,EAAA;AACA;AACA,IAAA,MAAA,mBAAA,GAAA;AACA,MAAA,eAAA;AACA,MAAA,YAAA;AACA,MAAA,wBAAA;AACA,MAAA,eAAA;AACA,MAAA,cAAA;AACA,MAAA,UAAA;AACA,MAAA,mBAAA;AACA,KAAA;;AAEA,IAAA,MAAA,cAAA,IAAAA,SAAA,CAAA,iBAAA,IAAAA,SAAA,CAAA;;AAEA,IAAA,MAAA,cAAA,GAAA,MAAA,CAAA,MAAA,CAAA,cAAA,CAAA,CAAA,IAAA,CAAA,GAAA,IAAA;AACA,MAAA,OAAA,OAAA,GAAA,KAAA,UAAA,IAAA,mBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,IAAA,CAAA;AACA,IAAA,CAAA,CAAA;;AAEA,IAAA,IAAA,CAAA,cAAA,EAAA;AACA,MAAA;AACA,IAAA;;AAEA;AACA,IAAA,MAAA,WAAA,GAAA,cAAA,CAAA,SAAA;;AAEA;AACA,IAAA,IAAA,WAAA,CAAA,kBAAA,EAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA,WAAA,CAAA,kBAAA,GAAA,IAAA;;AAEA;AACA;AACA,IAAA,MAAA,cAAA,GAAA,CAAA,QAAA,EAAA,QAAA,EAAA,OAAA,CAAA;;AAEA,IAAA,KAAA,MAAA,UAAA,IAAA,cAAA,EAAA;AACA,MAAA,MAAA,MAAA,GAAA,WAAA,CAAA,UAAA,CAAA;AACA,MAAA,IAAA,OAAA,MAAA,KAAA,UAAA,EAAA;AACA,QAAA,WAAA,CAAA,UAAA,CAAA,GAAA,kBAAA;AACA,UAAA,MAAA;AACA,UAAA,aAEA,CAAA;AACA,MAAA;AACA,IAAA;AACA,EAAA;AACA;;;;"}
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../src/integrations/tracing/langchain/instrumentation.ts"],"sourcesContent":["import {\n InstrumentationBase,\n type InstrumentationConfig,\n type InstrumentationModuleDefinition,\n InstrumentationNodeModuleDefinition,\n} from '@opentelemetry/instrumentation';\nimport { InstrumentationNodeModuleFile } from '../InstrumentationNodeModuleFile';\nimport type { LangChainOptions } from '@sentry/core';\nimport {\n _INTERNAL_mergeLangChainCallbackHandler,\n _INTERNAL_skipAiProviderWrapping,\n ANTHROPIC_AI_INTEGRATION_NAME,\n createLangChainCallbackHandler,\n GOOGLE_GENAI_INTEGRATION_NAME,\n instrumentLangChainEmbeddings,\n OPENAI_INTEGRATION_NAME,\n SDK_VERSION,\n} from '@sentry/core';\n\nconst supportedVersions = ['>=0.1.0 <2.0.0'];\n\ntype LangChainInstrumentationOptions = InstrumentationConfig & LangChainOptions;\n\n/**\n * Represents the patched shape of LangChain provider package exports\n */\ninterface PatchedLangChainExports {\n [key: string]: unknown;\n}\n\n/**\n * Wraps Runnable methods (invoke, stream, batch) to inject Sentry callbacks at request time\n * Uses a Proxy to intercept method calls and augment the options.callbacks\n */\nfunction wrapRunnableMethod(\n originalMethod: (...args: unknown[]) => unknown,\n sentryHandler: unknown,\n _methodName: string,\n): (...args: unknown[]) => unknown {\n return new Proxy(originalMethod, {\n apply(target, thisArg, args: unknown[]): unknown {\n // LangChain Runnable method signatures:\n // invoke(input, options?) - options contains callbacks\n // stream(input, options?) - options contains callbacks\n // batch(inputs, options?) - options contains callbacks\n\n // Options is typically the second argument\n const optionsIndex = 1;\n let options = args[optionsIndex] as Record<string, unknown> | undefined;\n\n // If options don't exist or aren't an object, create them\n if (!options || typeof options !== 'object' || Array.isArray(options)) {\n options = {};\n args[optionsIndex] = options;\n }\n\n // Inject our callback handler into options.callbacks (request time callbacks)\n options.callbacks = _INTERNAL_mergeLangChainCallbackHandler(options.callbacks, sentryHandler);\n\n // Call original method with augmented options\n return Reflect.apply(target, thisArg, args);\n },\n }) as (...args: unknown[]) => unknown;\n}\n\n/**\n * Sentry LangChain instrumentation using OpenTelemetry.\n */\nexport class SentryLangChainInstrumentation extends InstrumentationBase<LangChainInstrumentationOptions> {\n public constructor(config: LangChainInstrumentationOptions = {}) {\n super('@sentry/instrumentation-langchain', SDK_VERSION, config);\n }\n\n /**\n * Initializes the instrumentation by defining the modules to be patched.\n * We patch the BaseChatModel class methods to inject callbacks\n *\n * We hook into provider packages (@langchain/anthropic, @langchain/openai, etc.)\n * because @langchain/core is often bundled and not loaded as a separate module\n */\n public init(): InstrumentationModuleDefinition | InstrumentationModuleDefinition[] {\n const modules: InstrumentationModuleDefinition[] = [];\n\n // Hook into common LangChain provider packages\n const providerPackages = [\n '@langchain/anthropic',\n '@langchain/openai',\n '@langchain/google-genai',\n '@langchain/mistralai',\n '@langchain/google-vertexai',\n '@langchain/groq',\n ];\n\n for (const packageName of providerPackages) {\n // In CJS, LangChain packages re-export from dist/index.cjs files.\n // Patching only the root module sometimes misses the real implementation or\n // gets overwritten when that file is loaded. We add a file-level patch so that\n // _patch runs again on the concrete implementation\n modules.push(\n new InstrumentationNodeModuleDefinition(\n packageName,\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n [\n new InstrumentationNodeModuleFile(\n `${packageName}/dist/index.cjs`,\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n ),\n ],\n ),\n );\n }\n\n // Hook into main 'langchain' package to catch initChatModel (v1+)\n modules.push(\n new InstrumentationNodeModuleDefinition(\n 'langchain',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n [\n // To catch the CJS build that contains ConfigurableModel / initChatModel for v1\n new InstrumentationNodeModuleFile(\n 'langchain/dist/chat_models/universal.cjs',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n ),\n ],\n ),\n );\n\n return modules;\n }\n\n /**\n * Core patch logic - patches chat model and embedding methods\n * This is called when a LangChain provider package is loaded\n */\n private _patch(exports: PatchedLangChainExports): PatchedLangChainExports | void {\n // Skip AI provider wrapping now that LangChain is actually being used\n // This prevents duplicate spans from Anthropic/OpenAI/GoogleGenAI standalone integrations\n _INTERNAL_skipAiProviderWrapping([\n OPENAI_INTEGRATION_NAME,\n ANTHROPIC_AI_INTEGRATION_NAME,\n GOOGLE_GENAI_INTEGRATION_NAME,\n ]);\n\n const config = this.getConfig();\n\n // Create a shared handler instance for chat model callbacks\n const sentryHandler = createLangChainCallbackHandler(config);\n\n // Patch Runnable methods to inject callbacks at request time\n // This directly manipulates options.callbacks that LangChain uses\n this._patchRunnableMethods(exports, sentryHandler);\n\n // Patch embedding methods to create spans directly\n // Embeddings don't use the callback system, so we wrap the methods themselves\n this._patchEmbeddingsMethods(exports, config);\n\n return exports;\n }\n\n /**\n * Patches chat model methods (invoke, stream, batch) to inject Sentry callbacks\n * Finds a chat model class from the provider package exports and patches its prototype methods\n */\n private _patchRunnableMethods(exports: PatchedLangChainExports, sentryHandler: unknown): void {\n // Known chat model class names for each provider\n const knownChatModelNames = [\n 'ChatAnthropic',\n 'ChatOpenAI',\n 'ChatGoogleGenerativeAI',\n 'ChatMistralAI',\n 'ChatVertexAI',\n 'ChatGroq',\n 'ConfigurableModel',\n ];\n\n const exportsToPatch = (exports.universal_exports ?? exports) as Record<string, unknown>;\n\n const chatModelClass = Object.values(exportsToPatch).find(exp => {\n return typeof exp === 'function' && knownChatModelNames.includes(exp.name);\n }) as { prototype: unknown; name: string } | undefined;\n\n if (!chatModelClass) {\n return;\n }\n\n // Patch directly on chatModelClass.prototype\n const targetProto = chatModelClass.prototype as Record<string, unknown>;\n\n // Skip if already patched (both file-level and module-level hooks resolve to the same prototype)\n if (targetProto.__sentry_patched__) {\n return;\n }\n targetProto.__sentry_patched__ = true;\n\n // Patch the methods (invoke, stream, batch)\n // All chat model instances will inherit these patched methods\n const methodsToPatch = ['invoke', 'stream', 'batch'] as const;\n\n for (const methodName of methodsToPatch) {\n const method = targetProto[methodName];\n if (typeof method === 'function') {\n targetProto[methodName] = wrapRunnableMethod(\n method as (...args: unknown[]) => unknown,\n sentryHandler,\n methodName,\n );\n }\n }\n }\n\n /**\n * Patches embedding class methods (embedQuery, embedDocuments) to create Sentry spans.\n *\n * Unlike chat models which use LangChain's callback system, the Embeddings base class\n * has no callback support. We wrap the methods directly on the prototype.\n *\n * Instruments any exported class whose prototype has both embedQuery and embedDocuments as functions.\n */\n private _patchEmbeddingsMethods(exports: PatchedLangChainExports, options: LangChainOptions): void {\n const exportsToPatch = (exports.universal_exports ?? exports) as Record<string, unknown>;\n\n for (const exp of Object.values(exportsToPatch)) {\n if (typeof exp !== 'function' || !exp.prototype) {\n continue;\n }\n const proto = exp.prototype as Record<string, unknown>;\n if (typeof proto.embedQuery !== 'function' || typeof proto.embedDocuments !== 'function') {\n continue;\n }\n if (proto.__sentry_patched__) {\n continue;\n }\n proto.__sentry_patched__ = true;\n\n instrumentLangChainEmbeddings(proto, options);\n }\n }\n}\n"],"names":["_INTERNAL_mergeLangChainCallbackHandler","InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","_INTERNAL_skipAiProviderWrapping","OPENAI_INTEGRATION_NAME","ANTHROPIC_AI_INTEGRATION_NAME","GOOGLE_GENAI_INTEGRATION_NAME","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],"mappings":"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"}
@@ -6,86 +6,16 @@ const instrumentation = require('./instrumentation.js');
6
6
 
7
7
  const instrumentLangGraph = nodeCore.generateInstrumentOnce(
8
8
  core.LANGGRAPH_INTEGRATION_NAME,
9
- options => new instrumentation.SentryLangGraphInstrumentation(options),
9
+ (options) => new instrumentation.SentryLangGraphInstrumentation(options)
10
10
  );
11
-
12
11
  const _langGraphIntegration = ((options = {}) => {
13
12
  return {
14
13
  name: core.LANGGRAPH_INTEGRATION_NAME,
15
14
  setupOnce() {
16
15
  instrumentLangGraph(options);
17
- },
16
+ }
18
17
  };
19
- }) ;
20
-
21
- /**
22
- * Adds Sentry tracing instrumentation for LangGraph.
23
- *
24
- * This integration is enabled by default.
25
- *
26
- * When configured, this integration automatically instruments LangGraph StateGraph and compiled graph instances
27
- * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
28
- *
29
- * @example
30
- * ```javascript
31
- * import * as Sentry from '@sentry/node';
32
- *
33
- * Sentry.init({
34
- * integrations: [Sentry.langGraphIntegration()],
35
- * });
36
- * ```
37
- *
38
- * ## Options
39
- *
40
- * - `recordInputs`: Whether to record input messages (default: respects `sendDefaultPii` client option)
41
- * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
42
- *
43
- * ### Default Behavior
44
- *
45
- * By default, the integration will:
46
- * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
47
- * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
48
- *
49
- * @example
50
- * ```javascript
51
- * // Record inputs and outputs when sendDefaultPii is false
52
- * Sentry.init({
53
- * integrations: [
54
- * Sentry.langGraphIntegration({
55
- * recordInputs: true,
56
- * recordOutputs: true
57
- * })
58
- * ],
59
- * });
60
- *
61
- * // Never record inputs/outputs regardless of sendDefaultPii
62
- * Sentry.init({
63
- * sendDefaultPii: true,
64
- * integrations: [
65
- * Sentry.langGraphIntegration({
66
- * recordInputs: false,
67
- * recordOutputs: false
68
- * })
69
- * ],
70
- * });
71
- * ```
72
- *
73
- * ## Captured Operations
74
- *
75
- * The integration captures the following LangGraph operations:
76
- * - **Agent Creation** (`StateGraph.compile()`) - Creates a `gen_ai.create_agent` span
77
- * - **Agent Invocation** (`CompiledGraph.invoke()`) - Creates a `gen_ai.invoke_agent` span
78
- *
79
- * ## Captured Data
80
- *
81
- * When `recordInputs` and `recordOutputs` are enabled, the integration captures:
82
- * - Input messages from the graph state
83
- * - Output messages and LLM responses
84
- * - Tool calls made during agent execution
85
- * - Agent and graph names
86
- * - Available tools configured in the graph
87
- *
88
- */
18
+ });
89
19
  const langGraphIntegration = core.defineIntegration(_langGraphIntegration);
90
20
 
91
21
  exports.instrumentLangGraph = instrumentLangGraph;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/langgraph/index.ts"],"sourcesContent":["import type { IntegrationFn, LangGraphOptions } from '@sentry/core';\nimport { defineIntegration, LANGGRAPH_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryLangGraphInstrumentation } from './instrumentation';\n\nexport const instrumentLangGraph = generateInstrumentOnce<LangGraphOptions>(\n LANGGRAPH_INTEGRATION_NAME,\n options => new SentryLangGraphInstrumentation(options),\n);\n\nconst _langGraphIntegration = ((options: LangGraphOptions = {}) => {\n return {\n name: LANGGRAPH_INTEGRATION_NAME,\n setupOnce() {\n instrumentLangGraph(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for LangGraph.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments LangGraph StateGraph and compiled graph instances\n * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.langGraphIntegration()],\n * });\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record input messages (default: respects `sendDefaultPii` client option)\n * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options\n * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled\n *\n * @example\n * ```javascript\n * // Record inputs and outputs when sendDefaultPii is false\n * Sentry.init({\n * integrations: [\n * Sentry.langGraphIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of sendDefaultPii\n * Sentry.init({\n * sendDefaultPii: true,\n * integrations: [\n * Sentry.langGraphIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n * ## Captured Operations\n *\n * The integration captures the following LangGraph operations:\n * - **Agent Creation** (`StateGraph.compile()`) - Creates a `gen_ai.create_agent` span\n * - **Agent Invocation** (`CompiledGraph.invoke()`) - Creates a `gen_ai.invoke_agent` span\n *\n * ## Captured Data\n *\n * When `recordInputs` and `recordOutputs` are enabled, the integration captures:\n * - Input messages from the graph state\n * - Output messages and LLM responses\n * - Tool calls made during agent execution\n * - Agent and graph names\n * - Available tools configured in the graph\n *\n */\nexport const langGraphIntegration = defineIntegration(_langGraphIntegration);\n"],"names":["generateInstrumentOnce","LANGGRAPH_INTEGRATION_NAME","SentryLangGraphInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,mBAAA,GAAsBA,+BAAsB;AACzD,EAAEC,+BAA0B;AAC5B,EAAE,WAAW,IAAIC,8CAA8B,CAAC,OAAO,CAAC;AACxD;;AAEA,MAAM,qBAAA,IAAyB,CAAC,OAAO,GAAqB,EAAE,KAAK;AACnE,EAAE,OAAO;AACT,IAAI,IAAI,EAAED,+BAA0B;AACpC,IAAI,SAAS,GAAG;AAChB,MAAM,mBAAmB,CAAC,OAAO,CAAC;AAClC,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,oBAAA,GAAuBE,sBAAiB,CAAC,qBAAqB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/langgraph/index.ts"],"sourcesContent":["import type { IntegrationFn, LangGraphOptions } from '@sentry/core';\nimport { defineIntegration, LANGGRAPH_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryLangGraphInstrumentation } from './instrumentation';\n\nexport const instrumentLangGraph = generateInstrumentOnce<LangGraphOptions>(\n LANGGRAPH_INTEGRATION_NAME,\n options => new SentryLangGraphInstrumentation(options),\n);\n\nconst _langGraphIntegration = ((options: LangGraphOptions = {}) => {\n return {\n name: LANGGRAPH_INTEGRATION_NAME,\n setupOnce() {\n instrumentLangGraph(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for LangGraph.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments LangGraph StateGraph and compiled graph instances\n * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.langGraphIntegration()],\n * });\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record prompt messages (default: follows `dataCollection.genAI.inputs`, or the deprecated `sendDefaultPii` option)\n * - `recordOutputs`: Whether to record response text (default: follows `dataCollection.genAI.outputs`, or the deprecated `sendDefaultPii` option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs based on `dataCollection.genAI` in your Sentry client options\n * (or the deprecated `sendDefaultPii` option, for backwards compatibility)\n * - Integration-level `recordInputs`/`recordOutputs` options take precedence over global config\n *\n * @example\n * ```javascript\n * // Always record inputs and outputs regardless of global dataCollection config\n * Sentry.init({\n * integrations: [\n * Sentry.langGraphIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of global dataCollection config\n * Sentry.init({\n * dataCollection: { genAI: { inputs: true, outputs: true } },\n * integrations: [\n * Sentry.langGraphIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n * ## Captured Operations\n *\n * The integration captures the following LangGraph operations:\n * - **Agent Creation** (`StateGraph.compile()`) - Creates a `gen_ai.create_agent` span\n * - **Agent Invocation** (`CompiledGraph.invoke()`) - Creates a `gen_ai.invoke_agent` span\n *\n * ## Captured Data\n *\n * When `recordInputs` and `recordOutputs` are enabled, the integration captures:\n * - Input messages from the graph state\n * - Output messages and LLM responses\n * - Tool calls made during agent execution\n * - Agent and graph names\n * - Available tools configured in the graph\n *\n */\nexport const langGraphIntegration = defineIntegration(_langGraphIntegration);\n"],"names":["generateInstrumentOnce","LANGGRAPH_INTEGRATION_NAME","SentryLangGraphInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,mBAAA,GAAsBA,+BAAA;AAAA,EACjCC,+BAAA;AAAA,EACA,CAAA,OAAA,KAAW,IAAIC,8CAAA,CAA+B,OAAO;AACvD;AAEA,MAAM,qBAAA,IAAyB,CAAC,OAAA,GAA4B,EAAC,KAAM;AACjE,EAAA,OAAO;AAAA,IACL,IAAA,EAAMD,+BAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,mBAAA,CAAoB,OAAO,CAAA;AAAA,IAC7B;AAAA,GACF;AACF,CAAA,CAAA;AAuEO,MAAM,oBAAA,GAAuBE,uBAAkB,qBAAqB;;;;;"}