@depup/sentry__node 10.48.0-depup.0 → 10.67.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (987) hide show
  1. package/README.md +5 -6
  2. package/build/cjs/debug-build.js +0 -5
  3. package/build/cjs/debug-build.js.map +1 -1
  4. package/build/cjs/index.js +76 -67
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/init.js +0 -6
  7. package/build/cjs/init.js.map +1 -1
  8. package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
  9. package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
  10. package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
  11. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  12. package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
  13. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  14. package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
  15. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  16. package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
  17. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  18. package/build/cjs/integrations/fs/index.js +17 -0
  19. package/build/cjs/integrations/fs/index.js.map +1 -0
  20. package/build/cjs/integrations/fs/vendored/constants.js +138 -0
  21. package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
  22. package/build/cjs/integrations/fs/vendored/instrumentation.js +230 -0
  23. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
  24. package/build/cjs/integrations/fs/vendored/utils.js +31 -0
  25. package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
  26. package/build/cjs/integrations/http.js +19 -175
  27. package/build/cjs/integrations/http.js.map +1 -1
  28. package/build/cjs/integrations/node-fetch.js +10 -94
  29. package/build/cjs/integrations/node-fetch.js.map +1 -1
  30. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +15 -0
  31. package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  32. package/build/cjs/integrations/tracing/amqplib/index.js +21 -0
  33. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
  34. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
  35. package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  36. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
  37. package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  38. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +26 -0
  39. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  40. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +17 -0
  41. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  42. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +129 -0
  43. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  44. package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
  45. package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
  46. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  47. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  48. package/build/cjs/integrations/tracing/connect/index.js +35 -0
  49. package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
  50. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +16 -0
  51. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  52. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +137 -0
  53. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  54. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
  55. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  56. package/build/cjs/integrations/tracing/connect/vendored/utils.js +36 -0
  57. package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
  58. package/build/cjs/integrations/tracing/dataloader/index.js +26 -0
  59. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
  60. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +217 -0
  61. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  62. package/build/cjs/integrations/tracing/express.js +22 -34
  63. package/build/cjs/integrations/tracing/express.js.map +1 -1
  64. package/build/cjs/integrations/tracing/fastify/index.js +19 -234
  65. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  66. package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
  67. package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
  68. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
  69. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  70. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +78 -162
  71. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  72. package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
  73. package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
  74. package/build/cjs/integrations/tracing/firebase/firebase.js +4 -33
  75. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  76. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  77. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  78. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +73 -215
  79. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  80. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  81. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  82. package/build/cjs/integrations/tracing/genericPool/index.js +21 -0
  83. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -0
  84. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +122 -0
  85. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  86. package/build/cjs/integrations/tracing/google-genai/index.js +3 -58
  87. package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
  88. package/build/cjs/integrations/tracing/google-genai/instrumentation.js +23 -43
  89. package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  90. package/build/cjs/integrations/tracing/graphql/index.js +34 -0
  91. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -0
  92. package/build/cjs/integrations/tracing/graphql/vendored/enum.js +47 -0
  93. package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  94. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
  95. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  96. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +329 -0
  97. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  98. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +6 -0
  99. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  100. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +8 -0
  101. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  102. package/build/cjs/integrations/tracing/graphql/vendored/utils.js +265 -0
  103. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  104. package/build/cjs/integrations/tracing/hapi/index.js +16 -91
  105. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  106. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +11 -0
  107. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  108. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +255 -0
  109. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  110. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +24 -0
  111. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  112. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +85 -0
  113. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  114. package/build/cjs/integrations/tracing/hono/constants.js +6 -7
  115. package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
  116. package/build/cjs/integrations/tracing/hono/index.js +26 -77
  117. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  118. package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
  119. package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
  120. package/build/cjs/integrations/tracing/index.js +74 -83
  121. package/build/cjs/integrations/tracing/index.js.map +1 -1
  122. package/build/cjs/integrations/tracing/kafka/index.js +21 -0
  123. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
  124. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +237 -0
  125. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  126. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +22 -0
  127. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  128. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +114 -0
  129. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  130. package/build/cjs/integrations/tracing/knex/index.js +26 -0
  131. package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
  132. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +135 -0
  133. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  134. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +10 -0
  135. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  136. package/build/cjs/integrations/tracing/knex/vendored/utils.js +84 -0
  137. package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
  138. package/build/cjs/integrations/tracing/koa/index.js +46 -0
  139. package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
  140. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
  141. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  142. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +127 -0
  143. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  144. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
  145. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  146. package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
  147. package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
  148. package/build/cjs/integrations/tracing/koa/vendored/utils.js +36 -0
  149. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
  150. package/build/cjs/integrations/tracing/langchain/index.js +3 -97
  151. package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
  152. package/build/cjs/integrations/tracing/langchain/instrumentation.js +57 -151
  153. package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
  154. package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
  155. package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
  156. package/build/cjs/integrations/tracing/langgraph/instrumentation.js +76 -40
  157. package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  158. package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
  159. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
  160. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +38 -0
  161. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  162. package/build/cjs/integrations/tracing/mongo/index.js +21 -0
  163. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
  164. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +129 -0
  165. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  166. package/build/cjs/integrations/tracing/mongo/vendored/patches.js +150 -0
  167. package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  168. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +40 -0
  169. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  170. package/build/cjs/integrations/tracing/mongoose/index.js +22 -0
  171. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
  172. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +240 -0
  173. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  174. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +41 -0
  175. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  176. package/build/cjs/integrations/tracing/mysql/index.js +21 -0
  177. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
  178. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +185 -0
  179. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  180. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +8 -0
  181. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  182. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +38 -0
  183. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  184. package/build/cjs/integrations/tracing/mysql2/index.js +22 -0
  185. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
  186. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +138 -0
  187. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  188. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +8 -0
  189. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  190. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +81 -0
  191. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  192. package/build/cjs/integrations/tracing/openai/index.js +3 -58
  193. package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
  194. package/build/cjs/integrations/tracing/openai/instrumentation.js +25 -49
  195. package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
  196. package/build/cjs/integrations/tracing/postgres/index.js +27 -0
  197. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
  198. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +11 -0
  199. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  200. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
  201. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  202. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +225 -0
  203. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  204. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +8 -0
  205. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  206. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +151 -0
  207. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  208. package/build/cjs/integrations/tracing/postgresjs.js +77 -190
  209. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  210. package/build/cjs/integrations/tracing/redis/cache.js +41 -0
  211. package/build/cjs/integrations/tracing/redis/cache.js.map +1 -0
  212. package/build/cjs/integrations/tracing/redis/index.js +50 -0
  213. package/build/cjs/integrations/tracing/redis/index.js.map +1 -0
  214. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +147 -0
  215. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  216. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +445 -0
  217. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  218. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +8 -0
  219. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  220. package/build/cjs/integrations/tracing/tedious/index.js +21 -0
  221. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
  222. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +154 -0
  223. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  224. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +8 -0
  225. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  226. package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
  227. package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  228. package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
  229. package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
  230. package/build/cjs/integrations/tracing/vercelai/index.js +7 -53
  231. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  232. package/build/cjs/integrations/tracing/vercelai/instrumentation.js +60 -158
  233. package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  234. package/build/cjs/preload.js +1 -14
  235. package/build/cjs/preload.js.map +1 -1
  236. package/build/cjs/sdk/diagnosticsChannelInjection.js +21 -0
  237. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -0
  238. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +33 -0
  239. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  240. package/build/cjs/sdk/index.js +33 -35
  241. package/build/cjs/sdk/index.js.map +1 -1
  242. package/build/cjs/sdk/initOtel.js +74 -60
  243. package/build/cjs/sdk/initOtel.js.map +1 -1
  244. package/build/cjs/utils/redisCache.js +24 -52
  245. package/build/cjs/utils/redisCache.js.map +1 -1
  246. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +21 -0
  247. package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  248. package/build/esm/debug-build.js +0 -5
  249. package/build/esm/debug-build.js.map +1 -1
  250. package/build/esm/index.js +23 -21
  251. package/build/esm/index.js.map +1 -1
  252. package/build/esm/init.js +0 -6
  253. package/build/esm/init.js.map +1 -1
  254. package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
  255. package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
  256. package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
  257. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  258. package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
  259. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  260. package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
  261. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  262. package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
  263. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  264. package/build/esm/integrations/fs/index.js +15 -0
  265. package/build/esm/integrations/fs/index.js.map +1 -0
  266. package/build/esm/integrations/fs/vendored/constants.js +134 -0
  267. package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
  268. package/build/esm/integrations/fs/vendored/instrumentation.js +228 -0
  269. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
  270. package/build/esm/integrations/fs/vendored/utils.js +28 -0
  271. package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
  272. package/build/esm/integrations/http.js +22 -176
  273. package/build/esm/integrations/http.js.map +1 -1
  274. package/build/esm/integrations/node-fetch.js +12 -95
  275. package/build/esm/integrations/node-fetch.js.map +1 -1
  276. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +13 -0
  277. package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
  278. package/build/esm/integrations/tracing/amqplib/index.js +18 -0
  279. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
  280. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
  281. package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
  282. package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
  283. package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
  284. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +14 -0
  285. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  286. package/build/esm/integrations/tracing/amqplib/vendored/types.js +15 -0
  287. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  288. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +117 -0
  289. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  290. package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
  291. package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
  292. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
  293. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  294. package/build/esm/integrations/tracing/connect/index.js +31 -0
  295. package/build/esm/integrations/tracing/connect/index.js.map +1 -0
  296. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +13 -0
  297. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  298. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +135 -0
  299. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  300. package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
  301. package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  302. package/build/esm/integrations/tracing/connect/vendored/utils.js +32 -0
  303. package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
  304. package/build/esm/integrations/tracing/dataloader/index.js +23 -0
  305. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
  306. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +215 -0
  307. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  308. package/build/esm/integrations/tracing/express.js +22 -34
  309. package/build/esm/integrations/tracing/express.js.map +1 -1
  310. package/build/esm/integrations/tracing/fastify/index.js +21 -235
  311. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  312. package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
  313. package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
  314. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
  315. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  316. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +74 -158
  317. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  318. package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
  319. package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
  320. package/build/esm/integrations/tracing/firebase/firebase.js +6 -35
  321. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  322. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
  323. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  324. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +72 -214
  325. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  326. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +86 -210
  327. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  328. package/build/esm/integrations/tracing/genericPool/index.js +18 -0
  329. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
  330. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
  331. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  332. package/build/esm/integrations/tracing/google-genai/index.js +3 -58
  333. package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
  334. package/build/esm/integrations/tracing/google-genai/instrumentation.js +23 -43
  335. package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  336. package/build/esm/integrations/tracing/graphql/index.js +31 -0
  337. package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
  338. package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
  339. package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  340. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +13 -0
  341. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  342. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +327 -0
  343. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  344. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
  345. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  346. package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
  347. package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  348. package/build/esm/integrations/tracing/graphql/vendored/utils.js +257 -0
  349. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  350. package/build/esm/integrations/tracing/hapi/index.js +16 -91
  351. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  352. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
  353. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  354. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +253 -0
  355. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  356. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
  357. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  358. package/build/esm/integrations/tracing/hapi/vendored/utils.js +76 -0
  359. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  360. package/build/esm/integrations/tracing/hono/constants.js +6 -7
  361. package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
  362. package/build/esm/integrations/tracing/hono/index.js +22 -73
  363. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  364. package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
  365. package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
  366. package/build/esm/integrations/tracing/index.js +20 -29
  367. package/build/esm/integrations/tracing/index.js.map +1 -1
  368. package/build/esm/integrations/tracing/kafka/index.js +18 -0
  369. package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
  370. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +235 -0
  371. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  372. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +12 -0
  373. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  374. package/build/esm/integrations/tracing/kafka/vendored/utils.js +108 -0
  375. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  376. package/build/esm/integrations/tracing/knex/index.js +23 -0
  377. package/build/esm/integrations/tracing/knex/index.js.map +1 -0
  378. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +133 -0
  379. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  380. package/build/esm/integrations/tracing/knex/vendored/semconv.js +6 -0
  381. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  382. package/build/esm/integrations/tracing/knex/vendored/utils.js +75 -0
  383. package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
  384. package/build/esm/integrations/tracing/koa/index.js +42 -0
  385. package/build/esm/integrations/tracing/koa/index.js.map +1 -0
  386. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
  387. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  388. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +125 -0
  389. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  390. package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
  391. package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  392. package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
  393. package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
  394. package/build/esm/integrations/tracing/koa/vendored/utils.js +33 -0
  395. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
  396. package/build/esm/integrations/tracing/langchain/index.js +3 -97
  397. package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
  398. package/build/esm/integrations/tracing/langchain/instrumentation.js +57 -151
  399. package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
  400. package/build/esm/integrations/tracing/langgraph/index.js +3 -73
  401. package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
  402. package/build/esm/integrations/tracing/langgraph/instrumentation.js +78 -42
  403. package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  404. package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
  405. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
  406. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +36 -0
  407. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  408. package/build/esm/integrations/tracing/mongo/index.js +18 -0
  409. package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
  410. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +127 -0
  411. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  412. package/build/esm/integrations/tracing/mongo/vendored/patches.js +142 -0
  413. package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  414. package/build/esm/integrations/tracing/mongo/vendored/utils.js +34 -0
  415. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  416. package/build/esm/integrations/tracing/mongoose/index.js +19 -0
  417. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
  418. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +236 -0
  419. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  420. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +38 -0
  421. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  422. package/build/esm/integrations/tracing/mysql/index.js +18 -0
  423. package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
  424. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +183 -0
  425. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  426. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +5 -0
  427. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  428. package/build/esm/integrations/tracing/mysql/vendored/utils.js +33 -0
  429. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  430. package/build/esm/integrations/tracing/mysql2/index.js +19 -0
  431. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
  432. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +136 -0
  433. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  434. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +5 -0
  435. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  436. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +75 -0
  437. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  438. package/build/esm/integrations/tracing/openai/index.js +3 -58
  439. package/build/esm/integrations/tracing/openai/index.js.map +1 -1
  440. package/build/esm/integrations/tracing/openai/instrumentation.js +25 -49
  441. package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
  442. package/build/esm/integrations/tracing/postgres/index.js +24 -0
  443. package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
  444. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +9 -0
  445. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  446. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
  447. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  448. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +223 -0
  449. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  450. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +5 -0
  451. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  452. package/build/esm/integrations/tracing/postgres/vendored/utils.js +136 -0
  453. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  454. package/build/esm/integrations/tracing/postgresjs.js +77 -190
  455. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  456. package/build/esm/integrations/tracing/redis/cache.js +38 -0
  457. package/build/esm/integrations/tracing/redis/cache.js.map +1 -0
  458. package/build/esm/integrations/tracing/redis/index.js +43 -0
  459. package/build/esm/integrations/tracing/redis/index.js.map +1 -0
  460. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +145 -0
  461. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
  462. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +443 -0
  463. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
  464. package/build/esm/integrations/tracing/redis/vendored/semconv.js +5 -0
  465. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -0
  466. package/build/esm/integrations/tracing/tedious/index.js +18 -0
  467. package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
  468. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +152 -0
  469. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  470. package/build/esm/integrations/tracing/tedious/vendored/semconv.js +5 -0
  471. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  472. package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
  473. package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  474. package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
  475. package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
  476. package/build/esm/integrations/tracing/vercelai/index.js +8 -54
  477. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  478. package/build/esm/integrations/tracing/vercelai/instrumentation.js +60 -158
  479. package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  480. package/build/esm/package.json +1 -1
  481. package/build/esm/preload.js +1 -14
  482. package/build/esm/preload.js.map +1 -1
  483. package/build/esm/sdk/diagnosticsChannelInjection.js +17 -0
  484. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -0
  485. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +30 -0
  486. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  487. package/build/esm/sdk/index.js +33 -36
  488. package/build/esm/sdk/index.js.map +1 -1
  489. package/build/esm/sdk/initOtel.js +77 -63
  490. package/build/esm/sdk/initOtel.js.map +1 -1
  491. package/build/esm/utils/redisCache.js +24 -52
  492. package/build/esm/utils/redisCache.js.map +1 -1
  493. package/build/esm/utils/setHttpServerSpanRouteAttribute.js +19 -0
  494. package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
  495. package/build/import-hook.mjs +6 -0
  496. package/build/types/index.d.ts +6 -4
  497. package/build/types/index.d.ts.map +1 -1
  498. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  499. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
  500. package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
  501. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
  502. package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
  503. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
  504. package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
  505. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
  506. package/build/types/integrations/fs/index.d.ts +14 -0
  507. package/build/types/integrations/fs/index.d.ts.map +1 -0
  508. package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
  509. package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
  510. package/build/types/integrations/fs/vendored/instrumentation.d.ts +3 -0
  511. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
  512. package/build/types/integrations/fs/vendored/types.d.ts +23 -0
  513. package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
  514. package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
  515. package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
  516. package/build/types/integrations/http.d.ts +12 -17
  517. package/build/types/integrations/http.d.ts.map +1 -1
  518. package/build/types/integrations/node-fetch.d.ts +8 -35
  519. package/build/types/integrations/node-fetch.d.ts.map +1 -1
  520. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  521. package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +1 -0
  522. package/build/types/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  523. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
  524. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  525. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
  526. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  527. package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
  528. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  529. package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
  530. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  531. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
  532. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  533. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
  534. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  535. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
  536. package/build/types/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  537. package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
  538. package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  539. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
  540. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  541. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
  542. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  543. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
  544. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
  545. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
  546. package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  547. package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
  548. package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  549. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
  550. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  551. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
  552. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  553. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
  554. package/build/types/integrations/tracing/express.d.ts +3 -1
  555. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  556. package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
  557. package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
  558. package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
  559. package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
  560. package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
  561. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  562. package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
  563. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  564. package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
  565. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  566. package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
  567. package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
  568. package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
  569. package/build/types/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  570. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
  571. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  572. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
  573. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  574. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
  575. package/build/types/integrations/tracing/google-genai/index.d.ts +11 -8
  576. package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
  577. package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -1
  578. package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  579. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
  580. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  581. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
  582. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  583. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
  584. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  585. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
  586. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  587. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
  588. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  589. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
  590. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  591. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
  592. package/build/types/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  593. package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
  594. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  595. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
  596. package/build/types/integrations/tracing/hapi/index.d.ts +4 -2
  597. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  598. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  599. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
  600. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  601. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
  602. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  603. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
  604. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  605. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
  606. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  607. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
  608. package/build/types/integrations/tracing/hono/index.d.ts +9 -1
  609. package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
  610. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  611. package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  612. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
  613. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  614. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
  615. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  616. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
  617. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  618. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
  619. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  620. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -0
  621. package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  622. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
  623. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  624. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
  625. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  626. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
  627. package/build/types/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  628. package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
  629. package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  630. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
  631. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  632. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
  633. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  634. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
  635. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  636. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
  637. package/build/types/integrations/tracing/koa/vendored/types.d.ts +13 -0
  638. package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
  639. package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  640. package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
  641. package/build/types/integrations/tracing/langchain/index.d.ts +12 -9
  642. package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
  643. package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
  644. package/build/types/integrations/tracing/langgraph/index.d.ts +11 -8
  645. package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
  646. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  647. package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -1
  648. package/build/types/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  649. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
  650. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  651. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
  652. package/build/{types-ts3.8/integrations/tracing/mongo.d.ts → types/integrations/tracing/mongo/index.d.ts} +22 -24
  653. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
  654. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  655. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
  656. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  657. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
  658. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  659. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
  660. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  661. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
  662. package/build/types/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  663. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
  664. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  665. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
  666. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  667. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
  668. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  669. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
  670. package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  671. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
  672. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  673. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
  674. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  675. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
  676. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  677. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
  678. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  679. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
  680. package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  681. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
  682. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  683. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
  684. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  685. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
  686. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  687. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
  688. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  689. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
  690. package/build/types/integrations/tracing/openai/index.d.ts +11 -8
  691. package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
  692. package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  693. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
  694. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  695. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
  696. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  697. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
  698. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  699. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
  700. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  701. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
  702. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  703. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
  704. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  705. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
  706. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  707. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
  708. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  709. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
  710. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  711. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
  712. package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
  713. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  714. package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
  715. package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
  716. package/build/types/integrations/tracing/redis/index.d.ts +28 -0
  717. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -0
  718. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  719. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -0
  720. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  721. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -0
  722. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  723. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -0
  724. package/build/types/integrations/tracing/redis/vendored/types.d.ts +24 -0
  725. package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -0
  726. package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  727. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
  728. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  729. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
  730. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  731. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
  732. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  733. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
  734. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  735. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
  736. package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
  737. package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
  738. package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
  739. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  740. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  741. package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
  742. package/build/types/integrations/tracing/vercelai/types.d.ts +11 -4
  743. package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
  744. package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
  745. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
  746. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  747. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
  748. package/build/types/sdk/index.d.ts +18 -0
  749. package/build/types/sdk/index.d.ts.map +1 -1
  750. package/build/types/sdk/initOtel.d.ts +2 -3
  751. package/build/types/sdk/initOtel.d.ts.map +1 -1
  752. package/build/types/utils/redisCache.d.ts +1 -1
  753. package/build/types/utils/redisCache.d.ts.map +1 -1
  754. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  755. package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
  756. package/build/types-ts3.8/index.d.ts +6 -4
  757. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
  758. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
  759. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
  760. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
  761. package/build/types-ts3.8/integrations/fs/index.d.ts +14 -0
  762. package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
  763. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +3 -0
  764. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +23 -0
  765. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
  766. package/build/types-ts3.8/integrations/http.d.ts +12 -17
  767. package/build/types-ts3.8/integrations/node-fetch.d.ts +8 -35
  768. package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
  769. package/build/types-ts3.8/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
  770. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  771. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
  772. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
  773. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
  774. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
  775. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
  776. package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +11 -8
  777. package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
  778. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
  779. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  780. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
  781. package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  782. package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
  783. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
  784. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
  785. package/build/types-ts3.8/integrations/tracing/express.d.ts +3 -1
  786. package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
  787. package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
  788. package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
  789. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
  790. package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
  791. package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
  792. package/build/types-ts3.8/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
  793. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  794. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
  795. package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +11 -8
  796. package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
  797. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  798. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
  799. package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
  800. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
  801. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  802. package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  803. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +33 -0
  804. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
  805. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +4 -2
  806. package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  807. package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  808. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  809. package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  810. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
  811. package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +9 -1
  812. package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
  813. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
  814. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
  815. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
  816. package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  817. package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
  818. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
  819. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
  820. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +9 -0
  821. package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
  822. package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  823. package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  824. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  825. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +13 -0
  826. package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  827. package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +12 -9
  828. package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +11 -8
  829. package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
  830. package/build/types-ts3.8/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
  831. package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  832. package/build/{types/integrations/tracing/mongo.d.ts → types-ts3.8/integrations/tracing/mongo/index.d.ts} +22 -24
  833. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
  834. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
  835. package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  836. package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
  837. package/build/types-ts3.8/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
  838. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
  839. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
  840. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
  841. package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
  842. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
  843. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  844. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
  845. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
  846. package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
  847. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
  848. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  849. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
  850. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
  851. package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +11 -8
  852. package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
  853. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
  854. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  855. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
  856. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
  857. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  858. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  859. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
  860. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +11 -0
  861. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
  862. package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
  863. package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
  864. package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +28 -0
  865. package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
  866. package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
  867. package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
  868. package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +24 -0
  869. package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
  870. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
  871. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
  872. package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  873. package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  874. package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
  875. package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
  876. package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
  877. package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +11 -4
  878. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
  879. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
  880. package/build/types-ts3.8/sdk/index.d.ts +18 -0
  881. package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
  882. package/build/types-ts3.8/utils/redisCache.d.ts +1 -1
  883. package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
  884. package/changes.json +6 -10
  885. package/package.json +30 -45
  886. package/build/cjs/integrations/fs.js +0 -142
  887. package/build/cjs/integrations/fs.js.map +0 -1
  888. package/build/cjs/integrations/tracing/amqplib.js +0 -47
  889. package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
  890. package/build/cjs/integrations/tracing/connect.js +0 -110
  891. package/build/cjs/integrations/tracing/connect.js.map +0 -1
  892. package/build/cjs/integrations/tracing/dataloader.js +0 -72
  893. package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
  894. package/build/cjs/integrations/tracing/genericPool.js +0 -59
  895. package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
  896. package/build/cjs/integrations/tracing/graphql.js +0 -127
  897. package/build/cjs/integrations/tracing/graphql.js.map +0 -1
  898. package/build/cjs/integrations/tracing/kafka.js +0 -48
  899. package/build/cjs/integrations/tracing/kafka.js.map +0 -1
  900. package/build/cjs/integrations/tracing/knex.js +0 -57
  901. package/build/cjs/integrations/tracing/knex.js.map +0 -1
  902. package/build/cjs/integrations/tracing/koa.js +0 -138
  903. package/build/cjs/integrations/tracing/koa.js.map +0 -1
  904. package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
  905. package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
  906. package/build/cjs/integrations/tracing/mongo.js +0 -93
  907. package/build/cjs/integrations/tracing/mongo.js.map +0 -1
  908. package/build/cjs/integrations/tracing/mongoose.js +0 -46
  909. package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
  910. package/build/cjs/integrations/tracing/mysql.js +0 -38
  911. package/build/cjs/integrations/tracing/mysql.js.map +0 -1
  912. package/build/cjs/integrations/tracing/mysql2.js +0 -46
  913. package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
  914. package/build/cjs/integrations/tracing/postgres.js +0 -48
  915. package/build/cjs/integrations/tracing/postgres.js.map +0 -1
  916. package/build/cjs/integrations/tracing/prisma.js +0 -203
  917. package/build/cjs/integrations/tracing/prisma.js.map +0 -1
  918. package/build/cjs/integrations/tracing/redis.js +0 -121
  919. package/build/cjs/integrations/tracing/redis.js.map +0 -1
  920. package/build/cjs/integrations/tracing/tedious.js +0 -67
  921. package/build/cjs/integrations/tracing/tedious.js.map +0 -1
  922. package/build/esm/integrations/fs.js +0 -140
  923. package/build/esm/integrations/fs.js.map +0 -1
  924. package/build/esm/integrations/tracing/amqplib.js +0 -44
  925. package/build/esm/integrations/tracing/amqplib.js.map +0 -1
  926. package/build/esm/integrations/tracing/connect.js +0 -106
  927. package/build/esm/integrations/tracing/connect.js.map +0 -1
  928. package/build/esm/integrations/tracing/dataloader.js +0 -69
  929. package/build/esm/integrations/tracing/dataloader.js.map +0 -1
  930. package/build/esm/integrations/tracing/genericPool.js +0 -56
  931. package/build/esm/integrations/tracing/genericPool.js.map +0 -1
  932. package/build/esm/integrations/tracing/graphql.js +0 -124
  933. package/build/esm/integrations/tracing/graphql.js.map +0 -1
  934. package/build/esm/integrations/tracing/kafka.js +0 -45
  935. package/build/esm/integrations/tracing/kafka.js.map +0 -1
  936. package/build/esm/integrations/tracing/knex.js +0 -54
  937. package/build/esm/integrations/tracing/knex.js.map +0 -1
  938. package/build/esm/integrations/tracing/koa.js +0 -134
  939. package/build/esm/integrations/tracing/koa.js.map +0 -1
  940. package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
  941. package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
  942. package/build/esm/integrations/tracing/mongo.js +0 -89
  943. package/build/esm/integrations/tracing/mongo.js.map +0 -1
  944. package/build/esm/integrations/tracing/mongoose.js +0 -43
  945. package/build/esm/integrations/tracing/mongoose.js.map +0 -1
  946. package/build/esm/integrations/tracing/mysql.js +0 -35
  947. package/build/esm/integrations/tracing/mysql.js.map +0 -1
  948. package/build/esm/integrations/tracing/mysql2.js +0 -43
  949. package/build/esm/integrations/tracing/mysql2.js.map +0 -1
  950. package/build/esm/integrations/tracing/postgres.js +0 -45
  951. package/build/esm/integrations/tracing/postgres.js.map +0 -1
  952. package/build/esm/integrations/tracing/prisma.js +0 -200
  953. package/build/esm/integrations/tracing/prisma.js.map +0 -1
  954. package/build/esm/integrations/tracing/redis.js +0 -117
  955. package/build/esm/integrations/tracing/redis.js.map +0 -1
  956. package/build/esm/integrations/tracing/tedious.js +0 -64
  957. package/build/esm/integrations/tracing/tedious.js.map +0 -1
  958. package/build/types/integrations/fs.d.ts +0 -24
  959. package/build/types/integrations/fs.d.ts.map +0 -1
  960. package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
  961. package/build/types/integrations/tracing/connect.d.ts.map +0 -1
  962. package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
  963. package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
  964. package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
  965. package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
  966. package/build/types/integrations/tracing/knex.d.ts.map +0 -1
  967. package/build/types/integrations/tracing/koa.d.ts.map +0 -1
  968. package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
  969. package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
  970. package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
  971. package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
  972. package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
  973. package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
  974. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -38
  975. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
  976. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -31
  977. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
  978. package/build/types/integrations/tracing/prisma.d.ts +0 -50
  979. package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
  980. package/build/types/integrations/tracing/redis.d.ts +0 -41
  981. package/build/types/integrations/tracing/redis.d.ts.map +0 -1
  982. package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
  983. package/build/types-ts3.8/integrations/fs.d.ts +0 -24
  984. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -44
  985. package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -34
  986. package/build/types-ts3.8/integrations/tracing/prisma.d.ts +0 -50
  987. package/build/types-ts3.8/integrations/tracing/redis.d.ts +0 -41
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/graphql/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-graphql\n * - Upstream version: @opentelemetry/instrumentation-graphql@0.66.0\n * - Types from `graphql` package inlined as simplified interfaces\n * - Minor TypeScript strictness adjustments\n * - Span lifecycle migrated from the OpenTelemetry tracer to the @sentry/core span API\n * - `auto.graphql.otel.graphql` origin baked into the execute span (previously set via a Sentry responseHook)\n * - The generic `responseHook` config was removed; its Sentry-specific logic (error status + root span renaming\n * via `useOperationNameForRootSpan`) is now applied directly when the execution result is handled\n */\n\n/* oxlint-disable max-lines */\n\nimport {\n isWrapped,\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile';\nimport type {\n DefinitionNode,\n DocumentNode,\n ExecutionArgs,\n ExecutionResult,\n GraphQLError,\n GraphQLFieldResolver,\n GraphQLSchema,\n GraphQLTypeResolver,\n OperationDefinitionNode,\n ParseOptions,\n PromiseOrValue,\n Source,\n TypeInfo,\n ValidationRule,\n} from './graphql-types';\nimport type { Maybe } from './graphql-types';\nimport { SpanNames } from './enum';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { OTEL_GRAPHQL_DATA_SYMBOL } from './symbols';\n\nimport {\n type executeFunctionWithObj,\n type executeArgumentsArray,\n type executeType,\n type parseType,\n type validateType,\n type OtelExecutionArgs,\n type ObjectWithGraphQLData,\n OPERATION_NOT_SUPPORTED,\n} from './internal-types';\nimport { addSpanSource, endSpan, getOperation, isPromise, wrapFieldResolver, wrapFields } from './utils';\n\nimport type { Span, SpanAttributeValue } from '@sentry/core';\nimport {\n getRootSpan,\n SDK_VERSION,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_STATUS_ERROR,\n spanToJSON,\n startInactiveSpan,\n withActiveSpan,\n} from '@sentry/core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from '@sentry/opentelemetry';\nimport type { GraphQLInstrumentationConfig, GraphQLInstrumentationParsedConfig } from './types';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-graphql';\n\nconst ORIGIN = 'auto.graphql.otel.graphql';\n\nconst DEFAULT_CONFIG: GraphQLInstrumentationParsedConfig = {\n ignoreResolveSpans: false,\n};\n\nconst supportedVersions = ['>=14.0.0 <17'];\n\nexport class GraphQLInstrumentation extends InstrumentationBase<GraphQLInstrumentationParsedConfig> {\n constructor(config: GraphQLInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, { ...DEFAULT_CONFIG, ...config });\n }\n\n override setConfig(config: GraphQLInstrumentationConfig = {}) {\n super.setConfig({ ...DEFAULT_CONFIG, ...config });\n }\n\n protected init() {\n const module = new InstrumentationNodeModuleDefinition('graphql', supportedVersions);\n module.files.push(this._addPatchingExecute());\n module.files.push(this._addPatchingParser());\n module.files.push(this._addPatchingValidate());\n\n return module;\n }\n\n private _addPatchingExecute(): InstrumentationNodeModuleFile {\n return new InstrumentationNodeModuleFile(\n 'graphql/execution/execute.js',\n supportedVersions,\n // cannot make it work with appropriate type as execute function has 2\n //types and/cannot import function but only types\n (moduleExports: any) => {\n if (isWrapped(moduleExports.execute)) {\n this._unwrap(moduleExports, 'execute');\n }\n this._wrap(moduleExports, 'execute', this._patchExecute(moduleExports.defaultFieldResolver));\n return moduleExports;\n },\n moduleExports => {\n if (moduleExports) {\n this._unwrap(moduleExports, 'execute');\n }\n },\n );\n }\n\n private _addPatchingParser(): InstrumentationNodeModuleFile {\n return new InstrumentationNodeModuleFile(\n 'graphql/language/parser.js',\n supportedVersions,\n (moduleExports: { parse: parseType; [key: string]: any }) => {\n if (isWrapped(moduleExports.parse)) {\n this._unwrap(moduleExports, 'parse');\n }\n this._wrap(moduleExports, 'parse', this._patchParse());\n return moduleExports;\n },\n (moduleExports: { parse: parseType; [key: string]: any }) => {\n if (moduleExports) {\n this._unwrap(moduleExports, 'parse');\n }\n },\n );\n }\n\n private _addPatchingValidate(): InstrumentationNodeModuleFile {\n return new InstrumentationNodeModuleFile(\n 'graphql/validation/validate.js',\n supportedVersions,\n moduleExports => {\n if (isWrapped(moduleExports.validate)) {\n this._unwrap(moduleExports, 'validate');\n }\n this._wrap(moduleExports, 'validate', this._patchValidate());\n return moduleExports;\n },\n moduleExports => {\n if (moduleExports) {\n this._unwrap(moduleExports, 'validate');\n }\n },\n );\n }\n\n private _patchExecute(defaultFieldResolved: GraphQLFieldResolver<any, any>): (original: executeType) => executeType {\n const instrumentation = this;\n return function execute(original) {\n return function patchExecute(this: executeType): PromiseOrValue<ExecutionResult> {\n let processedArgs: OtelExecutionArgs;\n\n // case when apollo server is used for example\n if (arguments.length >= 2) {\n const args = arguments as unknown as executeArgumentsArray;\n processedArgs = instrumentation._wrapExecuteArgs(\n args[0],\n args[1],\n args[2],\n args[3],\n args[4],\n args[5],\n args[6],\n args[7],\n defaultFieldResolved,\n );\n } else {\n const args = arguments[0] as ExecutionArgs;\n processedArgs = instrumentation._wrapExecuteArgs(\n args.schema,\n args.document,\n args.rootValue,\n args.contextValue,\n args.variableValues,\n args.operationName,\n args.fieldResolver,\n args.typeResolver,\n defaultFieldResolved,\n );\n }\n\n const operation = getOperation(processedArgs.document, processedArgs.operationName);\n\n const span = instrumentation._createExecuteSpan(operation, processedArgs);\n\n processedArgs.contextValue[OTEL_GRAPHQL_DATA_SYMBOL] = {\n source: processedArgs.document\n ? processedArgs.document || (processedArgs.document as ObjectWithGraphQLData)[OTEL_GRAPHQL_DATA_SYMBOL]\n : undefined,\n span,\n fields: {},\n };\n\n return withActiveSpan(span, () => {\n return safeExecuteInTheMiddle<PromiseOrValue<ExecutionResult>>(\n () => {\n return (original as executeFunctionWithObj).apply(this, [processedArgs]);\n },\n (err, result) => {\n instrumentation._handleExecutionResult(span, err, result);\n },\n );\n });\n };\n };\n }\n\n private _handleExecutionResult(span: Span, err?: Error, result?: PromiseOrValue<ExecutionResult>) {\n if (result === undefined || err) {\n endSpan(span, err);\n return;\n }\n\n if (isPromise(result)) {\n result.then(\n resultData => {\n this._updateSpanFromResult(span, resultData);\n endSpan(span);\n },\n error => {\n endSpan(span, error);\n },\n );\n } else {\n this._updateSpanFromResult(span, result);\n endSpan(span);\n }\n }\n\n /**\n * Applies Sentry-specific span mutations based on the GraphQL execution result:\n * - Marks the execute span as errored if the result contains errors (and no status was set yet)\n * - Optionally renames the containing root span to include the GraphQL operation name(s)\n */\n private _updateSpanFromResult(span: Span, result: ExecutionResult): void {\n // We want to ensure spans are marked as errored if there are errors in the result\n // We only do that if the span is not already marked with a status\n if (result.errors?.length && !spanToJSON(span).status) {\n span.setStatus({ code: SPAN_STATUS_ERROR });\n }\n\n if (!this.getConfig().useOperationNameForRootSpan) {\n return;\n }\n\n const attributes = spanToJSON(span).data;\n\n // If operation.name is not set, we fall back to use operation.type only\n const operationType = attributes[AttributeNames.OPERATION_TYPE];\n const operationName = attributes[AttributeNames.OPERATION_NAME];\n\n if (!operationType) {\n return;\n }\n\n const rootSpan = getRootSpan(span);\n const rootSpanAttributes = spanToJSON(rootSpan).data;\n\n const existingOperations = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION] || [];\n\n const newOperation = operationName ? `${operationType} ${operationName}` : `${operationType}`;\n\n // We keep track of each operation on the root span\n // This can either be a string, or an array of strings (if there are multiple operations)\n if (Array.isArray(existingOperations)) {\n (existingOperations as string[]).push(newOperation);\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, existingOperations);\n } else if (typeof existingOperations === 'string') {\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, [existingOperations, newOperation]);\n } else {\n rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, newOperation);\n }\n\n if (!spanToJSON(rootSpan).data['original-description']) {\n rootSpan.setAttribute('original-description', spanToJSON(rootSpan).description);\n }\n // Important for e.g. @sentry/aws-serverless because this would otherwise overwrite the name again\n rootSpan.updateName(\n `${spanToJSON(rootSpan).data['original-description']} (${getGraphqlOperationNamesFromAttribute(\n existingOperations,\n )})`,\n );\n }\n\n private _patchParse(): (original: parseType) => parseType {\n const instrumentation = this;\n return function parse(original) {\n return function patchParse(this: parseType, source: string | Source, options?: ParseOptions): DocumentNode {\n return instrumentation._parse(this, original, source, options);\n };\n };\n }\n\n private _patchValidate(): (original: validateType) => validateType {\n const instrumentation = this;\n return function validate(original: validateType) {\n return function patchValidate(\n this: validateType,\n schema: GraphQLSchema,\n documentAST: DocumentNode,\n rules?: ReadonlyArray<ValidationRule>,\n options?: { maxErrors?: number },\n typeInfo?: TypeInfo,\n ): ReadonlyArray<GraphQLError> {\n return instrumentation._validate(this, original, schema, documentAST, rules, typeInfo, options);\n };\n };\n }\n\n private _parse(obj: parseType, original: parseType, source: string | Source, options?: ParseOptions): DocumentNode {\n const span = startInactiveSpan({ name: SpanNames.PARSE });\n\n return withActiveSpan(span, () => {\n return safeExecuteInTheMiddle<DocumentNode & ObjectWithGraphQLData>(\n () => {\n return original.call(obj, source, options);\n },\n (err, result) => {\n if (result) {\n const operation = getOperation(result);\n if (!operation) {\n span.updateName(SpanNames.SCHEMA_PARSE);\n } else if (result.loc) {\n addSpanSource(span, result.loc);\n }\n }\n endSpan(span, err);\n },\n );\n });\n }\n\n private _validate(\n obj: validateType,\n original: validateType,\n schema: GraphQLSchema,\n documentAST: DocumentNode,\n rules?: ReadonlyArray<ValidationRule>,\n typeInfo?: TypeInfo,\n options?: { maxErrors?: number },\n ): ReadonlyArray<GraphQLError> {\n const span = startInactiveSpan({ name: SpanNames.VALIDATE });\n\n return withActiveSpan(span, () => {\n return safeExecuteInTheMiddle<ReadonlyArray<GraphQLError>>(\n () => {\n return original.call(obj, schema, documentAST, rules, options, typeInfo);\n },\n (err, _errors) => {\n if (!documentAST.loc) {\n span.updateName(SpanNames.SCHEMA_VALIDATE);\n }\n endSpan(span, err);\n },\n );\n });\n }\n\n private _createExecuteSpan(operation: DefinitionNode | undefined, processedArgs: OtelExecutionArgs): Span {\n const span = startInactiveSpan({\n name: SpanNames.EXECUTE,\n attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN },\n });\n if (operation) {\n const { operation: operationType, name: nameNode } = operation as OperationDefinitionNode;\n\n span.setAttribute(AttributeNames.OPERATION_TYPE, operationType);\n\n const operationName = nameNode?.value;\n\n // https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/instrumentation/graphql/\n // > The span name MUST be of the format <graphql.operation.type> <graphql.operation.name> provided that graphql.operation.type and graphql.operation.name are available.\n // > If graphql.operation.name is not available, the span SHOULD be named <graphql.operation.type>.\n if (operationName) {\n span.setAttribute(AttributeNames.OPERATION_NAME, operationName);\n span.updateName(`${operationType} ${operationName}`);\n } else {\n span.updateName(operationType);\n }\n } else {\n let operationName = ' ';\n if (processedArgs.operationName) {\n operationName = ` \"${processedArgs.operationName}\" `;\n }\n operationName = OPERATION_NOT_SUPPORTED.replace('$operationName$', operationName);\n span.setAttribute(AttributeNames.OPERATION_NAME, operationName);\n }\n\n if (processedArgs.document?.loc) {\n addSpanSource(span, processedArgs.document.loc);\n }\n\n return span;\n }\n\n private _wrapExecuteArgs(\n schema: GraphQLSchema,\n document: DocumentNode,\n rootValue: any,\n contextValue: any,\n variableValues: Maybe<{ [key: string]: any }>,\n operationName: Maybe<string>,\n fieldResolver: Maybe<GraphQLFieldResolver<any, any>>,\n typeResolver: Maybe<GraphQLTypeResolver<any, any>>,\n defaultFieldResolved: GraphQLFieldResolver<any, any>,\n ): OtelExecutionArgs {\n if (!contextValue) {\n // oxlint-disable-next-line no-param-reassign\n contextValue = {};\n }\n\n if (contextValue[OTEL_GRAPHQL_DATA_SYMBOL] || this.getConfig().ignoreResolveSpans) {\n return {\n schema,\n document,\n rootValue,\n contextValue,\n variableValues,\n operationName,\n fieldResolver,\n typeResolver,\n };\n }\n\n const isUsingDefaultResolver = fieldResolver == null;\n // follows graphql implementation here:\n // https://github.com/graphql/graphql-js/blob/0b7daed9811731362c71900e12e5ea0d1ecc7f1f/src/execution/execute.ts#L494\n const fieldResolverForExecute = fieldResolver ?? defaultFieldResolved;\n // oxlint-disable-next-line no-param-reassign\n fieldResolver = wrapFieldResolver(() => this.getConfig(), fieldResolverForExecute, isUsingDefaultResolver);\n\n if (schema) {\n wrapFields(schema.getQueryType() as any, () => this.getConfig());\n wrapFields(schema.getMutationType() as any, () => this.getConfig());\n }\n\n return {\n schema,\n document,\n rootValue,\n contextValue,\n variableValues,\n operationName,\n fieldResolver,\n typeResolver,\n };\n }\n}\n\n// copy from packages/opentelemetry/utils\nfunction getGraphqlOperationNamesFromAttribute(attr: SpanAttributeValue): string {\n if (Array.isArray(attr)) {\n // oxlint-disable-next-line typescript/require-array-sort-compare\n const sorted = attr.slice().sort();\n\n // Up to 5 items, we just add all of them\n if (sorted.length <= 5) {\n return sorted.join(', ');\n } else {\n // Else, we add the first 5 and the diff of other operations\n return `${sorted.slice(0, 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I,MAAA,CAAO,UAAU,CAAA,EAAG;AACtB,MAAA,OAAO,MAAA,CAAO,KAAK,IAAI,CAAA;AAAA,IACzB,CAAA,MAAO;AAEL,MAAA,OAAO,CAAA,EAAG,MAAA,CAAO,KAAA,CAAM,CAAA,EAAG,CAAC,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,GAAA,EAAM,MAAA,CAAO,MAAA,GAAS,CAAC,CAAA,CAAA;AAAA,IAChE;AAAA,EACF;AAEA,EAAA,OAAO,GAAG,IAAI,CAAA,CAAA;AAChB;;;;"}
@@ -0,0 +1,4 @@
1
+ const OPERATION_NOT_SUPPORTED = "Operation$operationName$not supported";
2
+
3
+ export { OPERATION_NOT_SUPPORTED };
4
+ //# sourceMappingURL=internal-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-types.js","sources":["../../../../../../src/integrations/tracing/graphql/vendored/internal-types.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-graphql\n * - Upstream version: @opentelemetry/instrumentation-graphql@0.66.0\n * - Types from `graphql` package inlined as simplified interfaces\n * - Minor TypeScript strictness adjustments\n */\n\nimport type { Span } from '@sentry/core';\nimport type {\n DocumentNode,\n ExecutionArgs,\n ExecutionResult,\n GraphQLError,\n GraphQLFieldResolver,\n GraphQLSchema,\n GraphQLTypeResolver,\n Maybe,\n ParseOptions,\n PromiseOrValue,\n Source,\n TypeInfo,\n ValidationRule,\n} from './graphql-types';\nimport type { OTEL_GRAPHQL_DATA_SYMBOL, OTEL_PATCHED_SYMBOL } from './symbols';\n\nexport type { Maybe } from './graphql-types';\n\nexport const OPERATION_NOT_SUPPORTED = 'Operation$operationName$not' + ' supported';\n\nexport type executeFunctionWithObj = (args: ExecutionArgs) => PromiseOrValue<ExecutionResult>;\n\nexport type executeArgumentsArray = [\n GraphQLSchema,\n DocumentNode,\n any,\n any,\n Maybe<{ [key: string]: any }>,\n Maybe<string>,\n Maybe<GraphQLFieldResolver<any, any>>,\n Maybe<GraphQLTypeResolver<any, any>>,\n];\n\nexport type executeFunctionWithArgs = (\n schema: GraphQLSchema,\n document: DocumentNode,\n rootValue?: any,\n contextValue?: any,\n variableValues?: Maybe<{ [key: string]: any }>,\n operationName?: Maybe<string>,\n fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>,\n typeResolver?: Maybe<GraphQLTypeResolver<any, any>>,\n) => PromiseOrValue<ExecutionResult>;\n\nexport interface OtelExecutionArgs {\n schema: GraphQLSchema;\n document: DocumentNode & ObjectWithGraphQLData;\n rootValue?: any;\n contextValue?: any & ObjectWithGraphQLData;\n variableValues?: Maybe<{ [key: string]: any }>;\n operationName?: Maybe<string>;\n fieldResolver?: Maybe<GraphQLFieldResolver<any, any> & OtelPatched>;\n typeResolver?: Maybe<GraphQLTypeResolver<any, any>>;\n}\n\nexport type executeType = executeFunctionWithObj | executeFunctionWithArgs;\n\nexport type parseType = (source: string | Source, options?: ParseOptions) => DocumentNode;\n\nexport type validateType = (\n schema: GraphQLSchema,\n documentAST: DocumentNode,\n rules?: ReadonlyArray<ValidationRule>,\n options?: { maxErrors?: number },\n typeInfo?: TypeInfo,\n) => ReadonlyArray<GraphQLError>;\n\nexport interface GraphQLField {\n span: Span;\n}\n\ninterface OtelGraphQLData {\n source?: any;\n span: Span;\n fields: { [key: string]: GraphQLField };\n}\n\nexport interface ObjectWithGraphQLData {\n [OTEL_GRAPHQL_DATA_SYMBOL]?: OtelGraphQLData;\n}\n\nexport interface OtelPatched {\n [OTEL_PATCHED_SYMBOL]?: boolean;\n}\n\nexport interface GraphQLPath {\n prev: GraphQLPath | undefined;\n key: string | number;\n /**\n * optional as it didn't exist yet in ver 14\n */\n typename?: string | undefined;\n}\n"],"names":[],"mappings":"AA+BO,MAAM,uBAAA,GAA0B;;;;"}
@@ -0,0 +1,5 @@
1
+ const OTEL_PATCHED_SYMBOL = /* @__PURE__ */ Symbol.for("opentelemetry.patched");
2
+ const OTEL_GRAPHQL_DATA_SYMBOL = /* @__PURE__ */ Symbol.for("opentelemetry.graphql_data");
3
+
4
+ export { OTEL_GRAPHQL_DATA_SYMBOL, OTEL_PATCHED_SYMBOL };
5
+ //# sourceMappingURL=symbols.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.js","sources":["../../../../../../src/integrations/tracing/graphql/vendored/symbols.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-graphql\n * - Upstream version: @opentelemetry/instrumentation-graphql@0.66.0\n */\n\nexport const OTEL_PATCHED_SYMBOL = Symbol.for('opentelemetry.patched');\n\nexport const OTEL_GRAPHQL_DATA_SYMBOL = Symbol.for('opentelemetry.graphql_data');\n"],"names":[],"mappings":"AASO,MAAM,mBAAA,mBAAsB,MAAA,CAAO,GAAA,CAAI,uBAAuB;AAE9D,MAAM,wBAAA,mBAA2B,MAAA,CAAO,GAAA,CAAI,4BAA4B;;;;"}
@@ -0,0 +1,257 @@
1
+ import { SPAN_STATUS_ERROR, getClient, isObjectLike, withActiveSpan, startInactiveSpan } from '@sentry/core';
2
+ import { AllowedOperationTypes, TokenKind, SpanNames } from './enum.js';
3
+ import { AttributeNames } from './enums/AttributeNames.js';
4
+ import { OTEL_PATCHED_SYMBOL, OTEL_GRAPHQL_DATA_SYMBOL } from './symbols.js';
5
+
6
+ const OPERATION_VALUES = Object.values(AllowedOperationTypes);
7
+ const isPromise = (value) => {
8
+ return typeof value?.then === "function";
9
+ };
10
+ function addSpanSource(span, loc, start, end) {
11
+ if (getClient()?.getDataCollectionOptions().graphQL.document === true) {
12
+ const source = getSourceFromLocation(loc, start, end);
13
+ span.setAttribute(AttributeNames.SOURCE, source);
14
+ }
15
+ }
16
+ function createFieldIfNotExists(contextValue, info, path) {
17
+ let field = getField(contextValue, path);
18
+ if (field) {
19
+ return { field, spanAdded: false };
20
+ }
21
+ const parentSpan = getParentFieldSpan(contextValue, path);
22
+ field = {
23
+ span: createResolverSpan(contextValue, info, path, parentSpan)
24
+ };
25
+ addField(contextValue, path, field);
26
+ return { field, spanAdded: true };
27
+ }
28
+ function createResolverSpan(contextValue, info, path, parentSpan) {
29
+ const attributes = {
30
+ [AttributeNames.FIELD_NAME]: info.fieldName,
31
+ [AttributeNames.FIELD_PATH]: path.join("."),
32
+ [AttributeNames.FIELD_TYPE]: info.returnType.toString(),
33
+ [AttributeNames.PARENT_NAME]: info.parentType.name
34
+ };
35
+ const span = startInactiveSpan({
36
+ name: `${SpanNames.RESOLVE} ${attributes[AttributeNames.FIELD_PATH]}`,
37
+ attributes,
38
+ parentSpan
39
+ });
40
+ const document = contextValue[OTEL_GRAPHQL_DATA_SYMBOL].source;
41
+ const fieldNode = info.fieldNodes.find((fieldNode2) => fieldNode2.kind === "Field");
42
+ if (fieldNode) {
43
+ addSpanSource(span, document.loc, fieldNode.loc?.start, fieldNode.loc?.end);
44
+ }
45
+ return span;
46
+ }
47
+ function endSpan(span, error) {
48
+ if (error) {
49
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: error.message });
50
+ }
51
+ span.end();
52
+ }
53
+ function getOperation(document, operationName) {
54
+ if (!document || !Array.isArray(document.definitions)) {
55
+ return void 0;
56
+ }
57
+ if (operationName) {
58
+ return document.definitions.filter((definition) => OPERATION_VALUES.indexOf(definition?.operation) !== -1).find((definition) => operationName === definition?.name?.value);
59
+ } else {
60
+ return document.definitions.find((definition) => OPERATION_VALUES.indexOf(definition?.operation) !== -1);
61
+ }
62
+ }
63
+ function addField(contextValue, path, field) {
64
+ return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[path.join(".")] = field;
65
+ }
66
+ function getField(contextValue, path) {
67
+ return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[path.join(".")];
68
+ }
69
+ function getParentFieldSpan(contextValue, path) {
70
+ for (let i = path.length - 1; i > 0; i--) {
71
+ const field = getField(contextValue, path.slice(0, i));
72
+ if (field) {
73
+ return field.span;
74
+ }
75
+ }
76
+ return getRootSpan(contextValue);
77
+ }
78
+ function getRootSpan(contextValue) {
79
+ return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].span;
80
+ }
81
+ function pathToArray(path) {
82
+ const flattened = [];
83
+ let curr = path;
84
+ while (curr) {
85
+ flattened.push(String(curr.key));
86
+ curr = curr.prev;
87
+ }
88
+ return flattened.reverse();
89
+ }
90
+ function repeatBreak(i) {
91
+ return repeatChar("\n", i);
92
+ }
93
+ function repeatSpace(i) {
94
+ return repeatChar(" ", i);
95
+ }
96
+ function repeatChar(char, to) {
97
+ let text = "";
98
+ for (let i = 0; i < to; i++) {
99
+ text += char;
100
+ }
101
+ return text;
102
+ }
103
+ const KindsToBeRemoved = [TokenKind.FLOAT, TokenKind.STRING, TokenKind.INT, TokenKind.BLOCK_STRING];
104
+ function getSourceFromLocation(loc, inputStart, inputEnd) {
105
+ let source = "";
106
+ if (loc?.startToken) {
107
+ const start = typeof inputStart === "number" ? inputStart : loc.start;
108
+ const end = typeof inputEnd === "number" ? inputEnd : loc.end;
109
+ let next = loc.startToken.next;
110
+ let previousLine = 1;
111
+ while (next) {
112
+ if (next.start < start) {
113
+ next = next.next;
114
+ previousLine = next?.line;
115
+ continue;
116
+ }
117
+ if (next.end > end) {
118
+ next = next.next;
119
+ previousLine = next?.line;
120
+ continue;
121
+ }
122
+ let value = next.value || next.kind;
123
+ let space = "";
124
+ if (KindsToBeRemoved.indexOf(next.kind) >= 0) {
125
+ value = "*";
126
+ }
127
+ if (next.kind === TokenKind.STRING) {
128
+ value = `"${value}"`;
129
+ }
130
+ if (next.kind === TokenKind.EOF) {
131
+ value = "";
132
+ }
133
+ if (next.line > previousLine) {
134
+ source += repeatBreak(next.line - previousLine);
135
+ previousLine = next.line;
136
+ space = repeatSpace(next.column - 1);
137
+ } else {
138
+ if (next.line === next.prev?.line) {
139
+ space = repeatSpace(next.start - (next.prev?.end || 0));
140
+ }
141
+ }
142
+ source += space + value;
143
+ if (next) {
144
+ next = next.next;
145
+ }
146
+ }
147
+ }
148
+ return source;
149
+ }
150
+ function wrapFields(type, getConfig) {
151
+ if (!type || type[OTEL_PATCHED_SYMBOL]) {
152
+ return;
153
+ }
154
+ const fields = type.getFields();
155
+ type[OTEL_PATCHED_SYMBOL] = true;
156
+ Object.keys(fields).forEach((key) => {
157
+ const field = fields[key];
158
+ if (!field) {
159
+ return;
160
+ }
161
+ if (field.resolve) {
162
+ field.resolve = wrapFieldResolver(getConfig, field.resolve);
163
+ }
164
+ if (field.type) {
165
+ const unwrappedTypes = unwrapType(field.type);
166
+ for (const unwrappedType of unwrappedTypes) {
167
+ wrapFields(unwrappedType, getConfig);
168
+ }
169
+ }
170
+ });
171
+ }
172
+ function unwrapType(type) {
173
+ if ("ofType" in type) {
174
+ return unwrapType(type.ofType);
175
+ }
176
+ if (isGraphQLUnionType(type)) {
177
+ return type.getTypes();
178
+ }
179
+ if (isGraphQLObjectType(type)) {
180
+ return [type];
181
+ }
182
+ return [];
183
+ }
184
+ function isGraphQLUnionType(type) {
185
+ return "getTypes" in type && typeof type.getTypes === "function";
186
+ }
187
+ function isGraphQLObjectType(type) {
188
+ return "getFields" in type && typeof type.getFields === "function";
189
+ }
190
+ const handleResolveSpanError = (resolveSpan, err, shouldEndSpan) => {
191
+ if (!shouldEndSpan) {
192
+ return;
193
+ }
194
+ resolveSpan.setStatus({
195
+ code: SPAN_STATUS_ERROR,
196
+ message: err.message
197
+ });
198
+ resolveSpan.end();
199
+ };
200
+ const handleResolveSpanSuccess = (resolveSpan, shouldEndSpan) => {
201
+ if (!shouldEndSpan) {
202
+ return;
203
+ }
204
+ resolveSpan.end();
205
+ };
206
+ function wrapFieldResolver(getConfig, fieldResolver, isDefaultResolver = false) {
207
+ if (wrappedFieldResolver[OTEL_PATCHED_SYMBOL] || typeof fieldResolver !== "function") {
208
+ return fieldResolver;
209
+ }
210
+ function wrappedFieldResolver(source, args, contextValue, info) {
211
+ if (!fieldResolver) {
212
+ return void 0;
213
+ }
214
+ const config = getConfig();
215
+ if (config.ignoreTrivialResolveSpans && isDefaultResolver && (isObjectLike(source) || typeof source === "function")) {
216
+ const property = source[info.fieldName];
217
+ if (typeof property !== "function") {
218
+ return fieldResolver.call(this, source, args, contextValue, info);
219
+ }
220
+ }
221
+ if (!contextValue[OTEL_GRAPHQL_DATA_SYMBOL]) {
222
+ return fieldResolver.call(this, source, args, contextValue, info);
223
+ }
224
+ const path = pathToArray(info?.path);
225
+ const { field, spanAdded } = createFieldIfNotExists(contextValue, info, path);
226
+ const span = field.span;
227
+ const shouldEndSpan = spanAdded;
228
+ return withActiveSpan(span, () => {
229
+ try {
230
+ const res = fieldResolver.call(this, source, args, contextValue, info);
231
+ if (isPromise(res)) {
232
+ return res.then(
233
+ (r) => {
234
+ handleResolveSpanSuccess(span, shouldEndSpan);
235
+ return r;
236
+ },
237
+ (err) => {
238
+ handleResolveSpanError(span, err, shouldEndSpan);
239
+ throw err;
240
+ }
241
+ );
242
+ } else {
243
+ handleResolveSpanSuccess(span, shouldEndSpan);
244
+ return res;
245
+ }
246
+ } catch (err) {
247
+ handleResolveSpanError(span, err, shouldEndSpan);
248
+ throw err;
249
+ }
250
+ });
251
+ }
252
+ wrappedFieldResolver[OTEL_PATCHED_SYMBOL] = true;
253
+ return wrappedFieldResolver;
254
+ }
255
+
256
+ export { addSpanSource, endSpan, getOperation, getSourceFromLocation, isPromise, wrapFieldResolver, wrapFields };
257
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/graphql/vendored/utils.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-graphql\n * - Upstream version: @opentelemetry/instrumentation-graphql@0.66.0\n * - Types from `graphql` package inlined as simplified interfaces\n * - Minor TypeScript strictness adjustments\n * - Span lifecycle migrated from the OpenTelemetry tracer to the @sentry/core span API\n */\n\nimport type {\n DocumentNode,\n GraphQLFieldResolver,\n GraphQLObjectType,\n GraphQLOutputType,\n GraphQLResolveInfo,\n GraphQLType,\n GraphQLUnionType,\n Location,\n Maybe,\n Token,\n} from './graphql-types';\nimport type { Span, SpanAttributes } from '@sentry/core';\nimport { getClient, isObjectLike, SPAN_STATUS_ERROR, startInactiveSpan, withActiveSpan } from '@sentry/core';\nimport { AllowedOperationTypes, SpanNames, TokenKind } from './enum';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { OTEL_GRAPHQL_DATA_SYMBOL, OTEL_PATCHED_SYMBOL } from './symbols';\nimport type { GraphQLField, GraphQLPath, ObjectWithGraphQLData, OtelPatched } from './internal-types';\nimport type { GraphQLInstrumentationParsedConfig } from './types';\n\nconst OPERATION_VALUES = Object.values(AllowedOperationTypes);\n\n// https://github.com/graphql/graphql-js/blob/main/src/jsutils/isPromise.ts\nexport const isPromise = (value: any): value is Promise<unknown> => {\n return typeof value?.then === 'function';\n};\n\nexport function addSpanSource(span: Span, loc?: Location, start?: number, end?: number): void {\n if (getClient()?.getDataCollectionOptions().graphQL.document === true) {\n const source = getSourceFromLocation(loc, start, end);\n span.setAttribute(AttributeNames.SOURCE, source);\n }\n}\n\nfunction createFieldIfNotExists(\n contextValue: any,\n info: GraphQLResolveInfo,\n path: string[],\n): {\n field: GraphQLField;\n spanAdded: boolean;\n} {\n let field = getField(contextValue, path);\n if (field) {\n return { field, spanAdded: false };\n }\n\n const parentSpan = getParentFieldSpan(contextValue, path);\n\n field = {\n span: createResolverSpan(contextValue, info, path, parentSpan),\n };\n\n addField(contextValue, path, field);\n\n return { field, spanAdded: true };\n}\n\nfunction createResolverSpan(contextValue: any, info: GraphQLResolveInfo, path: string[], parentSpan?: Span): Span {\n const attributes: SpanAttributes = {\n [AttributeNames.FIELD_NAME]: info.fieldName,\n [AttributeNames.FIELD_PATH]: path.join('.'),\n [AttributeNames.FIELD_TYPE]: info.returnType.toString(),\n [AttributeNames.PARENT_NAME]: info.parentType.name,\n };\n\n const span = startInactiveSpan({\n name: `${SpanNames.RESOLVE} ${attributes[AttributeNames.FIELD_PATH]}`,\n attributes,\n parentSpan,\n });\n\n const document = contextValue[OTEL_GRAPHQL_DATA_SYMBOL].source;\n const fieldNode = info.fieldNodes.find(fieldNode => fieldNode.kind === 'Field');\n\n if (fieldNode) {\n addSpanSource(span, document.loc, fieldNode.loc?.start, fieldNode.loc?.end);\n }\n\n return span;\n}\n\nexport function endSpan(span: Span, error?: Error): void {\n if (error) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: error.message });\n }\n span.end();\n}\n\nexport function getOperation(document: DocumentNode, operationName?: Maybe<string>): DefinitionNodeLike | undefined {\n if (!document || !Array.isArray(document.definitions)) {\n return undefined;\n }\n\n if (operationName) {\n return document.definitions\n .filter(definition => OPERATION_VALUES.indexOf(definition?.operation) !== -1)\n .find(definition => operationName === definition?.name?.value);\n } else {\n return document.definitions.find(definition => OPERATION_VALUES.indexOf(definition?.operation) !== -1);\n }\n}\n\ntype DefinitionNodeLike = DocumentNode['definitions'][number];\n\nfunction addField(contextValue: any, path: string[], field: GraphQLField) {\n return (contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[path.join('.')] = field);\n}\n\nfunction getField(contextValue: any, path: string[]): GraphQLField {\n return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[path.join('.')];\n}\n\nfunction getParentFieldSpan(contextValue: any, path: string[]): Span {\n for (let i = path.length - 1; i > 0; i--) {\n const field = getField(contextValue, path.slice(0, i));\n\n if (field) {\n return field.span;\n }\n }\n\n return getRootSpan(contextValue);\n}\n\nfunction getRootSpan(contextValue: any): Span {\n return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].span;\n}\n\nfunction pathToArray(path: GraphQLPath): string[] {\n const flattened: string[] = [];\n let curr: GraphQLPath | undefined = path;\n while (curr) {\n flattened.push(String(curr.key));\n curr = curr.prev;\n }\n return flattened.reverse();\n}\n\nfunction repeatBreak(i: number): string {\n return repeatChar('\\n', i);\n}\n\nfunction repeatSpace(i: number): string {\n return repeatChar(' ', i);\n}\n\nfunction repeatChar(char: string, to: number): string {\n let text = '';\n for (let i = 0; i < to; i++) {\n text += char;\n }\n return text;\n}\n\nconst KindsToBeRemoved: string[] = [TokenKind.FLOAT, TokenKind.STRING, TokenKind.INT, TokenKind.BLOCK_STRING];\n\nexport function getSourceFromLocation(loc?: Location, inputStart?: number, inputEnd?: number): string {\n let source = '';\n\n if (loc?.startToken) {\n const start = typeof inputStart === 'number' ? inputStart : loc.start;\n const end = typeof inputEnd === 'number' ? inputEnd : loc.end;\n\n let next: Token | null = loc.startToken.next;\n let previousLine: number | undefined = 1;\n while (next) {\n if (next.start < start) {\n next = next.next;\n previousLine = next?.line;\n continue;\n }\n if (next.end > end) {\n next = next.next;\n previousLine = next?.line;\n continue;\n }\n let value = next.value || next.kind;\n let space = '';\n if (KindsToBeRemoved.indexOf(next.kind) >= 0) {\n value = '*';\n }\n if (next.kind === TokenKind.STRING) {\n value = `\"${value}\"`;\n }\n if (next.kind === TokenKind.EOF) {\n value = '';\n }\n if (next.line > previousLine!) {\n source += repeatBreak(next.line - previousLine!);\n previousLine = next.line;\n space = repeatSpace(next.column - 1);\n } else {\n if (next.line === next.prev?.line) {\n space = repeatSpace(next.start - (next.prev?.end || 0));\n }\n }\n source += space + value;\n if (next) {\n next = next.next!;\n }\n }\n }\n\n return source;\n}\n\nexport function wrapFields(\n type: Maybe<GraphQLObjectType & OtelPatched>,\n getConfig: () => GraphQLInstrumentationParsedConfig,\n): void {\n if (!type || (type as any)[OTEL_PATCHED_SYMBOL]) {\n return;\n }\n const fields = type.getFields();\n\n (type as any)[OTEL_PATCHED_SYMBOL] = true;\n\n Object.keys(fields).forEach(key => {\n const field = fields[key];\n\n if (!field) {\n return;\n }\n\n if (field.resolve) {\n // The shared structural types narrow the resolver context to `ObjectWithGraphQLData`; cast back\n // to the field's own resolver type (behavior is unchanged — this is a type-only adjustment).\n field.resolve = wrapFieldResolver(getConfig, field.resolve) as GraphQLFieldResolver;\n }\n\n if (field.type) {\n const unwrappedTypes = unwrapType(field.type);\n for (const unwrappedType of unwrappedTypes) {\n wrapFields(unwrappedType as any, getConfig);\n }\n }\n });\n}\n\nfunction unwrapType(type: GraphQLOutputType): readonly GraphQLObjectType[] {\n // unwrap wrapping types (non-nullable and list types)\n if ('ofType' in type) {\n // The structural index signature widens `ofType` to `unknown`, so narrow it back explicitly.\n return unwrapType(type.ofType as GraphQLOutputType);\n }\n\n // unwrap union types\n if (isGraphQLUnionType(type)) {\n return type.getTypes();\n }\n\n // return object types\n if (isGraphQLObjectType(type)) {\n return [type];\n }\n\n return [];\n}\n\nfunction isGraphQLUnionType(type: GraphQLType): type is GraphQLUnionType {\n return 'getTypes' in type && typeof type.getTypes === 'function';\n}\n\nfunction isGraphQLObjectType(type: GraphQLType): type is GraphQLObjectType {\n return 'getFields' in type && typeof type.getFields === 'function';\n}\n\nconst handleResolveSpanError = (resolveSpan: Span, err: any, shouldEndSpan: boolean) => {\n if (!shouldEndSpan) {\n return;\n }\n resolveSpan.setStatus({\n code: SPAN_STATUS_ERROR,\n message: err.message,\n });\n resolveSpan.end();\n};\n\nconst handleResolveSpanSuccess = (resolveSpan: Span, shouldEndSpan: boolean) => {\n if (!shouldEndSpan) {\n return;\n }\n resolveSpan.end();\n};\n\nexport function wrapFieldResolver<TSource = any, TContext = any, TArgs = any>(\n getConfig: () => GraphQLInstrumentationParsedConfig,\n fieldResolver: Maybe<GraphQLFieldResolver<TSource, TContext, TArgs> & OtelPatched>,\n isDefaultResolver = false,\n): GraphQLFieldResolver<TSource, TContext & ObjectWithGraphQLData, TArgs> & OtelPatched {\n if ((wrappedFieldResolver as OtelPatched)[OTEL_PATCHED_SYMBOL] || typeof fieldResolver !== 'function') {\n return fieldResolver!;\n }\n\n function wrappedFieldResolver(\n this: GraphQLFieldResolver<TSource, TContext, TArgs>,\n source: TSource,\n args: TArgs,\n contextValue: TContext & ObjectWithGraphQLData,\n info: GraphQLResolveInfo,\n ) {\n if (!fieldResolver) {\n return undefined;\n }\n const config = getConfig();\n\n // follows what graphql is doing to decide if this is a trivial resolver\n // for which we don't need to create a resolve span\n if (\n config.ignoreTrivialResolveSpans &&\n isDefaultResolver &&\n (isObjectLike(source) || typeof source === 'function')\n ) {\n const property = (source as any)[info.fieldName];\n // a function execution is not trivial and should be recorder.\n // property which is not a function is just a value and we don't want a \"resolve\" span for it\n if (typeof property !== 'function') {\n return fieldResolver.call(this, source, args, contextValue, info);\n }\n }\n\n if (!contextValue[OTEL_GRAPHQL_DATA_SYMBOL]) {\n return fieldResolver.call(this, source, args, contextValue, info);\n }\n const path = pathToArray(info?.path);\n\n const { field, spanAdded } = createFieldIfNotExists(contextValue, info, path);\n const span = field.span;\n const shouldEndSpan = spanAdded;\n\n return withActiveSpan(span, () => {\n try {\n const res = fieldResolver.call(this, source, args, contextValue, info);\n if (isPromise(res)) {\n return res.then(\n (r: any) => {\n handleResolveSpanSuccess(span, shouldEndSpan);\n return r;\n },\n (err: Error) => {\n handleResolveSpanError(span, err, shouldEndSpan);\n throw err;\n },\n );\n } else {\n handleResolveSpanSuccess(span, shouldEndSpan);\n return res;\n }\n } catch (err: any) {\n handleResolveSpanError(span, err, shouldEndSpan);\n throw err;\n }\n });\n }\n\n (wrappedFieldResolver as OtelPatched)[OTEL_PATCHED_SYMBOL] = true;\n\n return wrappedFieldResolver;\n}\n"],"names":["fieldNode"],"mappings":";;;;;AAgCA,MAAM,gBAAA,GAAmB,MAAA,CAAO,MAAA,CAAO,qBAAqB,CAAA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A,IACF,CAAC,CAAA;AAAA,EACH;AAEA,EAAC,oBAAA,CAAqC,mBAAmB,CAAA,GAAI,IAAA;AAE7D,EAAA,OAAO,oBAAA;AACT;;;;"}
@@ -1,129 +1,54 @@
1
- import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi';
2
- import { defineIntegration, SDK_VERSION, getClient, getIsolationScope, getDefaultIsolationScope, debug, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, captureException } from '@sentry/core';
1
+ import { HapiInstrumentation } from './vendored/instrumentation.js';
2
+ import { defineIntegration, SDK_VERSION, getIsolationScope, getDefaultIsolationScope, debug, captureException } from '@sentry/core';
3
3
  import { generateInstrumentOnce, ensureIsWrapped } from '@sentry/node-core';
