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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (989) hide show
  1. package/README.md +5 -4
  2. package/build/cjs/debug-build.js +0 -5
  3. package/build/cjs/debug-build.js.map +1 -1
  4. package/build/cjs/index.js +81 -68
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/init.js +0 -6
  7. package/build/cjs/init.js.map +1 -1
  8. package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
  9. package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
  10. package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
  11. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  12. package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
  13. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  14. package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
  15. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  16. package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
  17. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  18. package/build/cjs/integrations/fs/index.js +17 -0
  19. package/build/cjs/integrations/fs/index.js.map +1 -0
  20. package/build/cjs/integrations/fs/vendored/constants.js +138 -0
  21. package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
  22. package/build/cjs/integrations/fs/vendored/instrumentation.js +230 -0
  23. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
  24. package/build/cjs/integrations/fs/vendored/utils.js +31 -0
  25. package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
  26. package/build/cjs/integrations/http.js +19 -175
  27. package/build/cjs/integrations/http.js.map +1 -1
  28. package/build/cjs/integrations/node-fetch.js +10 -94
  29. package/build/cjs/integrations/node-fetch.js.map +1 -1
  30. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +15 -0
  31. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  32. package/build/cjs/integrations/tracing/amqplib/index.js +21 -0
  33. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
  34. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
  35. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  36. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
  37. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  38. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +26 -0
  39. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  40. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +17 -0
  41. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  42. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +129 -0
  43. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  44. package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
  45. package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
  46. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  47. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  48. package/build/cjs/integrations/tracing/connect/index.js +35 -0
  49. package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
  50. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +16 -0
  51. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  52. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +137 -0
  53. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  54. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
  55. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  56. package/build/cjs/integrations/tracing/connect/vendored/utils.js +36 -0
  57. package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
  58. package/build/cjs/integrations/tracing/dataloader/index.js +26 -0
  59. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
  60. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +217 -0
  61. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  62. package/build/cjs/integrations/tracing/express.js +44 -147
  63. package/build/cjs/integrations/tracing/express.js.map +1 -1
  64. package/build/cjs/integrations/tracing/fastify/index.js +19 -234
  65. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  66. package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
  67. package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
  68. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
  69. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  70. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +78 -162
  71. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  72. package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
  73. package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
  74. package/build/cjs/integrations/tracing/firebase/firebase.js +4 -33
  75. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  76. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  77. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  78. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +73 -215
  79. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  80. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  81. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  82. package/build/cjs/integrations/tracing/genericPool/index.js +21 -0
  83. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -0
  84. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +122 -0
  85. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  86. package/build/cjs/integrations/tracing/google-genai/index.js +3 -58
  87. package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
  88. package/build/cjs/integrations/tracing/google-genai/instrumentation.js +23 -43
  89. package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  90. package/build/cjs/integrations/tracing/graphql/index.js +34 -0
  91. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -0
  92. package/build/cjs/integrations/tracing/graphql/vendored/enum.js +47 -0
  93. package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  94. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
  95. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  96. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +329 -0
  97. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  98. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +6 -0
  99. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  100. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +8 -0
  101. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  102. package/build/cjs/integrations/tracing/graphql/vendored/utils.js +265 -0
  103. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  104. package/build/cjs/integrations/tracing/hapi/index.js +16 -91
  105. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  106. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +11 -0
  107. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  108. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +255 -0
  109. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  110. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +24 -0
  111. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  112. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +85 -0
  113. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  114. package/build/cjs/integrations/tracing/hono/constants.js +6 -7
  115. package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
  116. package/build/cjs/integrations/tracing/hono/index.js +26 -77
  117. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  118. package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
  119. package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
  120. package/build/cjs/integrations/tracing/index.js +74 -83
  121. package/build/cjs/integrations/tracing/index.js.map +1 -1
  122. package/build/cjs/integrations/tracing/kafka/index.js +21 -0
  123. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
  124. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +237 -0
  125. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  126. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +22 -0
  127. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  128. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +114 -0
  129. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  130. package/build/cjs/integrations/tracing/knex/index.js +26 -0
  131. package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
  132. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +135 -0
  133. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  134. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +10 -0
  135. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  136. package/build/cjs/integrations/tracing/knex/vendored/utils.js +84 -0
  137. package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
  138. package/build/cjs/integrations/tracing/koa/index.js +46 -0
  139. package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
  140. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
  141. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  142. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +127 -0
  143. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  144. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
  145. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  146. package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
  147. package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
  148. package/build/cjs/integrations/tracing/koa/vendored/utils.js +36 -0
  149. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
  150. package/build/cjs/integrations/tracing/langchain/index.js +3 -96
  151. package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
  152. package/build/cjs/integrations/tracing/langchain/instrumentation.js +80 -140
  153. package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
  154. package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
  155. package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
  156. package/build/cjs/integrations/tracing/langgraph/instrumentation.js +76 -40
  157. package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  158. package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
  159. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
  160. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +38 -0
  161. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  162. package/build/cjs/integrations/tracing/mongo/index.js +21 -0
  163. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
  164. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +129 -0
  165. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  166. package/build/cjs/integrations/tracing/mongo/vendored/patches.js +150 -0
  167. package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  168. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +40 -0
  169. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  170. package/build/cjs/integrations/tracing/mongoose/index.js +22 -0
  171. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
  172. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +240 -0
  173. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  174. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +41 -0
  175. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  176. package/build/cjs/integrations/tracing/mysql/index.js +21 -0
  177. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
  178. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +185 -0
  179. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  180. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +8 -0
  181. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  182. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +38 -0
  183. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  184. package/build/cjs/integrations/tracing/mysql2/index.js +22 -0
  185. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
  186. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +138 -0
  187. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  188. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +8 -0
  189. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  190. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +81 -0
  191. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  192. package/build/cjs/integrations/tracing/openai/index.js +3 -58
  193. package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
  194. package/build/cjs/integrations/tracing/openai/instrumentation.js +25 -49
  195. package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
  196. package/build/cjs/integrations/tracing/postgres/index.js +27 -0
  197. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
  198. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +11 -0
  199. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  200. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
  201. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  202. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +225 -0
  203. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  204. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +8 -0
  205. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  206. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +151 -0
  207. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  208. package/build/cjs/integrations/tracing/postgresjs.js +77 -190
  209. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  210. package/build/cjs/integrations/tracing/redis/cache.js +41 -0
  211. package/build/cjs/integrations/tracing/redis/cache.js.map +1 -0
  212. package/build/cjs/integrations/tracing/redis/index.js +50 -0
  213. package/build/cjs/integrations/tracing/redis/index.js.map +1 -0
  214. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +147 -0
  215. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  216. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +445 -0
  217. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  218. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +8 -0
  219. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  220. package/build/cjs/integrations/tracing/tedious/index.js +21 -0
  221. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
  222. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +154 -0
  223. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  224. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +8 -0
  225. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  226. package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
  227. package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  228. package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
  229. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
  230. package/build/cjs/integrations/tracing/vercelai/index.js +7 -53
  231. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  232. package/build/cjs/integrations/tracing/vercelai/instrumentation.js +60 -158
  233. package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  234. package/build/cjs/preload.js +1 -14
  235. package/build/cjs/preload.js.map +1 -1
  236. package/build/cjs/sdk/diagnosticsChannelInjection.js +21 -0
  237. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -0
  238. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +33 -0
  239. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  240. package/build/cjs/sdk/index.js +33 -35
  241. package/build/cjs/sdk/index.js.map +1 -1
  242. package/build/cjs/sdk/initOtel.js +74 -60
  243. package/build/cjs/sdk/initOtel.js.map +1 -1
  244. package/build/cjs/utils/redisCache.js +24 -52
  245. package/build/cjs/utils/redisCache.js.map +1 -1
  246. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +21 -0
  247. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  248. package/build/esm/debug-build.js +0 -5
  249. package/build/esm/debug-build.js.map +1 -1
  250. package/build/esm/index.js +24 -22
  251. package/build/esm/index.js.map +1 -1
  252. package/build/esm/init.js +0 -6
  253. package/build/esm/init.js.map +1 -1
  254. package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
  255. package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
  256. package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
  257. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  258. package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
  259. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  260. package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
  261. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  262. package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
  263. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  264. package/build/esm/integrations/fs/index.js +15 -0
  265. package/build/esm/integrations/fs/index.js.map +1 -0
  266. package/build/esm/integrations/fs/vendored/constants.js +134 -0
  267. package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
  268. package/build/esm/integrations/fs/vendored/instrumentation.js +228 -0
  269. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
  270. package/build/esm/integrations/fs/vendored/utils.js +28 -0
  271. package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
  272. package/build/esm/integrations/http.js +22 -176
  273. package/build/esm/integrations/http.js.map +1 -1
  274. package/build/esm/integrations/node-fetch.js +12 -95
  275. package/build/esm/integrations/node-fetch.js.map +1 -1
  276. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +13 -0
  277. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  278. package/build/esm/integrations/tracing/amqplib/index.js +18 -0
  279. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
  280. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
  281. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  282. package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
  283. package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  284. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +14 -0
  285. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  286. package/build/esm/integrations/tracing/amqplib/vendored/types.js +15 -0
  287. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  288. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +117 -0
  289. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  290. package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
  291. package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
  292. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  293. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  294. package/build/esm/integrations/tracing/connect/index.js +31 -0
  295. package/build/esm/integrations/tracing/connect/index.js.map +1 -0
  296. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +13 -0
  297. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  298. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +135 -0
  299. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  300. package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
  301. package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  302. package/build/esm/integrations/tracing/connect/vendored/utils.js +32 -0
  303. package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
  304. package/build/esm/integrations/tracing/dataloader/index.js +23 -0
  305. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
  306. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +215 -0
  307. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  308. package/build/esm/integrations/tracing/express.js +45 -148
  309. package/build/esm/integrations/tracing/express.js.map +1 -1
  310. package/build/esm/integrations/tracing/fastify/index.js +21 -235
  311. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  312. package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
  313. package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
  314. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
  315. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  316. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +74 -158
  317. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  318. package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
  319. package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
  320. package/build/esm/integrations/tracing/firebase/firebase.js +6 -35
  321. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  322. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  323. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  324. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +72 -214
  325. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  326. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  327. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  328. package/build/esm/integrations/tracing/genericPool/index.js +18 -0
  329. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
  330. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
  331. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  332. package/build/esm/integrations/tracing/google-genai/index.js +3 -58
  333. package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
  334. package/build/esm/integrations/tracing/google-genai/instrumentation.js +23 -43
  335. package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  336. package/build/esm/integrations/tracing/graphql/index.js +31 -0
  337. package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
  338. package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
  339. package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  340. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +13 -0
  341. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  342. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +327 -0
  343. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  344. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
  345. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  346. package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
  347. package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  348. package/build/esm/integrations/tracing/graphql/vendored/utils.js +257 -0
  349. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  350. package/build/esm/integrations/tracing/hapi/index.js +16 -91
  351. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  352. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
  353. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  354. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +253 -0
  355. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  356. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
  357. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  358. package/build/esm/integrations/tracing/hapi/vendored/utils.js +76 -0
  359. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  360. package/build/esm/integrations/tracing/hono/constants.js +6 -7
  361. package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
  362. package/build/esm/integrations/tracing/hono/index.js +22 -73
  363. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  364. package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
  365. package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
  366. package/build/esm/integrations/tracing/index.js +20 -29
  367. package/build/esm/integrations/tracing/index.js.map +1 -1
  368. package/build/esm/integrations/tracing/kafka/index.js +18 -0
  369. package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
  370. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +235 -0
  371. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  372. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +12 -0
  373. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  374. package/build/esm/integrations/tracing/kafka/vendored/utils.js +108 -0
  375. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  376. package/build/esm/integrations/tracing/knex/index.js +23 -0
  377. package/build/esm/integrations/tracing/knex/index.js.map +1 -0
  378. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +133 -0
  379. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  380. package/build/esm/integrations/tracing/knex/vendored/semconv.js +6 -0
  381. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  382. package/build/esm/integrations/tracing/knex/vendored/utils.js +75 -0
  383. package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
  384. package/build/esm/integrations/tracing/koa/index.js +42 -0
  385. package/build/esm/integrations/tracing/koa/index.js.map +1 -0
  386. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
  387. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  388. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +125 -0
  389. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  390. package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
  391. package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  392. package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
  393. package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
  394. package/build/esm/integrations/tracing/koa/vendored/utils.js +33 -0
  395. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
  396. package/build/esm/integrations/tracing/langchain/index.js +3 -96
  397. package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
  398. package/build/esm/integrations/tracing/langchain/instrumentation.js +80 -140
  399. package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
  400. package/build/esm/integrations/tracing/langgraph/index.js +3 -73
  401. package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
  402. package/build/esm/integrations/tracing/langgraph/instrumentation.js +78 -42
  403. package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  404. package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
  405. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
  406. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +36 -0
  407. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  408. package/build/esm/integrations/tracing/mongo/index.js +18 -0
  409. package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
  410. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +127 -0
  411. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  412. package/build/esm/integrations/tracing/mongo/vendored/patches.js +142 -0
  413. package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  414. package/build/esm/integrations/tracing/mongo/vendored/utils.js +34 -0
  415. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  416. package/build/esm/integrations/tracing/mongoose/index.js +19 -0
  417. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
  418. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +236 -0
  419. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  420. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +38 -0
  421. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  422. package/build/esm/integrations/tracing/mysql/index.js +18 -0
  423. package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
  424. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +183 -0
  425. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  426. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +5 -0
  427. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  428. package/build/esm/integrations/tracing/mysql/vendored/utils.js +33 -0
  429. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  430. package/build/esm/integrations/tracing/mysql2/index.js +19 -0
  431. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
  432. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +136 -0
  433. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  434. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +5 -0
  435. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  436. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +75 -0
  437. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  438. package/build/esm/integrations/tracing/openai/index.js +3 -58
  439. package/build/esm/integrations/tracing/openai/index.js.map +1 -1
  440. package/build/esm/integrations/tracing/openai/instrumentation.js +25 -49
  441. package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
  442. package/build/esm/integrations/tracing/postgres/index.js +24 -0
  443. package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
  444. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +9 -0
  445. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  446. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
  447. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  448. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +223 -0
  449. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  450. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +5 -0
  451. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  452. package/build/esm/integrations/tracing/postgres/vendored/utils.js +136 -0
  453. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  454. package/build/esm/integrations/tracing/postgresjs.js +77 -190
  455. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  456. package/build/esm/integrations/tracing/redis/cache.js +38 -0
  457. package/build/esm/integrations/tracing/redis/cache.js.map +1 -0
  458. package/build/esm/integrations/tracing/redis/index.js +43 -0
  459. package/build/esm/integrations/tracing/redis/index.js.map +1 -0
  460. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +145 -0
  461. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  462. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +443 -0
  463. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  464. package/build/esm/integrations/tracing/redis/vendored/semconv.js +5 -0
  465. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  466. package/build/esm/integrations/tracing/tedious/index.js +18 -0
  467. package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
  468. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +152 -0
  469. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  470. package/build/esm/integrations/tracing/tedious/vendored/semconv.js +5 -0
  471. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  472. package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
  473. package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  474. package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
  475. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
  476. package/build/esm/integrations/tracing/vercelai/index.js +8 -54
  477. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  478. package/build/esm/integrations/tracing/vercelai/instrumentation.js +60 -158
  479. package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  480. package/build/esm/package.json +1 -1
  481. package/build/esm/preload.js +1 -14
  482. package/build/esm/preload.js.map +1 -1
  483. package/build/esm/sdk/diagnosticsChannelInjection.js +17 -0
  484. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -0
  485. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +30 -0
  486. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  487. package/build/esm/sdk/index.js +33 -36
  488. package/build/esm/sdk/index.js.map +1 -1
  489. package/build/esm/sdk/initOtel.js +77 -63
  490. package/build/esm/sdk/initOtel.js.map +1 -1
  491. package/build/esm/utils/redisCache.js +24 -52
  492. package/build/esm/utils/redisCache.js.map +1 -1
  493. package/build/esm/utils/setHttpServerSpanRouteAttribute.js +19 -0
  494. package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  495. package/build/import-hook.mjs +6 -0
  496. package/build/types/index.d.ts +6 -4
  497. package/build/types/index.d.ts.map +1 -1
  498. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  499. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
  500. package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
  501. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  502. package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
  503. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
  504. package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
  505. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
  506. package/build/types/integrations/fs/index.d.ts +14 -0
  507. package/build/types/integrations/fs/index.d.ts.map +1 -0
  508. package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
  509. package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
  510. package/build/types/integrations/fs/vendored/instrumentation.d.ts +3 -0
  511. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
  512. package/build/types/integrations/fs/vendored/types.d.ts +23 -0
  513. package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
  514. package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
  515. package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
  516. package/build/types/integrations/http.d.ts +12 -17
  517. package/build/types/integrations/http.d.ts.map +1 -1
  518. package/build/types/integrations/node-fetch.d.ts +8 -35
  519. package/build/types/integrations/node-fetch.d.ts.map +1 -1
  520. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  521. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +1 -0
  522. package/build/types/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  523. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
  524. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  525. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
  526. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  527. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
  528. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  529. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
  530. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  531. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
  532. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  533. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
  534. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  535. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
  536. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  537. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
  538. package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  539. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
  540. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  541. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
  542. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  543. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
  544. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
  545. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
  546. package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  547. package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
  548. package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  549. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
  550. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  551. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
  552. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  553. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
  554. package/build/types/integrations/tracing/express.d.ts +15 -68
  555. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  556. package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
  557. package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
  558. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
  559. package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
  560. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  561. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  562. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
  563. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  564. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
  565. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  566. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
  567. package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
  568. package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
  569. package/build/types/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  570. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
  571. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  572. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
  573. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  574. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
  575. package/build/types/integrations/tracing/google-genai/index.d.ts +11 -8
  576. package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
  577. package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -1
  578. package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  579. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
  580. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  581. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
  582. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  583. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
  584. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  585. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
  586. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  587. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
  588. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  589. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
  590. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  591. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
  592. package/build/types/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  593. package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
  594. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  595. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
  596. package/build/types/integrations/tracing/hapi/index.d.ts +4 -2
  597. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  598. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  599. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
  600. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  601. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
  602. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  603. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
  604. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  605. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
  606. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  607. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
  608. package/build/types/integrations/tracing/hono/index.d.ts +9 -1
  609. package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
  610. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  611. package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  612. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
  613. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  614. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
  615. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  616. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
  617. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  618. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
  619. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  620. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -0
  621. package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  622. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
  623. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  624. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
  625. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  626. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
  627. package/build/types/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  628. package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
  629. package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  630. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
  631. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  632. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
  633. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  634. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
  635. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  636. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
  637. package/build/types/integrations/tracing/koa/vendored/types.d.ts +13 -0
  638. package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
  639. package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  640. package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
  641. package/build/types/integrations/tracing/langchain/index.d.ts +16 -12
  642. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  643. package/build/types/integrations/tracing/langchain/instrumentation.d.ts +10 -1
  644. package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
  645. package/build/types/integrations/tracing/langgraph/index.d.ts +11 -8
  646. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  647. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  648. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -1
  649. package/build/types/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  650. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
  651. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  652. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
  653. package/build/{types-ts3.8/integrations/tracing/mongo.d.ts → types/integrations/tracing/mongo/index.d.ts} +22 -24
  654. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
  655. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  656. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
  657. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  658. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
  659. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  660. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
  661. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  662. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
  663. package/build/types/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  664. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
  665. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  666. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
  667. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  668. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
  669. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  670. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
  671. package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  672. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
  673. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  674. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
  675. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  676. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
  677. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  678. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
  679. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  680. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
  681. package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  682. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
  683. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  684. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
  685. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  686. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
  687. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  688. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
  689. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  690. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
  691. package/build/types/integrations/tracing/openai/index.d.ts +11 -8
  692. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  693. package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  694. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
  695. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  696. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
  697. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  698. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
  699. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  700. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
  701. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  702. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
  703. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  704. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
  705. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  706. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
  707. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  708. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
  709. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  710. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
  711. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  712. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
  713. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  714. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  715. package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
  716. package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
  717. package/build/types/integrations/tracing/redis/index.d.ts +28 -0
  718. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -0
  719. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  720. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -0
  721. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  722. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -0
  723. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  724. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -0
  725. package/build/types/integrations/tracing/redis/vendored/types.d.ts +24 -0
  726. package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -0
  727. package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  728. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
  729. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  730. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
  731. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  732. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
  733. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  734. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
  735. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  736. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
  737. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  738. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  739. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
  740. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  741. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  742. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
  743. package/build/types/integrations/tracing/vercelai/types.d.ts +11 -4
  744. package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
  745. package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
  746. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
  747. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  748. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
  749. package/build/types/sdk/index.d.ts +18 -0
  750. package/build/types/sdk/index.d.ts.map +1 -1
  751. package/build/types/sdk/initOtel.d.ts +2 -3
  752. package/build/types/sdk/initOtel.d.ts.map +1 -1
  753. package/build/types/utils/redisCache.d.ts +1 -1
  754. package/build/types/utils/redisCache.d.ts.map +1 -1
  755. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  756. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
  757. package/build/types-ts3.8/index.d.ts +6 -4
  758. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  759. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  760. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  761. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  762. package/build/types-ts3.8/integrations/fs/index.d.ts +14 -0
  763. package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
  764. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +3 -0
  765. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +23 -0
  766. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
  767. package/build/types-ts3.8/integrations/http.d.ts +12 -17
  768. package/build/types-ts3.8/integrations/node-fetch.d.ts +8 -35
  769. package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  770. package/build/types-ts3.8/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  771. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  772. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  773. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  774. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  775. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  776. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  777. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  778. package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  779. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  780. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  781. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
  782. package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  783. package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  784. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  785. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  786. package/build/types-ts3.8/integrations/tracing/express.d.ts +15 -68
  787. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  788. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  789. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  790. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  791. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  792. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
  793. package/build/types-ts3.8/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  794. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  795. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  796. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +11 -8
  797. package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  798. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  799. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  800. package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  801. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  802. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  803. package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  804. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  805. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  806. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +4 -2
  807. package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  808. package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  809. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  810. package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  811. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  812. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +9 -1
  813. package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  814. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  815. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  816. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  817. package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  818. package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  819. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  820. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  821. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  822. package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  823. package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  824. package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  825. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  826. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +13 -0
  827. package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  828. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +16 -12
  829. package/build/types-ts3.8/integrations/tracing/langchain/instrumentation.d.ts +10 -1
  830. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +11 -8
  831. package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  832. package/build/types-ts3.8/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  833. package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  834. package/build/{types/integrations/tracing/mongo.d.ts → types-ts3.8/integrations/tracing/mongo/index.d.ts} +22 -24
  835. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  836. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  837. package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  838. package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  839. package/build/types-ts3.8/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  840. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  841. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  842. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  843. package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  844. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  845. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  846. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  847. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  848. package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  849. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  850. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  851. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  852. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  853. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +11 -8
  854. package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  855. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  856. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  857. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  858. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  859. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  860. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  861. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  862. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  863. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  864. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  865. package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
  866. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +28 -0
  867. package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  868. package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  869. package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  870. package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +24 -0
  871. package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  872. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  873. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  874. package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  875. package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  876. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  877. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
  878. package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  879. package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +11 -4
  880. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
  881. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  882. package/build/types-ts3.8/sdk/index.d.ts +18 -0
  883. package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
  884. package/build/types-ts3.8/utils/redisCache.d.ts +1 -1
  885. package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  886. package/changes.json +9 -5
  887. package/package.json +33 -41
  888. package/build/cjs/integrations/fs.js +0 -142
  889. package/build/cjs/integrations/fs.js.map +0 -1
  890. package/build/cjs/integrations/tracing/amqplib.js +0 -47
  891. package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
  892. package/build/cjs/integrations/tracing/connect.js +0 -110
  893. package/build/cjs/integrations/tracing/connect.js.map +0 -1
  894. package/build/cjs/integrations/tracing/dataloader.js +0 -72
  895. package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
  896. package/build/cjs/integrations/tracing/genericPool.js +0 -59
  897. package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
  898. package/build/cjs/integrations/tracing/graphql.js +0 -127
  899. package/build/cjs/integrations/tracing/graphql.js.map +0 -1
  900. package/build/cjs/integrations/tracing/kafka.js +0 -48
  901. package/build/cjs/integrations/tracing/kafka.js.map +0 -1
  902. package/build/cjs/integrations/tracing/knex.js +0 -57
  903. package/build/cjs/integrations/tracing/knex.js.map +0 -1
  904. package/build/cjs/integrations/tracing/koa.js +0 -138
  905. package/build/cjs/integrations/tracing/koa.js.map +0 -1
  906. package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
  907. package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
  908. package/build/cjs/integrations/tracing/mongo.js +0 -93
  909. package/build/cjs/integrations/tracing/mongo.js.map +0 -1
  910. package/build/cjs/integrations/tracing/mongoose.js +0 -46
  911. package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
  912. package/build/cjs/integrations/tracing/mysql.js +0 -38
  913. package/build/cjs/integrations/tracing/mysql.js.map +0 -1
  914. package/build/cjs/integrations/tracing/mysql2.js +0 -46
  915. package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
  916. package/build/cjs/integrations/tracing/postgres.js +0 -48
  917. package/build/cjs/integrations/tracing/postgres.js.map +0 -1
  918. package/build/cjs/integrations/tracing/prisma.js +0 -203
  919. package/build/cjs/integrations/tracing/prisma.js.map +0 -1
  920. package/build/cjs/integrations/tracing/redis.js +0 -121
  921. package/build/cjs/integrations/tracing/redis.js.map +0 -1
  922. package/build/cjs/integrations/tracing/tedious.js +0 -67
  923. package/build/cjs/integrations/tracing/tedious.js.map +0 -1
  924. package/build/esm/integrations/fs.js +0 -140
  925. package/build/esm/integrations/fs.js.map +0 -1
  926. package/build/esm/integrations/tracing/amqplib.js +0 -44
  927. package/build/esm/integrations/tracing/amqplib.js.map +0 -1
  928. package/build/esm/integrations/tracing/connect.js +0 -106
  929. package/build/esm/integrations/tracing/connect.js.map +0 -1
  930. package/build/esm/integrations/tracing/dataloader.js +0 -69
  931. package/build/esm/integrations/tracing/dataloader.js.map +0 -1
  932. package/build/esm/integrations/tracing/genericPool.js +0 -56
  933. package/build/esm/integrations/tracing/genericPool.js.map +0 -1
  934. package/build/esm/integrations/tracing/graphql.js +0 -124
  935. package/build/esm/integrations/tracing/graphql.js.map +0 -1
  936. package/build/esm/integrations/tracing/kafka.js +0 -45
  937. package/build/esm/integrations/tracing/kafka.js.map +0 -1
  938. package/build/esm/integrations/tracing/knex.js +0 -54
  939. package/build/esm/integrations/tracing/knex.js.map +0 -1
  940. package/build/esm/integrations/tracing/koa.js +0 -134
  941. package/build/esm/integrations/tracing/koa.js.map +0 -1
  942. package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
  943. package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
  944. package/build/esm/integrations/tracing/mongo.js +0 -89
  945. package/build/esm/integrations/tracing/mongo.js.map +0 -1
  946. package/build/esm/integrations/tracing/mongoose.js +0 -43
  947. package/build/esm/integrations/tracing/mongoose.js.map +0 -1
  948. package/build/esm/integrations/tracing/mysql.js +0 -35
  949. package/build/esm/integrations/tracing/mysql.js.map +0 -1
  950. package/build/esm/integrations/tracing/mysql2.js +0 -43
  951. package/build/esm/integrations/tracing/mysql2.js.map +0 -1
  952. package/build/esm/integrations/tracing/postgres.js +0 -45
  953. package/build/esm/integrations/tracing/postgres.js.map +0 -1
  954. package/build/esm/integrations/tracing/prisma.js +0 -200
  955. package/build/esm/integrations/tracing/prisma.js.map +0 -1
  956. package/build/esm/integrations/tracing/redis.js +0 -117
  957. package/build/esm/integrations/tracing/redis.js.map +0 -1
  958. package/build/esm/integrations/tracing/tedious.js +0 -64
  959. package/build/esm/integrations/tracing/tedious.js.map +0 -1
  960. package/build/types/integrations/fs.d.ts +0 -24
  961. package/build/types/integrations/fs.d.ts.map +0 -1
  962. package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
  963. package/build/types/integrations/tracing/connect.d.ts.map +0 -1
  964. package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
  965. package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
  966. package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
  967. package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
  968. package/build/types/integrations/tracing/knex.d.ts.map +0 -1
  969. package/build/types/integrations/tracing/koa.d.ts.map +0 -1
  970. package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
  971. package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
  972. package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
  973. package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
  974. package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
  975. package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
  976. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -38
  977. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
  978. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -31
  979. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
  980. package/build/types/integrations/tracing/prisma.d.ts +0 -50
  981. package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
  982. package/build/types/integrations/tracing/redis.d.ts +0 -41
  983. package/build/types/integrations/tracing/redis.d.ts.map +0 -1
  984. package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
  985. package/build/types-ts3.8/integrations/fs.d.ts +0 -24
  986. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -44
  987. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -34
  988. package/build/types-ts3.8/integrations/tracing/prisma.d.ts +0 -50
  989. package/build/types-ts3.8/integrations/tracing/redis.d.ts +0 -41
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/hono/index.ts"],"sourcesContent":["import { ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport type { IntegrationFn, Span } from '@sentry/core';\nimport {\n captureException,\n debug,\n defineIntegration,\n getDefaultIsolationScope,\n getIsolationScope,\n httpRequestToRequestData,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n spanToJSON,\n} from '@sentry/core';\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport { AttributeNames } from './constants';\nimport { HonoInstrumentation } from './instrumentation';\nimport type { Context, MiddlewareHandler, MiddlewareHandlerInterface, Next } from './types';\n\nconst INTEGRATION_NAME = 'Hono';\n\nfunction addHonoSpanAttributes(span: Span): void {\n const attributes = spanToJSON(span).data;\n const type = attributes[AttributeNames.HONO_TYPE];\n if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] || !type) {\n return;\n }\n\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.hono',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.hono`,\n });\n\n const name = attributes[AttributeNames.HONO_NAME];\n if (typeof name === 'string') {\n span.updateName(name);\n }\n\n if (getIsolationScope() === getDefaultIsolationScope()) {\n DEBUG_BUILD && debug.warn('Isolation scope is default isolation scope - skipping setting transactionName');\n return;\n }\n\n const route = attributes[ATTR_HTTP_ROUTE];\n const method = attributes[ATTR_HTTP_REQUEST_METHOD];\n if (typeof route === 'string' && typeof method === 'string') {\n getIsolationScope().setTransactionName(`${method} ${route}`);\n }\n}\n\nexport const instrumentHono = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new HonoInstrumentation({\n responseHook: span => {\n addHonoSpanAttributes(span);\n },\n }),\n);\n\nconst _honoIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentHono();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Hono](https://hono.dev/).\n *\n * If you also want to capture errors, you need to call `setupHonoErrorHandler(app)` after you set up your Hono server.\n *\n * For more information, see the [hono documentation](https://docs.sentry.io/platforms/javascript/guides/hono/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.honoIntegration()],\n * })\n * ```\n */\nexport const honoIntegration = defineIntegration(_honoIntegration);\n\ninterface HonoHandlerOptions {\n /**\n * Callback method deciding whether error should be captured and sent to Sentry\n * @param error Captured Hono error\n */\n shouldHandleError: (context: Context) => boolean;\n}\n\nfunction honoRequestHandler(): MiddlewareHandler {\n return async function sentryRequestMiddleware(context: Context, next: Next): Promise<void> {\n const normalizedRequest = httpRequestToRequestData(context.req);\n getIsolationScope().setSDKProcessingMetadata({ normalizedRequest });\n await next();\n };\n}\n\nfunction defaultShouldHandleError(context: Context): boolean {\n const statusCode = context.res.status;\n return statusCode >= 500;\n}\n\nfunction honoErrorHandler(options?: Partial<HonoHandlerOptions>): MiddlewareHandler {\n return async function sentryErrorMiddleware(context: Context, next: Next): Promise<void> {\n await next();\n\n const shouldHandleError = options?.shouldHandleError || defaultShouldHandleError;\n if (shouldHandleError(context)) {\n (context.res as { sentry?: string }).sentry = captureException(context.error, {\n mechanism: {\n type: 'auto.middleware.hono',\n handled: false,\n },\n });\n }\n };\n}\n\n/**\n * Add a Hono error handler to capture errors to Sentry.\n *\n * @param app The Hono instances\n * @param options Configuration options for the handler\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const { Hono } = require(\"hono\");\n *\n * const app = new Hono();\n *\n * Sentry.setupHonoErrorHandler(app);\n *\n * // Add your routes, etc.\n * ```\n */\nexport function setupHonoErrorHandler(\n app: { use: MiddlewareHandlerInterface },\n options?: Partial<HonoHandlerOptions>,\n): void {\n app.use(honoRequestHandler());\n app.use(honoErrorHandler(options));\n ensureIsWrapped(app.use, 'hono');\n}\n"],"names":["spanToJSON","AttributeNames","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","getIsolationScope","getDefaultIsolationScope","DEBUG_BUILD","debug","ATTR_HTTP_ROUTE","ATTR_HTTP_REQUEST_METHOD","generateInstrumentOnce","HonoInstrumentation","defineIntegration","httpRequestToRequestData","captureException","ensureIsWrapped"],"mappings":";;;;;;;;;AAmBA,MAAM,gBAAA,GAAmB,MAAM;;AAE/B,SAAS,qBAAqB,CAAC,IAAI,EAAc;AACjD,EAAE,MAAM,aAAaA,eAAU,CAAC,IAAI,CAAC,CAAC,IAAI;AAC1C,EAAE,MAAM,OAAO,UAAU,CAACC,wBAAc,CAAC,SAAS,CAAC;AACnD,EAAE,IAAI,UAAU,CAACC,iCAA4B,CAAA,IAAK,CAAC,IAAI,EAAE;AACzD,IAAI;AACJ,EAAE;;AAEF,EAAE,IAAI,CAAC,aAAa,CAAC;AACrB,IAAI,CAACC,qCAAgC,GAAG,qBAAqB;AAC7D,IAAI,CAACD,iCAA4B,GAAG,CAAC,EAAA,IA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A,EAAA,IAAA,EAAA;AACA,IAAA,MAAA,iBAAA,GAAAC,6BAAA,CAAA,OAAA,CAAA,GAAA,CAAA;AACA,IAAAT,sBAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,iBAAA,EAAA,CAAA;AACA,IAAA,MAAA,IAAA,EAAA;AACA,EAAA,CAAA;AACA;;AAEA,SAAA,wBAAA,CAAA,OAAA,EAAA;AACA,EAAA,MAAA,UAAA,GAAA,OAAA,CAAA,GAAA,CAAA,MAAA;AACA,EAAA,OAAA,UAAA,IAAA,GAAA;AACA;;AAEA,SAAA,gBAAA,CAAA,OAAA,EAAA;AACA,EAAA,OAAA,eAAA,qBAAA,CAAA,OAAA,EAAA,IAAA,EAAA;AACA,IAAA,MAAA,IAAA,EAAA;;AAEA,IAAA,MAAA,iBAAA,GAAA,OAAA,EAAA,iBAAA,IAAA,wBAAA;AACA,IAAA,IAAA,iBAAA,CAAA,OAAA,CAAA,EAAA;AACA,MAAA,CAAA,OAAA,CAAA,GAAA,GAAA,MAAA,GAAAU,qBAAA,CAAA,OAAA,CAAA,KAAA,EAAA;AACA,QAAA,SAAA,EAAA;AACA,UAAA,IAAA,EAAA,sBAAA;AACA,UAAA,OAAA,EAAA,KAAA;AACA,SAAA;AACA,OAAA,CAAA;AACA,IAAA;AACA,EAAA,CAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,qBAAA;AACA,EAAA,GAAA;AACA,EAAA,OAAA;AACA,EAAA;AACA,EAAA,GAAA,CAAA,GAAA,CAAA,kBAAA,EAAA,CAAA;AACA,EAAA,GAAA,CAAA,GAAA,CAAA,gBAAA,CAAA,OAAA,CAAA,CAAA;AACA,EAAAC,wBAAA,CAAA,GAAA,CAAA,GAAA,EAAA,MAAA,CAAA;AACA;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/hono/index.ts"],"sourcesContent":["import { HTTP_REQUEST_METHOD, HTTP_ROUTE } from '@sentry/conventions/attributes';\nimport type { IntegrationFn, Span } from '@sentry/core';\nimport {\n captureException,\n debug,\n defineIntegration,\n getDefaultIsolationScope,\n getIsolationScope,\n httpRequestToRequestData,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n spanToJSON,\n} from '@sentry/core';\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport { AttributeNames } from './constants';\nimport { HonoInstrumentation } from './instrumentation';\nimport type { Context, MiddlewareHandler, MiddlewareHandlerInterface, Next } from './types';\n\nconst INTEGRATION_NAME = 'Hono' as const;\n\nfunction addHonoSpanAttributes(span: Span): void {\n const attributes = spanToJSON(span).data;\n const type = attributes[AttributeNames.HONO_TYPE];\n if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] || !type) {\n return;\n }\n\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.hono',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.hono`,\n });\n\n const name = attributes[AttributeNames.HONO_NAME];\n if (typeof name === 'string') {\n span.updateName(name);\n }\n\n if (getIsolationScope() === getDefaultIsolationScope()) {\n DEBUG_BUILD && debug.warn('Isolation scope is default isolation scope - skipping setting transactionName');\n return;\n }\n\n const route = attributes[HTTP_ROUTE];\n const method = attributes[HTTP_REQUEST_METHOD];\n if (typeof route === 'string' && typeof method === 'string') {\n getIsolationScope().setTransactionName(`${method} ${route}`);\n }\n}\n\nexport const instrumentHono = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new HonoInstrumentation({\n responseHook: span => {\n addHonoSpanAttributes(span);\n },\n }),\n);\n\nconst _honoIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentHono();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Hono](https://hono.dev/).\n *\n * If you also want to capture errors, you need to call `setupHonoErrorHandler(app)` after you set up your Hono server.\n *\n * For more information, see the [hono documentation](https://docs.sentry.io/platforms/javascript/guides/hono/).\n *\n * @deprecated Use the `@sentry/hono` package instead. The `sentry()` middleware from `@sentry/hono/node` handles\n * tracing and error capturing automatically without needing this integration or `setupHonoErrorHandler`.\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.honoIntegration()],\n * })\n * ```\n */\nexport const honoIntegration = defineIntegration(_honoIntegration);\n\ninterface HonoHandlerOptions {\n /**\n * Callback method deciding whether error should be captured and sent to Sentry\n * @param error Captured Hono error\n */\n shouldHandleError: (context: Context) => boolean;\n}\n\nfunction honoRequestHandler(): MiddlewareHandler {\n return async function sentryRequestMiddleware(context: Context, next: Next): Promise<void> {\n const normalizedRequest = httpRequestToRequestData(context.req);\n getIsolationScope().setSDKProcessingMetadata({ normalizedRequest });\n await next();\n };\n}\n\nfunction defaultShouldHandleError(context: Context): boolean {\n const statusCode = context.res.status;\n return statusCode >= 500;\n}\n\nfunction honoErrorHandler(options?: Partial<HonoHandlerOptions>): MiddlewareHandler {\n return async function sentryErrorMiddleware(context: Context, next: Next): Promise<void> {\n await next();\n\n const shouldHandleError = options?.shouldHandleError || defaultShouldHandleError;\n if (shouldHandleError(context)) {\n (context.res as { sentry?: string }).sentry = captureException(context.error, {\n mechanism: {\n type: 'auto.middleware.hono',\n handled: false,\n },\n });\n }\n };\n}\n\n/**\n * Add a Hono error handler to capture errors to Sentry.\n *\n * @param app The Hono instances\n * @param options Configuration options for the handler\n *\n * @deprecated Use the `@sentry/hono` package instead. The `sentry()` middleware from `@sentry/hono/node` handles\n * error capturing automatically without needing this function or `honoIntegration`.\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const { Hono } = require(\"hono\");\n *\n * const app = new Hono();\n *\n * Sentry.setupHonoErrorHandler(app);\n *\n * // Add your routes, etc.\n * ```\n */\nexport function setupHonoErrorHandler(\n app: { use: MiddlewareHandlerInterface },\n options?: Partial<HonoHandlerOptions>,\n): void {\n app.use(honoRequestHandler());\n app.use(honoErrorHandler(options));\n ensureIsWrapped(app.use, 'hono');\n}\n"],"names":["attributes","spanToJSON","AttributeNames","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","getIsolationScope","getDefaultIsolationScope","DEBUG_BUILD","debug","HTTP_ROUTE","HTTP_REQUEST_METHOD","generateInstrumentOnce","HonoInstrumentation","defineIntegration","httpRequestToRequestData","captureException","ensureIsWrapped"],"mappings":";;;;;;;;;AAmBA,MAAM,gBAAA,GAAmB,MAAA;AAEzB,SAAS,sBAAsB,IAAA,EAAkB;AAC/C,EAAA,MAAMA,YAAA,GAAaC,eAAA,CAAW,IAAI,CAAA,CAAE,IAAA;AACpC,EAAA,MAAM,IAAA,GAAOD,YAAA,CAAWE,wBAAA,CAAe,SAAS,CAAA;AAChD,EAAA,IAAIF,YAAA,CAAWG,iCAA4B,CAAA,IAAK,CAAC,IAAA,EAAM;AACrD,IAAA;AAAA,EACF;AAEA,EAAA,IAAA,CAAK,aAAA,CAAc;AAAA,IACjB,CAACC,qCAAgC,GAAG,qBAAA;AAAA,IACpC,CAACD,iCAA4B,GAAG,CAAA,EAAG,IAAI,CAAA,KAAA;AAAA,GACxC,CAAA;AAED,EAAA,MAAM,IAAA,GAAOH,YAAA,CAAWE,wBAAA,CAAe,SAAS,CAAA;AAChD,EAAA,IAAI,OAAO,SAAS,QAAA,EAAU;AAC5B,IAAA,IAAA,CAAK,WAAW,IAAI,CAAA;AAAA,EACtB;AAEA,EAAA,IAAIG,sBAAA,EAAkB,KAAMC,6BAAA,EAAyB,EAAG;AACtD,IAAAC,sBAAA,IAAeC,UAAA,CAAM,KAAK,+EAA+E,CAAA;AACzG,IAAA;AAAA,EACF;AAEA,EAAA,MAAM,KAAA,GAAQR,aAAWS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MAAM,iBAAA,GAAoB,SAAS,iBAAA,IAAqB,wBAAA;AACxD,IAAA,IAAI,iBAAA,CAAkB,OAAO,CAAA,EAAG;AAC9B,MAAC,OAAA,CAAQ,GAAA,CAA4B,MAAA,GAASU,qBAAA,CAAiB,QAAQ,KAAA,EAAO;AAAA,QAC5E,SAAA,EAAW;AAAA,UACT,IAAA,EAAM,sBAAA;AAAA,UACN,OAAA,EAAS;AAAA;AACX,OACD,CAAA;AAAA,IACH;AAAA,EACF,CAAA;AACF;AAuBO,SAAS,qBAAA,CACd,KACA,OAAA,EACM;AACN,EAAA,GAAA,CAAI,GAAA,CAAI,oBAAoB,CAAA;AAC5B,EAAA,GAAA,CAAI,GAAA,CAAI,gBAAA,CAAiB,OAAO,CAAC,CAAA;AACjC,EAAAC,wBAAA,CAAgB,GAAA,CAAI,KAAK,MAAM,CAAA;AACjC;;;;;;"}
@@ -5,227 +5,192 @@ const instrumentation = require('@opentelemetry/instrumentation');
5
5
  const core = require('@sentry/core');
