@sentry/node 10.53.0 → 10.54.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 (955) hide show
  1. package/build/cjs/debug-build.js +0 -5
  2. package/build/cjs/debug-build.js.map +1 -1
  3. package/build/cjs/index.js +68 -68
  4. package/build/cjs/init.js +0 -6
  5. package/build/cjs/init.js.map +1 -1
  6. package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
  7. package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
  8. package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
  9. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  10. package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
  11. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
  12. package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
  13. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
  14. package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
  15. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
  16. package/build/cjs/integrations/fs/index.js +107 -0
  17. package/build/cjs/integrations/fs/index.js.map +1 -0
  18. package/build/cjs/integrations/fs/vendored/constants.js +138 -0
  19. package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
  20. package/build/cjs/integrations/fs/vendored/instrumentation.js +311 -0
  21. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
  22. package/build/cjs/integrations/fs/vendored/utils.js +31 -0
  23. package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
  24. package/build/cjs/integrations/http.js +11 -37
  25. package/build/cjs/integrations/http.js.map +1 -1
  26. package/build/cjs/integrations/node-fetch/index.js +19 -46
  27. package/build/cjs/integrations/node-fetch/index.js.map +1 -1
  28. package/build/cjs/integrations/node-fetch/vendored/undici.js +71 -215
  29. package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
  30. package/build/cjs/integrations/tracing/amqplib/index.js +29 -0
  31. package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
  32. package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +452 -0
  33. package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
  34. package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +24 -0
  35. package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
  36. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +12 -0
  37. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  38. package/build/cjs/integrations/tracing/amqplib/vendored/types.js +23 -0
  39. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  40. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +137 -0
  41. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  42. package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
  43. package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
  44. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +16 -39
  45. package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  46. package/build/cjs/integrations/tracing/connect/index.js +56 -0
  47. package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
  48. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +22 -0
  49. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  50. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +148 -0
  51. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  52. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
  53. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  54. package/build/cjs/integrations/tracing/connect/vendored/utils.js +35 -0
  55. package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
  56. package/build/cjs/integrations/tracing/dataloader/index.js +41 -0
  57. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
  58. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +245 -0
  59. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  60. package/build/cjs/integrations/tracing/express.js +15 -23
  61. package/build/cjs/integrations/tracing/express.js.map +1 -1
  62. package/build/cjs/integrations/tracing/fastify/index.js +46 -165
  63. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  64. package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
  65. package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
  66. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
  67. package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  68. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +68 -150
  69. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  70. package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
  71. package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
  72. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js +388 -0
  73. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
  74. package/build/cjs/integrations/tracing/firebase/firebase.js +15 -21
  75. package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
  76. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
  77. package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  78. package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
  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 +81 -147
  81. package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  82. package/build/cjs/integrations/tracing/genericPool/index.js +35 -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 +18 -39
  89. package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  90. package/build/cjs/integrations/tracing/graphql/index.js +83 -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 +17 -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 +318 -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 +300 -0
  103. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  104. package/build/cjs/integrations/tracing/hapi/index.js +20 -78
  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 +275 -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/semconv.js +6 -0
  113. package/build/cjs/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
  114. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +91 -0
  115. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  116. package/build/cjs/integrations/tracing/hono/constants.js +6 -7
  117. package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
  118. package/build/cjs/integrations/tracing/hono/index.js +19 -70
  119. package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
  120. package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
  121. package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
  122. package/build/cjs/integrations/tracing/index.js +74 -82
  123. package/build/cjs/integrations/tracing/index.js.map +1 -1
  124. package/build/cjs/integrations/tracing/kafka/index.js +31 -0
  125. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
  126. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +438 -0
  127. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  128. package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js +6 -0
  129. package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
  130. package/build/cjs/integrations/tracing/kafka/vendored/propagator.js +22 -0
  131. package/build/cjs/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
  132. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +38 -0
  133. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  134. package/build/cjs/integrations/tracing/knex/index.js +36 -0
  135. package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
  136. package/build/cjs/integrations/tracing/knex/vendored/constants.js +16 -0
  137. package/build/cjs/integrations/tracing/knex/vendored/constants.js.map +1 -0
  138. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +162 -0
  139. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  140. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +24 -0
  141. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  142. package/build/cjs/integrations/tracing/knex/vendored/utils.js +97 -0
  143. package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
  144. package/build/cjs/integrations/tracing/koa/index.js +69 -0
  145. package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
  146. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
  147. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  148. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +140 -0
  149. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  150. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
  151. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  152. package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
  153. package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
  154. package/build/cjs/integrations/tracing/koa/vendored/utils.js +33 -0
  155. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
  156. package/build/cjs/integrations/tracing/langchain/index.js +3 -97
  157. package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
  158. package/build/cjs/integrations/tracing/langchain/instrumentation.js +51 -146
  159. package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
  160. package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
  161. package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
  162. package/build/cjs/integrations/tracing/langgraph/instrumentation.js +27 -38
  163. package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  164. package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
  165. package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
  166. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +39 -0
  167. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  168. package/build/cjs/integrations/tracing/mongo/index.js +62 -0
  169. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
  170. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +678 -0
  171. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  172. package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js +14 -0
  173. package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
  174. package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +26 -0
  175. package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
  176. package/build/cjs/integrations/tracing/mongoose/index.js +28 -0
  177. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
  178. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +375 -0
  179. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  180. package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +22 -0
  181. package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
  182. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +87 -0
  183. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  184. package/build/cjs/integrations/tracing/mysql/index.js +21 -0
  185. package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
  186. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js +9 -0
  187. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
  188. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +278 -0
  189. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  190. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +22 -0
  191. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  192. package/build/cjs/integrations/tracing/mysql/vendored/utils.js +63 -0
  193. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  194. package/build/cjs/integrations/tracing/mysql2/index.js +28 -0
  195. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
  196. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +173 -0
  197. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  198. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +20 -0
  199. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  200. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +97 -0
  201. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  202. package/build/cjs/integrations/tracing/openai/index.js +3 -58
  203. package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
  204. package/build/cjs/integrations/tracing/openai/instrumentation.js +17 -41
  205. package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
  206. package/build/cjs/integrations/tracing/postgres/index.js +31 -0
  207. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
  208. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +12 -0
  209. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  210. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
  211. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  212. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +436 -0
  213. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  214. package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js +6 -0
  215. package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
  216. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +32 -0
  217. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  218. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +275 -0
  219. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  220. package/build/cjs/integrations/tracing/postgresjs.js +66 -181
  221. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  222. package/build/cjs/integrations/tracing/prisma/index.js +123 -0
  223. package/build/cjs/integrations/tracing/prisma/index.js.map +1 -0
  224. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +119 -0
  225. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
  226. package/build/cjs/integrations/tracing/prisma/vendored/constants.js +14 -0
  227. package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -0
  228. package/build/cjs/integrations/tracing/prisma/vendored/global.js +28 -0
  229. package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -0
  230. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +38 -0
  231. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
  232. package/build/cjs/integrations/tracing/redis/index.js +15 -72
  233. package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
  234. package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
  235. package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
  236. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
  237. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  238. package/build/cjs/integrations/tracing/redis/vendored/redis-common.js +9 -49
  239. package/build/cjs/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
  240. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
  241. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  242. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +7 -36
  243. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -1
  244. package/build/cjs/integrations/tracing/tedious/index.js +45 -0
  245. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
  246. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +205 -0
  247. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  248. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +20 -0
  249. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  250. package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
  251. package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  252. package/build/cjs/integrations/tracing/utils/sql-common.js +43 -0
  253. package/build/cjs/integrations/tracing/utils/sql-common.js.map +1 -0
  254. package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
  255. package/build/cjs/integrations/tracing/vercelai/index.js +3 -50
  256. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  257. package/build/cjs/integrations/tracing/vercelai/instrumentation.js +58 -157
  258. package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  259. package/build/cjs/preload.js +1 -14
  260. package/build/cjs/preload.js.map +1 -1
  261. package/build/cjs/sdk/index.js +6 -34
  262. package/build/cjs/sdk/index.js.map +1 -1
  263. package/build/cjs/sdk/initOtel.js +13 -51
  264. package/build/cjs/sdk/initOtel.js.map +1 -1
  265. package/build/cjs/utils/redisCache.js +24 -52
  266. package/build/cjs/utils/redisCache.js.map +1 -1
  267. package/build/esm/debug-build.js +0 -5
  268. package/build/esm/debug-build.js.map +1 -1
  269. package/build/esm/index.js +17 -17
  270. package/build/esm/init.js +0 -6
  271. package/build/esm/init.js.map +1 -1
  272. package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
  273. package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
  274. package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
  275. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
  276. package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
  277. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
  278. package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
  279. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
  280. package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
  281. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
  282. package/build/esm/integrations/fs/index.js +105 -0
  283. package/build/esm/integrations/fs/index.js.map +1 -0
  284. package/build/esm/integrations/fs/vendored/constants.js +134 -0
  285. package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
  286. package/build/esm/integrations/fs/vendored/instrumentation.js +309 -0
  287. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
  288. package/build/esm/integrations/fs/vendored/utils.js +28 -0
  289. package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
  290. package/build/esm/integrations/http.js +11 -37
  291. package/build/esm/integrations/http.js.map +1 -1
  292. package/build/esm/integrations/node-fetch/index.js +19 -46
  293. package/build/esm/integrations/node-fetch/index.js.map +1 -1
  294. package/build/esm/integrations/node-fetch/vendored/undici.js +71 -215
  295. package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
  296. package/build/esm/integrations/tracing/amqplib/index.js +26 -0
  297. package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
  298. package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +450 -0
  299. package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
  300. package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +13 -0
  301. package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
  302. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +7 -0
  303. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
  304. package/build/esm/integrations/tracing/amqplib/vendored/types.js +20 -0
  305. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
  306. package/build/esm/integrations/tracing/amqplib/vendored/utils.js +126 -0
  307. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
  308. package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
  309. package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
  310. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +16 -39
  311. package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
  312. package/build/esm/integrations/tracing/connect/index.js +52 -0
  313. package/build/esm/integrations/tracing/connect/index.js.map +1 -0
  314. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +18 -0
  315. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
  316. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +145 -0
  317. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
  318. package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
  319. package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
  320. package/build/esm/integrations/tracing/connect/vendored/utils.js +31 -0
  321. package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
  322. package/build/esm/integrations/tracing/dataloader/index.js +38 -0
  323. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
  324. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +243 -0
  325. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
  326. package/build/esm/integrations/tracing/express.js +15 -23
  327. package/build/esm/integrations/tracing/express.js.map +1 -1
  328. package/build/esm/integrations/tracing/fastify/index.js +45 -164
  329. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  330. package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
  331. package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
  332. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
  333. package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
  334. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +68 -150
  335. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  336. package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
  337. package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
  338. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js +386 -0
  339. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
  340. package/build/esm/integrations/tracing/firebase/firebase.js +15 -21
  341. package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
  342. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
  343. package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
  344. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
  345. package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
  346. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +81 -147
  347. package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
  348. package/build/esm/integrations/tracing/genericPool/index.js +32 -0
  349. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
  350. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
  351. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
  352. package/build/esm/integrations/tracing/google-genai/index.js +3 -58
  353. package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
  354. package/build/esm/integrations/tracing/google-genai/instrumentation.js +18 -39
  355. package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
  356. package/build/esm/integrations/tracing/graphql/index.js +80 -0
  357. package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
  358. package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
  359. package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
  360. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
  361. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
  362. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +316 -0
  363. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
  364. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
  365. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
  366. package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
  367. package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
  368. package/build/esm/integrations/tracing/graphql/vendored/utils.js +291 -0
  369. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
  370. package/build/esm/integrations/tracing/hapi/index.js +19 -77
  371. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  372. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
  373. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
  374. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +273 -0
  375. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
  376. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
  377. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
  378. package/build/esm/integrations/tracing/hapi/vendored/semconv.js +4 -0
  379. package/build/esm/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
  380. package/build/esm/integrations/tracing/hapi/vendored/utils.js +82 -0
  381. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
  382. package/build/esm/integrations/tracing/hono/constants.js +6 -7
  383. package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
  384. package/build/esm/integrations/tracing/hono/index.js +19 -70
  385. package/build/esm/integrations/tracing/hono/index.js.map +1 -1
  386. package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
  387. package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
  388. package/build/esm/integrations/tracing/index.js +16 -24
  389. package/build/esm/integrations/tracing/index.js.map +1 -1
  390. package/build/esm/integrations/tracing/kafka/index.js +28 -0
  391. package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
  392. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +436 -0
  393. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
  394. package/build/esm/integrations/tracing/kafka/vendored/internal-types.js +4 -0
  395. package/build/esm/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
  396. package/build/esm/integrations/tracing/kafka/vendored/propagator.js +20 -0
  397. package/build/esm/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
  398. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +20 -0
  399. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
  400. package/build/esm/integrations/tracing/knex/index.js +33 -0
  401. package/build/esm/integrations/tracing/knex/index.js.map +1 -0
  402. package/build/esm/integrations/tracing/knex/vendored/constants.js +13 -0
  403. package/build/esm/integrations/tracing/knex/vendored/constants.js.map +1 -0
  404. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +160 -0
  405. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
  406. package/build/esm/integrations/tracing/knex/vendored/semconv.js +13 -0
  407. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
  408. package/build/esm/integrations/tracing/knex/vendored/utils.js +87 -0
  409. package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
  410. package/build/esm/integrations/tracing/koa/index.js +65 -0
  411. package/build/esm/integrations/tracing/koa/index.js.map +1 -0
  412. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
  413. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
  414. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +138 -0
  415. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
  416. package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
  417. package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
  418. package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
  419. package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
  420. package/build/esm/integrations/tracing/koa/vendored/utils.js +30 -0
  421. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
  422. package/build/esm/integrations/tracing/langchain/index.js +3 -97
  423. package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
  424. package/build/esm/integrations/tracing/langchain/instrumentation.js +52 -147
  425. package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
  426. package/build/esm/integrations/tracing/langgraph/index.js +3 -73
  427. package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
  428. package/build/esm/integrations/tracing/langgraph/instrumentation.js +27 -38
  429. package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
  430. package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
  431. package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
  432. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +37 -0
  433. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
  434. package/build/esm/integrations/tracing/mongo/index.js +58 -0
  435. package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
  436. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +676 -0
  437. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
  438. package/build/esm/integrations/tracing/mongo/vendored/internal-types.js +12 -0
  439. package/build/esm/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
  440. package/build/esm/integrations/tracing/mongo/vendored/semconv.js +14 -0
  441. package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
  442. package/build/esm/integrations/tracing/mongoose/index.js +25 -0
  443. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
  444. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +371 -0
  445. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
  446. package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +12 -0
  447. package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
  448. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +83 -0
  449. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
  450. package/build/esm/integrations/tracing/mysql/index.js +18 -0
  451. package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
  452. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js +7 -0
  453. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
  454. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +276 -0
  455. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
  456. package/build/esm/integrations/tracing/mysql/vendored/semconv.js +12 -0
  457. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
  458. package/build/esm/integrations/tracing/mysql/vendored/utils.js +55 -0
  459. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
  460. package/build/esm/integrations/tracing/mysql2/index.js +25 -0
  461. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
  462. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +171 -0
  463. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
  464. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +11 -0
  465. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
  466. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +91 -0
  467. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
  468. package/build/esm/integrations/tracing/openai/index.js +3 -58
  469. package/build/esm/integrations/tracing/openai/index.js.map +1 -1
  470. package/build/esm/integrations/tracing/openai/instrumentation.js +17 -41
  471. package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
  472. package/build/esm/integrations/tracing/postgres/index.js +28 -0
  473. package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
  474. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +10 -0
  475. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
  476. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
  477. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
  478. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +434 -0
  479. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
  480. package/build/esm/integrations/tracing/postgres/vendored/internal-types.js +4 -0
  481. package/build/esm/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
  482. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +17 -0
  483. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
  484. package/build/esm/integrations/tracing/postgres/vendored/utils.js +257 -0
  485. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
  486. package/build/esm/integrations/tracing/postgresjs.js +66 -181
  487. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  488. package/build/esm/integrations/tracing/prisma/index.js +120 -0
  489. package/build/esm/integrations/tracing/prisma/index.js.map +1 -0
  490. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +117 -0
  491. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
  492. package/build/esm/integrations/tracing/prisma/vendored/constants.js +9 -0
  493. package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -0
  494. package/build/esm/integrations/tracing/prisma/vendored/global.js +24 -0
  495. package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -0
  496. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +36 -0
  497. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
  498. package/build/esm/integrations/tracing/redis/index.js +15 -72
  499. package/build/esm/integrations/tracing/redis/index.js.map +1 -1
  500. package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
  501. package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
  502. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
  503. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  504. package/build/esm/integrations/tracing/redis/vendored/redis-common.js +9 -49
  505. package/build/esm/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
  506. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
  507. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  508. package/build/esm/integrations/tracing/redis/vendored/semconv.js +7 -36
  509. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -1
  510. package/build/esm/integrations/tracing/tedious/index.js +42 -0
  511. package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
  512. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +202 -0
  513. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
  514. package/build/esm/integrations/tracing/tedious/vendored/semconv.js +11 -0
  515. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
  516. package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
  517. package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
  518. package/build/esm/integrations/tracing/utils/sql-common.js +41 -0
  519. package/build/esm/integrations/tracing/utils/sql-common.js.map +1 -0
  520. package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
  521. package/build/esm/integrations/tracing/vercelai/index.js +3 -50
  522. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  523. package/build/esm/integrations/tracing/vercelai/instrumentation.js +58 -157
  524. package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
  525. package/build/esm/package.json +1 -1
  526. package/build/esm/preload.js +1 -14
  527. package/build/esm/preload.js.map +1 -1
  528. package/build/esm/sdk/index.js +6 -34
  529. package/build/esm/sdk/index.js.map +1 -1
  530. package/build/esm/sdk/initOtel.js +13 -51
  531. package/build/esm/sdk/initOtel.js.map +1 -1
  532. package/build/esm/utils/redisCache.js +24 -52
  533. package/build/esm/utils/redisCache.js.map +1 -1
  534. package/build/types/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
  535. package/build/types/integrations/fs/index.d.ts.map +1 -0
  536. package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
  537. package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
  538. package/build/types/integrations/fs/vendored/instrumentation.d.ts +15 -0
  539. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
  540. package/build/types/integrations/fs/vendored/types.d.ts +29 -0
  541. package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
  542. package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
  543. package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
  544. package/build/{types-ts3.8/integrations/tracing/amqplib.d.ts → types/integrations/tracing/amqplib/index.d.ts} +20 -20
  545. package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
  546. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  547. package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
  548. package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts +26 -0
  549. package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +1 -0
  550. package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
  551. package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +1 -0
  552. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
  553. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
  554. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
  555. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
  556. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
  557. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
  558. package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
  559. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
  560. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -0
  561. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
  562. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  563. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
  564. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
  565. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
  566. package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  567. package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
  568. package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +2 -2
  569. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
  570. package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
  571. package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts.map +1 -0
  572. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
  573. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
  574. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
  575. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
  576. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
  577. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +1 -0
  578. package/build/{types-ts3.8/integrations/tracing/genericPool.d.ts → types/integrations/tracing/genericPool/index.d.ts} +20 -20
  579. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
  580. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  581. package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
  582. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +10 -0
  583. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
  584. package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
  585. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
  586. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  587. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
  588. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +12 -0
  589. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
  590. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +136 -0
  591. package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
  592. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +20 -0
  593. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
  594. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  595. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
  596. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  597. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
  598. package/build/types/integrations/tracing/graphql/vendored/types.d.ts +71 -0
  599. package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
  600. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
  601. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
  602. package/build/types/integrations/tracing/hapi/index.d.ts +1 -1
  603. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  604. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  605. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
  606. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  607. package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
  608. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  609. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
  610. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  611. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
  612. package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts +13 -0
  613. package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts.map +1 -0
  614. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
  615. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
  616. package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
  617. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
  618. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
  619. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
  620. package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
  621. package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts.map +1 -0
  622. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
  623. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
  624. package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
  625. package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts.map +1 -0
  626. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
  627. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
  628. package/build/types/integrations/tracing/kafka/vendored/types.d.ts +26 -0
  629. package/build/types/integrations/tracing/kafka/vendored/types.d.ts.map +1 -0
  630. package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
  631. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
  632. package/build/types/integrations/tracing/knex/vendored/constants.d.ts +3 -0
  633. package/build/types/integrations/tracing/knex/vendored/constants.d.ts.map +1 -0
  634. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
  635. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
  636. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
  637. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
  638. package/build/types/integrations/tracing/knex/vendored/types.d.ts +8 -0
  639. package/build/types/integrations/tracing/knex/vendored/types.d.ts.map +1 -0
  640. package/build/types/integrations/tracing/knex/vendored/utils.d.ts +15 -0
  641. package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
  642. package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +2 -2
  643. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
  644. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  645. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
  646. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  647. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
  648. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  649. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
  650. package/build/types/integrations/tracing/koa/vendored/types.d.ts +50 -0
  651. package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
  652. package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  653. package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
  654. package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
  655. package/build/{types-ts3.8/integrations/tracing/lrumemoizer.d.ts → types/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
  656. package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
  657. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  658. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
  659. package/build/types/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
  660. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
  661. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -0
  662. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
  663. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +121 -0
  664. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
  665. package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
  666. package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +1 -0
  667. package/build/types/integrations/tracing/mongo/vendored/types.d.ts +51 -0
  668. package/build/types/integrations/tracing/mongo/vendored/types.d.ts.map +1 -0
  669. package/build/{types-ts3.8/integrations/tracing/mongoose.d.ts → types/integrations/tracing/mongoose/index.d.ts} +20 -20
  670. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
  671. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -0
  672. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
  673. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +24 -0
  674. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
  675. package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
  676. package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +1 -0
  677. package/build/types/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
  678. package/build/types/integrations/tracing/mongoose/vendored/types.d.ts.map +1 -0
  679. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +8 -0
  680. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
  681. package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +2 -2
  682. package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
  683. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
  684. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +1 -0
  685. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -0
  686. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
  687. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  688. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
  689. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +88 -0
  690. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
  691. package/build/types/integrations/tracing/mysql/vendored/types.d.ts +9 -0
  692. package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +1 -0
  693. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +25 -0
  694. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
  695. package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +2 -2
  696. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
  697. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -0
  698. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
  699. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  700. package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
  701. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +9 -0
  702. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
  703. package/build/types/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
  704. package/build/types/integrations/tracing/mysql2/vendored/types.d.ts.map +1 -0
  705. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
  706. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
  707. package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
  708. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
  709. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -0
  710. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
  711. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  712. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
  713. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +20 -0
  714. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
  715. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +35 -0
  716. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
  717. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  718. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
  719. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  720. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
  721. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +112 -0
  722. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
  723. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +65 -0
  724. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
  725. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
  726. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
  727. package/build/types/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
  728. package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -0
  729. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
  730. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -0
  731. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
  732. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -0
  733. package/build/types/integrations/tracing/prisma/vendored/global.d.ts +5 -0
  734. package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -0
  735. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
  736. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -0
  737. package/build/types/integrations/tracing/prisma/vendored/types.d.ts +52 -0
  738. package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -0
  739. package/build/types/integrations/tracing/prisma/vendored/v5-tracing-helper.d.ts.map +1 -0
  740. package/build/types/integrations/tracing/prisma/vendored/v6-tracing-helper.d.ts.map +1 -0
  741. package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
  742. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
  743. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
  744. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
  745. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +80 -0
  746. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
  747. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  748. package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
  749. package/build/types/integrations/tracing/tedious/vendored/types.d.ts +10 -0
  750. package/build/types/integrations/tracing/tedious/vendored/types.d.ts.map +1 -0
  751. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  752. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
  753. package/build/types/integrations/tracing/utils/sql-common.d.ts +3 -0
  754. package/build/types/integrations/tracing/utils/sql-common.d.ts.map +1 -0
  755. package/build/types-ts3.8/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
  756. package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
  757. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +15 -0
  758. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +29 -0
  759. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
  760. package/build/{types/integrations/tracing/amqplib.d.ts → types-ts3.8/integrations/tracing/amqplib/index.d.ts} +20 -20
  761. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
  762. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +26 -0
  763. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
  764. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
  765. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
  766. package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
  767. package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
  768. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -0
  769. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
  770. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
  771. package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
  772. package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +2 -2
  773. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
  774. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
  775. package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
  776. package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
  777. package/build/{types/integrations/tracing/genericPool.d.ts → types-ts3.8/integrations/tracing/genericPool/index.d.ts} +20 -20
  778. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
  779. package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +10 -0
  780. package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
  781. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
  782. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +12 -0
  783. package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +136 -0
  784. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +20 -0
  785. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
  786. package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
  787. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +71 -0
  788. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
  789. package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +1 -1
  790. package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
  791. package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
  792. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
  793. package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
  794. package/build/types-ts3.8/integrations/tracing/hapi/vendored/semconv.d.ts +13 -0
  795. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
  796. package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
  797. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
  798. package/build/types-ts3.8/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
  799. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
  800. package/build/types-ts3.8/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
  801. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
  802. package/build/types-ts3.8/integrations/tracing/kafka/vendored/types.d.ts +26 -0
  803. package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
  804. package/build/types-ts3.8/integrations/tracing/knex/vendored/constants.d.ts +3 -0
  805. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
  806. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
  807. package/build/types-ts3.8/integrations/tracing/knex/vendored/types.d.ts +8 -0
  808. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +15 -0
  809. package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +2 -2
  810. package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
  811. package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
  812. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
  813. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +50 -0
  814. package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
  815. package/build/{types/integrations/tracing/lrumemoizer.d.ts → types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
  816. package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
  817. package/build/types-ts3.8/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
  818. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -0
  819. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +121 -0
  820. package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
  821. package/build/types-ts3.8/integrations/tracing/mongo/vendored/types.d.ts +51 -0
  822. package/build/{types/integrations/tracing/mongoose.d.ts → types-ts3.8/integrations/tracing/mongoose/index.d.ts} +20 -20
  823. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -0
  824. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +24 -0
  825. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
  826. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
  827. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +8 -0
  828. package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +2 -2
  829. package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
  830. package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -0
  831. package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
  832. package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +88 -0
  833. package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +9 -0
  834. package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +25 -0
  835. package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +2 -2
  836. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -0
  837. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
  838. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +9 -0
  839. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
  840. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
  841. package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
  842. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -0
  843. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
  844. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +20 -0
  845. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +35 -0
  846. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
  847. package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
  848. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +112 -0
  849. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +65 -0
  850. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
  851. package/build/types-ts3.8/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
  852. package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
  853. package/build/types-ts3.8/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
  854. package/build/types-ts3.8/integrations/tracing/prisma/vendored/global.d.ts +5 -0
  855. package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
  856. package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +55 -0
  857. package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
  858. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
  859. package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +80 -0
  860. package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
  861. package/build/types-ts3.8/integrations/tracing/tedious/vendored/types.d.ts +10 -0
  862. package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
  863. package/build/types-ts3.8/integrations/tracing/utils/sql-common.d.ts +3 -0
  864. package/package.json +4 -24
  865. package/build/cjs/integrations/fs.js +0 -142
  866. package/build/cjs/integrations/fs.js.map +0 -1
  867. package/build/cjs/integrations/tracing/amqplib.js +0 -47
  868. package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
  869. package/build/cjs/integrations/tracing/connect.js +0 -110
  870. package/build/cjs/integrations/tracing/connect.js.map +0 -1
  871. package/build/cjs/integrations/tracing/dataloader.js +0 -72
  872. package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
  873. package/build/cjs/integrations/tracing/genericPool.js +0 -59
  874. package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
  875. package/build/cjs/integrations/tracing/graphql.js +0 -127
  876. package/build/cjs/integrations/tracing/graphql.js.map +0 -1
  877. package/build/cjs/integrations/tracing/kafka.js +0 -48
  878. package/build/cjs/integrations/tracing/kafka.js.map +0 -1
  879. package/build/cjs/integrations/tracing/knex.js +0 -57
  880. package/build/cjs/integrations/tracing/knex.js.map +0 -1
  881. package/build/cjs/integrations/tracing/koa.js +0 -138
  882. package/build/cjs/integrations/tracing/koa.js.map +0 -1
  883. package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
  884. package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
  885. package/build/cjs/integrations/tracing/mongo.js +0 -93
  886. package/build/cjs/integrations/tracing/mongo.js.map +0 -1
  887. package/build/cjs/integrations/tracing/mongoose.js +0 -46
  888. package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
  889. package/build/cjs/integrations/tracing/mysql.js +0 -38
  890. package/build/cjs/integrations/tracing/mysql.js.map +0 -1
  891. package/build/cjs/integrations/tracing/mysql2.js +0 -46
  892. package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
  893. package/build/cjs/integrations/tracing/postgres.js +0 -48
  894. package/build/cjs/integrations/tracing/postgres.js.map +0 -1
  895. package/build/cjs/integrations/tracing/prisma.js +0 -207
  896. package/build/cjs/integrations/tracing/prisma.js.map +0 -1
  897. package/build/cjs/integrations/tracing/tedious.js +0 -67
  898. package/build/cjs/integrations/tracing/tedious.js.map +0 -1
  899. package/build/esm/integrations/fs.js +0 -140
  900. package/build/esm/integrations/fs.js.map +0 -1
  901. package/build/esm/integrations/tracing/amqplib.js +0 -44
  902. package/build/esm/integrations/tracing/amqplib.js.map +0 -1
  903. package/build/esm/integrations/tracing/connect.js +0 -106
  904. package/build/esm/integrations/tracing/connect.js.map +0 -1
  905. package/build/esm/integrations/tracing/dataloader.js +0 -69
  906. package/build/esm/integrations/tracing/dataloader.js.map +0 -1
  907. package/build/esm/integrations/tracing/genericPool.js +0 -56
  908. package/build/esm/integrations/tracing/genericPool.js.map +0 -1
  909. package/build/esm/integrations/tracing/graphql.js +0 -124
  910. package/build/esm/integrations/tracing/graphql.js.map +0 -1
  911. package/build/esm/integrations/tracing/kafka.js +0 -45
  912. package/build/esm/integrations/tracing/kafka.js.map +0 -1
  913. package/build/esm/integrations/tracing/knex.js +0 -54
  914. package/build/esm/integrations/tracing/knex.js.map +0 -1
  915. package/build/esm/integrations/tracing/koa.js +0 -134
  916. package/build/esm/integrations/tracing/koa.js.map +0 -1
  917. package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
  918. package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
  919. package/build/esm/integrations/tracing/mongo.js +0 -89
  920. package/build/esm/integrations/tracing/mongo.js.map +0 -1
  921. package/build/esm/integrations/tracing/mongoose.js +0 -43
  922. package/build/esm/integrations/tracing/mongoose.js.map +0 -1
  923. package/build/esm/integrations/tracing/mysql.js +0 -35
  924. package/build/esm/integrations/tracing/mysql.js.map +0 -1
  925. package/build/esm/integrations/tracing/mysql2.js +0 -43
  926. package/build/esm/integrations/tracing/mysql2.js.map +0 -1
  927. package/build/esm/integrations/tracing/postgres.js +0 -45
  928. package/build/esm/integrations/tracing/postgres.js.map +0 -1
  929. package/build/esm/integrations/tracing/prisma.js +0 -204
  930. package/build/esm/integrations/tracing/prisma.js.map +0 -1
  931. package/build/esm/integrations/tracing/tedious.js +0 -64
  932. package/build/esm/integrations/tracing/tedious.js.map +0 -1
  933. package/build/types/integrations/fs.d.ts.map +0 -1
  934. package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
  935. package/build/types/integrations/tracing/connect.d.ts.map +0 -1
  936. package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
  937. package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
  938. package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
  939. package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
  940. package/build/types/integrations/tracing/knex.d.ts.map +0 -1
  941. package/build/types/integrations/tracing/koa.d.ts.map +0 -1
  942. package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
  943. package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
  944. package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
  945. package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
  946. package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
  947. package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
  948. package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
  949. package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
  950. package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
  951. package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
  952. /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
  953. /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
  954. /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
  955. /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"redis-instrumentation.js","sources":["../../../../../../src/integrations/tracing/redis/vendored/redis-instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/instrumentation-redis-v0.62.0/packages/instrumentation-redis\n * - Upstream version: @opentelemetry/instrumentation-redis@0.62.0\n * - Minor TypeScript adjustments for this repository's compiler settings\n */\n/* eslint-disable -- vendored @opentelemetry/instrumentation-redis */\n\nimport { context, SpanKind, SpanStatusCode, trace } from '@opentelemetry/api';\nimport type { DiagLogger, Span, TracerProvider } from '@opentelemetry/api';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport {\n ATTR_DB_OPERATION_NAME,\n ATTR_DB_QUERY_TEXT,\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from '@opentelemetry/semantic-conventions';\n\nimport { defaultDbStatementSerializer } from './redis-common';\nimport {\n ATTR_DB_CONNECTION_STRING,\n ATTR_DB_STATEMENT,\n ATTR_DB_SYSTEM,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\n DB_SYSTEM_NAME_VALUE_REDIS,\n DB_SYSTEM_VALUE_REDIS,\n} from './semconv';\nimport type { RedisInstrumentationConfig } from './types';\n\nconst PACKAGE_NAME = '@opentelemetry/instrumentation-redis';\nconst PACKAGE_VERSION = '0.62.0';\n\n// ---- Internal types ----\n\ninterface RedisPluginClientTypes {\n connection_options?: {\n port?: string | number;\n host?: string;\n };\n address?: string;\n}\n\ninterface RedisCommand {\n command: string;\n args: string[];\n buffer_args: boolean;\n callback: (err: Error | null, reply: unknown) => void;\n call_on_write: boolean;\n}\n\ninterface MultiErrorReply extends Error {\n replies: unknown[];\n errorIndexes: Array<number>;\n}\n\ninterface OpenSpanInfo {\n span: Span;\n commandName: string;\n commandArgs: Array<string | Buffer>;\n}\n\nconst OTEL_OPEN_SPANS = Symbol('opentelemetry.instrumentation.redis.open_spans');\nconst MULTI_COMMAND_OPTIONS = Symbol('opentelemetry.instrumentation.redis.multi_command_options');\n\n// ---- v4-v5 utils ----\n\nfunction removeCredentialsFromDBConnectionStringAttribute(\n diagLogger: DiagLogger,\n url: string | undefined,\n): string | undefined {\n if (typeof url !== 'string' || !url) {\n return undefined;\n }\n try {\n const u = new URL(url);\n u.searchParams.delete('user_pwd');\n u.username = '';\n u.password = '';\n return u.href;\n } catch (err) {\n diagLogger.error('failed to sanitize redis connection url', err);\n }\n return undefined;\n}\n\nfunction getClientAttributes(\n diagLogger: DiagLogger,\n options: any,\n semconvStability: SemconvStability,\n): Record<string, any> {\n const attributes: Record<string, any> = {};\n if (semconvStability & SemconvStability.OLD) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,\n [ATTR_NET_PEER_NAME]: options?.socket?.host,\n [ATTR_NET_PEER_PORT]: options?.socket?.port,\n [ATTR_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(diagLogger, options?.url),\n });\n }\n if (semconvStability & SemconvStability.STABLE) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM_NAME]: DB_SYSTEM_NAME_VALUE_REDIS,\n [ATTR_SERVER_ADDRESS]: options?.socket?.host,\n [ATTR_SERVER_PORT]: options?.socket?.port,\n });\n }\n return attributes;\n}\n\n// ---- v2-v3 utils ----\n\nfunction endSpanV2(span: Span, err: Error | null | undefined): void {\n if (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n }\n span.end();\n}\n\nfunction getTracedCreateClient(original: Function): Function {\n return function createClientTrace(this: any) {\n const client = original.apply(this, arguments);\n return context.bind(context.active(), client);\n };\n}\n\nfunction getTracedCreateStreamTrace(original: Function): Function {\n return function create_stream_trace(this: any) {\n if (!Object.prototype.hasOwnProperty.call(this, 'stream')) {\n Object.defineProperty(this, 'stream', {\n get() {\n return this._patched_redis_stream;\n },\n set(val: any) {\n context.bind(context.active(), val);\n this._patched_redis_stream = val;\n },\n });\n }\n return original.apply(this, arguments);\n };\n}\n\n// ---- RedisInstrumentationV2_V3 ----\n\nclass RedisInstrumentationV2_V3 extends InstrumentationBase<RedisInstrumentationConfig> {\n static COMPONENT = 'redis';\n _semconvStability: SemconvStability;\n\n constructor(config: RedisInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n override setConfig(config: RedisInstrumentationConfig = {}): void {\n super.setConfig(config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n init() {\n return [\n new InstrumentationNodeModuleDefinition(\n 'redis',\n ['>=2.6.0 <4'],\n (moduleExports: any) => {\n if (isWrapped(moduleExports.RedisClient.prototype['internal_send_command'])) {\n this._unwrap(moduleExports.RedisClient.prototype, 'internal_send_command');\n }\n this._wrap(moduleExports.RedisClient.prototype, 'internal_send_command', this._getPatchInternalSendCommand());\n if (isWrapped(moduleExports.RedisClient.prototype['create_stream'])) {\n this._unwrap(moduleExports.RedisClient.prototype, 'create_stream');\n }\n this._wrap(moduleExports.RedisClient.prototype, 'create_stream', this._getPatchCreateStream());\n if (isWrapped(moduleExports.createClient)) {\n this._unwrap(moduleExports, 'createClient');\n }\n this._wrap(moduleExports, 'createClient', this._getPatchCreateClient());\n return moduleExports;\n },\n (moduleExports: any) => {\n if (moduleExports === undefined) return;\n this._unwrap(moduleExports.RedisClient.prototype, 'internal_send_command');\n this._unwrap(moduleExports.RedisClient.prototype, 'create_stream');\n this._unwrap(moduleExports, 'createClient');\n },\n ),\n ];\n }\n\n private _getPatchInternalSendCommand() {\n const instrumentation = this;\n return function internal_send_command(original: Function) {\n return function internal_send_command_trace(this: RedisPluginClientTypes, cmd: RedisCommand) {\n if (arguments.length !== 1 || typeof cmd !== 'object') {\n return original.apply(this, arguments);\n }\n const config = instrumentation.getConfig();\n const hasNoParentSpan = trace.getSpan(context.active()) === undefined;\n if (config.requireParentSpan === true && hasNoParentSpan) {\n return original.apply(this, arguments);\n }\n const dbStatementSerializer = config?.dbStatementSerializer || defaultDbStatementSerializer;\n const attributes: Record<string, any> = {};\n if (instrumentation._semconvStability & SemconvStability.OLD) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,\n [ATTR_DB_STATEMENT]: dbStatementSerializer(cmd.command, cmd.args),\n });\n }\n if (instrumentation._semconvStability & SemconvStability.STABLE) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM_NAME]: DB_SYSTEM_NAME_VALUE_REDIS,\n [ATTR_DB_OPERATION_NAME]: cmd.command,\n [ATTR_DB_QUERY_TEXT]: dbStatementSerializer(cmd.command, cmd.args),\n });\n }\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.db.otel.redis';\n const span = instrumentation.tracer.startSpan(`${RedisInstrumentationV2_V3.COMPONENT}-${cmd.command}`, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n if (this.connection_options) {\n const connectionAttributes: Record<string, any> = {};\n if (instrumentation._semconvStability & SemconvStability.OLD) {\n Object.assign(connectionAttributes, {\n [ATTR_NET_PEER_NAME]: this.connection_options.host,\n [ATTR_NET_PEER_PORT]: this.connection_options.port,\n });\n }\n if (instrumentation._semconvStability & SemconvStability.STABLE) {\n Object.assign(connectionAttributes, {\n [ATTR_SERVER_ADDRESS]: this.connection_options.host,\n [ATTR_SERVER_PORT]: this.connection_options.port,\n });\n }\n span.setAttributes(connectionAttributes);\n }\n if (this.address && instrumentation._semconvStability & SemconvStability.OLD) {\n span.setAttribute(ATTR_DB_CONNECTION_STRING, `redis://${this.address}`);\n }\n const originalCallback = arguments[0].callback;\n if (originalCallback) {\n const originalContext = context.active();\n arguments[0].callback = function callback(this: any, err: Error | null, reply: unknown) {\n if (config?.responseHook) {\n const responseHook = config.responseHook;\n safeExecuteInTheMiddle(\n () => {\n responseHook(span, cmd.command, cmd.args, reply);\n },\n (e: Error | undefined) => {\n if (e) {\n instrumentation._diag.error('Error executing responseHook', e);\n }\n },\n true,\n );\n }\n endSpanV2(span, err);\n return context.with(originalContext, originalCallback, this, ...arguments);\n };\n }\n try {\n return original.apply(this, arguments);\n } catch (rethrow) {\n endSpanV2(span, rethrow as Error);\n throw rethrow;\n }\n };\n };\n }\n\n private _getPatchCreateClient() {\n return function createClient(original: Function) {\n return getTracedCreateClient(original);\n };\n }\n\n private _getPatchCreateStream() {\n return function createReadStream(original: Function) {\n return getTracedCreateStreamTrace(original);\n };\n }\n}\n\n// ---- RedisInstrumentationV4_V5 ----\n\nclass RedisInstrumentationV4_V5 extends InstrumentationBase<RedisInstrumentationConfig> {\n static COMPONENT = 'redis';\n _semconvStability: SemconvStability;\n\n constructor(config: RedisInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n override setConfig(config: RedisInstrumentationConfig = {}): void {\n super.setConfig(config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n init() {\n return [\n this._getInstrumentationNodeModuleDefinition('@redis/client'),\n this._getInstrumentationNodeModuleDefinition('@node-redis/client'),\n ];\n }\n\n private _getInstrumentationNodeModuleDefinition(basePackageName: string) {\n const commanderModuleFile = new InstrumentationNodeModuleFile(\n `${basePackageName}/dist/lib/commander.js`,\n ['^1.0.0'],\n (moduleExports: any, moduleVersion?: string) => {\n const transformCommandArguments = moduleExports.transformCommandArguments;\n if (!transformCommandArguments) {\n this._diag.error('internal instrumentation error, missing transformCommandArguments function');\n return moduleExports;\n }\n const functionToPatch = moduleVersion?.startsWith('1.0.') ? 'extendWithCommands' : 'attachCommands';\n if (isWrapped(moduleExports?.[functionToPatch])) {\n this._unwrap(moduleExports, functionToPatch);\n }\n this._wrap(moduleExports, functionToPatch, this._getPatchExtendWithCommands(transformCommandArguments));\n return moduleExports;\n },\n (moduleExports: any) => {\n if (isWrapped(moduleExports?.extendWithCommands)) {\n this._unwrap(moduleExports, 'extendWithCommands');\n }\n if (isWrapped(moduleExports?.attachCommands)) {\n this._unwrap(moduleExports, 'attachCommands');\n }\n },\n );\n\n const multiCommanderModule = new InstrumentationNodeModuleFile(\n `${basePackageName}/dist/lib/client/multi-command.js`,\n ['^1.0.0', '>=5.0.0 <5.12.0'],\n (moduleExports: any) => {\n const redisClientMultiCommandPrototype = moduleExports?.default?.prototype;\n if (isWrapped(redisClientMultiCommandPrototype?.exec)) {\n this._unwrap(redisClientMultiCommandPrototype, 'exec');\n }\n this._wrap(redisClientMultiCommandPrototype, 'exec', this._getPatchMultiCommandsExec(false));\n if (isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {\n this._unwrap(redisClientMultiCommandPrototype, 'execAsPipeline');\n }\n this._wrap(redisClientMultiCommandPrototype, 'execAsPipeline', this._getPatchMultiCommandsExec(true));\n if (isWrapped(redisClientMultiCommandPrototype?.addCommand)) {\n this._unwrap(redisClientMultiCommandPrototype, 'addCommand');\n }\n this._wrap(redisClientMultiCommandPrototype, 'addCommand', this._getPatchMultiCommandsAddCommand());\n return moduleExports;\n },\n (moduleExports: any) => {\n const redisClientMultiCommandPrototype = moduleExports?.default?.prototype;\n if (isWrapped(redisClientMultiCommandPrototype?.exec)) {\n this._unwrap(redisClientMultiCommandPrototype, 'exec');\n }\n if (isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {\n this._unwrap(redisClientMultiCommandPrototype, 'execAsPipeline');\n }\n if (isWrapped(redisClientMultiCommandPrototype?.addCommand)) {\n this._unwrap(redisClientMultiCommandPrototype, 'addCommand');\n }\n },\n );\n\n const clientIndexModule = new InstrumentationNodeModuleFile(\n `${basePackageName}/dist/lib/client/index.js`,\n ['^1.0.0', '>=5.0.0 <5.12.0'],\n (moduleExports: any) => {\n const redisClientPrototype = moduleExports?.default?.prototype;\n if (redisClientPrototype?.multi) {\n if (isWrapped(redisClientPrototype?.multi)) {\n this._unwrap(redisClientPrototype, 'multi');\n }\n this._wrap(redisClientPrototype, 'multi', this._getPatchRedisClientMulti());\n }\n if (redisClientPrototype?.MULTI) {\n if (isWrapped(redisClientPrototype?.MULTI)) {\n this._unwrap(redisClientPrototype, 'MULTI');\n }\n this._wrap(redisClientPrototype, 'MULTI', this._getPatchRedisClientMulti());\n }\n if (isWrapped(redisClientPrototype?.sendCommand)) {\n this._unwrap(redisClientPrototype, 'sendCommand');\n }\n this._wrap(redisClientPrototype, 'sendCommand', this._getPatchRedisClientSendCommand());\n if (isWrapped(redisClientPrototype?.connect)) {\n this._unwrap(redisClientPrototype, 'connect');\n }\n this._wrap(redisClientPrototype, 'connect', this._getPatchedClientConnect());\n return moduleExports;\n },\n (moduleExports: any) => {\n const redisClientPrototype = moduleExports?.default?.prototype;\n if (isWrapped(redisClientPrototype?.multi)) {\n this._unwrap(redisClientPrototype, 'multi');\n }\n if (isWrapped(redisClientPrototype?.MULTI)) {\n this._unwrap(redisClientPrototype, 'MULTI');\n }\n if (isWrapped(redisClientPrototype?.sendCommand)) {\n this._unwrap(redisClientPrototype, 'sendCommand');\n }\n if (isWrapped(redisClientPrototype?.connect)) {\n this._unwrap(redisClientPrototype, 'connect');\n }\n },\n );\n\n return new InstrumentationNodeModuleDefinition(\n basePackageName,\n ['^1.0.0', '>=5.0.0 <5.12.0'],\n (moduleExports: any) => moduleExports,\n () => {},\n [commanderModuleFile, multiCommanderModule, clientIndexModule],\n );\n }\n\n private _getPatchExtendWithCommands(transformCommandArguments: Function) {\n const plugin = this;\n return function extendWithCommandsPatchWrapper(original: Function) {\n return function extendWithCommandsPatch(this: any, config: any) {\n if (config?.BaseClass?.name !== 'RedisClient') {\n return original.apply(this, arguments);\n }\n const origExecutor = config.executor;\n config.executor = function (this: any, command: any, args: any) {\n const redisCommandArguments = transformCommandArguments(command, args).args;\n return plugin._traceClientCommand(origExecutor, this, arguments, redisCommandArguments);\n };\n return original.apply(this, arguments);\n };\n };\n }\n\n private _getPatchMultiCommandsExec(isPipeline: boolean) {\n const plugin = this;\n return function execPatchWrapper(original: Function) {\n return function execPatch(this: any) {\n const execRes = original.apply(this, arguments);\n if (typeof execRes?.then !== 'function') {\n plugin._diag.error('non-promise result when patching exec/execAsPipeline');\n return execRes;\n }\n return execRes\n .then((redisRes: unknown[]) => {\n const openSpans: OpenSpanInfo[] = this[OTEL_OPEN_SPANS];\n plugin._endSpansWithRedisReplies(openSpans, redisRes, isPipeline);\n return redisRes;\n })\n .catch((err: any) => {\n const openSpans: OpenSpanInfo[] = this[OTEL_OPEN_SPANS];\n if (!openSpans) {\n plugin._diag.error('cannot find open spans to end for multi/pipeline');\n } else {\n const replies =\n err.constructor.name === 'MultiErrorReply'\n ? (err as MultiErrorReply).replies\n : new Array(openSpans.length).fill(err);\n plugin._endSpansWithRedisReplies(openSpans, replies, isPipeline);\n }\n return Promise.reject(err);\n });\n };\n };\n }\n\n private _getPatchMultiCommandsAddCommand() {\n const plugin = this;\n return function addCommandWrapper(original: Function) {\n return function addCommandPatch(this: any, args: any) {\n return plugin._traceClientCommand(original, this, arguments, args);\n };\n };\n }\n\n private _getPatchRedisClientMulti() {\n return function multiPatchWrapper(original: Function) {\n return function multiPatch(this: any) {\n const multiRes: any = original.apply(this, arguments);\n multiRes[MULTI_COMMAND_OPTIONS] = this.options;\n return multiRes;\n };\n };\n }\n\n private _getPatchRedisClientSendCommand() {\n const plugin = this;\n return function sendCommandWrapper(original: Function) {\n return function sendCommandPatch(this: any, args: any) {\n return plugin._traceClientCommand(original, this, arguments, args);\n };\n };\n }\n\n private _getPatchedClientConnect() {\n const plugin = this;\n return function connectWrapper(original: Function) {\n return function patchedConnect(this: any) {\n const options = this.options;\n const attributes = getClientAttributes(plugin._diag, options, plugin._semconvStability);\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.db.otel.redis';\n const span = plugin.tracer.startSpan(`${RedisInstrumentationV4_V5.COMPONENT}-connect`, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n const res = context.with(trace.setSpan(context.active(), span), () => {\n return original.apply(this);\n });\n return res\n .then((result: any) => {\n span.end();\n return result;\n })\n .catch((error: Error) => {\n span.recordException(error);\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n span.end();\n return Promise.reject(error);\n });\n };\n };\n }\n\n _traceClientCommand(\n origFunction: Function,\n origThis: any,\n origArguments: IArguments,\n redisCommandArguments: Array<string | Buffer>,\n ): any {\n const hasNoParentSpan = trace.getSpan(context.active()) === undefined;\n if (hasNoParentSpan && this.getConfig().requireParentSpan) {\n return origFunction.apply(origThis, origArguments);\n }\n const clientOptions = origThis.options || origThis[MULTI_COMMAND_OPTIONS];\n const commandName = redisCommandArguments[0] as string;\n const commandArgs = redisCommandArguments.slice(1);\n const dbStatementSerializer = this.getConfig().dbStatementSerializer || defaultDbStatementSerializer;\n const attributes = getClientAttributes(this._diag, clientOptions, this._semconvStability);\n if (this._semconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_OPERATION_NAME] = commandName;\n }\n try {\n const dbStatement = dbStatementSerializer(commandName, commandArgs);\n if (dbStatement != null) {\n if (this._semconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = dbStatement;\n }\n if (this._semconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = dbStatement;\n }\n }\n } catch (e) {\n this._diag.error('dbStatementSerializer throw an exception', e, { commandName });\n }\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.db.otel.redis';\n const span = this.tracer.startSpan(`${RedisInstrumentationV4_V5.COMPONENT}-${commandName}`, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n const res = context.with(trace.setSpan(context.active(), span), () => {\n return origFunction.apply(origThis, origArguments);\n });\n if (typeof res?.then === 'function') {\n res.then(\n (redisRes: unknown) => {\n this._endSpanWithResponse(span, commandName, commandArgs, redisRes, undefined);\n },\n (err: Error) => {\n this._endSpanWithResponse(span, commandName, commandArgs, null, err);\n },\n );\n } else {\n const redisClientMultiCommand: any = res;\n redisClientMultiCommand[OTEL_OPEN_SPANS] = redisClientMultiCommand[OTEL_OPEN_SPANS] || [];\n redisClientMultiCommand[OTEL_OPEN_SPANS].push({\n span,\n commandName,\n commandArgs,\n });\n }\n return res;\n }\n\n _endSpansWithRedisReplies(openSpans: OpenSpanInfo[] | undefined, replies: unknown[], isPipeline = false): void {\n if (!openSpans) {\n return this._diag.error('cannot find open spans to end for redis multi/pipeline');\n }\n if (replies.length !== openSpans.length) {\n return this._diag.error('number of multi command spans does not match response from redis');\n }\n const allCommands = openSpans.map(s => s.commandName);\n const allSameCommand = allCommands.every(cmd => cmd === allCommands[0]);\n const operationName = allSameCommand\n ? (isPipeline ? 'PIPELINE ' : 'MULTI ') + allCommands[0]\n : isPipeline\n ? 'PIPELINE'\n : 'MULTI';\n for (let i = 0; i < openSpans.length; i++) {\n const { span, commandArgs } = openSpans[i]!;\n const currCommandRes = replies[i];\n const [res, err] = currCommandRes instanceof Error ? [null, currCommandRes] : [currCommandRes, undefined];\n if (this._semconvStability & SemconvStability.STABLE) {\n span.setAttribute(ATTR_DB_OPERATION_NAME, operationName);\n }\n this._endSpanWithResponse(span, allCommands[i]!, commandArgs, res, err);\n }\n }\n\n _endSpanWithResponse(\n span: Span,\n commandName: string,\n commandArgs: Array<string | Buffer>,\n response: unknown,\n error: Error | null | undefined,\n ): void {\n const { responseHook } = this.getConfig();\n if (!error && responseHook) {\n try {\n responseHook(span, commandName, commandArgs, response);\n } catch (err) {\n this._diag.error('responseHook throw an exception', err);\n }\n }\n if (error) {\n span.recordException(error);\n span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message });\n }\n span.end();\n }\n}\n\n// ---- RedisInstrumentation (wrapper) ----\n\nconst DEFAULT_CONFIG: RedisInstrumentationConfig = {\n requireParentSpan: false,\n};\n\nexport class RedisInstrumentation extends InstrumentationBase<RedisInstrumentationConfig> {\n private instrumentationV2_V3: RedisInstrumentationV2_V3;\n private instrumentationV4_V5: RedisInstrumentationV4_V5;\n private initialized = false;\n\n constructor(config: RedisInstrumentationConfig = {}) {\n const resolvedConfig = { ...DEFAULT_CONFIG, ...config };\n super(PACKAGE_NAME, PACKAGE_VERSION, resolvedConfig);\n this.instrumentationV2_V3 = new RedisInstrumentationV2_V3(this.getConfig());\n this.instrumentationV4_V5 = new RedisInstrumentationV4_V5(this.getConfig());\n this.initialized = true;\n }\n\n override setConfig(config: RedisInstrumentationConfig = {}): void {\n const newConfig = { ...DEFAULT_CONFIG, ...config };\n super.setConfig(newConfig);\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.setConfig(newConfig);\n this.instrumentationV4_V5.setConfig(newConfig);\n }\n\n init() {}\n\n override getModuleDefinitions() {\n return [...this.instrumentationV2_V3.getModuleDefinitions(), ...this.instrumentationV4_V5.getModuleDefinitions()];\n }\n\n override setTracerProvider(tracerProvider: TracerProvider): void {\n super.setTracerProvider(tracerProvider);\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.setTracerProvider(tracerProvider);\n this.instrumentationV4_V5.setTracerProvider(tracerProvider);\n }\n\n override enable(): void {\n super.enable();\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.enable();\n this.instrumentationV4_V5.enable();\n }\n\n override disable(): void {\n super.disable();\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.disable();\n this.instrumentationV4_V5.disable();\n }\n}\n"],"names":["SemconvStability","ATTR_DB_SYSTEM","DB_SYSTEM_VALUE_REDIS","ATTR_NET_PEER_NAME","ATTR_NET_PEER_PORT","ATTR_DB_CONNECTION_STRING","ATTR_DB_SYSTEM_NAME","DB_SYSTEM_NAME_VALUE_REDIS","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT","SpanStatusCode","context","InstrumentationBase","semconvStabilityFromStr","InstrumentationNodeModuleDefinition","isWrapped","instrumentation","trace","defaultDbStatementSerializer","ATTR_DB_STATEMENT","ATTR_DB_OPERATION_NAME","ATTR_DB_QUERY_TEXT","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SpanKind","safeExecuteInTheMiddle","InstrumentationNodeModuleFile"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAkCA,MAAM,YAAA,GAAe,sCAAsC;AAC3D,MAAM,eAAA,GAAkB,QAAQ;;AAEhC;;AA6BA,MAAM,eAAA,GAAkB,MAAM,CAAC,gDAAgD,CAAC;AAChF,MAAM,qBAAA,GAAwB,MAAM,CAAC,2DAA2D,CAAC;;AAEjG;;AAEA,SAAS,gDAAgD;AACzD,EAAE,UAAU;AACZ,EAAE,GAAG;AACL,EAAsB;AACtB,EAAE,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,CAAC,GAAG,EAAE;AACvC,IAAI,OAAO,SAAS;AACpB,EAAE;AACF,EAAE,IAAI;AACN,IAAI,MAAM,CAAA,GAAI,IAAI,GAAG,CAAC,GAAG,CAAC;AAC1B,IAAI,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;AACrC,IAAI,CAAC,CAAC,QAAA,GAAW,EAAE;AACnB,IAAI,CAAC,CAAC,QAAA,GAAW,EAAE;AACnB,IAAI,OAAO,CAAC,CAAC,IAAI;AACjB,EAAE,CAAA,CAAE,OAAO,GA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A,CAAA;AACA,IAAA,IAAA,CAAA,oBAAA,CAAA,SAAA,CAAA,SAAA,CAAA;AACA,EAAA;;AAEA,EAAA,IAAA,GAAA,CAAA;;AAEA,GAAA,oBAAA,GAAA;AACA,IAAA,OAAA,CAAA,GAAA,IAAA,CAAA,oBAAA,CAAA,oBAAA,EAAA,EAAA,GAAA,IAAA,CAAA,oBAAA,CAAA,oBAAA,EAAA,CAAA;AACA,EAAA;;AAEA,GAAA,iBAAA,CAAA,cAAA,EAAA;AACA,IAAA,KAAA,CAAA,iBAAA,CAAA,cAAA,CAAA;AACA,IAAA,IAAA,CAAA,IAAA,CAAA,WAAA,EAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA,IAAA,CAAA,oBAAA,CAAA,iBAAA,CAAA,cAAA,CAAA;AACA,IAAA,IAAA,CAAA,oBAAA,CAAA,iBAAA,CAAA,cAAA,CAAA;AACA,EAAA;;AAEA,GAAA,MAAA,GAAA;AACA,IAAA,KAAA,CAAA,MAAA,EAAA;AACA,IAAA,IAAA,CAAA,IAAA,CAAA,WAAA,EAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA,IAAA,CAAA,oBAAA,CAAA,MAAA,EAAA;AACA,IAAA,IAAA,CAAA,oBAAA,CAAA,MAAA,EAAA;AACA,EAAA;;AAEA,GAAA,OAAA,GAAA;AACA,IAAA,KAAA,CAAA,OAAA,EAAA;AACA,IAAA,IAAA,CAAA,IAAA,CAAA,WAAA,EAAA;AACA,MAAA;AACA,IAAA;AACA,IAAA,IAAA,CAAA,oBAAA,CAAA,OAAA,EAAA;AACA,IAAA,IAAA,CAAA,oBAAA,CAAA,OAAA,EAAA;AACA,EAAA;AACA;;;;"}
1
+ {"version":3,"file":"redis-instrumentation.js","sources":["../../../../../../src/integrations/tracing/redis/vendored/redis-instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/instrumentation-redis-v0.62.0/packages/instrumentation-redis\n * - Upstream version: @opentelemetry/instrumentation-redis@0.62.0\n * - Minor TypeScript adjustments for this repository's compiler settings\n */\n/* eslint-disable -- vendored @opentelemetry/instrumentation-redis */\n\nimport { context, SpanKind, SpanStatusCode, trace } from '@opentelemetry/api';\nimport type { DiagLogger, Span, TracerProvider } from '@opentelemetry/api';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport {\n ATTR_DB_OPERATION_NAME,\n ATTR_DB_QUERY_TEXT,\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from '@opentelemetry/semantic-conventions';\n\nimport { defaultDbStatementSerializer } from './redis-common';\nimport {\n ATTR_DB_CONNECTION_STRING,\n ATTR_DB_STATEMENT,\n ATTR_DB_SYSTEM,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\n DB_SYSTEM_NAME_VALUE_REDIS,\n DB_SYSTEM_VALUE_REDIS,\n} from './semconv';\nimport type { RedisInstrumentationConfig } from './types';\n\nconst PACKAGE_NAME = '@opentelemetry/instrumentation-redis';\nconst PACKAGE_VERSION = '0.62.0';\n\n// ---- Internal types ----\n\ninterface RedisPluginClientTypes {\n connection_options?: {\n port?: string | number;\n host?: string;\n };\n address?: string;\n}\n\ninterface RedisCommand {\n command: string;\n args: string[];\n buffer_args: boolean;\n callback: (err: Error | null, reply: unknown) => void;\n call_on_write: boolean;\n}\n\ninterface MultiErrorReply extends Error {\n replies: unknown[];\n errorIndexes: Array<number>;\n}\n\ninterface OpenSpanInfo {\n span: Span;\n commandName: string;\n commandArgs: Array<string | Buffer>;\n}\n\nconst OTEL_OPEN_SPANS = Symbol('opentelemetry.instrumentation.redis.open_spans');\nconst MULTI_COMMAND_OPTIONS = Symbol('opentelemetry.instrumentation.redis.multi_command_options');\n\n// ---- v4-v5 utils ----\n\nfunction removeCredentialsFromDBConnectionStringAttribute(\n diagLogger: DiagLogger,\n url: string | undefined,\n): string | undefined {\n if (typeof url !== 'string' || !url) {\n return undefined;\n }\n try {\n const u = new URL(url);\n u.searchParams.delete('user_pwd');\n u.username = '';\n u.password = '';\n return u.href;\n } catch (err) {\n diagLogger.error('failed to sanitize redis connection url', err);\n }\n return undefined;\n}\n\nfunction getClientAttributes(\n diagLogger: DiagLogger,\n options: any,\n semconvStability: SemconvStability,\n): Record<string, any> {\n const attributes: Record<string, any> = {};\n if (semconvStability & SemconvStability.OLD) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,\n [ATTR_NET_PEER_NAME]: options?.socket?.host,\n [ATTR_NET_PEER_PORT]: options?.socket?.port,\n [ATTR_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(diagLogger, options?.url),\n });\n }\n if (semconvStability & SemconvStability.STABLE) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM_NAME]: DB_SYSTEM_NAME_VALUE_REDIS,\n [ATTR_SERVER_ADDRESS]: options?.socket?.host,\n [ATTR_SERVER_PORT]: options?.socket?.port,\n });\n }\n return attributes;\n}\n\n// ---- v2-v3 utils ----\n\nfunction endSpanV2(span: Span, err: Error | null | undefined): void {\n if (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n }\n span.end();\n}\n\nfunction getTracedCreateClient(original: Function): Function {\n return function createClientTrace(this: any) {\n const client = original.apply(this, arguments);\n return context.bind(context.active(), client);\n };\n}\n\nfunction getTracedCreateStreamTrace(original: Function): Function {\n return function create_stream_trace(this: any) {\n if (!Object.prototype.hasOwnProperty.call(this, 'stream')) {\n Object.defineProperty(this, 'stream', {\n get() {\n return this._patched_redis_stream;\n },\n set(val: any) {\n context.bind(context.active(), val);\n this._patched_redis_stream = val;\n },\n });\n }\n return original.apply(this, arguments);\n };\n}\n\n// ---- RedisInstrumentationV2_V3 ----\n\nclass RedisInstrumentationV2_V3 extends InstrumentationBase<RedisInstrumentationConfig> {\n static COMPONENT = 'redis';\n _semconvStability: SemconvStability;\n\n constructor(config: RedisInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n override setConfig(config: RedisInstrumentationConfig = {}): void {\n super.setConfig(config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n init() {\n return [\n new InstrumentationNodeModuleDefinition(\n 'redis',\n ['>=2.6.0 <4'],\n (moduleExports: any) => {\n if (isWrapped(moduleExports.RedisClient.prototype['internal_send_command'])) {\n this._unwrap(moduleExports.RedisClient.prototype, 'internal_send_command');\n }\n this._wrap(moduleExports.RedisClient.prototype, 'internal_send_command', this._getPatchInternalSendCommand());\n if (isWrapped(moduleExports.RedisClient.prototype['create_stream'])) {\n this._unwrap(moduleExports.RedisClient.prototype, 'create_stream');\n }\n this._wrap(moduleExports.RedisClient.prototype, 'create_stream', this._getPatchCreateStream());\n if (isWrapped(moduleExports.createClient)) {\n this._unwrap(moduleExports, 'createClient');\n }\n this._wrap(moduleExports, 'createClient', this._getPatchCreateClient());\n return moduleExports;\n },\n (moduleExports: any) => {\n if (moduleExports === undefined) return;\n this._unwrap(moduleExports.RedisClient.prototype, 'internal_send_command');\n this._unwrap(moduleExports.RedisClient.prototype, 'create_stream');\n this._unwrap(moduleExports, 'createClient');\n },\n ),\n ];\n }\n\n private _getPatchInternalSendCommand() {\n const instrumentation = this;\n return function internal_send_command(original: Function) {\n return function internal_send_command_trace(this: RedisPluginClientTypes, cmd: RedisCommand) {\n if (arguments.length !== 1 || typeof cmd !== 'object') {\n return original.apply(this, arguments);\n }\n const config = instrumentation.getConfig();\n const hasNoParentSpan = trace.getSpan(context.active()) === undefined;\n if (config.requireParentSpan === true && hasNoParentSpan) {\n return original.apply(this, arguments);\n }\n const dbStatementSerializer = config?.dbStatementSerializer || defaultDbStatementSerializer;\n const attributes: Record<string, any> = {};\n if (instrumentation._semconvStability & SemconvStability.OLD) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,\n [ATTR_DB_STATEMENT]: dbStatementSerializer(cmd.command, cmd.args),\n });\n }\n if (instrumentation._semconvStability & SemconvStability.STABLE) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM_NAME]: DB_SYSTEM_NAME_VALUE_REDIS,\n [ATTR_DB_OPERATION_NAME]: cmd.command,\n [ATTR_DB_QUERY_TEXT]: dbStatementSerializer(cmd.command, cmd.args),\n });\n }\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.db.otel.redis';\n const span = instrumentation.tracer.startSpan(`${RedisInstrumentationV2_V3.COMPONENT}-${cmd.command}`, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n if (this.connection_options) {\n const connectionAttributes: Record<string, any> = {};\n if (instrumentation._semconvStability & SemconvStability.OLD) {\n Object.assign(connectionAttributes, {\n [ATTR_NET_PEER_NAME]: this.connection_options.host,\n [ATTR_NET_PEER_PORT]: this.connection_options.port,\n });\n }\n if (instrumentation._semconvStability & SemconvStability.STABLE) {\n Object.assign(connectionAttributes, {\n [ATTR_SERVER_ADDRESS]: this.connection_options.host,\n [ATTR_SERVER_PORT]: this.connection_options.port,\n });\n }\n span.setAttributes(connectionAttributes);\n }\n if (this.address && instrumentation._semconvStability & SemconvStability.OLD) {\n span.setAttribute(ATTR_DB_CONNECTION_STRING, `redis://${this.address}`);\n }\n const originalCallback = arguments[0].callback;\n if (originalCallback) {\n const originalContext = context.active();\n arguments[0].callback = function callback(this: any, err: Error | null, reply: unknown) {\n if (config?.responseHook) {\n const responseHook = config.responseHook;\n safeExecuteInTheMiddle(\n () => {\n responseHook(span, cmd.command, cmd.args, reply);\n },\n (e: Error | undefined) => {\n if (e) {\n instrumentation._diag.error('Error executing responseHook', e);\n }\n },\n true,\n );\n }\n endSpanV2(span, err);\n return context.with(originalContext, originalCallback, this, ...arguments);\n };\n }\n try {\n return original.apply(this, arguments);\n } catch (rethrow) {\n endSpanV2(span, rethrow as Error);\n throw rethrow;\n }\n };\n };\n }\n\n private _getPatchCreateClient() {\n return function createClient(original: Function) {\n return getTracedCreateClient(original);\n };\n }\n\n private _getPatchCreateStream() {\n return function createReadStream(original: Function) {\n return getTracedCreateStreamTrace(original);\n };\n }\n}\n\n// ---- RedisInstrumentationV4_V5 ----\n\nclass RedisInstrumentationV4_V5 extends InstrumentationBase<RedisInstrumentationConfig> {\n static COMPONENT = 'redis';\n _semconvStability: SemconvStability;\n\n constructor(config: RedisInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n override setConfig(config: RedisInstrumentationConfig = {}): void {\n super.setConfig(config);\n this._semconvStability = config.semconvStability\n ? config.semconvStability\n : semconvStabilityFromStr('database', process.env['OTEL_SEMCONV_STABILITY_OPT_IN']);\n }\n\n init() {\n return [\n this._getInstrumentationNodeModuleDefinition('@redis/client'),\n this._getInstrumentationNodeModuleDefinition('@node-redis/client'),\n ];\n }\n\n private _getInstrumentationNodeModuleDefinition(basePackageName: string) {\n const commanderModuleFile = new InstrumentationNodeModuleFile(\n `${basePackageName}/dist/lib/commander.js`,\n ['^1.0.0'],\n (moduleExports: any, moduleVersion?: string) => {\n const transformCommandArguments = moduleExports.transformCommandArguments;\n if (!transformCommandArguments) {\n this._diag.error('internal instrumentation error, missing transformCommandArguments function');\n return moduleExports;\n }\n const functionToPatch = moduleVersion?.startsWith('1.0.') ? 'extendWithCommands' : 'attachCommands';\n if (isWrapped(moduleExports?.[functionToPatch])) {\n this._unwrap(moduleExports, functionToPatch);\n }\n this._wrap(moduleExports, functionToPatch, this._getPatchExtendWithCommands(transformCommandArguments));\n return moduleExports;\n },\n (moduleExports: any) => {\n if (isWrapped(moduleExports?.extendWithCommands)) {\n this._unwrap(moduleExports, 'extendWithCommands');\n }\n if (isWrapped(moduleExports?.attachCommands)) {\n this._unwrap(moduleExports, 'attachCommands');\n }\n },\n );\n\n const multiCommanderModule = new InstrumentationNodeModuleFile(\n `${basePackageName}/dist/lib/client/multi-command.js`,\n ['^1.0.0', '>=5.0.0 <5.12.0'],\n (moduleExports: any) => {\n const redisClientMultiCommandPrototype = moduleExports?.default?.prototype;\n if (isWrapped(redisClientMultiCommandPrototype?.exec)) {\n this._unwrap(redisClientMultiCommandPrototype, 'exec');\n }\n this._wrap(redisClientMultiCommandPrototype, 'exec', this._getPatchMultiCommandsExec(false));\n if (isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {\n this._unwrap(redisClientMultiCommandPrototype, 'execAsPipeline');\n }\n this._wrap(redisClientMultiCommandPrototype, 'execAsPipeline', this._getPatchMultiCommandsExec(true));\n if (isWrapped(redisClientMultiCommandPrototype?.addCommand)) {\n this._unwrap(redisClientMultiCommandPrototype, 'addCommand');\n }\n this._wrap(redisClientMultiCommandPrototype, 'addCommand', this._getPatchMultiCommandsAddCommand());\n return moduleExports;\n },\n (moduleExports: any) => {\n const redisClientMultiCommandPrototype = moduleExports?.default?.prototype;\n if (isWrapped(redisClientMultiCommandPrototype?.exec)) {\n this._unwrap(redisClientMultiCommandPrototype, 'exec');\n }\n if (isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {\n this._unwrap(redisClientMultiCommandPrototype, 'execAsPipeline');\n }\n if (isWrapped(redisClientMultiCommandPrototype?.addCommand)) {\n this._unwrap(redisClientMultiCommandPrototype, 'addCommand');\n }\n },\n );\n\n const clientIndexModule = new InstrumentationNodeModuleFile(\n `${basePackageName}/dist/lib/client/index.js`,\n ['^1.0.0', '>=5.0.0 <5.12.0'],\n (moduleExports: any) => {\n const redisClientPrototype = moduleExports?.default?.prototype;\n if (redisClientPrototype?.multi) {\n if (isWrapped(redisClientPrototype?.multi)) {\n this._unwrap(redisClientPrototype, 'multi');\n }\n this._wrap(redisClientPrototype, 'multi', this._getPatchRedisClientMulti());\n }\n if (redisClientPrototype?.MULTI) {\n if (isWrapped(redisClientPrototype?.MULTI)) {\n this._unwrap(redisClientPrototype, 'MULTI');\n }\n this._wrap(redisClientPrototype, 'MULTI', this._getPatchRedisClientMulti());\n }\n if (isWrapped(redisClientPrototype?.sendCommand)) {\n this._unwrap(redisClientPrototype, 'sendCommand');\n }\n this._wrap(redisClientPrototype, 'sendCommand', this._getPatchRedisClientSendCommand());\n if (isWrapped(redisClientPrototype?.connect)) {\n this._unwrap(redisClientPrototype, 'connect');\n }\n this._wrap(redisClientPrototype, 'connect', this._getPatchedClientConnect());\n return moduleExports;\n },\n (moduleExports: any) => {\n const redisClientPrototype = moduleExports?.default?.prototype;\n if (isWrapped(redisClientPrototype?.multi)) {\n this._unwrap(redisClientPrototype, 'multi');\n }\n if (isWrapped(redisClientPrototype?.MULTI)) {\n this._unwrap(redisClientPrototype, 'MULTI');\n }\n if (isWrapped(redisClientPrototype?.sendCommand)) {\n this._unwrap(redisClientPrototype, 'sendCommand');\n }\n if (isWrapped(redisClientPrototype?.connect)) {\n this._unwrap(redisClientPrototype, 'connect');\n }\n },\n );\n\n return new InstrumentationNodeModuleDefinition(\n basePackageName,\n ['^1.0.0', '>=5.0.0 <5.12.0'],\n (moduleExports: any) => moduleExports,\n () => {},\n [commanderModuleFile, multiCommanderModule, clientIndexModule],\n );\n }\n\n private _getPatchExtendWithCommands(transformCommandArguments: Function) {\n const plugin = this;\n return function extendWithCommandsPatchWrapper(original: Function) {\n return function extendWithCommandsPatch(this: any, config: any) {\n if (config?.BaseClass?.name !== 'RedisClient') {\n return original.apply(this, arguments);\n }\n const origExecutor = config.executor;\n config.executor = function (this: any, command: any, args: any) {\n const redisCommandArguments = transformCommandArguments(command, args).args;\n return plugin._traceClientCommand(origExecutor, this, arguments, redisCommandArguments);\n };\n return original.apply(this, arguments);\n };\n };\n }\n\n private _getPatchMultiCommandsExec(isPipeline: boolean) {\n const plugin = this;\n return function execPatchWrapper(original: Function) {\n return function execPatch(this: any) {\n const execRes = original.apply(this, arguments);\n if (typeof execRes?.then !== 'function') {\n plugin._diag.error('non-promise result when patching exec/execAsPipeline');\n return execRes;\n }\n return execRes\n .then((redisRes: unknown[]) => {\n const openSpans: OpenSpanInfo[] = this[OTEL_OPEN_SPANS];\n plugin._endSpansWithRedisReplies(openSpans, redisRes, isPipeline);\n return redisRes;\n })\n .catch((err: any) => {\n const openSpans: OpenSpanInfo[] = this[OTEL_OPEN_SPANS];\n if (!openSpans) {\n plugin._diag.error('cannot find open spans to end for multi/pipeline');\n } else {\n const replies =\n err.constructor.name === 'MultiErrorReply'\n ? (err as MultiErrorReply).replies\n : new Array(openSpans.length).fill(err);\n plugin._endSpansWithRedisReplies(openSpans, replies, isPipeline);\n }\n return Promise.reject(err);\n });\n };\n };\n }\n\n private _getPatchMultiCommandsAddCommand() {\n const plugin = this;\n return function addCommandWrapper(original: Function) {\n return function addCommandPatch(this: any, args: any) {\n return plugin._traceClientCommand(original, this, arguments, args);\n };\n };\n }\n\n private _getPatchRedisClientMulti() {\n return function multiPatchWrapper(original: Function) {\n return function multiPatch(this: any) {\n const multiRes: any = original.apply(this, arguments);\n multiRes[MULTI_COMMAND_OPTIONS] = this.options;\n return multiRes;\n };\n };\n }\n\n private _getPatchRedisClientSendCommand() {\n const plugin = this;\n return function sendCommandWrapper(original: Function) {\n return function sendCommandPatch(this: any, args: any) {\n return plugin._traceClientCommand(original, this, arguments, args);\n };\n };\n }\n\n private _getPatchedClientConnect() {\n const plugin = this;\n return function connectWrapper(original: Function) {\n return function patchedConnect(this: any) {\n const options = this.options;\n const attributes = getClientAttributes(plugin._diag, options, plugin._semconvStability);\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.db.otel.redis';\n const span = plugin.tracer.startSpan(`${RedisInstrumentationV4_V5.COMPONENT}-connect`, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n const res = context.with(trace.setSpan(context.active(), span), () => {\n return original.apply(this);\n });\n return res\n .then((result: any) => {\n span.end();\n return result;\n })\n .catch((error: Error) => {\n span.recordException(error);\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n span.end();\n return Promise.reject(error);\n });\n };\n };\n }\n\n _traceClientCommand(\n origFunction: Function,\n origThis: any,\n origArguments: IArguments,\n redisCommandArguments: Array<string | Buffer>,\n ): any {\n const hasNoParentSpan = trace.getSpan(context.active()) === undefined;\n if (hasNoParentSpan && this.getConfig().requireParentSpan) {\n return origFunction.apply(origThis, origArguments);\n }\n const clientOptions = origThis.options || origThis[MULTI_COMMAND_OPTIONS];\n const commandName = redisCommandArguments[0] as string;\n const commandArgs = redisCommandArguments.slice(1);\n const dbStatementSerializer = this.getConfig().dbStatementSerializer || defaultDbStatementSerializer;\n const attributes = getClientAttributes(this._diag, clientOptions, this._semconvStability);\n if (this._semconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_OPERATION_NAME] = commandName;\n }\n try {\n const dbStatement = dbStatementSerializer(commandName, commandArgs);\n if (dbStatement != null) {\n if (this._semconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = dbStatement;\n }\n if (this._semconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = dbStatement;\n }\n }\n } catch (e) {\n this._diag.error('dbStatementSerializer throw an exception', e, { commandName });\n }\n attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = 'auto.db.otel.redis';\n const span = this.tracer.startSpan(`${RedisInstrumentationV4_V5.COMPONENT}-${commandName}`, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n const res = context.with(trace.setSpan(context.active(), span), () => {\n return origFunction.apply(origThis, origArguments);\n });\n if (typeof res?.then === 'function') {\n res.then(\n (redisRes: unknown) => {\n this._endSpanWithResponse(span, commandName, commandArgs, redisRes, undefined);\n },\n (err: Error) => {\n this._endSpanWithResponse(span, commandName, commandArgs, null, err);\n },\n );\n } else {\n const redisClientMultiCommand: any = res;\n redisClientMultiCommand[OTEL_OPEN_SPANS] = redisClientMultiCommand[OTEL_OPEN_SPANS] || [];\n redisClientMultiCommand[OTEL_OPEN_SPANS].push({\n span,\n commandName,\n commandArgs,\n });\n }\n return res;\n }\n\n _endSpansWithRedisReplies(openSpans: OpenSpanInfo[] | undefined, replies: unknown[], isPipeline = false): void {\n if (!openSpans) {\n return this._diag.error('cannot find open spans to end for redis multi/pipeline');\n }\n if (replies.length !== openSpans.length) {\n return this._diag.error('number of multi command spans does not match response from redis');\n }\n const allCommands = openSpans.map(s => s.commandName);\n const allSameCommand = allCommands.every(cmd => cmd === allCommands[0]);\n const operationName = allSameCommand\n ? (isPipeline ? 'PIPELINE ' : 'MULTI ') + allCommands[0]\n : isPipeline\n ? 'PIPELINE'\n : 'MULTI';\n for (let i = 0; i < openSpans.length; i++) {\n const { span, commandArgs } = openSpans[i]!;\n const currCommandRes = replies[i];\n const [res, err] = currCommandRes instanceof Error ? [null, currCommandRes] : [currCommandRes, undefined];\n if (this._semconvStability & SemconvStability.STABLE) {\n span.setAttribute(ATTR_DB_OPERATION_NAME, operationName);\n }\n this._endSpanWithResponse(span, allCommands[i]!, commandArgs, res, err);\n }\n }\n\n _endSpanWithResponse(\n span: Span,\n commandName: string,\n commandArgs: Array<string | Buffer>,\n response: unknown,\n error: Error | null | undefined,\n ): void {\n const { responseHook } = this.getConfig();\n if (!error && responseHook) {\n try {\n responseHook(span, commandName, commandArgs, response);\n } catch (err) {\n this._diag.error('responseHook throw an exception', err);\n }\n }\n if (error) {\n span.recordException(error);\n span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message });\n }\n span.end();\n }\n}\n\n// ---- RedisInstrumentation (wrapper) ----\n\nconst DEFAULT_CONFIG: RedisInstrumentationConfig = {\n requireParentSpan: false,\n};\n\nexport class RedisInstrumentation extends InstrumentationBase<RedisInstrumentationConfig> {\n private instrumentationV2_V3: RedisInstrumentationV2_V3;\n private instrumentationV4_V5: RedisInstrumentationV4_V5;\n private initialized = false;\n\n constructor(config: RedisInstrumentationConfig = {}) {\n const resolvedConfig = { ...DEFAULT_CONFIG, ...config };\n super(PACKAGE_NAME, PACKAGE_VERSION, resolvedConfig);\n this.instrumentationV2_V3 = new RedisInstrumentationV2_V3(this.getConfig());\n this.instrumentationV4_V5 = new RedisInstrumentationV4_V5(this.getConfig());\n this.initialized = true;\n }\n\n override setConfig(config: RedisInstrumentationConfig = {}): void {\n const newConfig = { ...DEFAULT_CONFIG, ...config };\n super.setConfig(newConfig);\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.setConfig(newConfig);\n this.instrumentationV4_V5.setConfig(newConfig);\n }\n\n init() {}\n\n override getModuleDefinitions() {\n return [...this.instrumentationV2_V3.getModuleDefinitions(), ...this.instrumentationV4_V5.getModuleDefinitions()];\n }\n\n override setTracerProvider(tracerProvider: TracerProvider): void {\n super.setTracerProvider(tracerProvider);\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.setTracerProvider(tracerProvider);\n this.instrumentationV4_V5.setTracerProvider(tracerProvider);\n }\n\n override enable(): void {\n super.enable();\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.enable();\n this.instrumentationV4_V5.enable();\n }\n\n override disable(): void {\n super.disable();\n if (!this.initialized) {\n return;\n }\n this.instrumentationV2_V3.disable();\n this.instrumentationV4_V5.disable();\n }\n}\n"],"names":["SemconvStability","ATTR_DB_SYSTEM","DB_SYSTEM_VALUE_REDIS","ATTR_NET_PEER_NAME","ATTR_NET_PEER_PORT","ATTR_DB_CONNECTION_STRING","ATTR_DB_SYSTEM_NAME","DB_SYSTEM_NAME_VALUE_REDIS","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT","SpanStatusCode","context","InstrumentationBase","semconvStabilityFromStr","InstrumentationNodeModuleDefinition","isWrapped","instrumentation","trace","defaultDbStatementSerializer","ATTR_DB_STATEMENT","ATTR_DB_OPERATION_NAME","ATTR_DB_QUERY_TEXT","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SpanKind","safeExecuteInTheMiddle","InstrumentationNodeModuleFile"],"mappings":";;;;;;;;;AAsDA,MAAM,YAAA,GAAe,sCAAA;AACrB,MAAM,eAAA,GAAkB,QAAA;AA+BxB,MAAM,eAAA,0BAAyB,gDAAgD,CAAA;AAC/E,MAAM,qBAAA,0BAA+B,2DAA2D,CAAA;AAIhG,SAAS,gDAAA,CACP,YACA,GAAA,EACoB;AACpB,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,CAAC,GAAA,EAAK;AACnC,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,IAAI;AACF,IAAA,MAAM,CAAA,GAAI,IAAI,GAAA,CAAI,GAAG,CAAA;AACrB,IAAA,CAAA,CAAE,YAAA,CAAa,OAAO,UAAU,CAAA;AAChC,IAAA,CAAA,CAAE,QAAA,GAAW,EAAA;AACb,IAAA,CAAA,CAAE,QAAA,GAAW,EAAA;AACb,IAAA,OAAO,CAAA,CAAE,IAAA;AAAA,EACX,SAAS,GAAA,EAAK;AACZ,IAAA,UAAA,CAAW,KAAA,CAAM,2CAA2C,GAAG,CAAA;AAAA,EACjE;AACA,EAAA,OAAO,MAAA;AACT;AAEA,SAAS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;AAClC,IAAA,IAAA,CAAK,qBAAqB,OAAA,EAAQ;AAAA,EACpC;AACF;;;;"}
@@ -1,41 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
- /*
4
- * Copyright The OpenTelemetry Authors
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * https://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- *
18
- * NOTICE from the Sentry authors:
19
- * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/instrumentation-redis-v0.62.0/packages/instrumentation-redis
20
- * - Upstream version: @opentelemetry/instrumentation-redis@0.62.0
21
- * - Minor TypeScript adjustments for this repository's compiler settings
22
- */
23
- /* eslint-disable -- vendored @opentelemetry/instrumentation-redis */
24
-
25
- /*
26
- * This file contains a copy of unstable semantic convention definitions
27
- * used by the vendored redis/ioredis instrumentations.
28
- * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
29
- */
30
-
31
- // Deprecated constants kept for backwards compatibility with older semconv
32
- const ATTR_DB_CONNECTION_STRING = 'db.connection_string';
33
- const ATTR_DB_STATEMENT = 'db.statement';
34
- const ATTR_DB_SYSTEM = 'db.system';
35
- const ATTR_NET_PEER_NAME = 'net.peer.name';
36
- const ATTR_NET_PEER_PORT = 'net.peer.port';
37
- const DB_SYSTEM_NAME_VALUE_REDIS = 'redis';
38
- const DB_SYSTEM_VALUE_REDIS = 'redis';
3
+ const ATTR_DB_CONNECTION_STRING = "db.connection_string";
4
+ const ATTR_DB_STATEMENT = "db.statement";
5
+ const ATTR_DB_SYSTEM = "db.system";
6
+ const ATTR_NET_PEER_NAME = "net.peer.name";
7
+ const ATTR_NET_PEER_PORT = "net.peer.port";
8
+ const DB_SYSTEM_NAME_VALUE_REDIS = "redis";
9
+ const DB_SYSTEM_VALUE_REDIS = "redis";
39
10
 
40
11
  exports.ATTR_DB_CONNECTION_STRING = ATTR_DB_CONNECTION_STRING;
41
12
  exports.ATTR_DB_STATEMENT = ATTR_DB_STATEMENT;
@@ -1 +1 @@
1
- {"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/redis/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/instrumentation-redis-v0.62.0/packages/instrumentation-redis\n * - Upstream version: @opentelemetry/instrumentation-redis@0.62.0\n * - Minor TypeScript adjustments for this repository's compiler settings\n */\n/* eslint-disable -- vendored @opentelemetry/instrumentation-redis */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by the vendored redis/ioredis instrumentations.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n// Deprecated constants kept for backwards compatibility with older semconv\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string';\nexport const ATTR_DB_STATEMENT = 'db.statement';\nexport const ATTR_DB_SYSTEM = 'db.system';\nexport const ATTR_NET_PEER_NAME = 'net.peer.name';\nexport const ATTR_NET_PEER_PORT = 'net.peer.port';\nexport const DB_SYSTEM_NAME_VALUE_REDIS = 'redis';\nexport const DB_SYSTEM_VALUE_REDIS = 'redis';\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACO,MAAM,yBAAA,GAA4B;AAClC,MAAM,iBAAA,GAAoB;AAC1B,MAAM,cAAA,GAAiB;AACvB,MAAM,kBAAA,GAAqB;AAC3B,MAAM,kBAAA,GAAqB;AAC3B,MAAM,0BAAA,GAA6B;AACnC,MAAM,qBAAA,GAAwB;;;;;;;;;;"}
1
+ {"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/redis/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/instrumentation-redis-v0.62.0/packages/instrumentation-redis\n * - Upstream version: @opentelemetry/instrumentation-redis@0.62.0\n * - Minor TypeScript adjustments for this repository's compiler settings\n */\n/* eslint-disable -- vendored @opentelemetry/instrumentation-redis */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by the vendored redis/ioredis instrumentations.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n// Deprecated constants kept for backwards compatibility with older semconv\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string';\nexport const ATTR_DB_STATEMENT = 'db.statement';\nexport const ATTR_DB_SYSTEM = 'db.system';\nexport const ATTR_NET_PEER_NAME = 'net.peer.name';\nexport const ATTR_NET_PEER_PORT = 'net.peer.port';\nexport const DB_SYSTEM_NAME_VALUE_REDIS = 'redis';\nexport const DB_SYSTEM_VALUE_REDIS = 'redis';\n"],"names":[],"mappings":";;AA6BO,MAAM,yBAAA,GAA4B;AAClC,MAAM,iBAAA,GAAoB;AAC1B,MAAM,cAAA,GAAiB;AACvB,MAAM,kBAAA,GAAqB;AAC3B,MAAM,kBAAA,GAAqB;AAC3B,MAAM,0BAAA,GAA6B;AACnC,MAAM,qBAAA,GAAwB;;;;;;;;;;"}
@@ -0,0 +1,45 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const instrumentation = require('./vendored/instrumentation.js');
4
+ const core = require('@sentry/core');
5
+ const nodeCore = require('@sentry/node-core');
6
+
7
+ const TEDIUS_INSTRUMENTED_METHODS = /* @__PURE__ */ new Set([
8
+ "callProcedure",
9
+ "execSql",
10
+ "execSqlBatch",
11
+ "execBulkLoad",
12
+ "prepare",
13
+ "execute"
14
+ ]);
15
+ const INTEGRATION_NAME = "Tedious";
16
+ const instrumentTedious = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentation.TediousInstrumentation({}));
17
+ const _tediousIntegration = (() => {
18
+ let instrumentationWrappedCallback;
19
+ return {
20
+ name: INTEGRATION_NAME,
21
+ setupOnce() {
22
+ const instrumentation = instrumentTedious();
23
+ instrumentationWrappedCallback = nodeCore.instrumentWhenWrapped(instrumentation);
24
+ },
25
+ setup(client) {
26
+ instrumentationWrappedCallback?.(
27
+ () => client.on("spanStart", (span) => {
28
+ const { description, data } = core.spanToJSON(span);
29
+ if (!description || data["db.system"] !== "mssql") {
30
+ return;
31
+ }
32
+ const operation = description.split(" ")[0] || "";
33
+ if (TEDIUS_INSTRUMENTED_METHODS.has(operation)) {
34
+ span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.db.otel.tedious");
35
+ }
36
+ })
37
+ );
38
+ }
39
+ };
40
+ });
41
+ const tediousIntegration = core.defineIntegration(_tediousIntegration);
42
+
43
+ exports.instrumentTedious = instrumentTedious;
44
+ exports.tediousIntegration = tediousIntegration;
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/tedious/index.ts"],"sourcesContent":["import { TediousInstrumentation } from './vendored/instrumentation';\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 TEDIUS_INSTRUMENTED_METHODS = new Set([\n 'callProcedure',\n 'execSql',\n 'execSqlBatch',\n 'execBulkLoad',\n 'prepare',\n 'execute',\n]);\n\nconst INTEGRATION_NAME = 'Tedious';\n\nexport const instrumentTedious = generateInstrumentOnce(INTEGRATION_NAME, () => new TediousInstrumentation({}));\n\nconst _tediousIntegration = (() => {\n let instrumentationWrappedCallback: undefined | ((callback: () => void) => void);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const instrumentation = instrumentTedious();\n instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);\n },\n\n setup(client) {\n instrumentationWrappedCallback?.(() =>\n client.on('spanStart', span => {\n const { description, data } = spanToJSON(span);\n // Tedius integration always set a span name and `db.system` attribute to `mssql`.\n if (!description || data['db.system'] !== 'mssql') {\n return;\n }\n\n const operation = description.split(' ')[0] || '';\n if (TEDIUS_INSTRUMENTED_METHODS.has(operation)) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.tedious');\n }\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [tedious](https://www.npmjs.com/package/tedious) library.\n *\n * For more information, see the [`tediousIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/tedious/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.tediousIntegration()],\n * });\n * ```\n */\nexport const tediousIntegration = defineIntegration(_tediousIntegration);\n"],"names":["generateInstrumentOnce","TediousInstrumentation","instrumentWhenWrapped","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,2BAAA,uBAAkC,GAAA,CAAI;AAAA,EAC1C,eAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,cAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAC,CAAA;AAED,MAAM,gBAAA,GAAmB,SAAA;AAElB,MAAM,iBAAA,GAAoBA,gCAAuB,gBAAA,EAAkB,MAAM,IAAIC,sCAAA,CAAuB,EAAE,CAAC;AAE9G,MAAM,uBAAuB,MAAM;AACjC,EAAA,IAAI,8BAAA;AAEJ,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,MAAM,kBAAkB,iBAAA,EAAkB;AAC1C,MAAA,8BAAA,GAAiCC,+BAAsB,eAAe,CAAA;AAAA,IACxE,CAAA;AAAA,IAEA,MAAM,MAAA,EAAQ;AACZ,MAAA,8BAAA;AAAA,QAAiC,MAC/B,MAAA,CAAO,EAAA,CAAG,WAAA,EAAa,CAAA,IAAA,KAAQ;AAC7B,UAAA,MAAM,EAAE,WAAA,EAAa,IAAA,EAAK,GAAIC,gBAAW,IAAI,CAAA;AAE7C,UAAA,IAAI,CAAC,WAAA,IAAe,IAAA,CAAK,WAAW,MAAM,OAAA,EAAS;AACjD,YAAA;AAAA,UACF;AAEA,UAAA,MAAM,YAAY,WAAA,CAAY,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,IAAK,EAAA;AAC/C,UAAA,IAAI,2BAAA,CAA4B,GAAA,CAAI,SAAS,CAAA,EAAG;AAC9C,YAAA,IAAA,CAAK,YAAA,CAAaC,uCAAkC,sBAAsB,CAAA;AAAA,UAC5E;AAAA,QACF,CAAC;AAAA,OACH;AAAA,IACF;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,kBAAA,GAAqBC,uBAAkB,mBAAmB;;;;;"}
@@ -0,0 +1,205 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const api = require('@opentelemetry/api');
4
+ const events = require('events');
5
+ const instrumentation = require('@opentelemetry/instrumentation');
6
+ const semanticConventions = require('@opentelemetry/semantic-conventions');
7
+ const semconv = require('./semconv.js');
8
+ const utils = require('./utils.js');
9
+ const core = require('@sentry/core');
10
+
11
+ const PACKAGE_NAME = "@sentry/instrumentation-tedious";
12
+ const CURRENT_DATABASE = /* @__PURE__ */ Symbol("opentelemetry.instrumentation-tedious.current-database");
13
+ const INJECTED_CTX = /* @__PURE__ */ Symbol("opentelemetry.instrumentation-tedious.context-info-injected");
14
+ const PATCHED_METHODS = ["callProcedure", "execSql", "execSqlBatch", "execBulkLoad", "prepare", "execute"];
15
+ function setDatabase(databaseName) {
16
+ Object.defineProperty(this, CURRENT_DATABASE, {
17
+ value: databaseName,
18
+ writable: true
19
+ });
20
+ }
21
+ const _TediousInstrumentation = class _TediousInstrumentation extends instrumentation.InstrumentationBase {
22
+ constructor(config = {}) {
23
+ super(PACKAGE_NAME, core.SDK_VERSION, config);
24
+ this._setSemconvStabilityFromEnv();
25
+ }
26
+ // Used for testing.
27
+ _setSemconvStabilityFromEnv() {
28
+ this._netSemconvStability = instrumentation.semconvStabilityFromStr("http", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
29
+ this._dbSemconvStability = instrumentation.semconvStabilityFromStr("database", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
30
+ }
31
+ init() {
32
+ return [
33
+ new instrumentation.InstrumentationNodeModuleDefinition(
34
+ _TediousInstrumentation.COMPONENT,
35
+ [">=1.11.0 <20"],
36
+ (moduleExports) => {
37
+ const ConnectionPrototype = moduleExports.Connection.prototype;
38
+ for (const method of PATCHED_METHODS) {
39
+ if (instrumentation.isWrapped(ConnectionPrototype[method])) {
40
+ this._unwrap(ConnectionPrototype, method);
41
+ }
42
+ this._wrap(ConnectionPrototype, method, this._patchQuery(method, moduleExports));
43
+ }
44
+ if (instrumentation.isWrapped(ConnectionPrototype.connect)) {
45
+ this._unwrap(ConnectionPrototype, "connect");
46
+ }
47
+ this._wrap(ConnectionPrototype, "connect", this._patchConnect);
48
+ return moduleExports;
49
+ },
50
+ (moduleExports) => {
51
+ if (moduleExports === void 0) return;
52
+ const ConnectionPrototype = moduleExports.Connection.prototype;
53
+ for (const method of PATCHED_METHODS) {
54
+ this._unwrap(ConnectionPrototype, method);
55
+ }
56
+ this._unwrap(ConnectionPrototype, "connect");
57
+ }
58
+ )
59
+ ];
60
+ }
61
+ _patchConnect(original) {
62
+ return function patchedConnect() {
63
+ setDatabase.call(this, this.config?.options?.database);
64
+ this.removeListener("databaseChange", setDatabase);
65
+ this.on("databaseChange", setDatabase);
66
+ this.once("end", () => {
67
+ this.removeListener("databaseChange", setDatabase);
68
+ });
69
+ return original.apply(this, arguments);
70
+ };
71
+ }
72
+ _buildTraceparent(span) {
73
+ const sc = span.spanContext();
74
+ return `00-${sc.traceId}-${sc.spanId}-0${Number(sc.traceFlags || api.TraceFlags.NONE).toString(16)}`;
75
+ }
76
+ /**
77
+ * Fire a one-off `SET CONTEXT_INFO @opentelemetry_traceparent` on the same
78
+ * connection. Marks the request with INJECTED_CTX so our patch skips it.
79
+ */
80
+ _injectContextInfo(connection, tediousModule, traceparent) {
81
+ return new Promise((resolve) => {
82
+ try {
83
+ const sql = "set context_info @opentelemetry_traceparent";
84
+ const req = new tediousModule.Request(sql, (_err) => {
85
+ resolve();
86
+ });
87
+ Object.defineProperty(req, INJECTED_CTX, { value: true });
88
+ const buf = Buffer.from(traceparent, "utf8");
89
+ req.addParameter("opentelemetry_traceparent", tediousModule.TYPES.VarBinary, buf, {
90
+ length: buf.length
91
+ });
92
+ connection.execSql(req);
93
+ } catch {
94
+ resolve();
95
+ }
96
+ });
97
+ }
98
+ _shouldInjectFor(operation) {
99
+ return operation === "execSql" || operation === "execSqlBatch" || operation === "callProcedure" || operation === "execute";
100
+ }
101
+ _patchQuery(operation, tediousModule) {
102
+ return (originalMethod) => {
103
+ const thisPlugin = this;
104
+ function patchedMethod(request) {
105
+ if (request?.[INJECTED_CTX]) {
106
+ return originalMethod.apply(this, arguments);
107
+ }
108
+ if (!(request instanceof events.EventEmitter)) {
109
+ thisPlugin._diag.warn(`Unexpected invocation of patched ${operation} method. Span not recorded`);
110
+ return originalMethod.apply(this, arguments);
111
+ }
112
+ let procCount = 0;
113
+ let statementCount = 0;
114
+ const incrementStatementCount = () => statementCount++;
115
+ const incrementProcCount = () => procCount++;
116
+ const databaseName = this[CURRENT_DATABASE];
117
+ const sql = ((request2) => {
118
+ if (request2.sqlTextOrProcedure === "sp_prepare" && request2.parametersByName?.stmt?.value) {
119
+ return request2.parametersByName.stmt.value;
120
+ }
121
+ return request2.sqlTextOrProcedure;
122
+ })(request);
123
+ const attributes = {};
124
+ if (thisPlugin._dbSemconvStability & instrumentation.SemconvStability.OLD) {
125
+ attributes[semconv.ATTR_DB_SYSTEM] = semconv.DB_SYSTEM_VALUE_MSSQL;
126
+ attributes[semconv.ATTR_DB_NAME] = databaseName;
127
+ attributes[semconv.ATTR_DB_USER] = this.config?.userName ?? this.config?.authentication?.options?.userName;
128
+ attributes[semconv.ATTR_DB_STATEMENT] = sql;
129
+ attributes[semconv.ATTR_DB_SQL_TABLE] = request.table;
130
+ }
131
+ if (thisPlugin._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
132
+ attributes[semanticConventions.ATTR_DB_NAMESPACE] = databaseName;
133
+ attributes[semanticConventions.ATTR_DB_SYSTEM_NAME] = semanticConventions.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER;
134
+ attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = sql;
135
+ attributes[semanticConventions.ATTR_DB_COLLECTION_NAME] = request.table;
136
+ }
137
+ if (thisPlugin._netSemconvStability & instrumentation.SemconvStability.OLD) {
138
+ attributes[semconv.ATTR_NET_PEER_NAME] = this.config?.server;
139
+ attributes[semconv.ATTR_NET_PEER_PORT] = this.config?.options?.port;
140
+ }
141
+ if (thisPlugin._netSemconvStability & instrumentation.SemconvStability.STABLE) {
142
+ attributes[semanticConventions.ATTR_SERVER_ADDRESS] = this.config?.server;
143
+ attributes[semanticConventions.ATTR_SERVER_PORT] = this.config?.options?.port;
144
+ }
145
+ const span = thisPlugin.tracer.startSpan(utils.getSpanName(operation, databaseName, sql, request.table), {
146
+ kind: api.SpanKind.CLIENT,
147
+ attributes
148
+ });
149
+ const endSpan = utils.once((err) => {
150
+ request.removeListener("done", incrementStatementCount);
151
+ request.removeListener("doneInProc", incrementStatementCount);
152
+ request.removeListener("doneProc", incrementProcCount);
153
+ request.removeListener("error", endSpan);
154
+ this.removeListener("end", endSpan);
155
+ span.setAttribute("tedious.procedure_count", procCount);
156
+ span.setAttribute("tedious.statement_count", statementCount);
157
+ if (err) {
158
+ span.setStatus({
159
+ code: api.SpanStatusCode.ERROR,
160
+ message: err.message
161
+ });
162
+ }
163
+ span.end();
164
+ });
165
+ request.on("done", incrementStatementCount);
166
+ request.on("doneInProc", incrementStatementCount);
167
+ request.on("doneProc", incrementProcCount);
168
+ request.once("error", endSpan);
169
+ this.on("end", endSpan);
170
+ if (typeof request.callback === "function") {
171
+ thisPlugin._wrap(request, "callback", thisPlugin._patchCallbackQuery(endSpan));
172
+ } else {
173
+ thisPlugin._diag.error("Expected request.callback to be a function");
174
+ }
175
+ const runUserRequest = () => {
176
+ return api.context.with(api.trace.setSpan(api.context.active(), span), originalMethod, this, ...arguments);
177
+ };
178
+ const cfg = thisPlugin.getConfig();
179
+ const shouldInject = cfg.enableTraceContextPropagation && thisPlugin._shouldInjectFor(operation);
180
+ if (!shouldInject) return runUserRequest();
181
+ const traceparent = thisPlugin._buildTraceparent(span);
182
+ void thisPlugin._injectContextInfo(this, tediousModule, traceparent).finally(runUserRequest);
183
+ }
184
+ Object.defineProperty(patchedMethod, "length", {
185
+ value: originalMethod.length,
186
+ writable: false
187
+ });
188
+ return patchedMethod;
189
+ };
190
+ }
191
+ _patchCallbackQuery(endSpan) {
192
+ return (originalCallback) => {
193
+ return function(err, rowCount, rows) {
194
+ endSpan(err);
195
+ return originalCallback.apply(this, arguments);
196
+ };
197
+ };
198
+ }
199
+ };
200
+ _TediousInstrumentation.COMPONENT = "tedious";
201
+ let TediousInstrumentation = _TediousInstrumentation;
202
+
203
+ exports.INJECTED_CTX = INJECTED_CTX;
204
+ exports.TediousInstrumentation = TediousInstrumentation;
205
+ //# sourceMappingURL=instrumentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/tedious/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-tedious\n * - Upstream version: @opentelemetry/instrumentation-tedious@0.37.0\n * - Minor TypeScript strictness adjustments\n */\n/* eslint-disable */\n\nimport * as api from '@opentelemetry/api';\nimport { EventEmitter } from 'events';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n isWrapped,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport {\n ATTR_DB_COLLECTION_NAME,\n ATTR_DB_NAMESPACE,\n ATTR_DB_QUERY_TEXT,\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,\n} from '@opentelemetry/semantic-conventions';\nimport {\n DB_SYSTEM_VALUE_MSSQL,\n ATTR_DB_NAME,\n ATTR_DB_SQL_TABLE,\n ATTR_DB_STATEMENT,\n ATTR_DB_SYSTEM,\n ATTR_DB_USER,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\n} from './semconv';\nimport type * as tedious from './tedious-types';\nimport { TediousInstrumentationConfig } from './types';\nimport { getSpanName, once } from './utils';\nimport { SDK_VERSION } from '@sentry/core';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-tedious';\n\nconst CURRENT_DATABASE = Symbol('opentelemetry.instrumentation-tedious.current-database');\n\nexport const INJECTED_CTX = Symbol('opentelemetry.instrumentation-tedious.context-info-injected');\n\nconst PATCHED_METHODS = ['callProcedure', 'execSql', 'execSqlBatch', 'execBulkLoad', 'prepare', 'execute'];\n\ntype UnknownFunction = (...args: any[]) => any;\ntype ApproxConnection = EventEmitter & {\n [CURRENT_DATABASE]: string;\n config: any;\n};\ntype ApproxRequest = EventEmitter & {\n sqlTextOrProcedure: string | undefined;\n callback: any;\n table: string | undefined;\n parametersByName: any;\n};\n\nfunction setDatabase(this: ApproxConnection, databaseName: string) {\n Object.defineProperty(this, CURRENT_DATABASE, {\n value: databaseName,\n writable: true,\n });\n}\n\nexport class TediousInstrumentation extends InstrumentationBase<TediousInstrumentationConfig> {\n static readonly COMPONENT = 'tedious';\n private _netSemconvStability!: SemconvStability;\n private _dbSemconvStability!: SemconvStability;\n\n constructor(config: TediousInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n this._setSemconvStabilityFromEnv();\n }\n\n // Used for testing.\n private _setSemconvStabilityFromEnv() {\n this._netSemconvStability = semconvStabilityFromStr('http', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n this._dbSemconvStability = semconvStabilityFromStr('database', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n }\n\n protected init() {\n return [\n new InstrumentationNodeModuleDefinition(\n TediousInstrumentation.COMPONENT,\n ['>=1.11.0 <20'],\n (moduleExports: typeof tedious) => {\n const ConnectionPrototype: any = moduleExports.Connection.prototype;\n for (const method of PATCHED_METHODS) {\n if (isWrapped(ConnectionPrototype[method])) {\n this._unwrap(ConnectionPrototype, method);\n }\n this._wrap(ConnectionPrototype, method, this._patchQuery(method, moduleExports) as any);\n }\n\n if (isWrapped(ConnectionPrototype.connect)) {\n this._unwrap(ConnectionPrototype, 'connect');\n }\n this._wrap(ConnectionPrototype, 'connect', this._patchConnect);\n\n return moduleExports;\n },\n (moduleExports: typeof tedious) => {\n if (moduleExports === undefined) return;\n const ConnectionPrototype: any = moduleExports.Connection.prototype;\n for (const method of PATCHED_METHODS) {\n this._unwrap(ConnectionPrototype, method);\n }\n this._unwrap(ConnectionPrototype, 'connect');\n },\n ),\n ];\n }\n\n private _patchConnect(original: UnknownFunction): UnknownFunction {\n return function patchedConnect(this: ApproxConnection) {\n setDatabase.call(this, this.config?.options?.database);\n\n // remove the listener first in case it's already added\n this.removeListener('databaseChange', setDatabase);\n this.on('databaseChange', setDatabase);\n\n this.once('end', () => {\n this.removeListener('databaseChange', setDatabase);\n });\n return original.apply(this, arguments as unknown as any[]);\n };\n }\n\n private _buildTraceparent(span: api.Span): string {\n const sc = span.spanContext();\n return `00-${sc.traceId}-${sc.spanId}-0${Number(sc.traceFlags || api.TraceFlags.NONE).toString(16)}`;\n }\n\n /**\n * Fire a one-off `SET CONTEXT_INFO @opentelemetry_traceparent` on the same\n * connection. Marks the request with INJECTED_CTX so our patch skips it.\n */\n private _injectContextInfo(connection: any, tediousModule: typeof tedious, traceparent: string): Promise<void> {\n return new Promise(resolve => {\n try {\n const sql = 'set context_info @opentelemetry_traceparent';\n const req = new tediousModule.Request(sql, (_err: any) => {\n resolve();\n });\n Object.defineProperty(req, INJECTED_CTX, { value: true });\n const buf = Buffer.from(traceparent, 'utf8');\n req.addParameter('opentelemetry_traceparent', (tediousModule as any).TYPES.VarBinary, buf, {\n length: buf.length,\n });\n\n connection.execSql(req);\n } catch {\n resolve();\n }\n });\n }\n\n private _shouldInjectFor(operation: string): boolean {\n return (\n operation === 'execSql' ||\n operation === 'execSqlBatch' ||\n operation === 'callProcedure' ||\n operation === 'execute'\n );\n }\n\n private _patchQuery(operation: string, tediousModule: typeof tedious) {\n return (originalMethod: UnknownFunction): UnknownFunction => {\n const thisPlugin = this;\n\n function patchedMethod(this: ApproxConnection, request: ApproxRequest) {\n // Skip our own injected request\n if ((request as any)?.[INJECTED_CTX]) {\n return originalMethod.apply(this, arguments as unknown as any[]);\n }\n\n if (!(request instanceof EventEmitter)) {\n thisPlugin._diag.warn(`Unexpected invocation of patched ${operation} method. Span not recorded`);\n return originalMethod.apply(this, arguments as unknown as any[]);\n }\n let procCount = 0;\n let statementCount = 0;\n const incrementStatementCount = () => statementCount++;\n const incrementProcCount = () => procCount++;\n const databaseName = this[CURRENT_DATABASE];\n const sql = (request => {\n // Required for <11.0.9\n if (request.sqlTextOrProcedure === 'sp_prepare' && request.parametersByName?.stmt?.value) {\n return request.parametersByName.stmt.value;\n }\n return request.sqlTextOrProcedure;\n })(request);\n\n const attributes: api.Attributes = {};\n if (thisPlugin._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_SYSTEM] = DB_SYSTEM_VALUE_MSSQL;\n attributes[ATTR_DB_NAME] = databaseName;\n // >=4 uses `authentication` object; older versions just userName and password pair\n attributes[ATTR_DB_USER] = this.config?.userName ?? this.config?.authentication?.options?.userName;\n attributes[ATTR_DB_STATEMENT] = sql;\n attributes[ATTR_DB_SQL_TABLE] = request.table;\n }\n if (thisPlugin._dbSemconvStability & SemconvStability.STABLE) {\n // The OTel spec for \"db.namespace\" discusses handling for connection\n // to MSSQL \"named instances\". This isn't currently supported.\n // https://opentelemetry.io/docs/specs/semconv/database/sql-server/#:~:text=%5B1%5D%20db%2Enamespace\n attributes[ATTR_DB_NAMESPACE] = databaseName;\n attributes[ATTR_DB_SYSTEM_NAME] = DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER;\n attributes[ATTR_DB_QUERY_TEXT] = sql;\n attributes[ATTR_DB_COLLECTION_NAME] = request.table;\n // See https://opentelemetry.io/docs/specs/semconv/database/sql-server/#spans\n // TODO(3290): can `db.response.status_code` be added?\n // TODO(3290): is `operation` correct for `db.operation.name`\n // TODO(3290): can `db.query.summary` reliably be calculated?\n // TODO(3290): `db.stored_procedure.name`\n }\n if (thisPlugin._netSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_NET_PEER_NAME] = this.config?.server;\n attributes[ATTR_NET_PEER_PORT] = this.config?.options?.port;\n }\n if (thisPlugin._netSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_SERVER_ADDRESS] = this.config?.server;\n attributes[ATTR_SERVER_PORT] = this.config?.options?.port;\n }\n const span = thisPlugin.tracer.startSpan(getSpanName(operation, databaseName, sql, request.table), {\n kind: api.SpanKind.CLIENT,\n attributes,\n });\n\n const endSpan = once((err?: any) => {\n request.removeListener('done', incrementStatementCount);\n request.removeListener('doneInProc', incrementStatementCount);\n request.removeListener('doneProc', incrementProcCount);\n request.removeListener('error', endSpan);\n this.removeListener('end', endSpan);\n\n span.setAttribute('tedious.procedure_count', procCount);\n span.setAttribute('tedious.statement_count', statementCount);\n if (err) {\n span.setStatus({\n code: api.SpanStatusCode.ERROR,\n message: err.message,\n });\n // TODO(3290): set `error.type` attribute?\n }\n span.end();\n });\n\n request.on('done', incrementStatementCount);\n request.on('doneInProc', incrementStatementCount);\n request.on('doneProc', incrementProcCount);\n request.once('error', endSpan);\n this.on('end', endSpan);\n\n if (typeof request.callback === 'function') {\n thisPlugin._wrap(request, 'callback', thisPlugin._patchCallbackQuery(endSpan));\n } else {\n thisPlugin._diag.error('Expected request.callback to be a function');\n }\n\n const runUserRequest = () => {\n return api.context.with(api.trace.setSpan(api.context.active(), span), originalMethod, this, ...arguments);\n };\n\n const cfg = thisPlugin.getConfig();\n const shouldInject = cfg.enableTraceContextPropagation && thisPlugin._shouldInjectFor(operation);\n\n if (!shouldInject) return runUserRequest();\n\n const traceparent = thisPlugin._buildTraceparent(span);\n\n void thisPlugin._injectContextInfo(this, tediousModule, traceparent).finally(runUserRequest);\n }\n\n Object.defineProperty(patchedMethod, 'length', {\n value: originalMethod.length,\n writable: false,\n });\n\n return patchedMethod;\n };\n }\n\n private _patchCallbackQuery(endSpan: Function) {\n return (originalCallback: Function) => {\n return function (this: any, err: Error | undefined | null, rowCount?: number, rows?: any) {\n endSpan(err);\n return originalCallback.apply(this, arguments);\n };\n };\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","semconvStabilityFromStr","InstrumentationNodeModuleDefinition","isWrapped","EventEmitter","request","SemconvStability","ATTR_DB_SYSTEM","DB_SYSTEM_VALUE_MSSQL","ATTR_DB_NAME","ATTR_DB_USER","ATTR_DB_STATEMENT","ATTR_DB_SQL_TABLE","ATTR_DB_NAMESPACE","ATTR_DB_SYSTEM_NAME","DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER","ATTR_DB_QUERY_TEXT","ATTR_DB_COLLECTION_NAME","ATTR_NET_PEER_NAME","ATTR_NET_PEER_PORT","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT","getSpanName","once"],"mappings":";;;;;;;;;;AAuDA,MAAM,YAAA,GAAe,iCAAA;AAErB,MAAM,gBAAA,0BAA0B,wDAAwD,CAAA;AAEjF,MAAM,YAAA,0BAAsB,6DAA6D;AAEhG,MAAM,kBAAkB,CAAC,eAAA,EAAiB,WAAW,cAAA,EAAgB,cAAA,EAAgB,WAAW,SAAS,CAAA;AAczG,SAAS,YAAoC,YAAA,EAAsB;AACjE,EAAA,MAAA,CAAO,cAAA,CAAe,MAAM,gBAAA,EAAkB;AAAA,IAC5C,KAAA,EAAO,YAA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