@depup/sentry__node 10.48.0-depup.0 → 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 (987) hide show
  1. package/README.md +5 -6
  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 +76 -67
  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 +22 -34
  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 -97
  151. package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
  152. package/build/cjs/integrations/tracing/langchain/instrumentation.js +57 -151
  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 +23 -21
  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 +22 -34
  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 -97
  397. package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
  398. package/build/esm/integrations/tracing/langchain/instrumentation.js +57 -151
  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 +3 -1
  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 +12 -9
  642. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  643. package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
  644. package/build/types/integrations/tracing/langgraph/index.d.ts +11 -8
  645. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  646. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  647. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -1
  648. package/build/types/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  649. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
  650. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  651. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
  652. package/build/{types-ts3.8/integrations/tracing/mongo.d.ts → types/integrations/tracing/mongo/index.d.ts} +22 -24
  653. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
  654. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  655. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
  656. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  657. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
  658. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  659. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
  660. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  661. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
  662. package/build/types/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  663. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
  664. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  665. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
  666. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  667. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
  668. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  669. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
  670. package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  671. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
  672. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  673. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
  674. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  675. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
  676. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  677. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
  678. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  679. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
  680. package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  681. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
  682. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  683. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
  684. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  685. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
  686. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  687. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
  688. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  689. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
  690. package/build/types/integrations/tracing/openai/index.d.ts +11 -8
  691. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  692. package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  693. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
  694. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  695. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
  696. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  697. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
  698. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  699. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
  700. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  701. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
  702. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  703. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
  704. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  705. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
  706. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  707. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
  708. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  709. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
  710. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  711. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
  712. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  713. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  714. package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
  715. package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
  716. package/build/types/integrations/tracing/redis/index.d.ts +28 -0
  717. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -0
  718. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  719. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -0
  720. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  721. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -0
  722. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  723. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -0
  724. package/build/types/integrations/tracing/redis/vendored/types.d.ts +24 -0
  725. package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -0
  726. package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  727. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
  728. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  729. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
  730. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  731. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
  732. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  733. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
  734. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  735. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
  736. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  737. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  738. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
  739. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  740. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  741. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
  742. package/build/types/integrations/tracing/vercelai/types.d.ts +11 -4
  743. package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
  744. package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
  745. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
  746. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  747. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
  748. package/build/types/sdk/index.d.ts +18 -0
  749. package/build/types/sdk/index.d.ts.map +1 -1
  750. package/build/types/sdk/initOtel.d.ts +2 -3
  751. package/build/types/sdk/initOtel.d.ts.map +1 -1
  752. package/build/types/utils/redisCache.d.ts +1 -1
  753. package/build/types/utils/redisCache.d.ts.map +1 -1
  754. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  755. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
  756. package/build/types-ts3.8/index.d.ts +6 -4
  757. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  758. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  759. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  760. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  761. package/build/types-ts3.8/integrations/fs/index.d.ts +14 -0
  762. package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
  763. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +3 -0
  764. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +23 -0
  765. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
  766. package/build/types-ts3.8/integrations/http.d.ts +12 -17
  767. package/build/types-ts3.8/integrations/node-fetch.d.ts +8 -35
  768. package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  769. package/build/types-ts3.8/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  770. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  771. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  772. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  773. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  774. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  775. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  776. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  777. package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  778. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  779. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  780. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
  781. package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  782. package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  783. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  784. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  785. package/build/types-ts3.8/integrations/tracing/express.d.ts +3 -1
  786. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  787. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  788. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  789. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  790. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  791. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
  792. package/build/types-ts3.8/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  793. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  794. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  795. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +11 -8
  796. package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  797. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  798. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  799. package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  800. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  801. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  802. package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  803. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  804. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  805. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +4 -2
  806. package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  807. package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  808. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  809. package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  810. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  811. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +9 -1
  812. package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  813. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  814. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  815. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  816. package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  817. package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  818. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  819. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  820. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  821. package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  822. package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  823. package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  824. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  825. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +13 -0
  826. package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  827. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +12 -9
  828. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +11 -8
  829. package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  830. package/build/types-ts3.8/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  831. package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  832. package/build/{types/integrations/tracing/mongo.d.ts → types-ts3.8/integrations/tracing/mongo/index.d.ts} +22 -24
  833. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  834. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  835. package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  836. package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  837. package/build/types-ts3.8/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  838. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  839. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  840. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  841. package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  842. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  843. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  844. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  845. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  846. package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  847. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  848. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  849. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  850. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  851. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +11 -8
  852. package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  853. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  854. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  855. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  856. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  857. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  858. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  859. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  860. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  861. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  862. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  863. package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
  864. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +28 -0
  865. package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  866. package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  867. package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  868. package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +24 -0
  869. package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  870. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  871. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  872. package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  873. package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  874. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  875. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
  876. package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  877. package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +11 -4
  878. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
  879. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  880. package/build/types-ts3.8/sdk/index.d.ts +18 -0
  881. package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
  882. package/build/types-ts3.8/utils/redisCache.d.ts +1 -1
  883. package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  884. package/changes.json +6 -10
  885. package/package.json +30 -45
  886. package/build/cjs/integrations/fs.js +0 -142
  887. package/build/cjs/integrations/fs.js.map +0 -1
  888. package/build/cjs/integrations/tracing/amqplib.js +0 -47
  889. package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
  890. package/build/cjs/integrations/tracing/connect.js +0 -110
  891. package/build/cjs/integrations/tracing/connect.js.map +0 -1
  892. package/build/cjs/integrations/tracing/dataloader.js +0 -72
  893. package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
  894. package/build/cjs/integrations/tracing/genericPool.js +0 -59
  895. package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
  896. package/build/cjs/integrations/tracing/graphql.js +0 -127
  897. package/build/cjs/integrations/tracing/graphql.js.map +0 -1
  898. package/build/cjs/integrations/tracing/kafka.js +0 -48
  899. package/build/cjs/integrations/tracing/kafka.js.map +0 -1
  900. package/build/cjs/integrations/tracing/knex.js +0 -57
  901. package/build/cjs/integrations/tracing/knex.js.map +0 -1
  902. package/build/cjs/integrations/tracing/koa.js +0 -138
  903. package/build/cjs/integrations/tracing/koa.js.map +0 -1
  904. package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
  905. package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
  906. package/build/cjs/integrations/tracing/mongo.js +0 -93
  907. package/build/cjs/integrations/tracing/mongo.js.map +0 -1
  908. package/build/cjs/integrations/tracing/mongoose.js +0 -46
  909. package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
  910. package/build/cjs/integrations/tracing/mysql.js +0 -38
  911. package/build/cjs/integrations/tracing/mysql.js.map +0 -1
  912. package/build/cjs/integrations/tracing/mysql2.js +0 -46
  913. package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
  914. package/build/cjs/integrations/tracing/postgres.js +0 -48
  915. package/build/cjs/integrations/tracing/postgres.js.map +0 -1
  916. package/build/cjs/integrations/tracing/prisma.js +0 -203
  917. package/build/cjs/integrations/tracing/prisma.js.map +0 -1
  918. package/build/cjs/integrations/tracing/redis.js +0 -121
  919. package/build/cjs/integrations/tracing/redis.js.map +0 -1
  920. package/build/cjs/integrations/tracing/tedious.js +0 -67
  921. package/build/cjs/integrations/tracing/tedious.js.map +0 -1
  922. package/build/esm/integrations/fs.js +0 -140
  923. package/build/esm/integrations/fs.js.map +0 -1
  924. package/build/esm/integrations/tracing/amqplib.js +0 -44
  925. package/build/esm/integrations/tracing/amqplib.js.map +0 -1
  926. package/build/esm/integrations/tracing/connect.js +0 -106
  927. package/build/esm/integrations/tracing/connect.js.map +0 -1
  928. package/build/esm/integrations/tracing/dataloader.js +0 -69
  929. package/build/esm/integrations/tracing/dataloader.js.map +0 -1
  930. package/build/esm/integrations/tracing/genericPool.js +0 -56
  931. package/build/esm/integrations/tracing/genericPool.js.map +0 -1
  932. package/build/esm/integrations/tracing/graphql.js +0 -124
  933. package/build/esm/integrations/tracing/graphql.js.map +0 -1
  934. package/build/esm/integrations/tracing/kafka.js +0 -45
  935. package/build/esm/integrations/tracing/kafka.js.map +0 -1
  936. package/build/esm/integrations/tracing/knex.js +0 -54
  937. package/build/esm/integrations/tracing/knex.js.map +0 -1
  938. package/build/esm/integrations/tracing/koa.js +0 -134
  939. package/build/esm/integrations/tracing/koa.js.map +0 -1
  940. package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
  941. package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
  942. package/build/esm/integrations/tracing/mongo.js +0 -89
  943. package/build/esm/integrations/tracing/mongo.js.map +0 -1
  944. package/build/esm/integrations/tracing/mongoose.js +0 -43
  945. package/build/esm/integrations/tracing/mongoose.js.map +0 -1
  946. package/build/esm/integrations/tracing/mysql.js +0 -35
  947. package/build/esm/integrations/tracing/mysql.js.map +0 -1
  948. package/build/esm/integrations/tracing/mysql2.js +0 -43
  949. package/build/esm/integrations/tracing/mysql2.js.map +0 -1
  950. package/build/esm/integrations/tracing/postgres.js +0 -45
  951. package/build/esm/integrations/tracing/postgres.js.map +0 -1
  952. package/build/esm/integrations/tracing/prisma.js +0 -200
  953. package/build/esm/integrations/tracing/prisma.js.map +0 -1
  954. package/build/esm/integrations/tracing/redis.js +0 -117
  955. package/build/esm/integrations/tracing/redis.js.map +0 -1
  956. package/build/esm/integrations/tracing/tedious.js +0 -64
  957. package/build/esm/integrations/tracing/tedious.js.map +0 -1
  958. package/build/types/integrations/fs.d.ts +0 -24
  959. package/build/types/integrations/fs.d.ts.map +0 -1
  960. package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
  961. package/build/types/integrations/tracing/connect.d.ts.map +0 -1
  962. package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
  963. package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
  964. package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
  965. package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
  966. package/build/types/integrations/tracing/knex.d.ts.map +0 -1
  967. package/build/types/integrations/tracing/koa.d.ts.map +0 -1
  968. package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
  969. package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
  970. package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
  971. package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
  972. package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
  973. package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
  974. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -38
  975. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
  976. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -31
  977. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
  978. package/build/types/integrations/tracing/prisma.d.ts +0 -50
  979. package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
  980. package/build/types/integrations/tracing/redis.d.ts +0 -41
  981. package/build/types/integrations/tracing/redis.d.ts.map +0 -1
  982. package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
  983. package/build/types-ts3.8/integrations/fs.d.ts +0 -24
  984. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -44
  985. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -34
  986. package/build/types-ts3.8/integrations/tracing/prisma.d.ts +0 -50
  987. package/build/types-ts3.8/integrations/tracing/redis.d.ts +0 -41
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/mysql/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mysql\n * - Upstream version: @opentelemetry/instrumentation-mysql@0.64.0\n * - Types from the `mysql` package inlined as simplified interfaces\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs, and the connection-pool\n * metrics / `enhancedDatabaseReporting` option were removed (unused by the Sentry SDK)\n */\n\nimport type { Span } from '@opentelemetry/api';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport type { Scope, SpanAttributes } from '@sentry/core';\nimport {\n bindScopeToEmitter,\n getCurrentScope,\n SDK_VERSION,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_KIND,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n withActiveSpan,\n withScope,\n} from '@sentry/core';\nimport {\n DB_NAME,\n DB_STATEMENT,\n DB_SYSTEM,\n DB_USER,\n NET_PEER_NAME,\n NET_PEER_PORT,\n} from '@sentry/conventions/attributes';\nimport type * as mysqlTypes from './mysql-types';\nimport { ATTR_DB_CONNECTION_STRING, DB_SYSTEM_VALUE_MYSQL } from './semconv';\nimport { getConfig, getDbQueryText, getJDBCString, getSpanName } from './utils';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-mysql';\nconst ORIGIN = 'auto.db.otel.mysql';\n\ntype getConnectionCallbackType = (err: mysqlTypes.MysqlError, connection: mysqlTypes.PoolConnection) => void;\n\nexport class MySQLInstrumentation extends InstrumentationBase<InstrumentationConfig> {\n public constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n protected init() {\n return [\n new InstrumentationNodeModuleDefinition(\n 'mysql',\n ['>=2.0.0 <3'],\n (moduleExports: typeof mysqlTypes) => {\n if (isWrapped(moduleExports.createConnection)) {\n this._unwrap(moduleExports, 'createConnection');\n }\n // oxlint-disable-next-line typescript/no-explicit-any\n this._wrap(moduleExports, 'createConnection', this._patchCreateConnection() as any);\n\n if (isWrapped(moduleExports.createPool)) {\n this._unwrap(moduleExports, 'createPool');\n }\n // oxlint-disable-next-line typescript/no-explicit-any\n this._wrap(moduleExports, 'createPool', this._patchCreatePool() as any);\n\n if (isWrapped(moduleExports.createPoolCluster)) {\n this._unwrap(moduleExports, 'createPoolCluster');\n }\n // oxlint-disable-next-line typescript/no-explicit-any\n this._wrap(moduleExports, 'createPoolCluster', this._patchCreatePoolCluster() as any);\n\n return moduleExports;\n },\n (moduleExports: typeof mysqlTypes) => {\n if (moduleExports === undefined) return;\n this._unwrap(moduleExports, 'createConnection');\n this._unwrap(moduleExports, 'createPool');\n this._unwrap(moduleExports, 'createPoolCluster');\n },\n ),\n ];\n }\n\n // global export function\n private _patchCreateConnection() {\n return (originalCreateConnection: Function) => {\n // oxlint-disable-next-line typescript/no-this-alias\n const thisPlugin = this;\n\n return function createConnection(_connectionUri: string | mysqlTypes.ConnectionConfig) {\n const originalResult = originalCreateConnection(...arguments);\n\n // This is unwrapped on next call after unpatch\n // oxlint-disable-next-line typescript/no-explicit-any\n thisPlugin._wrap(originalResult, 'query', thisPlugin._patchQuery(originalResult) as any);\n\n return originalResult;\n };\n };\n }\n\n // global export function\n private _patchCreatePool() {\n return (originalCreatePool: Function) => {\n // oxlint-disable-next-line typescript/no-this-alias\n const thisPlugin = this;\n return function createPool(_config: string | mysqlTypes.PoolConfig) {\n const pool = originalCreatePool(...arguments);\n\n thisPlugin._wrap(pool, 'query', thisPlugin._patchQuery(pool));\n thisPlugin._wrap(pool, 'getConnection', thisPlugin._patchGetConnection(pool));\n\n return pool;\n };\n };\n }\n\n // global export function\n private _patchCreatePoolCluster() {\n return (originalCreatePoolCluster: Function) => {\n // oxlint-disable-next-line typescript/no-this-alias\n const thisPlugin = this;\n return function createPool(_config: string | mysqlTypes.PoolConfig) {\n const cluster = originalCreatePoolCluster(...arguments);\n\n // This is unwrapped on next call after unpatch\n thisPlugin._wrap(cluster, 'getConnection', thisPlugin._patchGetConnection(cluster));\n\n return cluster;\n };\n };\n }\n\n // method on cluster or pool\n private _patchGetConnection(pool: mysqlTypes.Pool | mysqlTypes.PoolCluster) {\n return (originalGetConnection: Function) => {\n // oxlint-disable-next-line typescript/no-this-alias\n const thisPlugin = this;\n\n return function getConnection(arg1?: unknown, arg2?: unknown, arg3?: unknown) {\n // Unwrap if unpatch has been called\n if (!thisPlugin['_enabled']) {\n thisPlugin._unwrap(pool, 'getConnection');\n return originalGetConnection.apply(pool, arguments);\n }\n\n if (arguments.length === 1 && typeof arg1 === 'function') {\n const patchFn = thisPlugin._getConnectionCallbackPatchFn(arg1 as getConnectionCallbackType);\n return originalGetConnection.call(pool, patchFn);\n }\n if (arguments.length === 2 && typeof arg2 === 'function') {\n const patchFn = thisPlugin._getConnectionCallbackPatchFn(arg2 as getConnectionCallbackType);\n return originalGetConnection.call(pool, arg1, patchFn);\n }\n if (arguments.length === 3 && typeof arg3 === 'function') {\n const patchFn = thisPlugin._getConnectionCallbackPatchFn(arg3 as getConnectionCallbackType);\n return originalGetConnection.call(pool, arg1, arg2, patchFn);\n }\n\n return originalGetConnection.apply(pool, arguments);\n };\n };\n }\n\n private _getConnectionCallbackPatchFn(cb: getConnectionCallbackType) {\n // oxlint-disable-next-line typescript/no-this-alias\n const thisPlugin = this;\n const scope = getCurrentScope();\n return function (this: unknown, err: mysqlTypes.MysqlError, connection: mysqlTypes.PoolConnection) {\n if (connection) {\n // this is the callback passed into a query\n // no need to unwrap\n if (!isWrapped(connection.query)) {\n // oxlint-disable-next-line typescript/no-explicit-any\n thisPlugin._wrap(connection, 'query', thisPlugin._patchQuery(connection) as any);\n }\n }\n if (typeof cb === 'function') {\n withScope(scope, () => cb.call(this, err, connection));\n }\n };\n }\n\n private _patchQuery(connection: mysqlTypes.Connection | mysqlTypes.Pool) {\n return (originalQuery: Function) => {\n // oxlint-disable-next-line typescript/no-this-alias\n const thisPlugin = this;\n\n return function query(\n query: string | mysqlTypes.Query | mysqlTypes.QueryOptions,\n _valuesOrCallback?: unknown[] | mysqlTypes.queryCallback,\n _callback?: mysqlTypes.queryCallback,\n ) {\n if (!thisPlugin['_enabled']) {\n thisPlugin._unwrap(connection, 'query');\n return originalQuery.apply(connection, arguments);\n }\n\n const { host, port, database, user } = getConfig(connection.config);\n const portNumber = parseInt(String(port), 10);\n /* eslint-disable @sentry/no-deprecated-attributes */\n const attributes: SpanAttributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n [DB_SYSTEM]: DB_SYSTEM_VALUE_MYSQL,\n [ATTR_DB_CONNECTION_STRING]: getJDBCString(host, port, database),\n [DB_NAME]: database,\n [DB_USER]: user,\n [DB_STATEMENT]: getDbQueryText(query),\n [NET_PEER_NAME]: host,\n };\n\n if (!isNaN(portNumber)) {\n attributes[NET_PEER_PORT] = portNumber;\n }\n /* eslint-enable @sentry/no-deprecated-attributes */\n\n const span = startInactiveSpan({\n name: getSpanName(query),\n kind: SPAN_KIND.CLIENT,\n attributes,\n });\n\n const cbIndex = Array.from(arguments).findIndex(arg => typeof arg === 'function');\n\n const scope = getCurrentScope();\n if (cbIndex === -1) {\n const streamableQuery: mysqlTypes.Query = withActiveSpan(span, () => {\n return originalQuery.apply(connection, arguments);\n });\n bindScopeToEmitter(streamableQuery, scope);\n\n return streamableQuery\n .on('error', (err: unknown) => {\n span.setStatus({\n code: SPAN_STATUS_ERROR,\n message: (err as mysqlTypes.MysqlError).message,\n });\n })\n .on('end', () => {\n span.end();\n });\n } else {\n thisPlugin._wrap(arguments, cbIndex, thisPlugin._patchCallbackQuery(span, scope));\n\n return withActiveSpan(span, () => {\n return originalQuery.apply(connection, arguments);\n });\n }\n };\n };\n }\n\n private _patchCallbackQuery(span: Span, scope: Scope) {\n return (originalCallback: Function) => {\n return function (err: mysqlTypes.MysqlError | null, _results?: unknown, _fields?: mysqlTypes.FieldInfo[]) {\n if (err) {\n span.setStatus({\n code: SPAN_STATUS_ERROR,\n message: err.message,\n });\n }\n span.end();\n return withScope(scope, () => originalCallback(...arguments));\n };\n };\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","isWrapped","getCurrentScope","withScope","getConfig","attributes","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","DB_SYSTEM","DB_SYSTEM_VALUE_MYSQL","ATTR_DB_CONNECTION_STRING","getJDBCString","DB_NAME","DB_USER","DB_STATEMENT","getDbQueryText","NET_PEER_NAME","NET_PEER_PORT","startInactiveSpan","getSpanName","SPAN_KIND","withActiveSpan","bindScopeToEmitter","SPAN_STATUS_ERROR"],"mappings":";;;;;;;;AAwCA,MAAM,YAAA,GAAe,+BAAA;AACrB,MAAM,MAAA,GAAS,oBAAA;AAIR,MAAM,6BAA6BA,mCAAA,CAA2C;AAAA,EAC5E,WAAA,CAAY,MAAA,GAAgC,EAAC,EAAG;AACrD,IAAA,KAAA,CAAM,YAAA,EAAcC,kBAAa,MAAM,CAA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B,IAAA,EAAM,KAAK,CAAC,CAAA;AAEhF,UAAA,OAAOF,mBAAA,CAAe,MAAM,MAAM;AAChC,YAAA,OAAO,aAAA,CAAc,KAAA,CAAM,UAAA,EAAY,SAAS,CAAA;AAAA,UAClD,CAAC,CAAA;AAAA,QACH;AAAA,MACF,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AAAA,EAEQ,mBAAA,CAAoB,MAAY,KAAA,EAAc;AACpD,IAAA,OAAO,CAAC,gBAAA,KAA+B;AACrC,MAAA,OAAO,SAAU,GAAA,EAAmC,QAAA,EAAoB,OAAA,EAAkC;AACxG,QAAA,IAAI,GAAA,EAAK;AACP,UAAA,IAAA,CAAK,SAAA,CAAU;AAAA,YACb,IAAA,EAAME,sBAAA;AAAA,YACN,SAAS,GAAA,CAAI;AAAA,WACd,CAAA;AAAA,QACH;AACA,QAAA,IAAA,CAAK,GAAA,EAAI;AACT,QAAA,OAAOnB,eAAU,KAAA,EAAO,MAAM,gBAAA,CAAiB,GAAG,SAAS,CAAC,CAAA;AAAA,MAC9D,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AACF;;;;"}
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const ATTR_DB_CONNECTION_STRING = "db.connection_string";
4
+ const DB_SYSTEM_VALUE_MYSQL = "mysql";
5
+
6
+ exports.ATTR_DB_CONNECTION_STRING = ATTR_DB_CONNECTION_STRING;
7
+ exports.DB_SYSTEM_VALUE_MYSQL = DB_SYSTEM_VALUE_MYSQL;
8
+ //# sourceMappingURL=semconv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/mysql/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mysql\n * - Upstream version: @opentelemetry/instrumentation-mysql@0.64.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Deprecated, use `server.address`, `server.port` attributes instead.\n *\n * @example \"Server=(localdb)\\\\v11.0;Integrated Security=true;\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` and `server.port`.\n */\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\n\n/**\n * Enum value \"mysql\" for attribute `db.system`.\n *\n * MySQL\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const DB_SYSTEM_VALUE_MYSQL = 'mysql' as const;\n"],"names":[],"mappings":";;AAwBO,MAAM,yBAAA,GAA4B;AASlC,MAAM,qBAAA,GAAwB;;;;;"}
@@ -0,0 +1,38 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ function getConfig(config) {
4
+ const resolved = config?.connectionConfig || config || {};
5
+ const { host, port, database, user } = resolved;
6
+ return { host, port, database, user };
7
+ }
8
+ function getJDBCString(host, port, database) {
9
+ let jdbcString = `jdbc:mysql://${host || "localhost"}`;
10
+ if (typeof port === "number") {
11
+ jdbcString += `:${port}`;
12
+ }
13
+ if (typeof database === "string") {
14
+ jdbcString += `/${database}`;
15
+ }
16
+ return jdbcString;
17
+ }
18
+ function getDbQueryText(query) {
19
+ if (typeof query === "string") {
20
+ return query;
21
+ } else {
22
+ return query.sql;
23
+ }
24
+ }
25
+ function getSpanName(query) {
26
+ const rawQuery = typeof query === "object" ? query.sql : query;
27
+ const firstSpace = rawQuery?.indexOf(" ");
28
+ if (typeof firstSpace === "number" && firstSpace !== -1) {
29
+ return rawQuery?.substring(0, firstSpace);
30
+ }
31
+ return rawQuery;
32
+ }
33
+
34
+ exports.getConfig = getConfig;
35
+ exports.getDbQueryText = getDbQueryText;
36
+ exports.getJDBCString = getJDBCString;
37
+ exports.getSpanName = getSpanName;
38
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/mysql/vendored/utils.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mysql\n * - Upstream version: @opentelemetry/instrumentation-mysql@0.64.0\n * - Types from the `mysql` package inlined as simplified interfaces\n */\n\nimport type { ConnectionConfig, PoolConfig, Query, QueryOptions } from './mysql-types';\n\nexport function getConfig(config: ConnectionConfig | PoolConfig | undefined) {\n const resolved = (config as PoolConfig | undefined)?.connectionConfig || config || {};\n const { host, port, database, user } = resolved;\n return { host, port, database, user };\n}\n\nexport function getJDBCString(host: string | undefined, port: number | undefined, database: string | undefined) {\n let jdbcString = `jdbc:mysql://${host || 'localhost'}`;\n\n if (typeof port === 'number') {\n jdbcString += `:${port}`;\n }\n\n if (typeof database === 'string') {\n jdbcString += `/${database}`;\n }\n\n return jdbcString;\n}\n\n/**\n * @returns the database query being executed.\n */\nexport function getDbQueryText(query: string | Query | QueryOptions): string {\n if (typeof query === 'string') {\n return query;\n } else {\n return query.sql;\n }\n}\n\n/**\n * The span name SHOULD be set to a low cardinality value\n * representing the statement executed on the database.\n *\n * TODO: revisit span name based on https://github.com/open-telemetry/semantic-conventions/blob/v1.33.0/docs/database/database-spans.md#name\n *\n * @returns SQL statement without variable arguments or SQL verb\n */\nexport function getSpanName(query: string | Query | QueryOptions): string {\n const rawQuery = typeof query === 'object' ? query.sql : query;\n // Extract the SQL verb\n const firstSpace = rawQuery?.indexOf(' ');\n if (typeof firstSpace === 'number'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C;AACA,EAAA,OAAO,QAAA;AACT;;;;;;;"}
@@ -0,0 +1,22 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const instrumentation = require('./vendored/instrumentation.js');
4
+ const core = require('@sentry/core');
5
+ const nodeCore = require('@sentry/node-core');
6
+ const serverUtils = require('@sentry/server-utils');
7
+
8
+ const INTEGRATION_NAME = "Mysql2";
9
+ const instrumentMysql2 = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentation.MySQL2Instrumentation());
10
+ const _mysql2Integration = (() => {
11
+ return core.extendIntegration(serverUtils.mysql2Integration(), {
12
+ name: INTEGRATION_NAME,
13
+ setupOnce() {
14
+ instrumentMysql2();
15
+ }
16
+ });
17
+ });
18
+ const mysql2Integration = core.defineIntegration(_mysql2Integration);
19
+
20
+ exports.instrumentMysql2 = instrumentMysql2;
21
+ exports.mysql2Integration = mysql2Integration;
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/mysql2/index.ts"],"sourcesContent":["import { MySQL2Instrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, extendIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { mysql2Integration as mysql2ChannelIntegration } from '@sentry/server-utils';\n\nconst INTEGRATION_NAME = 'Mysql2' as const;\n\nexport const instrumentMysql2 = generateInstrumentOnce(INTEGRATION_NAME, () => new MySQL2Instrumentation());\n\nconst _mysql2Integration = (() => {\n // The diagnostics_channel subscription (mysql2 >= 3.20.0) lives in server-utils so it is shared\n // across server runtimes; we extend it here to also run the vendored OTel patcher for mysql2 < 3.20.0.\n return extendIntegration(mysql2ChannelIntegration(), {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMysql2();\n },\n });\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library.\n *\n * For more information, see the [`mysql2Integration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql2/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mysqlIntegration()],\n * });\n * ```\n */\nexport const mysql2Integration = defineIntegration(_mysql2Integration);\n"],"names":["generateInstrumentOnce","MySQL2Instrumentation","extendIntegration","mysql2ChannelIntegration","defineIntegration"],"mappings":";;;;;;;AAMA,MAAM,gBAAA,GAAmB,QAAA;AAElB,MAAM,mBAAmBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,uCAAuB;AAE1G,MAAM,sBAAsB,MAAM;AAGhC,EAAA,OAAOC,sBAAA,CAAkBC,+BAAyB,EAAG;AAAA,IACnD,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,gBAAA,EAAiB;AAAA,IACnB;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AAgBO,MAAM,iBAAA,GAAoBC,uBAAkB,kBAAkB;;;;;"}
@@ -0,0 +1,138 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const instrumentation = require('@opentelemetry/instrumentation');
4
+ const attributes = require('@sentry/conventions/attributes');
5
+ const core = require('@sentry/core');
6
+ const InstrumentationNodeModuleFile = require('../../InstrumentationNodeModuleFile.js');
7
+ const semconv = require('./semconv.js');
8
+ const utils = require('./utils.js');
9
+
10
+ const PACKAGE_NAME = "@sentry/instrumentation-mysql2";
11
+ const ORIGIN = "auto.db.otel.mysql2";
12
+ const supportedVersions = [">=1.4.2 <3.20.0"];
13
+ class MySQL2Instrumentation extends instrumentation.InstrumentationBase {
14
+ constructor(config = {}) {
15
+ super(PACKAGE_NAME, core.SDK_VERSION, config);
16
+ }
17
+ init() {
18
+ let format;
19
+ function setFormatFunction(moduleExports) {
20
+ if (!format && moduleExports.format) {
21
+ format = moduleExports.format;
22
+ }
23
+ }
24
+ const patch = (ConnectionPrototype) => {
25
+ if (instrumentation.isWrapped(ConnectionPrototype.query)) {
26
+ this._unwrap(ConnectionPrototype, "query");
27
+ }
28
+ this._wrap(ConnectionPrototype, "query", this._patchQuery(format));
29
+ if (instrumentation.isWrapped(ConnectionPrototype.execute)) {
30
+ this._unwrap(ConnectionPrototype, "execute");
31
+ }
32
+ this._wrap(ConnectionPrototype, "execute", this._patchQuery(format));
33
+ };
34
+ const unpatch = (ConnectionPrototype) => {
35
+ this._unwrap(ConnectionPrototype, "query");
36
+ this._unwrap(ConnectionPrototype, "execute");
37
+ };
38
+ return [
39
+ new instrumentation.InstrumentationNodeModuleDefinition(
40
+ "mysql2",
41
+ supportedVersions,
42
+ (moduleExports) => {
43
+ setFormatFunction(moduleExports);
44
+ return moduleExports;
45
+ },
46
+ () => {
47
+ },
48
+ [
49
+ new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
50
+ "mysql2/promise.js",
51
+ supportedVersions,
52
+ (moduleExports) => {
53
+ setFormatFunction(moduleExports);
54
+ return moduleExports;
55
+ },
56
+ () => {
57
+ }
58
+ ),
59
+ new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
60
+ "mysql2/lib/connection.js",
61
+ supportedVersions,
62
+ (moduleExports) => {
63
+ const ConnectionPrototype = utils.getConnectionPrototypeToInstrument(moduleExports);
64
+ patch(ConnectionPrototype);
65
+ return moduleExports;
66
+ },
67
+ (moduleExports) => {
68
+ if (moduleExports === void 0) return;
69
+ const ConnectionPrototype = utils.getConnectionPrototypeToInstrument(moduleExports);
70
+ unpatch(ConnectionPrototype);
71
+ }
72
+ )
73
+ ]
74
+ )
75
+ ];
76
+ }
77
+ _patchQuery(format) {
78
+ const thisPlugin = this;
79
+ return (originalQuery) => {
80
+ return function query(query, _valuesOrCallback, _callback) {
81
+ let values;
82
+ if (Array.isArray(_valuesOrCallback)) {
83
+ values = _valuesOrCallback;
84
+ } else if (arguments[2]) {
85
+ values = [_valuesOrCallback];
86
+ }
87
+ const attributes$1 = {
88
+ ...utils.getConnectionAttributes(this.config),
89
+ // oxlint-disable-next-line typescript/no-deprecated
90
+ [attributes.DB_SYSTEM]: semconv.DB_SYSTEM_VALUE_MYSQL,
91
+ // oxlint-disable-next-line typescript/no-deprecated
92
+ [attributes.DB_STATEMENT]: utils.getQueryText(query, format, values),
93
+ [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
94
+ };
95
+ const span = core.startInactiveSpan({
96
+ name: utils.getSpanName(query),
97
+ kind: core.SPAN_KIND.CLIENT,
98
+ attributes: attributes$1
99
+ });
100
+ const endSpan = utils.once((err) => {
101
+ if (err) {
102
+ span.setStatus({ code: core.SPAN_STATUS_ERROR, message: err.message });
103
+ }
104
+ span.end();
105
+ });
106
+ if (arguments.length === 1) {
107
+ if (typeof query.onResult === "function") {
108
+ thisPlugin._wrap(query, "onResult", thisPlugin._patchCallbackQuery(endSpan));
109
+ }
110
+ const streamableQuery = originalQuery.apply(this, arguments);
111
+ streamableQuery.once("error", (err) => {
112
+ endSpan(err);
113
+ }).once("result", () => {
114
+ endSpan();
115
+ });
116
+ return streamableQuery;
117
+ }
118
+ if (typeof arguments[1] === "function") {
119
+ thisPlugin._wrap(arguments, 1, thisPlugin._patchCallbackQuery(endSpan));
120
+ } else if (typeof arguments[2] === "function") {
121
+ thisPlugin._wrap(arguments, 2, thisPlugin._patchCallbackQuery(endSpan));
122
+ }
123
+ return originalQuery.apply(this, arguments);
124
+ };
125
+ };
126
+ }
127
+ _patchCallbackQuery(endSpan) {
128
+ return (originalCallback) => {
129
+ return function(...args) {
130
+ endSpan(args[0]);
131
+ return originalCallback(...args);
132
+ };
133
+ };
134
+ }
135
+ }
136
+
137
+ exports.MySQL2Instrumentation = MySQL2Instrumentation;
138
+ //# sourceMappingURL=instrumentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/mysql2/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mysql2\n * - Upstream version: @opentelemetry/instrumentation-mysql2@0.64.0\n * - Types from 'mysql2' inlined as simplified interfaces\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n */\n\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport { DB_STATEMENT, DB_SYSTEM } from '@sentry/conventions/attributes';\nimport type { SpanAttributes } from '@sentry/core';\nimport {\n SDK_VERSION,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_KIND,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n} from '@sentry/core';\nimport { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile';\nimport type { Connection, FormatFunction, Query, QueryError, QueryOptions } from './mysql2-types';\nimport { DB_SYSTEM_VALUE_MYSQL } from './semconv';\nimport { getConnectionAttributes, getConnectionPrototypeToInstrument, getQueryText, getSpanName, once } from './utils';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-mysql2';\nconst ORIGIN = 'auto.db.otel.mysql2';\n\n// mysql2 >= 3.20.0 publishes via diagnostics_channel and is instrumented by\n// `subscribeMysql2DiagnosticChannels` instead, so this IITM patcher must not\n// overlap it — otherwise every query would emit two mysql2 spans.\nconst supportedVersions = ['>=1.4.2 <3.20.0'];\n\n// The raw imported `mysql2` module exposes the `format` helper used to render\n// parameterized queries. Typed shallowly since it is only read internally.\ntype MySQL2Module = { format?: FormatFunction; [key: string]: unknown };\n\nexport class MySQL2Instrumentation extends InstrumentationBase<InstrumentationConfig> {\n public constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n protected init(): InstrumentationNodeModuleDefinition[] {\n let format: FormatFunction | undefined;\n function setFormatFunction(moduleExports: MySQL2Module): void {\n if (!format && moduleExports.format) {\n format = moduleExports.format;\n }\n }\n const patch = (ConnectionPrototype: Connection): void => {\n if (isWrapped(ConnectionPrototype.query)) {\n this._unwrap(ConnectionPrototype, 'query');\n }\n this._wrap(ConnectionPrototype, 'query', this._patchQuery(format) as any);\n if (isWrapped(ConnectionPrototype.execute)) {\n this._unwrap(ConnectionPrototype, 'execute');\n }\n this._wrap(ConnectionPrototype, 'execute', this._patchQuery(format) as any);\n };\n const unpatch = (ConnectionPrototype: Connection): void => {\n this._unwrap(ConnectionPrototype, 'query');\n this._unwrap(ConnectionPrototype, 'execute');\n };\n return [\n new InstrumentationNodeModuleDefinition(\n 'mysql2',\n supportedVersions,\n (moduleExports: MySQL2Module) => {\n setFormatFunction(moduleExports);\n return moduleExports;\n },\n () => {},\n [\n new InstrumentationNodeModuleFile(\n 'mysql2/promise.js',\n supportedVersions,\n (moduleExports: MySQL2Module) => {\n setFormatFunction(moduleExports);\n return moduleExports;\n },\n () => {},\n ),\n new InstrumentationNodeModuleFile(\n 'mysql2/lib/connection.js',\n supportedVersions,\n (moduleExports: any) => {\n const ConnectionPrototype: Connection = getConnectionPrototypeToInstrument(moduleExports);\n patch(ConnectionPrototype);\n return moduleExports;\n },\n (moduleExports: any) => {\n if (moduleExports === undefined) return;\n const ConnectionPrototype: Connection = getConnectionPrototypeToInstrument(moduleExports);\n unpatch(ConnectionPrototype);\n },\n ),\n ],\n ),\n ];\n }\n\n private _patchQuery(format: FormatFunction | undefined) {\n const thisPlugin = this;\n return (originalQuery: Function): Function => {\n return function query(\n this: Connection,\n query: string | Query | QueryOptions,\n _valuesOrCallback?: unknown[] | Function,\n _callback?: Function,\n ) {\n let values;\n if (Array.isArray(_valuesOrCallback)) {\n values = _valuesOrCallback;\n } else if (arguments[2]) {\n values = [_valuesOrCallback];\n }\n\n const attributes: SpanAttributes = {\n ...getConnectionAttributes(this.config),\n // oxlint-disable-next-line typescript/no-deprecated\n [DB_SYSTEM]: DB_SYSTEM_VALUE_MYSQL,\n // oxlint-disable-next-line typescript/no-deprecated\n [DB_STATEMENT]: getQueryText(query, format, values),\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n };\n\n const span = startInactiveSpan({\n name: getSpanName(query),\n kind: SPAN_KIND.CLIENT,\n attributes,\n });\n\n const endSpan = once((err?: QueryError | null) => {\n if (err) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });\n }\n span.end();\n });\n\n if (arguments.length === 1) {\n if (typeof (query as any).onResult === 'function') {\n thisPlugin._wrap(query as any, 'onResult', thisPlugin._patchCallbackQuery(endSpan));\n }\n\n const streamableQuery: Query = originalQuery.apply(this, arguments);\n\n streamableQuery\n .once('error', (err: any) => {\n endSpan(err);\n })\n .once('result', () => {\n endSpan();\n });\n\n return streamableQuery;\n }\n\n if (typeof arguments[1] === 'function') {\n thisPlugin._wrap(arguments, 1, thisPlugin._patchCallbackQuery(endSpan));\n } else if (typeof arguments[2] === 'function') {\n thisPlugin._wrap(arguments, 2, thisPlugin._patchCallbackQuery(endSpan));\n }\n\n return originalQuery.apply(this, arguments);\n };\n };\n }\n\n private _patchCallbackQuery(endSpan: (err?: QueryError | null) => void) {\n return (originalCallback: Function) => {\n return function (...args: [err: QueryError | null, ...rest: unknown[]]) {\n endSpan(args[0]);\n return originalCallback(...args);\n };\n };\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","isWrapped","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","getConnectionPrototypeToInstrument","attributes","getConnectionAttributes","DB_SYSTEM","DB_SYSTEM_VALUE_MYSQL","DB_STATEMENT","getQueryText","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","startInactiveSpan","getSpanName","SPAN_KIND","once","SPAN_STATUS_ERROR"],"mappings":";;;;;;;;;AA4BA,MA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AA;AAAA,QACT;AAEA,QAAA,IAAI,OAAO,SAAA,CAAU,CAAC,CAAA,KAAM,UAAA,EAAY;AACtC,UAAA,UAAA,CAAW,MAAM,SAAA,EAAW,CAAA,EAAG,UAAA,CAAW,mBAAA,CAAoB,OAAO,CAAC,CAAA;AAAA,QACxE,CAAA,MAAA,IAAW,OAAO,SAAA,CAAU,CAAC,MAAM,UAAA,EAAY;AAC7C,UAAA,UAAA,CAAW,MAAM,SAAA,EAAW,CAAA,EAAG,UAAA,CAAW,mBAAA,CAAoB,OAAO,CAAC,CAAA;AAAA,QACxE;AAEA,QAAA,OAAO,aAAA,CAAc,KAAA,CAAM,IAAA,EAAM,SAAS,CAAA;AAAA,MAC5C,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AAAA,EAEQ,oBAAoB,OAAA,EAA4C;AACtE,IAAA,OAAO,CAAC,gBAAA,KAA+B;AACrC,MAAA,OAAO,YAAa,IAAA,EAAoD;AACtE,QAAA,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAC,CAAA;AACf,QAAA,OAAO,gBAAA,CAAiB,GAAG,IAAI,CAAA;AAAA,MACjC,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AACF;;;;"}
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const ATTR_DB_CONNECTION_STRING = "db.connection_string";
4
+ const DB_SYSTEM_VALUE_MYSQL = "mysql";
5
+
6
+ exports.ATTR_DB_CONNECTION_STRING = ATTR_DB_CONNECTION_STRING;
7
+ exports.DB_SYSTEM_VALUE_MYSQL = DB_SYSTEM_VALUE_MYSQL;
8
+ //# sourceMappingURL=semconv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/mysql2/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mysql2\n * - Upstream version: @opentelemetry/instrumentation-mysql2@0.64.0\n */\n\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\nexport const DB_SYSTEM_VALUE_MYSQL = 'mysql' as const;\n"],"names":[],"mappings":";;AASO,MAAM,yBAAA,GAA4B;AAClC,MAAM,qBAAA,GAAwB;;;;;"}
@@ -0,0 +1,81 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const attributes = require('@sentry/conventions/attributes');
4
+ const semconv = require('./semconv.js');
5
+
6
+ function getConnectionAttributes(config) {
7
+ const { host, port, database, user } = getConfig(config);
8
+ const attrs = {
9
+ [semconv.ATTR_DB_CONNECTION_STRING]: getJDBCString(host, port, database),
10
+ // oxlint-disable-next-line typescript/no-deprecated
11
+ [attributes.DB_NAME]: database,
12
+ [attributes.DB_USER]: user,
13
+ // oxlint-disable-next-line typescript/no-deprecated
14
+ [attributes.NET_PEER_NAME]: host
15
+ };
16
+ const portNumber = parseInt(port, 10);
17
+ if (!isNaN(portNumber)) {
18
+ attrs[attributes.NET_PEER_PORT] = portNumber;
19
+ }
20
+ return attrs;
21
+ }
22
+ function getConfig(config) {
23
+ const { host, port, database, user } = config?.connectionConfig || config || {};
24
+ return { host, port, database, user };
25
+ }
26
+ function getJDBCString(host, port, database) {
27
+ let jdbcString = `jdbc:mysql://${host || "localhost"}`;
28
+ if (typeof port === "number") {
29
+ jdbcString += `:${port}`;
30
+ }
31
+ if (typeof database === "string") {
32
+ jdbcString += `/${database}`;
33
+ }
34
+ return jdbcString;
35
+ }
36
+ function getQueryText(query, format, values) {
37
+ const [querySql, queryValues] = typeof query === "string" ? [query, values] : [query.sql, hasValues(query) ? values || query.values : values];
38
+ try {
39
+ if (format && queryValues) {
40
+ return format(querySql, queryValues);
41
+ } else {
42
+ return querySql;
43
+ }
44
+ } catch {
45
+ return "Could not determine the query due to an error in formatting";
46
+ }
47
+ }
48
+ function hasValues(obj) {
49
+ return "values" in obj;
50
+ }
51
+ function getSpanName(query) {
52
+ const rawQuery = typeof query === "object" ? query.sql : query;
53
+ const firstSpace = rawQuery?.indexOf(" ");
54
+ if (typeof firstSpace === "number" && firstSpace !== -1) {
55
+ return rawQuery?.substring(0, firstSpace);
56
+ }
57
+ return rawQuery;
58
+ }
59
+ const once = (fn) => {
60
+ let called = false;
61
+ return (...args) => {
62
+ if (called) return;
63
+ called = true;
64
+ return fn(...args);
65
+ };
66
+ };
67
+ function getConnectionPrototypeToInstrument(connection) {
68
+ const connectionPrototype = connection.prototype;
69
+ const basePrototype = Object.getPrototypeOf(connectionPrototype);
70
+ if (typeof basePrototype?.query === "function" && typeof basePrototype?.execute === "function") {
71
+ return basePrototype;
72
+ }
73
+ return connectionPrototype;
74
+ }
75
+
76
+ exports.getConnectionAttributes = getConnectionAttributes;
77
+ exports.getConnectionPrototypeToInstrument = getConnectionPrototypeToInstrument;
78
+ exports.getQueryText = getQueryText;
79
+ exports.getSpanName = getSpanName;
80
+ exports.once = once;
81
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/mysql2/vendored/utils.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mysql2\n * - Upstream version: @opentelemetry/instrumentation-mysql2@0.64.0\n * - Types from 'mysql2' inlined as simplified interfaces\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n */\n\nimport { DB_NAME, DB_USER, NET_PEER_NAME, NET_PEER_PORT } from '@sentry/conventions/attributes';\nimport type { SpanAttributes } from '@sentry/core';\nimport type { FormatFunction } from './mysql2-types';\nimport { ATTR_DB_CONNECTION_STRING } from './semconv';\n\ninterface QueryOptions {\n sql: string;\n values?: any | any[] | { [param: string]: any };\n}\n\ninterface Query {\n sql: string;\n}\n\ninterface Config {\n host?: string;\n port?: number;\n database?: string;\n user?: string;\n connectionConfig?: Config;\n}\n\nexport function getConnectionAttributes(config: Config): SpanAttributes {\n const { host, port, database, user } = getConfig(config);\n\n const attrs: SpanAttributes = {\n [ATTR_DB_CONNECTION_STRING]: getJDBCString(host, port, database),\n // oxlint-disable-next-line typescript/no-deprecated\n [DB_NAME]: database,\n [DB_USER]: user,\n // oxlint-disable-next-line typescript/no-deprecated\n [NET_PEER_NAME]: host,\n };\n\n const portNumber = parseInt(port, 10);\n if (!isNaN(portNumber)) {\n // oxlint-disable-next-line typescript/no-deprecated\n attrs[NET_PEER_PORT] = portNumber;\n }\n\n return attrs;\n}\n\nfunction getConfig(config: any) {\n const { host, port, database, user } = config?.connectionConfig || config || {};\n return { host, port, database, user };\n}\n\nfunction getJDBCString(host: string | undefined, port: number | undefined, database: string | undefined) {\n let jdbcString = `jdbc:mysql://${host || 'localhost'}`;\n\n if (typeof port === 'number') {\n jdbcString += `:${port}`;\n }\n\n if (typeof database === 'string') {\n jdbcString += `/${database}`;\n }\n\n return jdbcString;\n}\n\nexport function getQueryText(query: string | Query | QueryOptions, format?: FormatFunction, values?: any[]): string {\n const [querySql, queryValues] =\n typeof query === 'string' ? [query, values] : [query.sql, hasValues(query) ? values || query.values : values];\n try {\n if (format && queryValues) {\n return format(querySql, queryValues);\n } else {\n return querySql;\n }\n } catch {\n return 'Could not determine the query due to an error in formatting';\n }\n}\n\nfunction hasValues(obj: Query | QueryOptions): obj is QueryOptions {\n return 'values' in obj;\n}\n\nexport function getSpanName(query: string | Query | QueryOptions): string {\n const rawQuery = typeof query === 'object' ? query.sql : query;\n const firstSpace = rawQuery?.indexOf(' ');\n if (typeof firstSpace === 'number' && firstSpace !== -1) {\n return rawQuery?.substring(0, firstSpace);\n }\n return rawQuery;\n}\n\nexport const once = (fn: Function) => {\n let called = false;\n return (...args: unknown[]) => {\n if (called) return;\n called = true;\n return fn(...args);\n };\n};\n\nexport function getConnectionPrototypeToInstrument(connection: any) {\n const connectionPrototype = connection.prototype;\n const basePrototype = Object.getPrototypeOf(connectionPrototype);\n\n if (typeof basePrototype?.query === 'function' && typeof basePrototype?.execute === 'function') {\n return basePrototype;\n }\n\n return connectionPrototype;\n}\n"],"names":["ATTR_DB_CONNECTION_STRING","DB_NAME","DB_USER","NET_PEER_NAME","NET_PEER_PORT"],"mappings":";;;;;AAiCO,SAAS,wBAAwB,MAAA,EAAgC;AACtE,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,UAAU,IAAA,EAAK,GAAI,UAAU,MAAM,CAAA;AAEvD,EAAA,MAAM,KAAA,GAAwB;AAAA,IAC5B,CAACA,iCAAyB,GAAG,aAAA,CAAc,IAAA,EAAM,MAAM,QAAQ,CAAA;AAAA;AAAA,IAE/D,CAACC,kBAAO,GAAG,QAAA;AAAA,IACX,CAACC,kBAAO,GAAG,IAAA;AAAA;AAAA,IAEX,CAACC,wBAAa,GAAG;AAAA,GACnB;AAEA,EAAA,MAAM,UAAA,GAAa,QAAA,CAAS,IAAA,EAAM,EAAE,CAAA;AACpC,EAAA,IAAI,CAAC,KAAA,CAAM,UAAU,CAAA,EAAG;AAEtB,IAAA,KAAA,CAAMC,wBAAa,CAAA,GAAI,UAAA;AAAA,EACzB;AAEA,EAAA,OAAO,KAAA;AACT;AAEA,SAAS,UAAU,MAAA,EAAa;AAC9B,EAAA,MAAM,EAAE,MAAM,IAAA,EAAM,QAAA,EAAU,MAAK,GAAI,MAAA,EAAQ,gBAAA,IAAoB,MAAA,IAAU,EAAC;AAC9E,EAAA,OAAO,EAAE,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,IAAA,EAAK;AACtC;AAEA,SAAS,aAAA,CAAc,IAAA,EAA0B,IAAA,EAA0B,QAAA,EAA8B;AACvG,EAAA,IAAI,UAAA,GAA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IAAA,GAAO,CAAC,EAAA,KAAiB;AACpC,EAAA,IAAI,MAAA,GAAS,KAAA;AACb,EAAA,OAAO,IAAI,IAAA,KAAoB;AAC7B,IAAA,IAAI,MAAA,EAAQ;AACZ,IAAA,MAAA,GAAS,IAAA;AACT,IAAA,OAAO,EAAA,CAAG,GAAG,IAAI,CAAA;AAAA,EACnB,CAAA;AACF;AAEO,SAAS,mCAAmC,UAAA,EAAiB;AAClE,EAAA,MAAM,sBAAsB,UAAA,CAAW,SAAA;AACvC,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,cAAA,CAAe,mBAAmB,CAAA;AAE/D,EAAA,IAAI,OAAO,aAAA,EAAe,KAAA,KAAU,cAAc,OAAO,aAAA,EAAe,YAAY,UAAA,EAAY;AAC9F,IAAA,OAAO,aAAA;AAAA,EACT;AAEA,EAAA,OAAO,mBAAA;AACT;;;;;;;;"}
@@ -6,71 +6,16 @@ const instrumentation = require('./instrumentation.js');
6
6
 
7
7
  const instrumentOpenAi = nodeCore.generateInstrumentOnce(
8
8
  core.OPENAI_INTEGRATION_NAME,
9
- options => new instrumentation.SentryOpenAiInstrumentation(options),
9
+ (options) => new instrumentation.SentryOpenAiInstrumentation(options)
10
10
  );
11
-
12
11
  const _openAiIntegration = ((options = {}) => {
13
12
  return {
14
13
  name: core.OPENAI_INTEGRATION_NAME,
15
14
  setupOnce() {
16
15
  instrumentOpenAi(options);
17
- },
16
+ }
18
17
  };
19
- }) ;
20
-
21
- /**
22
- * Adds Sentry tracing instrumentation for the OpenAI SDK.
23
- *
24
- * This integration is enabled by default.
25
- *
26
- * When configured, this integration automatically instruments OpenAI SDK client 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.openAIIntegration()],
35
- * });
36
- * ```
37
- *
38
- * ## Options
39
- *
40
- * - `recordInputs`: Whether to record prompt 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.openAIIntegration({
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.openAIIntegration({
66
- * recordInputs: false,
67
- * recordOutputs: false
68
- * })
69
- * ],
70
- * });
71
- * ```
72
- *
73
- */
18
+ });
74
19
  const openAIIntegration = core.defineIntegration(_openAiIntegration);
75
20
 
76
21
  exports.instrumentOpenAi = instrumentOpenAi;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/openai/index.ts"],"sourcesContent":["import type { IntegrationFn, OpenAiOptions } from '@sentry/core';\nimport { defineIntegration, OPENAI_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryOpenAiInstrumentation } from './instrumentation';\n\nexport const instrumentOpenAi = generateInstrumentOnce<OpenAiOptions>(\n OPENAI_INTEGRATION_NAME,\n options => new SentryOpenAiInstrumentation(options),\n);\n\nconst _openAiIntegration = ((options: OpenAiOptions = {}) => {\n return {\n name: OPENAI_INTEGRATION_NAME,\n setupOnce() {\n instrumentOpenAi(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the OpenAI SDK.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments OpenAI SDK client 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.openAIIntegration()],\n * });\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record prompt 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.openAIIntegration({\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.openAIIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n */\nexport const openAIIntegration = defineIntegration(_openAiIntegration);\n"],"names":["generateInstrumentOnce","OPENAI_INTEGRATION_NAME","SentryOpenAiInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,gBAAA,GAAmBA,+BAAsB;AACtD,EAAEC,4BAAuB;AACzB,EAAE,WAAW,IAAIC,2CAA2B,CAAC,OAAO,CAAC;AACrD;;AAEA,MAAM,kBAAA,IAAsB,CAAC,OAAO,GAAkB,EAAE,KAAK;AAC7D,EAAE,OAAO;AACT,IAAI,IAAI,EAAED,4BAAuB;AACjC,IAAI,SAAS,GAAG;AAChB,MAAM,gBAAgB,CAAC,OAAO,CAAC;AAC/B,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;MACa,iBAAA,GAAoBE,sBAAiB,CAAC,kBAAkB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/openai/index.ts"],"sourcesContent":["import type { IntegrationFn, OpenAiOptions } from '@sentry/core';\nimport { defineIntegration, OPENAI_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryOpenAiInstrumentation } from './instrumentation';\n\nexport const instrumentOpenAi = generateInstrumentOnce<OpenAiOptions>(\n OPENAI_INTEGRATION_NAME,\n options => new SentryOpenAiInstrumentation(options),\n);\n\nconst _openAiIntegration = ((options: OpenAiOptions = {}) => {\n return {\n name: OPENAI_INTEGRATION_NAME,\n setupOnce() {\n instrumentOpenAi(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the OpenAI SDK.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments OpenAI SDK client 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.openAIIntegration()],\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.openAIIntegration({\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.openAIIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n */\nexport const openAIIntegration = defineIntegration(_openAiIntegration);\n"],"names":["generateInstrumentOnce","OPENAI_INTEGRATION_NAME","SentryOpenAiInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,gBAAA,GAAmBA,+BAAA;AAAA,EAC9BC,4BAAA;AAAA,EACA,CAAA,OAAA,KAAW,IAAIC,2CAAA,CAA4B,OAAO;AACpD;AAEA,MAAM,kBAAA,IAAsB,CAAC,OAAA,GAAyB,EAAC,KAAM;AAC3D,EAAA,OAAO;AAAA,IACL,IAAA,EAAMD,4BAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,gBAAA,CAAiB,OAAO,CAAA;AAAA,IAC1B;AAAA,GACF;AACF,CAAA,CAAA;AAwDO,MAAM,iBAAA,GAAoBE,uBAAkB,kBAAkB;;;;;"}
@@ -3,100 +3,76 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const instrumentation = require('@opentelemetry/instrumentation');
4
4
  const core = require('@sentry/core');
5
5
 
6
- const supportedVersions = ['>=4.0.0 <7'];
7
-
8
- /**
9
- * Sentry OpenAI instrumentation using OpenTelemetry.
10
- */
6
+ const supportedVersions = [">=4.0.0 <7"];
11
7
  class SentryOpenAiInstrumentation extends instrumentation.InstrumentationBase {
12
- constructor(config = {}) {
13
- super('@sentry/instrumentation-openai', core.SDK_VERSION, config);
8
+ constructor(config = {}) {
9
+ super("@sentry/instrumentation-openai", core.SDK_VERSION, config);
14
10
  }
15
-
16
11
  /**
17
12
  * Initializes the instrumentation by defining the modules to be patched.
18
13
  */
19
- init() {
20
- const module = new instrumentation.InstrumentationNodeModuleDefinition('openai', supportedVersions, this._patch.bind(this));
14
+ init() {
15
+ const module = new instrumentation.InstrumentationNodeModuleDefinition("openai", supportedVersions, this._patch.bind(this));
21
16
  return module;
22
17
  }
23
-
24
18
  /**
25
19
  * Core patch logic applying instrumentation to the OpenAI and AzureOpenAI client constructors.
26
20
  */
27
- _patch(exports$1) {
28
- let result = exports$1;
29
- result = this._patchClient(result, 'OpenAI');
30
- result = this._patchClient(result, 'AzureOpenAI');
21
+ _patch(exports) {
22
+ let result = exports;
23
+ result = this._patchClient(result, "OpenAI");
24
+ result = this._patchClient(result, "AzureOpenAI");
31
25
  return result;
32
26
  }
33
-
34
27
  /**
35
28
  * Patch logic applying instrumentation to the specified client constructor.
36
29
  */
37
- _patchClient(exports$1, exportKey) {
38
- const Original = exports$1[exportKey];
30
+ _patchClient(exports, exportKey) {
31
+ const Original = exports[exportKey];
39
32
  if (!Original) {
40
- return exports$1;
33
+ return exports;
41
34
  }
42
-
43
35
  const config = this.getConfig();
44
-
45
- const WrappedOpenAI = function ( ...args) {
46
- // Check if wrapping should be skipped (e.g., when LangChain is handling instrumentation)
36
+ const WrappedOpenAI = function(...args) {
47
37
  if (core._INTERNAL_shouldSkipAiProviderWrapping(core.OPENAI_INTEGRATION_NAME)) {
48
- return Reflect.construct(Original, args) ;
38
+ return Reflect.construct(Original, args);
49
39
  }
50
-
51
40
  const instance = Reflect.construct(Original, args);
52
-
53
- return core.instrumentOpenAiClient(instance , config);
54
- } ;
55
-
56
- // Preserve static and prototype chains
41
+ return core.instrumentOpenAiClient(instance, config);
42
+ };
57
43
  Object.setPrototypeOf(WrappedOpenAI, Original);
58
44
  Object.setPrototypeOf(WrappedOpenAI.prototype, Original.prototype);
59
-
60
45
  for (const key of Object.getOwnPropertyNames(Original)) {
61
- if (!['length', 'name', 'prototype'].includes(key)) {
46
+ if (!["length", "name", "prototype"].includes(key)) {
62
47
  const descriptor = Object.getOwnPropertyDescriptor(Original, key);
63
48
  if (descriptor) {
64
49
  Object.defineProperty(WrappedOpenAI, key, descriptor);
65
50
  }
66
51
  }
67
52
  }
68
-
69
- // Constructor replacement - handle read-only properties
70
- // The OpenAI property might have only a getter, so use defineProperty
71
53
  try {
72
- exports$1[exportKey] = WrappedOpenAI;
54
+ exports[exportKey] = WrappedOpenAI;
73
55
  } catch {
74
- // If direct assignment fails, override the property descriptor
75
- Object.defineProperty(exports$1, exportKey, {
56
+ Object.defineProperty(exports, exportKey, {
76
57
  value: WrappedOpenAI,
77
58
  writable: true,
78
59
  configurable: true,
79
- enumerable: true,
60
+ enumerable: true
80
61
  });
81
62
  }
82
-
83
- // Wrap the default export if it points to the original constructor
84
- // Constructor replacement - handle read-only properties
85
- // The OpenAI property might have only a getter, so use defineProperty
86
- if (exports$1.default === Original) {
63
+ if (exports.default === Original) {
87
64
  try {
88
- exports$1.default = WrappedOpenAI;
65
+ exports.default = WrappedOpenAI;
89
66
  } catch {
90
- // If direct assignment fails, override the property descriptor
91
- Object.defineProperty(exports$1, 'default', {
67
+ Object.defineProperty(exports, "default", {
92
68
  value: WrappedOpenAI,
93
69
  writable: true,
94
70
  configurable: true,
95
- enumerable: true,
71
+ enumerable: true
96
72
  });
97
73
  }
98
74
  }
99
- return exports$1;
75
+ return exports;
100
76
  }
101
77
  }
102
78