@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
@@ -1,59 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const instrumentationGenericPool = require('@opentelemetry/instrumentation-generic-pool');
4
- const core = require('@sentry/core');
5
- const nodeCore = require('@sentry/node-core');
6
-
7
- const INTEGRATION_NAME = 'GenericPool';
8
-
9
- const instrumentGenericPool = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentationGenericPool.GenericPoolInstrumentation({}));
10
-
11
- const _genericPoolIntegration = (() => {
12
- let instrumentationWrappedCallback;
13
-
14
- return {
15
- name: INTEGRATION_NAME,
16
- setupOnce() {
17
- const instrumentation = instrumentGenericPool();
18
- instrumentationWrappedCallback = nodeCore.instrumentWhenWrapped(instrumentation);
19
- },
20
-
21
- setup(client) {
22
- instrumentationWrappedCallback?.(() =>
23
- client.on('spanStart', span => {
24
- const spanJSON = core.spanToJSON(span);
25
-
26
- const spanDescription = spanJSON.description;
27
-
28
- // typo in emitted span for version <= 0.38.0 of @opentelemetry/instrumentation-generic-pool
29
- const isGenericPoolSpan =
30
- spanDescription === 'generic-pool.aquire' || spanDescription === 'generic-pool.acquire';
31
-
32
- if (isGenericPoolSpan) {
33
- span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.generic_pool');
34
- }
35
- }),
36
- );
37
- },
38
- };
39
- }) ;
40
-
41
- /**
42
- * Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library.
43
- *
44
- * For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/).
45
- *
46
- * @example
47
- * ```javascript
48
- * const Sentry = require('@sentry/node');
49
- *
50
- * Sentry.init({
51
- * integrations: [Sentry.genericPoolIntegration()],
52
- * });
53
- * ```
54
- */
55
- const genericPoolIntegration = core.defineIntegration(_genericPoolIntegration);
56
-
57
- exports.genericPoolIntegration = genericPoolIntegration;
58
- exports.instrumentGenericPool = instrumentGenericPool;
59
- //# sourceMappingURL=genericPool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"genericPool.js","sources":["../../../../src/integrations/tracing/genericPool.ts"],"sourcesContent":["import { GenericPoolInstrumentation } from '@opentelemetry/instrumentation-generic-pool';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON } from '@sentry/core';\nimport { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'GenericPool';\n\nexport const instrumentGenericPool = generateInstrumentOnce(INTEGRATION_NAME, () => new GenericPoolInstrumentation({}));\n\nconst _genericPoolIntegration = (() => {\n let instrumentationWrappedCallback: undefined | ((callback: () => void) => void);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const instrumentation = instrumentGenericPool();\n instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);\n },\n\n setup(client) {\n instrumentationWrappedCallback?.(() =>\n client.on('spanStart', span => {\n const spanJSON = spanToJSON(span);\n\n const spanDescription = spanJSON.description;\n\n // typo in emitted span for version <= 0.38.0 of @opentelemetry/instrumentation-generic-pool\n const isGenericPoolSpan =\n spanDescription === 'generic-pool.aquire' || spanDescription === 'generic-pool.acquire';\n\n if (isGenericPoolSpan) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.generic_pool');\n }\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library.\n *\n * For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.genericPoolIntegration()],\n * });\n * ```\n */\nexport const genericPoolIntegration = defineIntegration(_genericPoolIntegration);\n"],"names":["generateInstrumentOnce","GenericPoolInstrumentation","instrumentWhenWrapped","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,aAAa;;MAEzB,qBAAA,GAAwBA,+BAAsB,CAAC,gBAAgB,EAAE,MAAM,IAAIC,qDAA0B,CAAC,EAAE,CAAC;;AAEtH,MAAM,uBAAA,IAA2B,MAAM;AACvC,EAAE,IAAI,8BAA8B;;AAEpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,MAAM,eAAA,GAAkB,qBAAqB,EAAE;AACrD,MAAM,8BAAA,GAAiCC,8BAAqB,CAAC,eAAe,CAAC;AAC7E,IAAI,CAAC;;AAEL,IAAI,KAAK,CAAC,MAAM,EAAE;AAClB,MAAM,8BAA8B,GAAG;AACvC,QAAQ,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ;AACvC,UAAU,MAAM,QAAA,GAAWC,eAAU,CAAC,IAAI,CAAC;;AAE3C,UAAU,MAAM,eAAA,GAAkB,QAAQ,CAAC,WAAW;;AAEtD;AACA,UAAU,MAAM,iBAAA;AAChB,YAAY,oBAAoB,qBAAA,IAAyB,eAAA,KAAoB,sBAAsB;;AAEnG,UAAU,IAAI,iBAAiB,EAAE;AACjC,YAAY,IAAI,CAAC,YAAY,CAACC,qCAAgC,EAAE,2BAA2B,CAAC;AAC5F,UAAU;AACV,QAAQ,CAAC,CAAC;AACV,OAAO;AACP,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,sBAAA,GAAyBC,sBAAiB,CAAC,uBAAuB;;;;;"}
@@ -1,127 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const api = require('@opentelemetry/api');
4
- const instrumentationGraphql = require('@opentelemetry/instrumentation-graphql');
5
- const core = require('@sentry/core');
6
- const nodeCore = require('@sentry/node-core');
7
- const opentelemetry = require('@sentry/opentelemetry');
8
-
9
- const INTEGRATION_NAME = 'Graphql';
10
-
11
- const instrumentGraphql = nodeCore.generateInstrumentOnce(
12
- INTEGRATION_NAME,
13
- instrumentationGraphql.GraphQLInstrumentation,
14
- (_options) => {
15
- const options = getOptionsWithDefaults(_options);
16
-
17
- return {
18
- ...options,
19
- responseHook(span, result) {
20
- nodeCore.addOriginToSpan(span, 'auto.graphql.otel.graphql');
21
-
22
- // We want to ensure spans are marked as errored if there are errors in the result
23
- // We only do that if the span is not already marked with a status
24
- const resultWithMaybeError = result ;
25
- if (resultWithMaybeError.errors?.length && !core.spanToJSON(span).status) {
26
- span.setStatus({ code: api.SpanStatusCode.ERROR });
27
- }
28
-
29
- const attributes = core.spanToJSON(span).data;
30
-
31
- // If operation.name is not set, we fall back to use operation.type only
32
- const operationType = attributes['graphql.operation.type'];
33
- const operationName = attributes['graphql.operation.name'];
34
-
35
- if (options.useOperationNameForRootSpan && operationType) {
36
- const rootSpan = core.getRootSpan(span);
37
- const rootSpanAttributes = core.spanToJSON(rootSpan).data;
38
-
39
- const existingOperations = rootSpanAttributes[opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION] || [];
40
-
41
- const newOperation = operationName ? `${operationType} ${operationName}` : `${operationType}`;
42
-
43
- // We keep track of each operation on the root span
44
- // This can either be a string, or an array of strings (if there are multiple operations)
45
- if (Array.isArray(existingOperations)) {
46
- (existingOperations ).push(newOperation);
47
- rootSpan.setAttribute(opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, existingOperations);
48
- } else if (typeof existingOperations === 'string') {
49
- rootSpan.setAttribute(opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, [existingOperations, newOperation]);
50
- } else {
51
- rootSpan.setAttribute(opentelemetry.SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, newOperation);
52
- }
53
-
54
- if (!core.spanToJSON(rootSpan).data['original-description']) {
55
- rootSpan.setAttribute('original-description', core.spanToJSON(rootSpan).description);
56
- }
57
- // Important for e.g. @sentry/aws-serverless because this would otherwise overwrite the name again
58
- rootSpan.updateName(
59
- `${core.spanToJSON(rootSpan).data['original-description']} (${getGraphqlOperationNamesFromAttribute(
60
- existingOperations,
61
- )})`,
62
- );
63
- }
64
- },
65
- };
66
- },
67
- );
68
-
69
- const _graphqlIntegration = ((options = {}) => {
70
- return {
71
- name: INTEGRATION_NAME,
72
- setupOnce() {
73
- // We set defaults here, too, because otherwise we'd update the instrumentation config
74
- // to the config without defaults, as `generateInstrumentOnce` automatically calls `setConfig(options)`
75
- // when being called the second time
76
- instrumentGraphql(getOptionsWithDefaults(options));
77
- },
78
- };
79
- }) ;
80
-
81
- /**
82
- * Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library.
83
- *
84
- * For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/).
85
- *
86
- * @param {GraphqlOptions} options Configuration options for the GraphQL integration.
87
- *
88
- * @example
89
- * ```javascript
90
- * const Sentry = require('@sentry/node');
91
- *
92
- * Sentry.init({
93
- * integrations: [Sentry.graphqlIntegration()],
94
- * });
95
- */
96
- const graphqlIntegration = core.defineIntegration(_graphqlIntegration);
97
-
98
- function getOptionsWithDefaults(options) {
99
- return {
100
- ignoreResolveSpans: true,
101
- ignoreTrivialResolveSpans: true,
102
- useOperationNameForRootSpan: true,
103
- ...options,
104
- };
105
- }
106
-
107
- // copy from packages/opentelemetry/utils
108
- function getGraphqlOperationNamesFromAttribute(attr) {
109
- if (Array.isArray(attr)) {
110
- // oxlint-disable-next-line typescript/require-array-sort-compare
111
- const sorted = attr.slice().sort();
112
-
113
- // Up to 5 items, we just add all of them
114
- if (sorted.length <= 5) {
115
- return sorted.join(', ');
116
- } else {
117
- // Else, we add the first 5 and the diff of other operations
118
- return `${sorted.slice(0, 5).join(', ')}, +${sorted.length - 5}`;
119
- }
120
- }
121
-
122
- return `${attr}`;
123
- }
124
-
125
- exports.graphqlIntegration = graphqlIntegration;
126
- exports.instrumentGraphql = instrumentGraphql;
127
- //# sourceMappingURL=graphql.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql.js","sources":["../../../../src/integrations/tracing/graphql.ts"],"sourcesContent":["import type { AttributeValue } from '@opentelemetry/api';\nimport { SpanStatusCode } from '@opentelemetry/api';\nimport { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, getRootSpan, spanToJSON } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from '@sentry/opentelemetry';\n\ninterface GraphqlOptions {\n /**\n * Do not create spans for resolvers.\n *\n * Defaults to true.\n */\n ignoreResolveSpans?: boolean;\n\n /**\n * Don't create spans for the execution of the default resolver on object properties.\n *\n * When a resolver function is not defined on the schema for a field, graphql will\n * use the default resolver which just looks for a property with that name on the object.\n * If the property is not a function, it's not very interesting to trace.\n * This option can reduce noise and number of spans created.\n *\n * Defaults to true.\n */\n ignoreTrivialResolveSpans?: boolean;\n\n /**\n * If this is enabled, a http.server root span containing this span will automatically be renamed to include the operation name.\n * Set this to `false` if you do not want this behavior, and want to keep the default http.server span name.\n *\n * Defaults to true.\n */\n useOperationNameForRootSpan?: boolean;\n}\n\nconst INTEGRATION_NAME = 'Graphql';\n\nexport const instrumentGraphql = generateInstrumentOnce(\n INTEGRATION_NAME,\n GraphQLInstrumentation,\n (_options: GraphqlOptions) => {\n const options = getOptionsWithDefaults(_options);\n\n return {\n ...options,\n responseHook(span, result) {\n addOriginToSpan(span, 'auto.graphql.otel.graphql');\n\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 const resultWithMaybeError = result as { errors?: { message: string }[] };\n if (resultWithMaybeError.errors?.length && !spanToJSON(span).status) {\n span.setStatus({ code: SpanStatusCode.ERROR });\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['graphql.operation.type'];\n const operationName = attributes['graphql.operation.name'];\n\n if (options.useOperationNameForRootSpan && operationType) {\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 };\n },\n);\n\nconst _graphqlIntegration = ((options: GraphqlOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // We set defaults here, too, because otherwise we'd update the instrumentation config\n // to the config without defaults, as `generateInstrumentOnce` automatically calls `setConfig(options)`\n // when being called the second time\n instrumentGraphql(getOptionsWithDefaults(options));\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library.\n *\n * For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/).\n *\n * @param {GraphqlOptions} options Configuration options for the GraphQL integration.\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.graphqlIntegration()],\n * });\n */\nexport const graphqlIntegration = defineIntegration(_graphqlIntegration);\n\nfunction getOptionsWithDefaults(options?: GraphqlOptions): GraphqlOptions {\n return {\n ignoreResolveSpans: true,\n ignoreTrivialResolveSpans: true,\n useOperationNameForRootSpan: true,\n ...options,\n };\n}\n\n// copy from packages/opentelemetry/utils\nfunction getGraphqlOperationNamesFromAttribute(attr: AttributeValue): 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, 5).join(', ')}, +${sorted.length - 5}`;\n }\n }\n\n return `${attr}`;\n}\n"],"names":["generateInstrumentOnce","GraphQLInstrumentation","addOriginToSpan","spanToJSON","SpanStatusCode","getRootSpan","SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION","defineIntegration"],"mappings":";;;;;;;;AAqCA,MAAM,gBAAA,GAAmB,SAAS;;AAE3B,MAAM,iBAAA,GAAoBA,+BAAsB;AACvD,EAAE,gBAAgB;AAClB,EAAEC,6CAAsB;AACxB,EAAE,CAAC,QAAQ,KAAqB;AAChC,IAAI,MAAM,OAAA,GAAU,sBAAsB,CAAC,QAAQ,CAAC;;AAEpD,IAAI,OAAO;AACX,MAAM,GAAG,OAAO;AAChB,MAAM,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE;AACjC,QAAQC,wBAAe,CAAC,IAAI,EAAE,2BAA2B,CAAC;;AAE1D;AACA;AACA,QAAQ,MAAM,oBAAA,GAAuB,MAAA;AACrC,QAAQ,IAAI,oBAAoB,CAAC,MAAM,EAAE,MAAA,IAAU,CAACC,eAAU,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE;AAC7E,UAAU,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAEC,kBAAc,CAAC,KAAA,EAAO,CAAC;AACxD,QAAQ;;AAER,QAAQ,MAAM,aAAaD,eAAU,CAAC,IAAI,CAAC,CAAC,IAAI;;AAEhD;AACA,QAAQ,MAAM,aAAA,GAAgB,UAAU,CAAC,wBAAwB,CAAC;AAClE,QAAQ,MAAM,aAAA,GAAgB,UAAU,CAAC,wBAAwB,CAAC;;AAElE,QAAQ,IAAI,OAAO,CAAC,2BAAA,IAA+B,aAAa,EAAE;AAClE,UAAU,MAAM,QAAA,GAAWE,gBAAW,CAAC,IAAI,CAAC;AAC5C,UAAU,MAAM,qBAAqBF,eAAU,CAAC,QAAQ,CAAC,CAAC,IAAI;;AAE9D,UAAU,MAAM,qBAAqB,kBAAkB,CAACG,yDAA2C,CAAA,IAAK,EAAE;;AAE1G,UAAU,MAAM,YAAA,GAAe,aAAA,GAAgB,CAAC,EAAA,aAAA,CAAA,CAAA,EAAA,aAAA,CAAA,CAAA,GAAA,CAAA,EAAA,aAAA,CAAA,CAAA;;AAEA;AACA;AACA,UAAA,IAAA,KAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA;AACA,YAAA,CAAA,kBAAA,GAAA,IAAA,CAAA,YAAA,CAAA;AACA,YAAA,QAAA,CAAA,YAAA,CAAAA,yDAAA,EAAA,kBAAA,CAAA;AACA,UAAA,CAAA,MAAA,IAAA,OAAA,kBAAA,KAAA,QAAA,EAAA;AACA,YAAA,QAAA,CAAA,YAAA,CAAAA,yDAAA,EAAA,CAAA,kBAAA,EAAA,YAAA,CAAA,CAAA;AACA,UAAA,CAAA,MAAA;AACA,YAAA,QAAA,CAAA,YAAA,CAAAA,yDAAA,EAAA,YAAA,CAAA;AACA,UAAA;;AAEA,UAAA,IAAA,CAAAH,eAAA,CAAA,QAAA,CAAA,CAAA,IAAA,CAAA,sBAAA,CAAA,EAAA;AACA,YAAA,QAAA,CAAA,YAAA,CAAA,sBAAA,EAAAA,eAAA,CAAA,QAAA,CAAA,CAAA,WAAA,CAAA;AACA,UAAA;AACA;AACA,UAAA,QAAA,CAAA,UAAA;AACA,YAAA,CAAA,EAAAA,eAAA,CAAA,QAAA,CAAA,CAAA,IAAA,CAAA,sBAAA,CAAA,CAAA,EAAA,EAAA,qCAAA;AACA,cAAA,kBAAA;AACA,aAAA,CAAA,CAAA,CAAA;AACA,WAAA;AACA,QAAA;AACA,MAAA,CAAA;AACA,KAAA;AACA,EAAA,CAAA;AACA;;AAEA,MAAA,mBAAA,IAAA,CAAA,OAAA,GAAA,EAAA,KAAA;AACA,EAAA,OAAA;AACA,IAAA,IAAA,EAAA,gBAAA;AACA,IAAA,SAAA,GAAA;AACA;AACA;AACA;AACA,MAAA,iBAAA,CAAA,sBAAA,CAAA,OAAA,CAAA,CAAA;AACA,IAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,kBAAA,GAAAI,sBAAA,CAAA,mBAAA;;AAEA,SAAA,sBAAA,CAAA,OAAA,EAAA;AACA,EAAA,OAAA;AACA,IAAA,kBAAA,EAAA,IAAA;AACA,IAAA,yBAAA,EAAA,IAAA;AACA,IAAA,2BAAA,EAAA,IAAA;AACA,IAAA,GAAA,OAAA;AACA,GAAA;AACA;;AAEA;AACA,SAAA,qCAAA,CAAA,IAAA,EAAA;AACA,EAAA,IAAA,KAAA,CAAA,OAAA,CAAA,IAAA,CAAA,EAAA;AACA;AACA,IAAA,MAAA,MAAA,GAAA,IAAA,CAAA,KAAA,EAAA,CAAA,IAAA,EAAA;;AAEA;AACA,IAAA,IAAA,MAAA,CAAA,MAAA,IAAA,CAAA,EAAA;AACA,MAAA,OAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA;AACA,IAAA,CAAA,MAAA;AACA;AACA,MAAA,OAAA,CAAA,EAAA,MAAA,CAAA,KAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,IAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA,MAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA;AACA,IAAA;AACA,EAAA;;AAEA,EAAA,OAAA,CAAA,EAAA,IAAA,CAAA,CAAA;AACA;;;;;"}
@@ -1,48 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const instrumentationKafkajs = require('@opentelemetry/instrumentation-kafkajs');
4
- const core = require('@sentry/core');
5
- const nodeCore = require('@sentry/node-core');
6
-
7
- const INTEGRATION_NAME = 'Kafka';
8
-
9
- const instrumentKafka = nodeCore.generateInstrumentOnce(
10
- INTEGRATION_NAME,
11
- () =>
12
- new instrumentationKafkajs.KafkaJsInstrumentation({
13
- consumerHook(span) {
14
- nodeCore.addOriginToSpan(span, 'auto.kafkajs.otel.consumer');
15
- },
16
- producerHook(span) {
17
- nodeCore.addOriginToSpan(span, 'auto.kafkajs.otel.producer');
18
- },
19
- }),
20
- );
21
-
22
- const _kafkaIntegration = (() => {
23
- return {
24
- name: INTEGRATION_NAME,
25
- setupOnce() {
26
- instrumentKafka();
27
- },
28
- };
29
- }) ;
30
-
31
- /**
32
- * Adds Sentry tracing instrumentation for the [kafkajs](https://www.npmjs.com/package/kafkajs) library.
33
- *
34
- * For more information, see the [`kafkaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/kafka/).
35
- *
36
- * @example
37
- * ```javascript
38
- * const Sentry = require('@sentry/node');
39
- *
40
- * Sentry.init({
41
- * integrations: [Sentry.kafkaIntegration()],
42
- * });
43
- */
44
- const kafkaIntegration = core.defineIntegration(_kafkaIntegration);
45
-
46
- exports.instrumentKafka = instrumentKafka;
47
- exports.kafkaIntegration = kafkaIntegration;
48
- //# sourceMappingURL=kafka.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kafka.js","sources":["../../../../src/integrations/tracing/kafka.ts"],"sourcesContent":["import { KafkaJsInstrumentation } from '@opentelemetry/instrumentation-kafkajs';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Kafka';\n\nexport const instrumentKafka = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new KafkaJsInstrumentation({\n consumerHook(span) {\n addOriginToSpan(span, 'auto.kafkajs.otel.consumer');\n },\n producerHook(span) {\n addOriginToSpan(span, 'auto.kafkajs.otel.producer');\n },\n }),\n);\n\nconst _kafkaIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentKafka();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [kafkajs](https://www.npmjs.com/package/kafkajs) library.\n *\n * For more information, see the [`kafkaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/kafka/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.kafkaIntegration()],\n * });\n */\nexport const kafkaIntegration = defineIntegration(_kafkaIntegration);\n"],"names":["generateInstrumentOnce","KafkaJsInstrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,OAAO;;AAEzB,MAAM,eAAA,GAAkBA,+BAAsB;AACrD,EAAE,gBAAgB;AAClB,EAAE;AACF,IAAI,IAAIC,6CAAsB,CAAC;AAC/B,MAAM,YAAY,CAAC,IAAI,EAAE;AACzB,QAAQC,wBAAe,CAAC,IAAI,EAAE,4BAA4B,CAAC;AAC3D,MAAM,CAAC;AACP,MAAM,YAAY,CAAC,IAAI,EAAE;AACzB,QAAQA,wBAAe,CAAC,IAAI,EAAE,4BAA4B,CAAC;AAC3D,MAAM,CAAC;AACP,KAAK,CAAC;AACN;;AAEA,MAAM,iBAAA,IAAqB,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,eAAe,EAAE;AACvB,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,gBAAA,GAAmBC,sBAAiB,CAAC,iBAAiB;;;;;"}
@@ -1,57 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const instrumentationKnex = require('@opentelemetry/instrumentation-knex');
4
- const core = require('@sentry/core');
5
- const nodeCore = require('@sentry/node-core');
6
-
7
- const INTEGRATION_NAME = 'Knex';
8
-
9
- const instrumentKnex = nodeCore.generateInstrumentOnce(
10
- INTEGRATION_NAME,
11
- () => new instrumentationKnex.KnexInstrumentation({ requireParentSpan: true }),
12
- );
13
-
14
- const _knexIntegration = (() => {
15
- let instrumentationWrappedCallback;
16
-
17
- return {
18
- name: INTEGRATION_NAME,
19
- setupOnce() {
20
- const instrumentation = instrumentKnex();
21
- instrumentationWrappedCallback = nodeCore.instrumentWhenWrapped(instrumentation);
22
- },
23
-
24
- setup(client) {
25
- instrumentationWrappedCallback?.(() =>
26
- client.on('spanStart', span => {
27
- const { data } = core.spanToJSON(span);
28
- // knex.version is always set in the span data
29
- // https://github.com/open-telemetry/opentelemetry-js-contrib/blob/0309caeafc44ac9cb13a3345b790b01b76d0497d/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts#L138
30
- if ('knex.version' in data) {
31
- span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.knex');
32
- }
33
- }),
34
- );
35
- },
36
- };
37
- }) ;
38
-
39
- /**
40
- * Knex integration
41
- *
42
- * Capture tracing data for [Knex](https://knexjs.org/).
43
- *
44
- * @example
45
- * ```javascript
46
- * import * as Sentry from '@sentry/node';
47
- *
48
- * Sentry.init({
49
- * integrations: [Sentry.knexIntegration()],
50
- * });
51
- * ```
52
- */
53
- const knexIntegration = core.defineIntegration(_knexIntegration);
54
-
55
- exports.instrumentKnex = instrumentKnex;
56
- exports.knexIntegration = knexIntegration;
57
- //# sourceMappingURL=knex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"knex.js","sources":["../../../../src/integrations/tracing/knex.ts"],"sourcesContent":["import { KnexInstrumentation } from '@opentelemetry/instrumentation-knex';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON } from '@sentry/core';\nimport { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Knex';\n\nexport const instrumentKnex = generateInstrumentOnce(\n INTEGRATION_NAME,\n () => new KnexInstrumentation({ requireParentSpan: true }),\n);\n\nconst _knexIntegration = (() => {\n let instrumentationWrappedCallback: undefined | ((callback: () => void) => void);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const instrumentation = instrumentKnex();\n instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);\n },\n\n setup(client) {\n instrumentationWrappedCallback?.(() =>\n client.on('spanStart', span => {\n const { data } = spanToJSON(span);\n // knex.version is always set in the span data\n // https://github.com/open-telemetry/opentelemetry-js-contrib/blob/0309caeafc44ac9cb13a3345b790b01b76d0497d/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts#L138\n if ('knex.version' in data) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.knex');\n }\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Knex integration\n *\n * Capture tracing data for [Knex](https://knexjs.org/).\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.knexIntegration()],\n * });\n * ```\n */\nexport const knexIntegration = defineIntegration(_knexIntegration);\n"],"names":["generateInstrumentOnce","KnexInstrumentation","instrumentWhenWrapped","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,MAAM;;AAExB,MAAM,cAAA,GAAiBA,+BAAsB;AACpD,EAAE,gBAAgB;AAClB,EAAE,MAAM,IAAIC,uCAAmB,CAAC,EAAE,iBAAiB,EAAE,IAAA,EAAM,CAAC;AAC5D;;AAEA,MAAM,gBAAA,IAAoB,MAAM;AAChC,EAAE,IAAI,8BAA8B;;AAEpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,MAAM,eAAA,GAAkB,cAAc,EAAE;AAC9C,MAAM,8BAAA,GAAiCC,8BAAqB,CAAC,eAAe,CAAC;AAC7E,IAAI,CAAC;;AAEL,IAAI,KAAK,CAAC,MAAM,EAAE;AAClB,MAAM,8BAA8B,GAAG;AACvC,QAAQ,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ;AACvC,UAAU,MAAM,EAAE,IAAA,EAAK,GAAIC,eAAU,CAAC,IAAI,CAAC;AAC3C;AACA;AACA,UAAU,IAAI,cAAA,IAAkB,IAAI,EAAE;AACtC,YAAY,IAAI,CAAC,YAAY,CAACC,qCAAgC,EAAE,mBAAmB,CAAC;AACpF,UAAU;AACV,QAAQ,CAAC,CAAC;AACV,OAAO;AACP,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,eAAA,GAAkBC,sBAAiB,CAAC,gBAAgB;;;;;"}
@@ -1,138 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const instrumentationKoa = require('@opentelemetry/instrumentation-koa');
4
- const semanticConventions = require('@opentelemetry/semantic-conventions');
5
- const core = require('@sentry/core');
6
- const nodeCore = require('@sentry/node-core');
7
- const debugBuild = require('../../debug-build.js');
8
-
9
- const INTEGRATION_NAME = 'Koa';
10
-
11
- const instrumentKoa = nodeCore.generateInstrumentOnce(
12
- INTEGRATION_NAME,
13
- instrumentationKoa.KoaInstrumentation,
14
- (options = {}) => {
15
- return {
16
- ignoreLayersType: options.ignoreLayersType ,
17
- requestHook(span, info) {
18
- nodeCore.addOriginToSpan(span, 'auto.http.otel.koa');
19
-
20
- const attributes = core.spanToJSON(span).data;
21
-
22
- // this is one of: middleware, router
23
- const type = attributes['koa.type'];
24
- if (type) {
25
- span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_OP, `${type}.koa`);
26
- }
27
-
28
- // Also update the name
29
- const name = attributes['koa.name'];
30
- if (typeof name === 'string') {
31
- // Somehow, name is sometimes `''` for middleware spans
32
- // See: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2220
33
- span.updateName(name || '< unknown >');
34
- }
35
-
36
- if (core.getIsolationScope() === core.getDefaultIsolationScope()) {
37
- debugBuild.DEBUG_BUILD && core.debug.warn('Isolation scope is default isolation scope - skipping setting transactionName');
38
- return;
39
- }
40
- const route = attributes[semanticConventions.ATTR_HTTP_ROUTE];
41
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
42
- const method = info.context?.request?.method?.toUpperCase() || 'GET';
43
- if (route) {
44
- core.getIsolationScope().setTransactionName(`${method} ${route}`);
45
- }
46
- },
47
- } ;
48
- },
49
- );
50
-
51
- const _koaIntegration = ((options = {}) => {
52
- return {
53
- name: INTEGRATION_NAME,
54
- setupOnce() {
55
- instrumentKoa(options);
56
- },
57
- };
58
- }) ;
59
-
60
- /**
61
- * Adds Sentry tracing instrumentation for [Koa](https://koajs.com/).
62
- *
63
- * If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server.
64
- *
65
- * For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/).
66
- *
67
- * @param {KoaOptions} options Configuration options for the Koa integration.
68
- *
69
- * @example
70
- * ```javascript
71
- * const Sentry = require('@sentry/node');
72
- *
73
- * Sentry.init({
74
- * integrations: [Sentry.koaIntegration()],
75
- * })
76
- * ```
77
- *
78
- * @example
79
- * ```javascript
80
- * // To ignore middleware spans
81
- * const Sentry = require('@sentry/node');
82
- *
83
- * Sentry.init({
84
- * integrations: [
85
- * Sentry.koaIntegration({
86
- * ignoreLayersType: ['middleware']
87
- * })
88
- * ],
89
- * })
90
- * ```
91
- */
92
- const koaIntegration = core.defineIntegration(_koaIntegration);
93
-
94
- /**
95
- * Add an Koa error handler to capture errors to Sentry.
96
- *
97
- * The error handler must be before any other middleware and after all controllers.
98
- *
99
- * @param app The Express instances
100
- * @param options {ExpressHandlerOptions} Configuration options for the handler
101
- *
102
- * @example
103
- * ```javascript
104
- * const Sentry = require('@sentry/node');
105
- * const Koa = require("koa");
106
- *
107
- * const app = new Koa();
108
- *
109
- * Sentry.setupKoaErrorHandler(app);
110
- *
111
- * // Add your routes, etc.
112
- *
113
- * app.listen(3000);
114
- * ```
115
- */
116
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
117
- const setupKoaErrorHandler = (app) => {
118
- app.use(async (ctx, next) => {
119
- try {
120
- await next();
121
- } catch (error) {
122
- core.captureException(error, {
123
- mechanism: {
124
- handled: false,
125
- type: 'auto.middleware.koa',
126
- },
127
- });
128
- throw error;
129
- }
130
- });
131
-
132
- nodeCore.ensureIsWrapped(app.use, 'koa');
133
- };
134
-
135
- exports.instrumentKoa = instrumentKoa;
136
- exports.koaIntegration = koaIntegration;
137
- exports.setupKoaErrorHandler = setupKoaErrorHandler;
138
- //# sourceMappingURL=koa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"koa.js","sources":["../../../../src/integrations/tracing/koa.ts"],"sourcesContent":["import type { KoaInstrumentationConfig, KoaLayerType } from '@opentelemetry/instrumentation-koa';\nimport { KoaInstrumentation } from '@opentelemetry/instrumentation-koa';\nimport { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n captureException,\n debug,\n defineIntegration,\n getDefaultIsolationScope,\n getIsolationScope,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n spanToJSON,\n} from '@sentry/core';\nimport { addOriginToSpan, ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\nimport { DEBUG_BUILD } from '../../debug-build';\n\ninterface KoaOptions {\n /**\n * Ignore layers of specified types\n */\n ignoreLayersType?: Array<'middleware' | 'router'>;\n}\n\nconst INTEGRATION_NAME = 'Koa';\n\nexport const instrumentKoa = generateInstrumentOnce(\n INTEGRATION_NAME,\n KoaInstrumentation,\n (options: KoaOptions = {}) => {\n return {\n ignoreLayersType: options.ignoreLayersType as KoaLayerType[],\n requestHook(span, info) {\n addOriginToSpan(span, 'auto.http.otel.koa');\n\n const attributes = spanToJSON(span).data;\n\n // this is one of: middleware, router\n const type = attributes['koa.type'];\n if (type) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, `${type}.koa`);\n }\n\n // Also update the name\n const name = attributes['koa.name'];\n if (typeof name === 'string') {\n // Somehow, name is sometimes `''` for middleware spans\n // See: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2220\n span.updateName(name || '< unknown >');\n }\n\n if (getIsolationScope() === getDefaultIsolationScope()) {\n DEBUG_BUILD && debug.warn('Isolation scope is default isolation scope - skipping setting transactionName');\n return;\n }\n const route = attributes[ATTR_HTTP_ROUTE];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const method = info.context?.request?.method?.toUpperCase() || 'GET';\n if (route) {\n getIsolationScope().setTransactionName(`${method} ${route}`);\n }\n },\n } satisfies KoaInstrumentationConfig;\n },\n);\n\nconst _koaIntegration = ((options: KoaOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentKoa(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Koa](https://koajs.com/).\n *\n * If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server.\n *\n * For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/).\n *\n * @param {KoaOptions} options Configuration options for the Koa integration.\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.koaIntegration()],\n * })\n * ```\n *\n * @example\n * ```javascript\n * // To ignore middleware spans\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [\n * Sentry.koaIntegration({\n * ignoreLayersType: ['middleware']\n * })\n * ],\n * })\n * ```\n */\nexport const koaIntegration = defineIntegration(_koaIntegration);\n\n/**\n * Add an Koa error handler to capture errors to Sentry.\n *\n * The error handler must be before any other middleware and after all controllers.\n *\n * @param app The Express instances\n * @param options {ExpressHandlerOptions} Configuration options for the handler\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const Koa = require(\"koa\");\n *\n * const app = new Koa();\n *\n * Sentry.setupKoaErrorHandler(app);\n *\n * // Add your routes, etc.\n *\n * app.listen(3000);\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const setupKoaErrorHandler = (app: { use: (arg0: (ctx: any, next: any) => Promise<void>) => void }): void => {\n app.use(async (ctx, next) => {\n try {\n await next();\n } catch (error) {\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'auto.middleware.koa',\n },\n });\n throw error;\n }\n });\n\n ensureIsWrapped(app.use, 'koa');\n};\n"],"names":["generateInstrumentOnce","KoaInstrumentation","addOriginToSpan","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_OP","getIsolationScope","getDefaultIsolationScope","DEBUG_BUILD","debug","ATTR_HTTP_ROUTE","defineIntegration","captureException","ensureIsWrapped"],"mappings":";;;;;;;;AAuBA,MAAM,gBAAA,GAAmB,KAAK;;AAEvB,MAAM,aAAA,GAAgBA,+BAAsB;AACnD,EAAE,gBAAgB;AAClB,EAAEC,qCAAkB;AACpB,EAAE,CAAC,OAAO,GAAe,EAAE,KAAK;AAChC,IAAI,OAAO;AACX,MAAM,gBAAgB,EAAE,OAAO,CAAC,gBAAA;AAChC,MAAM,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE;AAC9B,QAAQC,wBAAe,CAAC,IAAI,EAAE,oBAAoB,CAAC;;AAEnD,QAAQ,MAAM,aAAaC,eAAU,CAAC,IAAI,CAAC,CAAC,IAAI;;AAEhD;AACA,QAAQ,MAAM,IAAA,GAAO,UAAU,CAAC,UAAU,CAAC;AAC3C,QAAQ,IAAI,IAAI,EAAE;AAClB,UAAU,IAAI,CAAC,YAAY,CAACC,iCAA4B,EAAE,CAAC,EAAA,IAAA,CAAA,IAAA,CAAA,CAAA;AACA,QAAA;;AAEA;AACA,QAAA,MAAA,IAAA,GAAA,UAAA,CAAA,UAAA,CAAA;AACA,QAAA,IAAA,OAAA,IAAA,KAAA,QAAA,EAAA;AACA;AACA;AACA,UAAA,IAAA,CAAA,UAAA,CAAA,IAAA,IAAA,aAAA,CAAA;AACA,QAAA;;AAEA,QAAA,IAAAC,sBAAA,EAAA,KAAAC,6BAAA,EAAA,EAAA;AACA,UAAAC,sBAAA,IAAAC,UAAA,CAAA,IAAA,CAAA,+EAAA,CAAA;AACA,UAAA;AACA,QAAA;AACA,QAAA,MAAA,KAAA,GAAA,UAAA,CAAAC,mCAAA,CAAA;AACA;AACA,QAAA,MAAA,MAAA,GAAA,IAAA,CAAA,OAAA,EAAA,OAAA,EAAA,MAAA,EAAA,WAAA,EAAA,IAAA,KAAA;AACA,QAAA,IAAA,KAAA,EAAA;AACA,UAAAJ,sBAAA,EAAA,CAAA,kBAAA,CAAA,CAAA,EAAA,MAAA,CAAA,CAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AACA,QAAA;AACA,MAAA,CAAA;AACA,KAAA;AACA,EAAA,CAAA;AACA;;AAEA,MAAA,eAAA,IAAA,CAAA,OAAA,GAAA,EAAA,KAAA;AACA,EAAA,OAAA;AACA,IAAA,IAAA,EAAA,gBAAA;AACA,IAAA,SAAA,GAAA;AACA,MAAA,aAAA,CAAA,OAAA,CAAA;AACA,IAAA,CAAA;AACA,GAAA;AACA,CAAA,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,cAAA,GAAAK,sBAAA,CAAA,eAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,oBAAA,GAAA,CAAA,GAAA,KAAA;AACA,EAAA,GAAA,CAAA,GAAA,CAAA,OAAA,GAAA,EAAA,IAAA,KAAA;AACA,IAAA,IAAA;AACA,MAAA,MAAA,IAAA,EAAA;AACA,IAAA,CAAA,CAAA,OAAA,KAAA,EAAA;AACA,MAAAC,qBAAA,CAAA,KAAA,EAAA;AACA,QAAA,SAAA,EAAA;AACA,UAAA,OAAA,EAAA,KAAA;AACA,UAAA,IAAA,EAAA,qBAAA;AACA,SAAA;AACA,OAAA,CAAA;AACA,MAAA,MAAA,KAAA;AACA,IAAA;AACA,EAAA,CAAA,CAAA;;AAEA,EAAAC,wBAAA,CAAA,GAAA,CAAA,GAAA,EAAA,KAAA,CAAA;AACA;;;;;;"}
@@ -1,37 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const instrumentationLruMemoizer = require('@opentelemetry/instrumentation-lru-memoizer');
4
- const core = require('@sentry/core');
5
- const nodeCore = require('@sentry/node-core');
6
-
7
- const INTEGRATION_NAME = 'LruMemoizer';
8
-
9
- const instrumentLruMemoizer = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentationLruMemoizer.LruMemoizerInstrumentation());
10
-
11
- const _lruMemoizerIntegration = (() => {
12
- return {
13
- name: INTEGRATION_NAME,
14
- setupOnce() {
15
- instrumentLruMemoizer();
16
- },
17
- };
18
- }) ;
19
-
20
- /**
21
- * Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library.
22
- *
23
- * For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/).
24
- *
25
- * @example
26
- * ```javascript
27
- * const Sentry = require('@sentry/node');
28
- *
29
- * Sentry.init({
30
- * integrations: [Sentry.lruMemoizerIntegration()],
31
- * });
32
- */
33
- const lruMemoizerIntegration = core.defineIntegration(_lruMemoizerIntegration);
34
-
35
- exports.instrumentLruMemoizer = instrumentLruMemoizer;
36
- exports.lruMemoizerIntegration = lruMemoizerIntegration;
37
- //# sourceMappingURL=lrumemoizer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lrumemoizer.js","sources":["../../../../src/integrations/tracing/lrumemoizer.ts"],"sourcesContent":["import { LruMemoizerInstrumentation } from '@opentelemetry/instrumentation-lru-memoizer';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'LruMemoizer';\n\nexport const instrumentLruMemoizer = generateInstrumentOnce(INTEGRATION_NAME, () => new LruMemoizerInstrumentation());\n\nconst _lruMemoizerIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentLruMemoizer();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library.\n *\n * For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.lruMemoizerIntegration()],\n * });\n */\nexport const lruMemoizerIntegration = defineIntegration(_lruMemoizerIntegration);\n"],"names":["generateInstrumentOnce","LruMemoizerInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,aAAa;;AAE/B,MAAM,qBAAA,GAAwBA,+BAAsB,CAAC,gBAAgB,EAAE,MAAM,IAAIC,qDAA0B,EAAE;;AAEpH,MAAM,uBAAA,IAA2B,MAAM;AACvC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,qBAAqB,EAAE;AAC7B,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,sBAAA,GAAyBC,sBAAiB,CAAC,uBAAuB;;;;;"}
@@ -1,93 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const instrumentationMongodb = require('@opentelemetry/instrumentation-mongodb');
4
- const core = require('@sentry/core');
5
- const nodeCore = require('@sentry/node-core');
6
-
7
- const INTEGRATION_NAME = 'Mongo';
8
-
9
- const instrumentMongo = nodeCore.generateInstrumentOnce(
10
- INTEGRATION_NAME,
11
- () =>
12
- new instrumentationMongodb.MongoDBInstrumentation({
13
- dbStatementSerializer: _defaultDbStatementSerializer,
14
- responseHook(span) {
15
- nodeCore.addOriginToSpan(span, 'auto.db.otel.mongo');
16
- },
17
- }),
18
- );
19
-
20
- /**
21
- * Replaces values in document with '?', hiding PII and helping grouping.
22
- */
23
- function _defaultDbStatementSerializer(commandObj) {
24
- const resultObj = _scrubStatement(commandObj);
25
- return JSON.stringify(resultObj);
26
- }
27
-
28
- function _scrubStatement(value) {
29
- if (Array.isArray(value)) {
30
- return value.map(element => _scrubStatement(element));
31
- }
32
-
33
- if (isCommandObj(value)) {
34
- const initial = {};
35
- return Object.entries(value)
36
- .map(([key, element]) => [key, _scrubStatement(element)])
37
- .reduce((prev, current) => {
38
- if (isCommandEntry(current)) {
39
- prev[current[0]] = current[1];
40
- }
41
- return prev;
42
- }, initial);
43
- }
44
-
45
- // A value like string or number, possible contains PII, scrub it
46
- return '?';
47
- }
48
-
49
- function isCommandObj(value) {
50
- return typeof value === 'object' && value !== null && !isBuffer(value);
51
- }
52
-
53
- function isBuffer(value) {
54
- let isBuffer = false;
55
- if (typeof Buffer !== 'undefined') {
56
- isBuffer = Buffer.isBuffer(value);
57
- }
58
- return isBuffer;
59
- }
60
-
61
- function isCommandEntry(value) {
62
- return Array.isArray(value);
63
- }
64
-
65
- const _mongoIntegration = (() => {
66
- return {
67
- name: INTEGRATION_NAME,
68
- setupOnce() {
69
- instrumentMongo();
70
- },
71
- };
72
- }) ;
73
-
74
- /**
75
- * Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library.
76
- *
77
- * For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/).
78
- *
79
- * @example
80
- * ```javascript
81
- * const Sentry = require('@sentry/node');
82
- *
83
- * Sentry.init({
84
- * integrations: [Sentry.mongoIntegration()],
85
- * });
86
- * ```
87
- */
88
- const mongoIntegration = core.defineIntegration(_mongoIntegration);
89
-
90
- exports._defaultDbStatementSerializer = _defaultDbStatementSerializer;
91
- exports.instrumentMongo = instrumentMongo;
92
- exports.mongoIntegration = mongoIntegration;
93
- //# sourceMappingURL=mongo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo.js","sources":["../../../../src/integrations/tracing/mongo.ts"],"sourcesContent":["import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Mongo';\n\nexport const instrumentMongo = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new MongoDBInstrumentation({\n dbStatementSerializer: _defaultDbStatementSerializer,\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mongo');\n },\n }),\n);\n\n/**\n * Replaces values in document with '?', hiding PII and helping grouping.\n */\nexport function _defaultDbStatementSerializer(commandObj: Record<string, unknown>): string {\n const resultObj = _scrubStatement(commandObj);\n return JSON.stringify(resultObj);\n}\n\nfunction _scrubStatement(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.map(element => _scrubStatement(element));\n }\n\n if (isCommandObj(value)) {\n const initial: Record<string, unknown> = {};\n return Object.entries(value)\n .map(([key, element]) => [key, _scrubStatement(element)])\n .reduce((prev, current) => {\n if (isCommandEntry(current)) {\n prev[current[0]] = current[1];\n }\n return prev;\n }, initial);\n }\n\n // A value like string or number, possible contains PII, scrub it\n return '?';\n}\n\nfunction isCommandObj(value: Record<string, unknown> | unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !isBuffer(value);\n}\n\nfunction isBuffer(value: unknown): boolean {\n let isBuffer = false;\n if (typeof Buffer !== 'undefined') {\n isBuffer = Buffer.isBuffer(value);\n }\n return isBuffer;\n}\n\nfunction isCommandEntry(value: [string, unknown] | unknown): value is [string, unknown] {\n return Array.isArray(value);\n}\n\nconst _mongoIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMongo();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library.\n *\n * For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mongoIntegration()],\n * });\n * ```\n */\nexport const mongoIntegration = defineIntegration(_mongoIntegration);\n"],"names":["generateInstrumentOnce","MongoDBInstrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,OAAO;;AAEzB,MAAM,eAAA,GAAkBA,+BAAsB;AACrD,EAAE,gBAAgB;AAClB,EAAE;AACF,IAAI,IAAIC,6CAAsB,CAAC;AAC/B,MAAM,qBAAqB,EAAE,6BAA6B;AAC1D,MAAM,YAAY,CAAC,IAAI,EAAE;AACzB,QAAQC,wBAAe,CAAC,IAAI,EAAE,oBAAoB,CAAC;AACnD,MAAM,CAAC;AACP,KAAK,CAAC;AACN;;AAEA;AACA;AACA;AACO,SAAS,6BAA6B,CAAC,UAAU,EAAmC;AAC3F,EAAE,MAAM,SAAA,GAAY,eAAe,CAAC,UAAU,CAAC;AAC/C,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;AAClC;;AAEA,SAAS,eAAe,CAAC,KAAK,EAAoB;AAClD,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC5B,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,OAAA,IAAW,eAAe,CAAC,OAAO,CAAC,CAAC;AACzD,EAAE;;AAEF,EAAE,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;AAC3B,IAAI,MAAM,OAAO,GAA4B,EAAE;AAC/C,IAAI,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK;AAC/B,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;AAC9D,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK;AACjC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE;AACrC,UAAU,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,GAAI,OAAO,CAAC,CAAC,CAAC;AACvC,QAAQ;AACR,QAAQ,OAAO,IAAI;AACnB,MAAM,CAAC,EAAE,OAAO,CAAC;AACjB,EAAE;;AAEF;AACA,EAAE,OAAO,GAAG;AACZ;;AAEA,SAAS,YAAY,CAAC,KAAK,EAAuE;AAClG,EAAE,OAAO,OAAO,KAAA,KAAU,YAAY,KAAA,KAAU,IAAA,IAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;AACxE;;AAEA,SAAS,QAAQ,CAAC,KAAK,EAAoB;AAC3C,EAAE,IAAI,QAAA,GAAW,KAAK;AACtB,EAAE,IAAI,OAAO,MAAA,KAAW,WAAW,EAAE;AACrC,IAAI,WAAW,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;AACrC,EAAE;AACF,EAAE,OAAO,QAAQ;AACjB;;AAEA,SAAS,cAAc,CAAC,KAAK,EAA2D;AACxF,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAC7B;;AAEA,MAAM,iBAAA,IAAqB,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,eAAe,EAAE;AACvB,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,gBAAA,GAAmBC,sBAAiB,CAAC,iBAAiB;;;;;;"}