4
4
  import { DEBUG_BUILD } from '../../../debug-build.js';
5
5
 
6
- const INTEGRATION_NAME = 'Hapi';
7
-
6
+ const INTEGRATION_NAME = "Hapi";
8
7
  const instrumentHapi = generateInstrumentOnce(INTEGRATION_NAME, () => new HapiInstrumentation());
9
-
10
8
  const _hapiIntegration = (() => {
11
9
  return {
12
10
  name: INTEGRATION_NAME,
13
11
  setupOnce() {
14
12
  instrumentHapi();
15
- },
13
+ }
16
14
  };
17
- }) ;
18
-
19
- /**
20
- * Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/).
21
- *
22
- * If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.
23
- *
24
- * For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/).
25
- *
26
- * @example
27
- * ```javascript
28
- * const Sentry = require('@sentry/node');
29
- *
30
- * Sentry.init({
31
- * integrations: [Sentry.hapiIntegration()],
32
- * })
33
- * ```
34
- */
15
+ });
35
16
  const hapiIntegration = defineIntegration(_hapiIntegration);
36
-
37
17
  function isErrorEvent(event) {
38
- return !!(event && typeof event === 'object' && 'error' in event && event.error);
18
+ return !!(event && typeof event === "object" && "error" in event && event.error);
39
19
  }