6
6
  const constants = require('./constants.js');
7
7
 
8
- const PACKAGE_NAME = '@sentry/instrumentation-hono';
9
- const PACKAGE_VERSION = '0.0.1';
10
-
11
- /**
12
- * Hono instrumentation for OpenTelemetry
13
- */
8
+ const PACKAGE_NAME = "@sentry/instrumentation-hono";
9
+ const PACKAGE_VERSION = "0.0.1";
14
10
  class HonoInstrumentation extends instrumentation.InstrumentationBase {
15
- constructor(config = {}) {
11
+ constructor(config = {}) {
16
12
  super(PACKAGE_NAME, PACKAGE_VERSION, config);
17
13
  }
18
-
19
14
  /**
20
15
  * Initialize the instrumentation.
21
16
  */
22
- init() {
17
+ init() {
23
18
  return [
24
- new instrumentation.InstrumentationNodeModuleDefinition('hono', ['>=4.0.0 <5'], moduleExports => this._patch(moduleExports)),
19
+ new instrumentation.InstrumentationNodeModuleDefinition("hono", [">=4.0.0 <5"], (moduleExports) => this._patch(moduleExports))
25
20
  ];
26
21
  }
27
-
28
22
  /**
29
23
  * Patches the module exports to instrument Hono.
30
24
  */
31
- _patch(moduleExports) {
32
- // eslint-disable-next-line @typescript-eslint/no-this-alias
25
+ _patch(moduleExports) {
33
26
  const instrumentation = this;
34
-
35
27
  class WrappedHono extends moduleExports.Hono {
36
- constructor(...args) {
28
+ constructor(...args) {
37
29
  super(...args);
38
-
39
- instrumentation._wrap(this, 'get', instrumentation._patchHandler());
40
- instrumentation._wrap(this, 'post', instrumentation._patchHandler());
41
- instrumentation._wrap(this, 'put', instrumentation._patchHandler());
42
- instrumentation._wrap(this, 'delete', instrumentation._patchHandler());
43
- instrumentation._wrap(this, 'options', instrumentation._patchHandler());
44
- instrumentation._wrap(this, 'patch', instrumentation._patchHandler());
45
- instrumentation._wrap(this, 'all', instrumentation._patchHandler());
46
- instrumentation._wrap(this, 'on', instrumentation._patchOnHandler());
47
- instrumentation._wrap(this, 'use', instrumentation._patchMiddlewareHandler());
30
+ instrumentation._wrap(this, "get", instrumentation._patchHandler());
31
+ instrumentation._wrap(this, "post", instrumentation._patchHandler());
32
+ instrumentation._wrap(this, "put", instrumentation._patchHandler());
33
+ instrumentation._wrap(this, "delete", instrumentation._patchHandler());
34
+ instrumentation._wrap(this, "options", instrumentation._patchHandler());
35
+ instrumentation._wrap(this, "patch", instrumentation._patchHandler());
36
+ instrumentation._wrap(this, "all", instrumentation._patchHandler());
37
+ instrumentation._wrap(this, "on", instrumentation._patchOnHandler());
38
+ instrumentation._wrap(this, "use", instrumentation._patchMiddlewareHandler());
48
39
  }
49
40
  }
50
-
51
41
  try {
52
42
  moduleExports.Hono = WrappedHono;
53
43
  } catch {
54
- // This is a workaround for environments where direct assignment is not allowed.
55
44
  return { ...moduleExports, Hono: WrappedHono };
56
45
  }
57
-
58
46
  return moduleExports;
59
47
  }
60
-
61
48
  /**
62
49
  * Patches the route handler to instrument it.
63
50
  */
64
- _patchHandler() {
65
- // eslint-disable-next-line @typescript-eslint/no-this-alias
51
+ _patchHandler() {
66
52
  const instrumentation = this;
67
-
68
- return function (original) {
69
- return function wrappedHandler( ...args) {
70
- if (typeof args[0] === 'string') {
53
+ return function(original) {
54
+ return function wrappedHandler(...args) {
55
+ if (typeof args[0] === "string") {
71
56
  const path = args[0];
72
57
  if (args.length === 1) {
73
58
  return original.apply(this, [path]);
74
59
  }
75
-
76
60
  const handlers = args.slice(1);
77
61
  return original.apply(this, [
78
62
  path,
79
- ...handlers.map(handler => instrumentation._wrapHandler(handler )),
63
+ ...handlers.map((handler) => instrumentation._wrapHandler(handler))
80
64
  ]);
81
65
  }
82
-
83
66
  return original.apply(
84
67
  this,
85
- args.map(handler => instrumentation._wrapHandler(handler )),
68
+ args.map((handler) => instrumentation._wrapHandler(handler))
86
69
  );
87
70
  };
88
71
  };
89
72
  }
90
-
91
73
  /**
92
74
  * Patches the 'on' handler to instrument it.
93
75
  */
94
- _patchOnHandler() {
95
- // eslint-disable-next-line @typescript-eslint/no-this-alias
76
+ _patchOnHandler() {
96
77
  const instrumentation = this;
97
-
98
- return function (original) {
99
- return function wrappedHandler( ...args) {
78
+ return function(original) {
79
+ return function wrappedHandler(...args) {
100
80
  const handlers = args.slice(2);
101
81
  return original.apply(this, [
102
82
  ...args.slice(0, 2),
103
- ...handlers.map(handler => instrumentation._wrapHandler(handler )),
83
+ ...handlers.map((handler) => instrumentation._wrapHandler(handler))
104
84
  ]);
105
85
  };
106
86
  };
107
87
  }
108
-
109
88
  /**
110
89
  * Patches the middleware handler to instrument it.
111
90
  */
112
- _patchMiddlewareHandler() {
113
- // eslint-disable-next-line @typescript-eslint/no-this-alias
91
+ _patchMiddlewareHandler() {
114
92
  const instrumentation = this;
115
-
116
- return function (original) {
117
- return function wrappedHandler( ...args) {
118
- if (typeof args[0] === 'string') {
93
+ return function(original) {
94
+ return function wrappedHandler(...args) {
95
+ if (typeof args[0] === "string") {
119
96
  const path = args[0];
120
97
  if (args.length === 1) {
121
98
  return original.apply(this, [path]);
122
99
  }
123
-
124
100
  const handlers = args.slice(1);
125
101
  return original.apply(this, [
126
102
  path,
127
- ...handlers.map(handler => instrumentation._wrapHandler(handler )),
103
+ ...handlers.map((handler) => instrumentation._wrapHandler(handler))
128
104
  ]);
129
105
  }
130
-
131
106
  return original.apply(
132
107
  this,
133
- args.map(handler => instrumentation._wrapHandler(handler )),
108
+ args.map((handler) => instrumentation._wrapHandler(handler))
134
109
  );
135
110
  };
136
111
  };
137
112
  }
138
-
139
113
  /**
140
114
  * Wraps a handler or middleware handler to apply instrumentation.
141
115
  */
142
- _wrapHandler(handler) {
143
- // eslint-disable-next-line @typescript-eslint/no-this-alias
116
+ _wrapHandler(handler) {
144
117
  const instrumentation = this;
145
-
146
- return function ( c, next) {
118
+ return function(c, next) {
147
119
  if (!instrumentation.isEnabled()) {
148
120
  return handler.apply(this, [c, next]);
149
121
  }
150
-
151
122
  const path = c.req.path;
152
123
  const span = instrumentation.tracer.startSpan(path);
153
-
154
124
  return api.context.with(api.trace.setSpan(api.context.active(), span), () => {
155
125
  return instrumentation._safeExecute(
156
126
  () => {
157
127
  const result = handler.apply(this, [c, next]);
158
128
  if (core.isThenable(result)) {
159
- return result.then(result => {
160
- const type = instrumentation._determineHandlerType(result);
129
+ return result.then((result2) => {
130
+ const type = instrumentation._determineHandlerType(result2);
161
131
  span.setAttributes({
162
132
  [constants.AttributeNames.HONO_TYPE]: type,
163
- [constants.AttributeNames.HONO_NAME]: type === constants.HonoTypes.REQUEST_HANDLER ? path : handler.name || 'anonymous',
133
+ [constants.AttributeNames.HONO_NAME]: type === constants.HonoTypes.REQUEST_HANDLER ? path : handler.name || "anonymous"
164
134
  });
165
135
  instrumentation.getConfig().responseHook?.(span);
166
- return result;
136
+ return result2;
167
137
  });
168
138
  } else {
169
139
  const type = instrumentation._determineHandlerType(result);
170
140
  span.setAttributes({
171
141
  [constants.AttributeNames.HONO_TYPE]: type,
172
- [constants.AttributeNames.HONO_NAME]: type === constants.HonoTypes.REQUEST_HANDLER ? path : handler.name || 'anonymous',
142
+ [constants.AttributeNames.HONO_NAME]: type === constants.HonoTypes.REQUEST_HANDLER ? path : handler.name || "anonymous"
173
143
  });
174
144
  instrumentation.getConfig().responseHook?.(span);
175
145
  return result;
176
146
  }
177
147
  },
178
148
  () => span.end(),
179
- error => {
149
+ (error) => {
180
150
  instrumentation._handleError(span, error);
181
151
  span.end();
182
- },
152
+ }
183
153
  );
184
154
  });
185
155
  };
186
156
  }
187
-
188
157
  /**
189
158
  * Safely executes a function and handles errors.
190
159
  */
191
160
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
192
- _safeExecute(execute, onSuccess, onFailure) {
161
+ _safeExecute(execute, onSuccess, onFailure) {
193
162
  try {
194
163
  const result = execute();
195
-
196
164
  if (core.isThenable(result)) {
197
165
  result.then(
198
166
  () => onSuccess(),
199
- (error) => onFailure(error),
167
+ (error) => onFailure(error)
200
168
  );
201
169
  } else {
202
170
  onSuccess();
203
171
  }
204
-
205
172
  return result;
206
173
  } catch (error) {
207
174
  onFailure(error);
208
175
  throw error;
209
176
  }
210
177
  }
211
-
212
178
  /**
213
179
  * Determines the handler type based on the result.
214
180
  * @param result
215
181
  * @private
216
182
  */
217
- _determineHandlerType(result) {
218
- return result === undefined ? constants.HonoTypes.MIDDLEWARE : constants.HonoTypes.REQUEST_HANDLER;
183
+ _determineHandlerType(result) {
184
+ return result === void 0 ? constants.HonoTypes.MIDDLEWARE : constants.HonoTypes.REQUEST_HANDLER;
219
185
  }
220
-
221
186
  /**
222
187
  * Handles errors by setting the span status and recording the exception.
223
188
  */
224
- _handleError(span, error) {
189
+ _handleError(span, error) {
225
190
  if (error instanceof Error) {
226
191
  span.setStatus({
227
192
  code: api.SpanStatusCode.ERROR,
228
- message: error.message,
193
+ message: error.message
229
194
  });
230
195
  span.recordException(error);
231
196
  }
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.js","sources":["../../../../../src/integrations/tracing/hono/instrumentation.ts"],"sourcesContent":["import type { Span } from '@opentelemetry/api';\nimport { context, SpanStatusCode, trace } from '@opentelemetry/api';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\nimport { isThenable } from '@sentry/core';\nimport { AttributeNames, HonoTypes } from './constants';\nimport type {\n Context,\n Handler,\n HandlerInterface,\n Hono,\n HonoInstance,\n MiddlewareHandler,\n MiddlewareHandlerInterface,\n Next,\n OnHandlerInterface,\n} from './types';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-hono';\nconst PACKAGE_VERSION = '0.0.1';\n\nexport interface HonoResponseHookFunction {\n (span: Span): void;\n}\n\nexport interface HonoInstrumentationConfig extends InstrumentationConfig {\n /** Function for adding custom span attributes from the response */\n responseHook?: HonoResponseHookFunction;\n}\n\n/**\n * Hono instrumentation for OpenTelemetry\n */\nexport class HonoInstrumentation extends InstrumentationBase<HonoInstrumentationConfig> {\n public constructor(config: HonoInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n }\n\n /**\n * Initialize the instrumentation.\n */\n public init(): InstrumentationNodeModuleDefinition[] {\n return [\n new InstrumentationNodeModuleDefinition('hono', ['>=4.0.0 <5'], moduleExports => this._patch(moduleExports)),\n ];\n }\n\n /**\n * Patches the module exports to instrument Hono.\n */\n private _patch(moduleExports: { Hono: Hono }): { Hono: Hono } {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n class WrappedHono extends moduleExports.Hono {\n public constructor(...args: unknown[]) {\n super(...args);\n\n instrumentation._wrap(this, 'get', instrumentation._patchHandler());\n instrumentation._wrap(this, 'post', instrumentation._patchHandler());\n instrumentation._wrap(this, 'put', instrumentation._patchHandler());\n instrumentation._wrap(this, 'delete', instrumentation._patchHandler());\n instrumentation._wrap(this, 'options', instrumentation._patchHandler());\n instrumentation._wrap(this, 'patch', instrumentation._patchHandler());\n instrumentation._wrap(this, 'all', instrumentation._patchHandler());\n instrumentation._wrap(this, 'on', instrumentation._patchOnHandler());\n instrumentation._wrap(this, 'use', instrumentation._patchMiddlewareHandler());\n }\n }\n\n try {\n moduleExports.Hono = WrappedHono;\n } catch {\n // This is a workaround for environments where direct assignment is not allowed.\n return { ...moduleExports, Hono: WrappedHono };\n }\n\n return moduleExports;\n }\n\n /**\n * Patches the route handler to instrument it.\n */\n private _patchHandler(): (original: HandlerInterface) => HandlerInterface {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (original: HandlerInterface) {\n return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {\n if (typeof args[0] === 'string') {\n const path = args[0];\n if (args.length === 1) {\n return original.apply(this, [path]);\n }\n\n const handlers = args.slice(1);\n return original.apply(this, [\n path,\n ...handlers.map(handler => instrumentation._wrapHandler(handler as Handler | MiddlewareHandler)),\n ]);\n }\n\n return original.apply(\n this,\n args.map(handler => instrumentation._wrapHandler(handler as Handler | MiddlewareHandler)),\n );\n };\n };\n }\n\n /**\n * Patches the 'on' handler to instrument it.\n */\n private _patchOnHandler(): (original: OnHandlerInterface) => OnHandlerInterface {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (original: OnHandlerInterface) {\n return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {\n const handlers = args.slice(2);\n return original.apply(this, [\n ...args.slice(0, 2),\n ...handlers.map(handler => instrumentation._wrapHandler(handler as Handler | MiddlewareHandler)),\n ]);\n };\n };\n }\n\n /**\n * Patches the middleware handler to instrument it.\n */\n private _patchMiddlewareHandler(): (original: MiddlewareHandlerInterface) => MiddlewareHandlerInterface {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (original: MiddlewareHandlerInterface) {\n return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {\n if (typeof args[0] === 'string') {\n const path = args[0];\n if (args.length === 1) {\n return original.apply(this, [path]);\n }\n\n const handlers = args.slice(1);\n return original.apply(this, [\n path,\n ...handlers.map(handler => instrumentation._wrapHandler(handler as MiddlewareHandler)),\n ]);\n }\n\n return original.apply(\n this,\n args.map(handler => instrumentation._wrapHandler(handler as MiddlewareHandler)),\n );\n };\n };\n }\n\n /**\n * Wraps a handler or middleware handler to apply instrumentation.\n */\n private _wrapHandler(handler: Handler | MiddlewareHandler): Handler | MiddlewareHandler {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (this: unknown, c: Context, next: Next) {\n if (!instrumentation.isEnabled()) {\n return handler.apply(this, [c, next]);\n }\n\n const path = c.req.path;\n const span = instrumentation.tracer.startSpan(path);\n\n return context.with(trace.setSpan(context.active(), span), () => {\n return instrumentation._safeExecute(\n () => {\n const result = handler.apply(this, [c, next]);\n if (isThenable(result)) {\n return result.then(result => {\n const type = instrumentation._determineHandlerType(result);\n span.setAttributes({\n [AttributeNames.HONO_TYPE]: type,\n [AttributeNames.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ? path : handler.name || 'anonymous',\n });\n instrumentation.getConfig().responseHook?.(span);\n return result;\n });\n } else {\n const type = instrumentation._determineHandlerType(result);\n span.setAttributes({\n [AttributeNames.HONO_TYPE]: type,\n [AttributeNames.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ? path : handler.name || 'anonymous',\n });\n instrumentation.getConfig().responseHook?.(span);\n return result;\n }\n },\n () => span.end(),\n error => {\n instrumentation._handleError(span, error);\n span.end();\n },\n );\n });\n };\n }\n\n /**\n * Safely executes a function and handles errors.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _safeExecute(execute: () => any, onSuccess: () => void, onFailure: (error: unknown) => void): () => any {\n try {\n const result = execute();\n\n if (isThenable(result)) {\n result.then(\n () => onSuccess(),\n (error: unknown) => onFailure(error),\n );\n } else {\n onSuccess();\n }\n\n return result;\n } catch (error: unknown) {\n onFailure(error);\n throw error;\n }\n }\n\n /**\n * Determines the handler type based on the result.\n * @param result\n * @private\n */\n private _determineHandlerType(result: unknown): HonoTypes {\n return result === undefined ? HonoTypes.MIDDLEWARE : HonoTypes.REQUEST_HANDLER;\n }\n\n /**\n * Handles errors by setting the span status and recording the exception.\n */\n private _handleError(span: Span, error: unknown): void {\n if (error instanceof Error) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n span.recordException(error);\n }\n }\n}\n"],"names":["InstrumentationBase","InstrumentationNodeModuleDefinition","context","trace","isThenable","AttributeNames","HonoTypes","SpanStatusCode"],"mappings":";;;;;;;AAkBA,MAAM,YAAA,GAAe,8BAA8B;AACnD,MAAM,eAAA,GAAkB,OAAO;;AAW/B;AACA;AACA;AACO,MAAM,mBAAA,SAA4BA,mCAAmB,CAA4B;AACxF,GAAS,WAAW,CAAC,MAAM,GAA8B,EAAE,EAAE;AAC7D,IAAI,KAAK,CAAC,YAAY,EAAE,eAAe,EAAE,MAAM,CAAC;AAChD,EAAE;;AAEF;AACA;AACA;AACA,GAAS,IAAI,GAA0C;AACvD,IAAI,OAAO;AACX,MAAM,IAAIC,mDAAmC,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,aAAA,IAAiB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAClH,KAAK;AACL,EAAE;;AAEF;AACA;AACA;AACA,GAAU,MAAM,CAAC,aAAa,EAAkC;AAChE;AACA,IAAI,MAAM,eAAA,GAAkB,IAAI;;AAEhC,IAAI,MAAM,WAAA,SAAoB,aAAa,CAAC,IAAA,CAAK;AACjD,OAAa,WAAW,CAAC,GAAG,IAAI,EAAa;AAC7C,QAAQ,KAAK,CAAC,GAAG,IAAI,CAAC;;AAEtB,QAAQ,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,aAAa,EAAE,CAAC;AAC3E,QAAQ,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,aAAa,EAAE,CAAC;AAC5E,QAAQ,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,aAAa,EAAE,CAAC;AAC3E,QAAQ,eAAe,C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AC;AACrD,YAAY,IAAI,CAAC,GAAG,EAAE;AACtB,UAAU,CAAC;AACX,SAAS;AACT,MAAM,CAAC,CAAC;AACR,IAAI,CAAC;AACL,EAAE;;AAEF;AACA;AACA;AACA;AACA,GAAU,YAAY,CAAC,OAAO,EAAa,SAAS,EAAc,SAAS,EAAuC;AAClH,IAAI,IAAI;AACR,MAAM,MAAM,MAAA,GAAS,OAAO,EAAE;;AAE9B,MAAM,IAAIF,eAAU,CAAC,MAAM,CAAC,EAAE;AAC9B,QAAQ,MAAM,CAAC,IAAI;AACnB,UAAU,MAAM,SAAS,EAAE;AAC3B,UAAU,CAAC,KAAK,KAAc,SAAS,CAAC,KAAK,CAAC;AAC9C,SAAS;AACT,MAAM,OAAO;AACb,QAAQ,SAAS,EAAE;AACnB,MAAM;;AAEN,MAAM,OAAO,MAAM;AACnB,IAAI,CAAA,CAAE,OAAO,KAAK,EAAW;AAC7B,MAAM,SAAS,CAAC,KAAK,CAAC;AACtB,MAAM,MAAM,KAAK;AACjB,IAAI;AACJ,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAU,qBAAqB,CAAC,MAAM,EAAsB;AAC5D,IAAI,OAAO,MAAA,KAAW,SAAA,GAAYE,mBAAS,CAAC,UAAA,GAAaA,mBAAS,CAAC,eAAe;AAClF,EAAE;;AAEF;AACA;AACA;AACA,GAAU,YAAY,CAAC,IAAI,EAAQ,KAAK,EAAiB;AACzD,IAAI,IAAI,KAAA,YAAiB,KAAK,EAAE;AAChC,MAAM,IAAI,CAAC,SAAS,CAAC;AACrB,QAAQ,IAAI,EAAEC,kBAAc,CAAC,KAAK;AAClC,QAAQ,OAAO,EAAE,KAAK,CAAC,OAAO;AAC9B,OAAO,CAAC;AACR,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;AACjC,IAAI;AACJ,EAAE;AACF;;;;"}
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../src/integrations/tracing/hono/instrumentation.ts"],"sourcesContent":["import type { Span } from '@opentelemetry/api';\nimport { context, SpanStatusCode, trace } from '@opentelemetry/api';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\nimport { isThenable } from '@sentry/core';\nimport { AttributeNames, HonoTypes } from './constants';\nimport type {\n Context,\n Handler,\n HandlerInterface,\n Hono,\n HonoInstance,\n MiddlewareHandler,\n MiddlewareHandlerInterface,\n Next,\n OnHandlerInterface,\n} from './types';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-hono';\nconst PACKAGE_VERSION = '0.0.1';\n\nexport interface HonoResponseHookFunction {\n (span: Span): void;\n}\n\nexport interface HonoInstrumentationConfig extends InstrumentationConfig {\n /** Function for adding custom span attributes from the response */\n responseHook?: HonoResponseHookFunction;\n}\n\n/**\n * Hono instrumentation for OpenTelemetry\n */\nexport class HonoInstrumentation extends InstrumentationBase<HonoInstrumentationConfig> {\n public constructor(config: HonoInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n }\n\n /**\n * Initialize the instrumentation.\n */\n public init(): InstrumentationNodeModuleDefinition[] {\n return [\n new InstrumentationNodeModuleDefinition('hono', ['>=4.0.0 <5'], moduleExports => this._patch(moduleExports)),\n ];\n }\n\n /**\n * Patches the module exports to instrument Hono.\n */\n private _patch(moduleExports: { Hono: Hono }): { Hono: Hono } {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n class WrappedHono extends moduleExports.Hono {\n public constructor(...args: unknown[]) {\n super(...args);\n\n instrumentation._wrap(this, 'get', instrumentation._patchHandler());\n instrumentation._wrap(this, 'post', instrumentation._patchHandler());\n instrumentation._wrap(this, 'put', instrumentation._patchHandler());\n instrumentation._wrap(this, 'delete', instrumentation._patchHandler());\n instrumentation._wrap(this, 'options', instrumentation._patchHandler());\n instrumentation._wrap(this, 'patch', instrumentation._patchHandler());\n instrumentation._wrap(this, 'all', instrumentation._patchHandler());\n instrumentation._wrap(this, 'on', instrumentation._patchOnHandler());\n instrumentation._wrap(this, 'use', instrumentation._patchMiddlewareHandler());\n }\n }\n\n try {\n moduleExports.Hono = WrappedHono;\n } catch {\n // This is a workaround for environments where direct assignment is not allowed.\n return { ...moduleExports, Hono: WrappedHono };\n }\n\n return moduleExports;\n }\n\n /**\n * Patches the route handler to instrument it.\n */\n private _patchHandler(): (original: HandlerInterface) => HandlerInterface {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (original: HandlerInterface) {\n return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {\n if (typeof args[0] === 'string') {\n const path = args[0];\n if (args.length === 1) {\n return original.apply(this, [path]);\n }\n\n const handlers = args.slice(1);\n return original.apply(this, [\n path,\n ...handlers.map(handler => instrumentation._wrapHandler(handler as Handler | MiddlewareHandler)),\n ]);\n }\n\n return original.apply(\n this,\n args.map(handler => instrumentation._wrapHandler(handler as Handler | MiddlewareHandler)),\n );\n };\n };\n }\n\n /**\n * Patches the 'on' handler to instrument it.\n */\n private _patchOnHandler(): (original: OnHandlerInterface) => OnHandlerInterface {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (original: OnHandlerInterface) {\n return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {\n const handlers = args.slice(2);\n return original.apply(this, [\n ...args.slice(0, 2),\n ...handlers.map(handler => instrumentation._wrapHandler(handler as Handler | MiddlewareHandler)),\n ]);\n };\n };\n }\n\n /**\n * Patches the middleware handler to instrument it.\n */\n private _patchMiddlewareHandler(): (original: MiddlewareHandlerInterface) => MiddlewareHandlerInterface {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (original: MiddlewareHandlerInterface) {\n return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {\n if (typeof args[0] === 'string') {\n const path = args[0];\n if (args.length === 1) {\n return original.apply(this, [path]);\n }\n\n const handlers = args.slice(1);\n return original.apply(this, [\n path,\n ...handlers.map(handler => instrumentation._wrapHandler(handler as MiddlewareHandler)),\n ]);\n }\n\n return original.apply(\n this,\n args.map(handler => instrumentation._wrapHandler(handler as MiddlewareHandler)),\n );\n };\n };\n }\n\n /**\n * Wraps a handler or middleware handler to apply instrumentation.\n */\n private _wrapHandler(handler: Handler | MiddlewareHandler): Handler | MiddlewareHandler {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instrumentation = this;\n\n return function (this: unknown, c: Context, next: Next) {\n if (!instrumentation.isEnabled()) {\n return handler.apply(this, [c, next]);\n }\n\n const path = c.req.path;\n const span = instrumentation.tracer.startSpan(path);\n\n return context.with(trace.setSpan(context.active(), span), () => {\n return instrumentation._safeExecute(\n () => {\n const result = handler.apply(this, [c, next]);\n if (isThenable(result)) {\n return result.then(result => {\n const type = instrumentation._determineHandlerType(result);\n span.setAttributes({\n [AttributeNames.HONO_TYPE]: type,\n [AttributeNames.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ? path : handler.name || 'anonymous',\n });\n instrumentation.getConfig().responseHook?.(span);\n return result;\n });\n } else {\n const type = instrumentation._determineHandlerType(result);\n span.setAttributes({\n [AttributeNames.HONO_TYPE]: type,\n [AttributeNames.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ? path : handler.name || 'anonymous',\n });\n instrumentation.getConfig().responseHook?.(span);\n return result;\n }\n },\n () => span.end(),\n error => {\n instrumentation._handleError(span, error);\n span.end();\n },\n );\n });\n };\n }\n\n /**\n * Safely executes a function and handles errors.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _safeExecute(execute: () => any, onSuccess: () => void, onFailure: (error: unknown) => void): () => any {\n try {\n const result = execute();\n\n if (isThenable(result)) {\n result.then(\n () => onSuccess(),\n (error: unknown) => onFailure(error),\n );\n } else {\n onSuccess();\n }\n\n return result;\n } catch (error: unknown) {\n onFailure(error);\n throw error;\n }\n }\n\n /**\n * Determines the handler type based on the result.\n * @param result\n * @private\n */\n private _determineHandlerType(result: unknown): HonoTypes {\n return result === undefined ? HonoTypes.MIDDLEWARE : HonoTypes.REQUEST_HANDLER;\n }\n\n /**\n * Handles errors by setting the span status and recording the exception.\n */\n private _handleError(span: Span, error: unknown): void {\n if (error instanceof Error) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n span.recordException(error);\n }\n }\n}\n"],"names":["InstrumentationBase","InstrumentationNodeModuleDefinition","context","trace","isThenable","result","AttributeNames","HonoTypes","SpanStatusCode"],"mappings":";;;;;;;AAkBA,MAAM,YAAA,GAAe,8BAAA;AACrB,MAAM,eAAA,GAAkB,OAAA;AAcjB,MAAM,4BAA4BA,mCAAA,CAA+C;AAAA,EAC/E,WAAA,CAAY,MAAA,GAAoC,EAAC,EAAG;AACzD,IAAA,KAAA,CAAM,YAAA,EAAc,iBAAiB,MAAM,CAAA;AAAA,EAC7C;AAAA;AAAA;AAAA;AAAA,EAKO,IAAA,GAA8C;AACnD,IAAA,OAAO;AAAA,MACL,IAAIC,mDAAA,CAAoC,MAAA,EAAQ,CAAC,YAAY,GAAG,CAAA,aAAA,KAAiB,IAAA,CAAK,MAAA,CAAO,aAAa,CAAC;AAAA,KAC7G;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKQ,OAAO,aAAA,EAA+C;AAE5D,IAAA,MAAM,eAAA,GAAkB,IAAA;AAAA,IAExB,MAAM,WAAA,SAAoB,aAAA,CAAc,IAAA,CAAK;AAAA,MACpC,eAAe,IAAA,EAAiB;AACrC,QAAA,KAAA,CAAM,GAAG,IAAI,CAAA;AAEb,QAAA,eAAA,CAAgB,KAAA,CAAM,IAAA,EAAM,KAAA,EAAO,eAAA,CAAgB,eAAe,CAAA;AAClE,QAAA,eAAA,CAAgB,KAAA,CAAM,IAAA,EAAM,MAAA,EAAQ,eAAA,CAAgB,eAAe,CAAA;AACnE,QAAA,eAAA,CAAgB,KAAA,CAAM,IAAA,EAAM,KAAA,EAAO,eAAA,CAAgB,eAAe,CAAA;AAClE,Q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,IAAI;AACF,MAAA,MAAM,SAAS,OAAA,EAAQ;AAEvB,MAAA,IAAIH,eAAA,CAAW,MAAM,CAAA,EAAG;AACtB,QAAA,MAAA,CAAO,IAAA;AAAA,UACL,MAAM,SAAA,EAAU;AAAA,UAChB,CAAC,KAAA,KAAmB,SAAA,CAAU,KAAK;AAAA,SACrC;AAAA,MACF,CAAA,MAAO;AACL,QAAA,SAAA,EAAU;AAAA,MACZ;AAEA,MAAA,OAAO,MAAA;AAAA,IACT,SAAS,KAAA,EAAgB;AACvB,MAAA,SAAA,CAAU,KAAK,CAAA;AACf,MAAA,MAAM,KAAA;AAAA,IACR;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOQ,sBAAsB,MAAA,EAA4B;AACxD,IAAA,OAAO,MAAA,KAAW,MAAA,GAAYG,mBAAA,CAAU,UAAA,GAAaA,mBAAA,CAAU,eAAA;AAAA,EACjE;AAAA;AAAA;AAAA;AAAA,EAKQ,YAAA,CAAa,MAAY,KAAA,EAAsB;AACrD,IAAA,IAAI,iBAAiB,KAAA,EAAO;AAC1B,MAAA,IAAA,CAAK,SAAA,CAAU;AAAA,QACb,MAAMC,kBAAA,CAAe,KAAA;AAAA,QACrB,SAAS,KAAA,CAAM;AAAA,OAChB,CAAA;AACD,MAAA,IAAA,CAAK,gBAAgB,KAAK,CAAA;AAAA,IAC5B;AAAA,EACF;AACF;;;;"}
@@ -1,107 +1,98 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const serverUtils = require('@sentry/server-utils');
3
4
  const http = require('../http.js');
4
- const amqplib = require('./amqplib.js');
5
- const index$6 = require('./anthropic-ai/index.js');
6
- const connect = require('./connect.js');
5
+ const index$g = require('./amqplib/index.js');
6
+ const index$k = require('./anthropic-ai/index.js');
7
+ const index = require('./connect/index.js');
7
8
  const express = require('./express.js');
8
- const index = require('./fastify/index.js');
9
+ const index$1 = require('./fastify/index.js');
9
10
  const firebase = require('./firebase/firebase.js');
10
- const genericPool = require('./genericPool.js');
11
- const index$7 = require('./google-genai/index.js');
12
- const graphql = require('./graphql.js');
13
- const index$1 = require('./hapi/index.js');
14
- const index$2 = require('./hono/index.js');
15
- const kafka = require('./kafka.js');
16
- const koa = require('./koa.js');
17
- const index$3 = require('./langchain/index.js');
18
- const index$8 = require('./langgraph/index.js');
19
- const lrumemoizer = require('./lrumemoizer.js');
20
- const mongo = require('./mongo.js');
21
- const mongoose = require('./mongoose.js');
22
- const mysql = require('./mysql.js');
23
- const mysql2 = require('./mysql2.js');
24
- const index$5 = require('./openai/index.js');
25
- const postgres = require('./postgres.js');
11
+ const index$f = require('./genericPool/index.js');
12
+ const index$l = require('./google-genai/index.js');
13
+ const index$c = require('./graphql/index.js');
14
+ const index$2 = require('./hapi/index.js');
15
+ const index$3 = require('./hono/index.js');
16
+ const index$4 = require('./kafka/index.js');
17
+ const index$5 = require('./koa/index.js');
18
+ const index$h = require('./langchain/index.js');
19
+ const index$m = require('./langgraph/index.js');
20
+ const index$6 = require('./lrumemoizer/index.js');
21
+ const index$7 = require('./mongo/index.js');
22
+ const index$8 = require('./mongoose/index.js');
23
+ const index$9 = require('./mysql/index.js');
24
+ const index$a = require('./mysql2/index.js');
25
+ const index$j = require('./openai/index.js');
26
+ const index$b = require('./postgres/index.js');
26
27
  const postgresjs = require('./postgresjs.js');
27
- const prisma = require('./prisma.js');
28
- const redis = require('./redis.js');
29
- const tedious = require('./tedious.js');
30
- const index$4 = require('./vercelai/index.js');
28
+ const index$d = require('./redis/index.js');
29
+ const index$e = require('./tedious/index.js');
30
+ const index$i = require('./vercelai/index.js');
31
31
 
32
- /**
33
- * With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
34
- */
35
32
  function getAutoPerformanceIntegrations() {
36
33
  return [
37
34
  express.expressIntegration(),
38
- index.fastifyIntegration(),
39
- graphql.graphqlIntegration(),
40
- index$2.honoIntegration(),
41
- mongo.mongoIntegration(),
42
- mongoose.mongooseIntegration(),
43
- mysql.mysqlIntegration(),
44
- mysql2.mysql2Integration(),
45
- redis.redisIntegration(),
46
- postgres.postgresIntegration(),
47
- prisma.prismaIntegration(),
48
- index$1.hapiIntegration(),
49
- koa.koaIntegration(),
50
- connect.connectIntegration(),
51
- tedious.tediousIntegration(),
52
- genericPool.genericPoolIntegration(),
53
- kafka.kafkaIntegration(),
54
- amqplib.amqplibIntegration(),
55
- lrumemoizer.lruMemoizerIntegration(),
35
+ index$1.fastifyIntegration(),
36
+ index$c.graphqlIntegration(),
37
+ // eslint-disable-next-line typescript/no-deprecated
38
+ index$3.honoIntegration(),
39
+ index$7.mongoIntegration(),
40
+ index$8.mongooseIntegration(),
41
+ index$9.mysqlIntegration(),
42
+ index$a.mysql2Integration(),
43
+ index$d.redisIntegration(),
44
+ index$b.postgresIntegration(),
45
+ serverUtils.prismaIntegration(),
46
+ index$2.hapiIntegration(),
47
+ index$5.koaIntegration(),
48
+ index.connectIntegration(),
49
+ index$e.tediousIntegration(),
50
+ index$f.genericPoolIntegration(),
51
+ index$4.kafkaIntegration(),
52
+ index$g.amqplibIntegration(),
53
+ index$6.lruMemoizerIntegration(),
56
54
  // AI providers
57
55
  // LangChain must come first to disable AI provider integrations before they instrument
58
- index$3.langChainIntegration(),
59
- index$8.langGraphIntegration(),
60
- index$4.vercelAIIntegration(),
61
- index$5.openAIIntegration(),
62
- index$6.anthropicAIIntegration(),
63
- index$7.googleGenAIIntegration(),
56
+ index$h.langChainIntegration(),
57
+ index$m.langGraphIntegration(),
58
+ index$i.vercelAIIntegration(),
59
+ index$j.openAIIntegration(),
60
+ index$k.anthropicAIIntegration(),
61
+ index$l.googleGenAIIntegration(),
64
62
  postgresjs.postgresJsIntegration(),
65
- firebase.firebaseIntegration(),
63
+ firebase.firebaseIntegration()
66
64
  ];
67
65
  }
68
-
69
- /**
70
- * Get a list of methods to instrument OTEL, when preload instrumentation.
71
- */
72
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
73
66
  function getOpenTelemetryInstrumentationToPreload() {
74
67
  return [
75
68
  http.instrumentSentryHttp,
76
- http.instrumentOtelHttp,
77
69
  express.instrumentExpress,
78
- connect.instrumentConnect,
79
- index.instrumentFastify,
80
- index.instrumentFastifyV3,
81
- index$1.instrumentHapi,
82
- index$2.instrumentHono,
83
- kafka.instrumentKafka,
84
- koa.instrumentKoa,
85
- lrumemoizer.instrumentLruMemoizer,
86
- mongo.instrumentMongo,
87
- mongoose.instrumentMongoose,
88
- mysql.instrumentMysql,
89
- mysql2.instrumentMysql2,
90
- postgres.instrumentPostgres,
91
- index$1.instrumentHapi,
92
- graphql.instrumentGraphql,
93
- redis.instrumentRedis,
94
- tedious.instrumentTedious,
95
- genericPool.instrumentGenericPool,
96
- amqplib.instrumentAmqplib,
97
- index$3.instrumentLangChain,
98
- index$4.instrumentVercelAi,
99
- index$5.instrumentOpenAi,
70
+ index.instrumentConnect,
71
+ index$1.instrumentFastifyV3,
72
+ index$2.instrumentHapi,
73
+ index$3.instrumentHono,
74
+ index$4.instrumentKafka,
75
+ index$5.instrumentKoa,
76
+ index$6.instrumentLruMemoizer,
77
+ index$7.instrumentMongo,
78
+ index$8.instrumentMongoose,
79
+ index$9.instrumentMysql,
80
+ index$a.instrumentMysql2,
81
+ index$b.instrumentPostgres,
82
+ index$2.instrumentHapi,
83
+ index$c.instrumentGraphql,
84
+ index$d.instrumentRedis,
85
+ index$e.instrumentTedious,
86
+ index$f.instrumentGenericPool,
87
+ index$g.instrumentAmqplib,
88
+ index$h.instrumentLangChain,
89
+ index$i.instrumentVercelAi,
90
+ index$j.instrumentOpenAi,
100
91
  postgresjs.instrumentPostgresJs,
101
92
  firebase.instrumentFirebase,
102
- index$6.instrumentAnthropicAi,
103
- index$7.instrumentGoogleGenAI,
104
- index$8.instrumentLangGraph,
93
+ index$k.instrumentAnthropicAi,
94
+ index$l.instrumentGoogleGenAI,
95
+ index$m.instrumentLangGraph
105
96
  ];
106
97
  }
107
98
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/integrations/tracing/index.ts"],"sourcesContent":["import type { Integration } from '@sentry/core';\nimport { instrumentOtelHttp, instrumentSentryHttp } from '../http';\nimport { amqplibIntegration, instrumentAmqplib } from './amqplib';\nimport { anthropicAIIntegration, instrumentAnthropicAi } from './anthropic-ai';\nimport { connectIntegration, instrumentConnect } from './connect';\nimport { expressIntegration, instrumentExpress } from './express';\nimport { fastifyIntegration, instrumentFastify, instrumentFastifyV3 } from './fastify';\nimport { firebaseIntegration, instrumentFirebase } from './firebase';\nimport { genericPoolIntegration, instrumentGenericPool } from './genericPool';\nimport { googleGenAIIntegration, instrumentGoogleGenAI } from './google-genai';\nimport { graphqlIntegration, instrumentGraphql } from './graphql';\nimport { hapiIntegration, instrumentHapi } from './hapi';\nimport { honoIntegration, instrumentHono } from './hono';\nimport { instrumentKafka, kafkaIntegration } from './kafka';\nimport { instrumentKoa, koaIntegration } from './koa';\nimport { instrumentLangChain, langChainIntegration } from './langchain';\nimport { instrumentLangGraph, langGraphIntegration } from './langgraph';\nimport { instrumentLruMemoizer, lruMemoizerIntegration } from './lrumemoizer';\nimport { instrumentMongo, mongoIntegration } from './mongo';\nimport { instrumentMongoose, mongooseIntegration } from './mongoose';\nimport { instrumentMysql, mysqlIntegration } from './mysql';\nimport { instrumentMysql2, mysql2Integration } from './mysql2';\nimport { instrumentOpenAi, openAIIntegration } from './openai';\nimport { instrumentPostgres, postgresIntegration } from './postgres';\nimport { instrumentPostgresJs, postgresJsIntegration } from './postgresjs';\nimport { prismaIntegration } from './prisma';\nimport { instrumentRedis, redisIntegration } from './redis';\nimport { instrumentTedious, tediousIntegration } from './tedious';\nimport { instrumentVercelAi, vercelAIIntegration } from './vercelai';\n\n/**\n * With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.\n */\nexport function getAutoPerformanceIntegrations(): Integration[] {\n return [\n expressIntegration(),\n fastifyIntegration(),\n graphqlIntegration(),\n honoIntegration(),\n mongoIntegration(),\n mongooseIntegration(),\n mysqlIntegration(),\n mysql2Integration(),\n redisIntegration(),\n postgresIntegration(),\n prismaIntegration(),\n hapiIntegration(),\n koaIntegration(),\n connectIntegration(),\n tediousIntegration(),\n genericPoolIntegration(),\n kafkaIntegration(),\n amqplibIntegration(),\n lruMemoizerIntegration(),\n // AI providers\n // LangChain must come first to disable AI provider integrations before they instrument\n langChainIntegration(),\n langGraphIntegration(),\n vercelAIIntegration(),\n openAIIntegration(),\n anthropicAIIntegration(),\n googleGenAIIntegration(),\n postgresJsIntegration(),\n firebaseIntegration(),\n ];\n}\n\n/**\n * Get a list of methods to instrument OTEL, when preload instrumentation.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getOpenTelemetryInstrumentationToPreload(): (((options?: any) => void) & { id: string })[] {\n return [\n instrumentSentryHttp,\n instrumentOtelHttp,\n instrumentExpress,\n instrumentConnect,\n instrumentFastify,\n instrumentFastifyV3,\n instrumentHapi,\n instrumentHono,\n instrumentKafka,\n instrumentKoa,\n instrumentLruMemoizer,\n instrumentMongo,\n instrumentMongoose,\n instrumentMysql,\n instrumentMysql2,\n instrumentPostgres,\n instrumentHapi,\n instrumentGraphql,\n instrumentRedis,\n instrumentTedious,\n instrumentGenericPool,\n instrumentAmqplib,\n instrumentLangChain,\n instrumentVercelAi,\n instrumentOpenAi,\n instrumentPostgresJs,\n instrumentFirebase,\n instrumentAnthropicAi,\n instrumentGoogleGenAI,\n instrumentLangGraph,\n ];\n}\n"],"names":["expressIntegration","fastifyIntegration","graphqlIntegration","honoIntegration","mongoIntegration","mongooseIntegration","mysqlIntegration","mysql2Integration","redisIntegration","postgresIntegration","prismaIntegration","hapiIntegration","koaIntegration","connectIntegration","tediousIntegration","genericPoolIntegration","kafkaIntegration","amqplibIntegration","lruMemoizerIntegration","langChainIntegration","langGraphIntegration","vercelAIIntegration","openAIIntegration","anthropicAIIntegration","googleGenAIIntegration","postgresJsIntegration","firebaseIntegration","instrumentSentryHttp","instrumentOtelHttp","instrumentExpress","instrumentConnect","instrumentFastify","instrumentFastifyV3","instrumentHapi","instrumentHono","instrumentKafka","instrumentKoa","instrumentLruMemoizer","instrumentMongo","instrumentMongoose","instrumentMysql","instrumentMysql2","instrumentPostgres","instrumentGraphql","instrumentRedis","instrumentTedious","instrumentGenericPool","instrumentAmqplib","instrumentLangChain","instrumentVercelAi","instrumentOpenAi","instrumentPostgresJs","instrumentFirebase","instrumentAnthropicAi","instrumentGoogleGenAI","instrumentLangGraph"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA;AACA;AACA;AACO,SAAS,8BAA8B,GAAkB;AAChE,EAAE,OAAO;AACT,IAAIA,0BAAkB,EAAE;AACxB,IAAIC,wBAAkB,EAAE;AACxB,IAAIC,0BAAkB,EAAE;AACxB,IAAIC,uBAAe,EAAE;AACrB,IAAIC,sBAAgB,EAAE;AACtB,IAAIC,4BAAmB,EAAE;AACzB,IAAIC,sBAAgB,EAAE;AACtB,IAAIC,wBAAiB,EAAE;AACvB,IAAIC,sBAAgB,EAAE;AACtB,IAAIC,4BAAmB,EAAE;AACzB,IAAIC,wBAAiB,EAAE;AACvB,IAAIC,uBAAe,EAAE;AACrB,IAAIC,kBAAc,EAAE;AACpB,IAAIC,0BAAkB,EAAE;AACxB,IAAIC,0BAAkB,EAAE;AACxB,IAAIC,kCAAsB,EAAE;AAC5B,IAAIC,sBAAgB,EAAE;AACtB,IAAIC,0BAAkB,EAAE;AACxB,IAAIC,kCAAsB,EAAE;AAC5B;AACA;AACA,IAAIC,4BAAoB,EAAE;AAC1B,IAAIC,4BAAoB,EAAE;AAC1B,IAAIC,2BAAmB,EAAE;AACzB,IAAIC,yBAAiB,EAAE;AACvB,IAAIC,8BAAsB,EAAE;AAC5B,IAAIC,8BAAsB,EAAE;AAC5B,IAAIC,gCAAqB,EAAE;AAC3B,IAAIC,4BAAmB,EAAE;AACzB,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACO,SAAS,wCAAwC,GAAmD;AAC3G,EAAE,OAAO;AACT,IAAIC,yBAAoB;AACxB,IAAIC,uBAAkB;AACtB,IAAIC,yBAAiB;AACrB,IAAIC,yBAAiB;AACrB,IAAIC,uBAAiB;AACrB,IAAIC,yBAAmB;AACvB,IAAIC,sBAAc;AAClB,IAAIC,sBAAc;AAClB,IAAIC,qBAAe;AACnB,IAAIC,iBAAa;AACjB,IAAIC,iCAAqB;AACzB,IAAIC,qBAAe;AACnB,IAAIC,2BAAkB;AACtB,IAAIC,qBAAe;AACnB,IAAIC,uBAAgB;AACpB,IAAIC,2BAAkB;AACtB,IAAIT,sBAAc;AAClB,IAAIU,yBAAiB;AACrB,IAAIC,qBAAe;AACnB,IAAIC,yBAAiB;AACrB,IAAIC,iCAAqB;AACzB,IAAIC,yBAAiB;AACrB,IAAIC,2BAAmB;AACvB,IAAIC,0BAAkB;AACtB,IAAIC,wBAAgB;AACpB,IAAIC,+BAAoB;AACxB,IAAIC,2BAAkB;AACtB,IAAIC,6BAAqB;AACzB,IAAIC,6BAAqB;AACzB,IAAIC,2BAAmB;AACvB,GAAG;AACH;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/integrations/tracing/index.ts"],"sourcesContent":["import type { Integration } from '@sentry/core';\nimport { prismaIntegration } from '@sentry/server-utils';\nimport { instrumentSentryHttp } from '../http';\nimport { amqplibIntegration, instrumentAmqplib } from './amqplib';\nimport { anthropicAIIntegration, instrumentAnthropicAi } from './anthropic-ai';\nimport { connectIntegration, instrumentConnect } from './connect';\nimport { expressIntegration, instrumentExpress } from './express';\nimport { fastifyIntegration, instrumentFastifyV3 } from './fastify';\nimport { firebaseIntegration, instrumentFirebase } from './firebase';\nimport { genericPoolIntegration, instrumentGenericPool } from './genericPool';\nimport { googleGenAIIntegration, instrumentGoogleGenAI } from './google-genai';\nimport { graphqlIntegration, instrumentGraphql } from './graphql';\nimport { hapiIntegration, instrumentHapi } from './hapi';\nimport { honoIntegration, instrumentHono } from './hono';\nimport { instrumentKafka, kafkaIntegration } from './kafka';\nimport { instrumentKoa, koaIntegration } from './koa';\nimport { instrumentLangChain, langChainIntegration } from './langchain';\nimport { instrumentLangGraph, langGraphIntegration } from './langgraph';\nimport { instrumentLruMemoizer, lruMemoizerIntegration } from './lrumemoizer';\nimport { instrumentMongo, mongoIntegration } from './mongo';\nimport { instrumentMongoose, mongooseIntegration } from './mongoose';\nimport { instrumentMysql, mysqlIntegration } from './mysql';\nimport { instrumentMysql2, mysql2Integration } from './mysql2';\nimport { instrumentOpenAi, openAIIntegration } from './openai';\nimport { instrumentPostgres, postgresIntegration } from './postgres';\nimport { instrumentPostgresJs, postgresJsIntegration } from './postgresjs';\nimport { instrumentRedis, redisIntegration } from './redis';\nimport { instrumentTedious, tediousIntegration } from './tedious';\nimport { instrumentVercelAi, vercelAIIntegration } from './vercelai';\n\n/**\n * With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.\n */\nexport function getAutoPerformanceIntegrations(): Integration[] {\n return [\n expressIntegration(),\n fastifyIntegration(),\n graphqlIntegration(),\n // eslint-disable-next-line typescript/no-deprecated\n honoIntegration(),\n mongoIntegration(),\n mongooseIntegration(),\n mysqlIntegration(),\n mysql2Integration(),\n redisIntegration(),\n postgresIntegration(),\n prismaIntegration(),\n hapiIntegration(),\n koaIntegration(),\n connectIntegration(),\n tediousIntegration(),\n genericPoolIntegration(),\n kafkaIntegration(),\n amqplibIntegration(),\n lruMemoizerIntegration(),\n // AI providers\n // LangChain must come first to disable AI provider integrations before they instrument\n langChainIntegration(),\n langGraphIntegration(),\n vercelAIIntegration(),\n openAIIntegration(),\n anthropicAIIntegration(),\n googleGenAIIntegration(),\n postgresJsIntegration(),\n firebaseIntegration(),\n ];\n}\n\n/**\n * Get a list of methods to instrument OTEL, when preload instrumentation.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getOpenTelemetryInstrumentationToPreload(): (((options?: any) => void) & { id: string })[] {\n return [\n instrumentSentryHttp,\n instrumentExpress,\n instrumentConnect,\n instrumentFastifyV3,\n instrumentHapi,\n instrumentHono,\n instrumentKafka,\n instrumentKoa,\n instrumentLruMemoizer,\n instrumentMongo,\n instrumentMongoose,\n instrumentMysql,\n instrumentMysql2,\n instrumentPostgres,\n instrumentHapi,\n instrumentGraphql,\n instrumentRedis,\n instrumentTedious,\n instrumentGenericPool,\n instrumentAmqplib,\n instrumentLangChain,\n instrumentVercelAi,\n instrumentOpenAi,\n instrumentPostgresJs,\n instrumentFirebase,\n instrumentAnthropicAi,\n instrumentGoogleGenAI,\n instrumentLangGraph,\n ];\n}\n"],"names":["expressIntegration","fastifyIntegration","graphqlIntegration","honoIntegration","mongoIntegration","mongooseIntegration","mysqlIntegration","mysql2Integration","redisIntegration","postgresIntegration","prismaIntegration","hapiIntegration","koaIntegration","connectIntegration","tediousIntegration","genericPoolIntegration","kafkaIntegration","amqplibIntegration","lruMemoizerIntegration","langChainIntegration","langGraphIntegration","vercelAIIntegration","openAIIntegration","anthropicAIIntegration","googleGenAIIntegration","postgresJsIntegration","firebaseIntegration","instrumentSentryHttp","instrumentExpress","instrumentConnect","instrumentFastifyV3","instrumentHapi","instrumentHono","instrumentKafka","instrumentKoa","instrumentLruMemoizer","instrumentMongo","instrumentMongoose","instrumentMysql","instrumentMysql2","instrumentPostgres","instrumentGraphql","instrumentRedis","instrumentTedious","instrumentGenericPool","instrumentAmqplib","instrumentLangChain","instrumentVercelAi","instrumentOpenAi","instrumentPostgresJs","instrumentFirebase","instrumentAnthropicAi","instrumentGoogleGenAI","instrumentLangGraph"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,SAAS,8BAAA,GAAgD;AAC9D,EAAA,OAAO;AAAA,IACLA,0BAAA,EAAmB;AAAA,IACnBC,0BAAA,EAAmB;AAAA,IACnBC,0BAAA,EAAmB;AAAA;AAAA,IAEnBC,uBAAA,EAAgB;AAAA,IAChBC,wBAAA,EAAiB;AAAA,IACjBC,2BAAA,EAAoB;AAAA,IACpBC,wBAA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