40
-
41
20
  function sendErrorToSentry(errorData) {
42
21
  captureException(errorData, {
43
22
  mechanism: {
44
- type: 'auto.function.hapi',
45
- handled: false,
46
- },
23
+ type: "auto.function.hapi",
24
+ handled: false
25
+ }
47
26
  });
48
27
  }
49
-
50
28
  const hapiErrorPlugin = {
51
- name: 'SentryHapiErrorPlugin',
29
+ name: "SentryHapiErrorPlugin",
52
30
  version: SDK_VERSION,
53
31
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- register: async function (serverArg) {
55
- const server = serverArg ;
56
-
57
- server.events.on({ name: 'request', channels: ['error'] }, (request, event) => {
32
+ register: async function(serverArg) {
33
+ const server = serverArg;
34
+ server.events.on({ name: "request", channels: ["error"] }, (request, event) => {
58
35
  if (getIsolationScope() !== getDefaultIsolationScope()) {
59
36
  const route = request.route;
60
37
  if (route.path) {
61
38
  getIsolationScope().setTransactionName(`${route.method.toUpperCase()} ${route.path}`);
62
39
  }
63
40
  } else {
64
- DEBUG_BUILD &&
65
- debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName');
41
+ DEBUG_BUILD && debug.warn("Isolation scope is still the default isolation scope - skipping setting transactionName");
66
42
  }
67
-
68
43
  if (isErrorEvent(event)) {
69
44
  sendErrorToSentry(event.error);
70
45
  }
71
46
  });
72
- },
47
+ }
73
48
  };
74
-
75
- /**
76
- * Add a Hapi plugin to capture errors to Sentry.
77
- *
78
- * @param server The Hapi server to attach the error handler to
79
- *
80
- * @example
81
- * ```javascript
82
- * const Sentry = require('@sentry/node');
83
- * const Hapi = require('@hapi/hapi');
84
- *
85
- * const init = async () => {
86
- * const server = Hapi.server();
87
- *
88
- * // all your routes here
89
- *
90
- * await Sentry.setupHapiErrorHandler(server);
91
- *
92
- * await server.start();
93
- * };
94
- * ```
95
- */
96
49
  async function setupHapiErrorHandler(server) {
97
50
  await server.register(hapiErrorPlugin);
98
-
99
- // Sadly, middleware spans do not go through `requestHook`, so we handle those here
100
- // We register this hook in this method, because if we register it in the integration `setup`,
101
- // it would always run even for users that are not even using hapi
102
- const client = getClient();
103
- if (client) {
104
- client.on('spanStart', span => {
105
- addHapiSpanAttributes(span);
106
- });
107
- }
108
-
109
- ensureIsWrapped(server.register, 'hapi');
110
- }
111
-
112
- function addHapiSpanAttributes(span) {
113
- const attributes = spanToJSON(span).data;
114
-
115
- // this is one of: router, plugin, server.ext
116
- const type = attributes['hapi.type'];
117
-
118
- // If this is already set, or we have no Hapi span, no need to process again...
119
- if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] || !type) {
120
- return;
121
- }
122
-
123
- span.setAttributes({
124
- [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.hapi',
125
- [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.hapi`,
126
- });
51
+ ensureIsWrapped(server.register, "hapi");
127
52
  }
128
53
 
129
54
  export { hapiErrorPlugin, hapiIntegration, instrumentHapi, setupHapiErrorHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"sourcesContent":["import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi';\nimport type { IntegrationFn, Span } from '@sentry/core';\nimport {\n captureException,\n debug,\n defineIntegration,\n getClient,\n getDefaultIsolationScope,\n getIsolationScope,\n SDK_VERSION,\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 type { Request, RequestEvent, Server } from './types';\n\nconst INTEGRATION_NAME = 'Hapi';\n\nexport const instrumentHapi = generateInstrumentOnce(INTEGRATION_NAME, () => new HapiInstrumentation());\n\nconst _hapiIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentHapi();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/).\n *\n * If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.\n *\n * For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.hapiIntegration()],\n * })\n * ```\n */\nexport const hapiIntegration = defineIntegration(_hapiIntegration);\n\nfunction isErrorEvent(event: unknown): event is RequestEvent {\n return !!(event && typeof event === 'object' && 'error' in event && event.error);\n}\n\nfunction sendErrorToSentry(errorData: object): void {\n captureException(errorData, {\n mechanism: {\n type: 'auto.function.hapi',\n handled: false,\n },\n });\n}\n\nexport const hapiErrorPlugin = {\n name: 'SentryHapiErrorPlugin',\n version: SDK_VERSION,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register: async function (serverArg: Record<any, any>) {\n const server = serverArg as unknown as Server;\n\n server.events.on({ name: 'request', channels: ['error'] }, (request: Request, event: RequestEvent) => {\n if (getIsolationScope() !== getDefaultIsolationScope()) {\n const route = request.route;\n if (route.path) {\n getIsolationScope().setTransactionName(`${route.method.toUpperCase()} ${route.path}`);\n }\n } else {\n DEBUG_BUILD &&\n debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName');\n }\n\n if (isErrorEvent(event)) {\n sendErrorToSentry(event.error);\n }\n });\n },\n};\n\n/**\n * Add a Hapi plugin to capture errors to Sentry.\n *\n * @param server The Hapi server to attach the error handler to\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const Hapi = require('@hapi/hapi');\n *\n * const init = async () => {\n * const server = Hapi.server();\n *\n * // all your routes here\n *\n * await Sentry.setupHapiErrorHandler(server);\n *\n * await server.start();\n * };\n * ```\n */\nexport async function setupHapiErrorHandler(server: Server): Promise<void> {\n await server.register(hapiErrorPlugin);\n\n // Sadly, middleware spans do not go through `requestHook`, so we handle those here\n // We register this hook in this method, because if we register it in the integration `setup`,\n // it would always run even for users that are not even using hapi\n const client = getClient();\n if (client) {\n client.on('spanStart', span => {\n addHapiSpanAttributes(span);\n });\n }\n\n ensureIsWrapped(server.register, 'hapi');\n}\n\nfunction addHapiSpanAttributes(span: Span): void {\n const attributes = spanToJSON(span).data;\n\n // this is one of: router, plugin, server.ext\n const type = attributes['hapi.type'];\n\n // If this is already set, or we have no Hapi span, no need to process again...\n if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] || !type) {\n return;\n }\n\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.hapi',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.hapi`,\n });\n}\n"],"names":[],"mappings":";;;;;AAkBA,MAAM,gBAAA,GAAmB,MAAM;;AAExB,MAAM,cAAA,GAAiB,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,IAAI,mBAAmB,EAAE;;AAEtG,MAAM,gBAAA,IAAoB,MAAM;AAChC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,cAAc,EAAE;AACtB,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,eAAA,GAAkB,iBAAiB,CAAC,gBAAgB;;AAEjE,SAAS,YAAY,CAAC,KAAK,EAAkC;AAC7D,EAAE,OAAO,CAAC,EAAE,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,IAAY,WAAW,KAAA,IAAS,KAAK,CAAC,KAAK,CAAC;AAClF;;AAEA,SAAS,iBAAiB,CAAC,SAAS,EAAgB;AACpD,EAAE,gBAAgB,CAAC,SAAS,EAAE;AAC9B,IAAI,SAAS,EAAE;AACf,MAAM,IAAI,EAAE,oBAAoB;AAChC,MAAM,OAAO,EAAE,KAAK;AACpB,KAAK;AACL,GAAG,CAAC;AACJ;;AAEO,MAAM,kB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AAA,IAAA,CAAA;AACA,IAAA,CAAA,CAAA;AACA,EAAA;;AAEA,EAAA,eAAA,CAAA,MAAA,CAAA,QAAA,EAAA,MAAA,CAAA;AACA;;AAEA,SAAA,qBAAA,CAAA,IAAA,EAAA;AACA,EAAA,MAAA,UAAA,GAAA,UAAA,CAAA,IAAA,CAAA,CAAA,IAAA;;AAEA;AACA,EAAA,MAAA,IAAA,GAAA,UAAA,CAAA,WAAA,CAAA;;AAEA;AACA,EAAA,IAAA,UAAA,CAAA,4BAAA,CAAA,IAAA,CAAA,IAAA,EAAA;AACA,IAAA;AACA,EAAA;;AAEA,EAAA,IAAA,CAAA,aAAA,CAAA;AACA,IAAA,CAAA,gCAAA,GAAA,qBAAA;AACA,IAAA,CAAA,4BAAA,GAAA,CAAA,EAAA,IAAA,CAAA,KAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"sourcesContent":["import { HapiInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n captureException,\n debug,\n defineIntegration,\n getDefaultIsolationScope,\n getIsolationScope,\n SDK_VERSION,\n} from '@sentry/core';\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport type { Request, RequestEvent, Server } from './types';\n\nconst INTEGRATION_NAME = 'Hapi' as const;\n\nexport const instrumentHapi = generateInstrumentOnce(INTEGRATION_NAME, () => new HapiInstrumentation());\n\nconst _hapiIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentHapi();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/).\n *\n * If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.\n *\n * For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.hapiIntegration()],\n * })\n * ```\n */\nexport const hapiIntegration = defineIntegration(_hapiIntegration);\n\nfunction isErrorEvent(event: unknown): event is RequestEvent {\n return !!(event && typeof event === 'object' && 'error' in event && event.error);\n}\n\nfunction sendErrorToSentry(errorData: object): void {\n captureException(errorData, {\n mechanism: {\n type: 'auto.function.hapi',\n handled: false,\n },\n });\n}\n\nexport const hapiErrorPlugin = {\n name: 'SentryHapiErrorPlugin',\n version: SDK_VERSION,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register: async function (serverArg: Record<any, any>) {\n const server = serverArg as unknown as Server;\n\n server.events.on({ name: 'request', channels: ['error'] }, (request: Request, event: RequestEvent) => {\n if (getIsolationScope() !== getDefaultIsolationScope()) {\n const route = request.route;\n if (route.path) {\n getIsolationScope().setTransactionName(`${route.method.toUpperCase()} ${route.path}`);\n }\n } else {\n DEBUG_BUILD &&\n debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName');\n }\n\n if (isErrorEvent(event)) {\n sendErrorToSentry(event.error);\n }\n });\n },\n};\n\n/**\n * Add a Hapi plugin to capture errors to Sentry.\n *\n * @param server The Hapi server to attach the error handler to\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const Hapi = require('@hapi/hapi');\n *\n * const init = async () => {\n * const server = Hapi.server();\n *\n * // all your routes here\n *\n * await Sentry.setupHapiErrorHandler(server);\n *\n * await server.start();\n * };\n * ```\n */\nexport async function setupHapiErrorHandler(server: Server): Promise<void> {\n await server.register(hapiErrorPlugin);\n ensureIsWrapped(server.register, 'hapi');\n}\n"],"names":[],"mappings":";;;;;AAcA,MAAM,gBAAA,GAAmB,MAAA;AAElB,MAAM,iBAAiB,sBAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAI,qBAAqB;AAEtG,MAAM,oBAAoB,MAAM;AAC9B,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,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KAAK,CAAA;AAAA,MAC/B;AAAA,IACF,CAAC,CAAA;AAAA,EACH;AACF;AAuBA,eAAsB,sBAAsB,MAAA,EAA+B;AACzE,EAAA,MAAM,MAAA,CAAO,SAAS,eAAe,CAAA;AACrC,EAAA,eAAA,CAAgB,MAAA,CAAO,UAAU,MAAM,CAAA;AACzC;;;;"}
@@ -0,0 +1,9 @@
1
+ var AttributeNames = /* @__PURE__ */ ((AttributeNames2) => {
2
+ AttributeNames2["HAPI_TYPE"] = "hapi.type";
3
+ AttributeNames2["PLUGIN_NAME"] = "hapi.plugin.name";
4
+ AttributeNames2["EXT_TYPE"] = "server.ext.type";
5
+ return AttributeNames2;
6
+ })(AttributeNames || {});
7
+
8
+ export { AttributeNames };
9
+ //# sourceMappingURL=AttributeNames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttributeNames.js","sources":["../../../../../../../src/integrations/tracing/hapi/vendored/enums/AttributeNames.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-hapi\n * - Upstream version: @opentelemetry/instrumentation-hapi@0.64.0\n */\n/* eslint-disable */\n\nexport enum AttributeNames {\n HAPI_TYPE = 'hapi.type',\n PLUGIN_NAME = 'hapi.plugin.name',\n EXT_TYPE = 'server.ext.type',\n}\n"],"names":["AttributeNames"],"mappings":"AAUO,IAAK,cAAA,qBAAAA,eAAAA,KAAL;AACL,EAAAA,gBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,gBAAA,aAAA,CAAA,GAAc,kBAAA;AACd,EAAAA,gBAAA,UAAA,CAAA,GAAW,iBAAA;AAHD,EAAA,OAAAA,eAAAA;AAAA,CAAA,EAAA,cAAA,IAAA,EAAA;;;;"}