@sentry/node 10.58.0 → 10.60.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 (561) hide show
  1. package/build/cjs/index.js +3 -0
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/fs/index.js +3 -84
  4. package/build/cjs/integrations/fs/index.js.map +1 -1
  5. package/build/cjs/integrations/fs/vendored/constants.js.map +1 -1
  6. package/build/cjs/integrations/fs/vendored/instrumentation.js +145 -175
  7. package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -1
  8. package/build/cjs/integrations/fs/vendored/utils.js.map +1 -1
  9. package/build/cjs/integrations/node-fetch/index.js +7 -8
  10. package/build/cjs/integrations/node-fetch/index.js.map +1 -1
  11. package/build/cjs/integrations/node-fetch/vendored/semconv.js +28 -0
  12. package/build/cjs/integrations/node-fetch/vendored/semconv.js.map +1 -0
  13. package/build/cjs/integrations/node-fetch/vendored/undici.js +91 -127
  14. package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
  15. package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -1
  16. package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -1
  17. package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  18. package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -1
  19. package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  20. package/build/cjs/integrations/tracing/connect/index.js +0 -21
  21. package/build/cjs/integrations/tracing/connect/index.js.map +1 -1
  22. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +0 -6
  23. package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -1
  24. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +33 -42
  25. package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -1
  26. package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -1
  27. package/build/cjs/integrations/tracing/connect/vendored/utils.js +3 -2
  28. package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -1
  29. package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
  30. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +1 -1
  31. package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  32. package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -1
  33. package/build/cjs/integrations/tracing/genericPool/index.js +1 -15
  34. package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -1
  35. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +30 -18
  36. package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -1
  37. package/build/cjs/integrations/tracing/graphql/index.js +1 -51
  38. package/build/cjs/integrations/tracing/graphql/index.js.map +1 -1
  39. package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -1
  40. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -2
  41. package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -1
  42. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +67 -57
  43. package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -1
  44. package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -1
  45. package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -1
  46. package/build/cjs/integrations/tracing/graphql/vendored/utils.js +28 -62
  47. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -1
  48. package/build/cjs/integrations/tracing/hapi/index.js +0 -17
  49. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  50. package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -1
  51. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +28 -45
  52. package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -1
  53. package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -1
  54. package/build/cjs/integrations/tracing/hapi/vendored/semconv.js.map +1 -1
  55. package/build/cjs/integrations/tracing/hapi/vendored/utils.js +4 -9
  56. package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -1
  57. package/build/cjs/integrations/tracing/index.js +1 -0
  58. package/build/cjs/integrations/tracing/index.js.map +1 -1
  59. package/build/cjs/integrations/tracing/kafka/index.js +1 -11
  60. package/build/cjs/integrations/tracing/kafka/index.js.map +1 -1
  61. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +45 -247
  62. package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -1
  63. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +4 -8
  64. package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -1
  65. package/build/cjs/integrations/tracing/kafka/vendored/utils.js +113 -0
  66. package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  67. package/build/cjs/integrations/tracing/knex/index.js +2 -17
  68. package/build/cjs/integrations/tracing/knex/index.js.map +1 -1
  69. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +65 -93
  70. package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
  71. package/build/cjs/integrations/tracing/knex/vendored/semconv.js +2 -0
  72. package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -1
  73. package/build/cjs/integrations/tracing/knex/vendored/utils.js +2 -15
  74. package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -1
  75. package/build/cjs/integrations/tracing/koa/index.js +1 -24
  76. package/build/cjs/integrations/tracing/koa/index.js.map +1 -1
  77. package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -1
  78. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +29 -41
  79. package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -1
  80. package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -1
  81. package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -1
  82. package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -1
  83. package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  84. package/build/cjs/integrations/tracing/mongo/index.js +1 -42
  85. package/build/cjs/integrations/tracing/mongo/index.js.map +1 -1
  86. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +12 -562
  87. package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -1
  88. package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js.map +1 -1
  89. package/build/cjs/integrations/tracing/mongo/vendored/patches.js +151 -0
  90. package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  91. package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +0 -4
  92. package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +1 -1
  93. package/build/cjs/integrations/tracing/mongo/vendored/utils.js +153 -0
  94. package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  95. package/build/cjs/integrations/tracing/mongoose/index.js +1 -8
  96. package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -1
  97. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +56 -203
  98. package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
  99. package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +0 -4
  100. package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +1 -1
  101. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +19 -49
  102. package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
  103. package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -1
  104. package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  105. package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  106. package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  107. package/build/cjs/integrations/tracing/mysql2/index.js +1 -8
  108. package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -1
  109. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +21 -59
  110. package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
  111. package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -1
  112. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +14 -33
  113. package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -1
  114. package/build/cjs/integrations/tracing/postgres/index.js +0 -4
  115. package/build/cjs/integrations/tracing/postgres/index.js.map +1 -1
  116. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -1
  117. package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -1
  118. package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -1
  119. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +51 -261
  120. package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
  121. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +0 -12
  122. package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -1
  123. package/build/cjs/integrations/tracing/postgres/vendored/utils.js +43 -167
  124. package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -1
  125. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  126. package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  127. package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -1
  128. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  129. package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
  130. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +89 -160
  131. package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  132. package/build/cjs/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
  133. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +92 -231
  134. package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  135. package/build/cjs/integrations/tracing/redis/vendored/semconv.js +0 -2
  136. package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -1
  137. package/build/cjs/integrations/tracing/tedious/index.js +1 -25
  138. package/build/cjs/integrations/tracing/tedious/index.js.map +1 -1
  139. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +25 -76
  140. package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
  141. package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -1
  142. package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -1
  143. package/build/cjs/sdk/diagnosticsChannelInjection.js +21 -0
  144. package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -0
  145. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +19 -0
  146. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  147. package/build/cjs/sdk/index.js +17 -1
  148. package/build/cjs/sdk/index.js.map +1 -1
  149. package/build/cjs/sdk/initOtel.js +2 -1
  150. package/build/cjs/sdk/initOtel.js.map +1 -1
  151. package/build/esm/index.js +2 -1
  152. package/build/esm/index.js.map +1 -1
  153. package/build/esm/integrations/fs/index.js +4 -85
  154. package/build/esm/integrations/fs/index.js.map +1 -1
  155. package/build/esm/integrations/fs/vendored/constants.js.map +1 -1
  156. package/build/esm/integrations/fs/vendored/instrumentation.js +147 -177
  157. package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -1
  158. package/build/esm/integrations/fs/vendored/utils.js.map +1 -1
  159. package/build/esm/integrations/node-fetch/index.js +8 -9
  160. package/build/esm/integrations/node-fetch/index.js.map +1 -1
  161. package/build/esm/integrations/node-fetch/vendored/semconv.js +15 -0
  162. package/build/esm/integrations/node-fetch/vendored/semconv.js.map +1 -0
  163. package/build/esm/integrations/node-fetch/vendored/undici.js +80 -116
  164. package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
  165. package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -1
  166. package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -1
  167. package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
  168. package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -1
  169. package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
  170. package/build/esm/integrations/tracing/connect/index.js +1 -22
  171. package/build/esm/integrations/tracing/connect/index.js.map +1 -1
  172. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +1 -6
  173. package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -1
  174. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +36 -44
  175. package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -1
  176. package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -1
  177. package/build/esm/integrations/tracing/connect/vendored/utils.js +3 -2
  178. package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -1
  179. package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
  180. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +1 -1
  181. package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
  182. package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -1
  183. package/build/esm/integrations/tracing/genericPool/index.js +3 -17
  184. package/build/esm/integrations/tracing/genericPool/index.js.map +1 -1
  185. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +31 -19
  186. package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -1
  187. package/build/esm/integrations/tracing/graphql/index.js +3 -53
  188. package/build/esm/integrations/tracing/graphql/index.js.map +1 -1
  189. package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -1
  190. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -2
  191. package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -1
  192. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +69 -59
  193. package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -1
  194. package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -1
  195. package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -1
  196. package/build/esm/integrations/tracing/graphql/vendored/utils.js +29 -62
  197. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -1
  198. package/build/esm/integrations/tracing/hapi/index.js +1 -18
  199. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  200. package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -1
  201. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +30 -47
  202. package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -1
  203. package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -1
  204. package/build/esm/integrations/tracing/hapi/vendored/semconv.js.map +1 -1
  205. package/build/esm/integrations/tracing/hapi/vendored/utils.js +5 -10
  206. package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -1
  207. package/build/esm/integrations/tracing/index.js +1 -0
  208. package/build/esm/integrations/tracing/index.js.map +1 -1
  209. package/build/esm/integrations/tracing/kafka/index.js +2 -12
  210. package/build/esm/integrations/tracing/kafka/index.js.map +1 -1
  211. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +47 -249
  212. package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -1
  213. package/build/esm/integrations/tracing/kafka/vendored/semconv.js +3 -5
  214. package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -1
  215. package/build/esm/integrations/tracing/kafka/vendored/utils.js +107 -0
  216. package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
  217. package/build/esm/integrations/tracing/knex/index.js +4 -19
  218. package/build/esm/integrations/tracing/knex/index.js.map +1 -1
  219. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +66 -94
  220. package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
  221. package/build/esm/integrations/tracing/knex/vendored/semconv.js +2 -1
  222. package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -1
  223. package/build/esm/integrations/tracing/knex/vendored/utils.js +3 -15
  224. package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -1
  225. package/build/esm/integrations/tracing/koa/index.js +3 -26
  226. package/build/esm/integrations/tracing/koa/index.js.map +1 -1
  227. package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -1
  228. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +31 -43
  229. package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -1
  230. package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -1
  231. package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -1
  232. package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -1
  233. package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
  234. package/build/esm/integrations/tracing/mongo/index.js +3 -43
  235. package/build/esm/integrations/tracing/mongo/index.js.map +1 -1
  236. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +13 -563
  237. package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -1
  238. package/build/esm/integrations/tracing/mongo/vendored/internal-types.js.map +1 -1
  239. package/build/esm/integrations/tracing/mongo/vendored/patches.js +143 -0
  240. package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
  241. package/build/esm/integrations/tracing/mongo/vendored/semconv.js +1 -3
  242. package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +1 -1
  243. package/build/esm/integrations/tracing/mongo/vendored/utils.js +146 -0
  244. package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
  245. package/build/esm/integrations/tracing/mongoose/index.js +2 -9
  246. package/build/esm/integrations/tracing/mongoose/index.js.map +1 -1
  247. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +59 -206
  248. package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
  249. package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +1 -3
  250. package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +1 -1
  251. package/build/esm/integrations/tracing/mongoose/vendored/utils.js +20 -50
  252. package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
  253. package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -1
  254. package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
  255. package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
  256. package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -1
  257. package/build/esm/integrations/tracing/mysql2/index.js +2 -9
  258. package/build/esm/integrations/tracing/mysql2/index.js.map +1 -1
  259. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +26 -64
  260. package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
  261. package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -1
  262. package/build/esm/integrations/tracing/mysql2/vendored/utils.js +15 -34
  263. package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -1
  264. package/build/esm/integrations/tracing/postgres/index.js +1 -5
  265. package/build/esm/integrations/tracing/postgres/index.js.map +1 -1
  266. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -1
  267. package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -1
  268. package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -1
  269. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +52 -262
  270. package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
  271. package/build/esm/integrations/tracing/postgres/vendored/semconv.js +1 -7
  272. package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -1
  273. package/build/esm/integrations/tracing/postgres/vendored/utils.js +44 -165
  274. package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -1
  275. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
  276. package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -1
  277. package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -1
  278. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
  279. package/build/esm/integrations/tracing/redis/index.js.map +1 -1
  280. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +92 -163
  281. package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
  282. package/build/esm/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
  283. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +94 -233
  284. package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
  285. package/build/esm/integrations/tracing/redis/vendored/semconv.js +1 -2
  286. package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -1
  287. package/build/esm/integrations/tracing/tedious/index.js +3 -27
  288. package/build/esm/integrations/tracing/tedious/index.js.map +1 -1
  289. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +29 -79
  290. package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
  291. package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -1
  292. package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -1
  293. package/build/esm/package.json +1 -1
  294. package/build/esm/sdk/diagnosticsChannelInjection.js +17 -0
  295. package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -0
  296. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +17 -0
  297. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
  298. package/build/esm/sdk/index.js +17 -1
  299. package/build/esm/sdk/index.js.map +1 -1
  300. package/build/esm/sdk/initOtel.js +2 -1
  301. package/build/esm/sdk/initOtel.js.map +1 -1
  302. package/build/import-hook.mjs +6 -0
  303. package/build/types/index.d.ts +2 -1
  304. package/build/types/index.d.ts.map +1 -1
  305. package/build/types/integrations/fs/index.d.ts.map +1 -1
  306. package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -1
  307. package/build/types/integrations/fs/vendored/instrumentation.d.ts +6 -10
  308. package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -1
  309. package/build/types/integrations/fs/vendored/types.d.ts +10 -15
  310. package/build/types/integrations/fs/vendored/types.d.ts.map +1 -1
  311. package/build/types/integrations/fs/vendored/utils.d.ts +2 -2
  312. package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -1
  313. package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
  314. package/build/types/integrations/node-fetch/vendored/internal-types.d.ts.map +1 -1
  315. package/build/types/integrations/node-fetch/vendored/semconv.d.ts +13 -0
  316. package/build/types/integrations/node-fetch/vendored/semconv.d.ts.map +1 -0
  317. package/build/types/integrations/node-fetch/vendored/types.d.ts +2 -4
  318. package/build/types/integrations/node-fetch/vendored/types.d.ts.map +1 -1
  319. package/build/types/integrations/node-fetch/vendored/undici.d.ts +6 -7
  320. package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +1 -1
  321. package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +1 -1
  322. package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +1 -1
  323. package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -1
  324. package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -1
  325. package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -1
  326. package/build/types/integrations/tracing/connect/index.d.ts.map +1 -1
  327. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -4
  328. package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -1
  329. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +5 -5
  330. package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -1
  331. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +2 -2
  332. package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -1
  333. package/build/types/integrations/tracing/connect/vendored/utils.d.ts +1 -1
  334. package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -1
  335. package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -1
  336. package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -1
  337. package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +1 -1
  338. package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -1
  339. package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -1
  340. package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -1
  341. package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -1
  342. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +1 -3
  343. package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -1
  344. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +7 -2
  345. package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -1
  346. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +4 -4
  347. package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -1
  348. package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -1
  349. package/build/types/integrations/tracing/graphql/vendored/types.d.ts +5 -43
  350. package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -1
  351. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +8 -11
  352. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -1
  353. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  354. package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -1
  355. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +2 -2
  356. package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -1
  357. package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -1
  358. package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts.map +1 -1
  359. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +3 -4
  360. package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -1
  361. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  362. package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -1
  363. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +3 -13
  364. package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -1
  365. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -32
  366. package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -1
  367. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +9 -28
  368. package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -1
  369. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  370. package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -0
  371. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -1
  372. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +8 -10
  373. package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -1
  374. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +1 -0
  375. package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -1
  376. package/build/types/integrations/tracing/knex/vendored/utils.d.ts +0 -6
  377. package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -1
  378. package/build/types/integrations/tracing/koa/index.d.ts.map +1 -1
  379. package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -1
  380. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +1 -1
  381. package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -1
  382. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +4 -4
  383. package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -1
  384. package/build/types/integrations/tracing/koa/vendored/types.d.ts +2 -39
  385. package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -1
  386. package/build/types/integrations/tracing/koa/vendored/utils.d.ts +3 -3
  387. package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -1
  388. package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -1
  389. package/build/types/integrations/tracing/mongo/index.d.ts +0 -4
  390. package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -1
  391. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +4 -72
  392. package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -1
  393. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -59
  394. package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -1
  395. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  396. package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
  397. package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +0 -54
  398. package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +1 -1
  399. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +24 -0
  400. package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
  401. package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -1
  402. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +3 -0
  403. package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -1
  404. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +3 -8
  405. package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -1
  406. package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -14
  407. package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +1 -1
  408. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -6
  409. package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -1
  410. package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +1 -1
  411. package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -1
  412. package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -1
  413. package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -1
  414. package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +1 -1
  415. package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -1
  416. package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -1
  417. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +3 -6
  418. package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -1
  419. package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -1
  420. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +3 -5
  421. package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -1
  422. package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -1
  423. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -1
  424. package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -1
  425. package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -1
  426. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +1 -9
  427. package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -1
  428. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -2
  429. package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -1
  430. package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -1
  431. package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -1
  432. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +0 -50
  433. package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -1
  434. package/build/types/integrations/tracing/postgres/vendored/types.d.ts +2 -56
  435. package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -1
  436. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +13 -26
  437. package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -1
  438. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -1
  439. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -1
  440. package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -1
  441. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -1
  442. package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -1
  443. package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
  444. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +3 -8
  445. package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -1
  446. package/build/types/integrations/tracing/redis/vendored/redis-common.d.ts.map +1 -1
  447. package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -1
  448. package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -1
  449. package/build/types/integrations/tracing/redis/vendored/types.d.ts +2 -36
  450. package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -1
  451. package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -1
  452. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +3 -14
  453. package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -1
  454. package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -1
  455. package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -1
  456. package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
  457. package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
  458. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +34 -0
  459. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
  460. package/build/types/sdk/index.d.ts.map +1 -1
  461. package/build/types/sdk/initOtel.d.ts.map +1 -1
  462. package/build/types-ts3.8/index.d.ts +2 -1
  463. package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +6 -10
  464. package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +10 -15
  465. package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +2 -2
  466. package/build/types-ts3.8/integrations/node-fetch/vendored/semconv.d.ts +13 -0
  467. package/build/types-ts3.8/integrations/node-fetch/vendored/types.d.ts +2 -4
  468. package/build/types-ts3.8/integrations/node-fetch/vendored/undici.d.ts +6 -7
  469. package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -4
  470. package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +4 -4
  471. package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +2 -2
  472. package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +1 -3
  473. package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +6 -1
  474. package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +3 -3
  475. package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +4 -42
  476. package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +6 -9
  477. package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +2 -2
  478. package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +1 -2
  479. package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +3 -13
  480. package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -32
  481. package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +9 -28
  482. package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
  483. package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +8 -10
  484. package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +1 -0
  485. package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +0 -6
  486. package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +4 -4
  487. package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +1 -38
  488. package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +0 -4
  489. package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +4 -72
  490. package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -59
  491. package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
  492. package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +0 -54
  493. package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +24 -0
  494. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +3 -0
  495. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +3 -8
  496. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -14
  497. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -6
  498. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +3 -6
  499. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +3 -5
  500. package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -1
  501. package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +0 -8
  502. package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -2
  503. package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +0 -50
  504. package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +1 -55
  505. package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +13 -26
  506. package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +3 -8
  507. package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +2 -36
  508. package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +3 -14
  509. package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
  510. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +34 -0
  511. package/package.json +20 -7
  512. package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js +0 -6
  513. package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js.map +0 -1
  514. package/build/cjs/integrations/tracing/kafka/vendored/propagator.js +0 -22
  515. package/build/cjs/integrations/tracing/kafka/vendored/propagator.js.map +0 -1
  516. package/build/cjs/integrations/tracing/knex/vendored/constants.js +0 -16
  517. package/build/cjs/integrations/tracing/knex/vendored/constants.js.map +0 -1
  518. package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js +0 -6
  519. package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js.map +0 -1
  520. package/build/cjs/integrations/tracing/utils/sql-common.js +0 -43
  521. package/build/cjs/integrations/tracing/utils/sql-common.js.map +0 -1
  522. package/build/esm/integrations/tracing/kafka/vendored/internal-types.js +0 -4
  523. package/build/esm/integrations/tracing/kafka/vendored/internal-types.js.map +0 -1
  524. package/build/esm/integrations/tracing/kafka/vendored/propagator.js +0 -20
  525. package/build/esm/integrations/tracing/kafka/vendored/propagator.js.map +0 -1
  526. package/build/esm/integrations/tracing/knex/vendored/constants.js +0 -13
  527. package/build/esm/integrations/tracing/knex/vendored/constants.js.map +0 -1
  528. package/build/esm/integrations/tracing/postgres/vendored/internal-types.js +0 -4
  529. package/build/esm/integrations/tracing/postgres/vendored/internal-types.js.map +0 -1
  530. package/build/esm/integrations/tracing/utils/sql-common.js +0 -41
  531. package/build/esm/integrations/tracing/utils/sql-common.js.map +0 -1
  532. package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts +0 -9
  533. package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts.map +0 -1
  534. package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts +0 -3
  535. package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts.map +0 -1
  536. package/build/types/integrations/tracing/kafka/vendored/types.d.ts +0 -26
  537. package/build/types/integrations/tracing/kafka/vendored/types.d.ts.map +0 -1
  538. package/build/types/integrations/tracing/knex/vendored/constants.d.ts +0 -3
  539. package/build/types/integrations/tracing/knex/vendored/constants.d.ts.map +0 -1
  540. package/build/types/integrations/tracing/knex/vendored/types.d.ts +0 -8
  541. package/build/types/integrations/tracing/knex/vendored/types.d.ts.map +0 -1
  542. package/build/types/integrations/tracing/mongo/vendored/types.d.ts +0 -51
  543. package/build/types/integrations/tracing/mongo/vendored/types.d.ts.map +0 -1
  544. package/build/types/integrations/tracing/mongoose/vendored/types.d.ts +0 -36
  545. package/build/types/integrations/tracing/mongoose/vendored/types.d.ts.map +0 -1
  546. package/build/types/integrations/tracing/mysql2/vendored/types.d.ts +0 -18
  547. package/build/types/integrations/tracing/mysql2/vendored/types.d.ts.map +0 -1
  548. package/build/types/integrations/tracing/tedious/vendored/types.d.ts +0 -10
  549. package/build/types/integrations/tracing/tedious/vendored/types.d.ts.map +0 -1
  550. package/build/types/integrations/tracing/utils/sql-common.d.ts +0 -3
  551. package/build/types/integrations/tracing/utils/sql-common.d.ts.map +0 -1
  552. package/build/types-ts3.8/integrations/tracing/kafka/vendored/internal-types.d.ts +0 -9
  553. package/build/types-ts3.8/integrations/tracing/kafka/vendored/propagator.d.ts +0 -3
  554. package/build/types-ts3.8/integrations/tracing/kafka/vendored/types.d.ts +0 -26
  555. package/build/types-ts3.8/integrations/tracing/knex/vendored/constants.d.ts +0 -3
  556. package/build/types-ts3.8/integrations/tracing/knex/vendored/types.d.ts +0 -8
  557. package/build/types-ts3.8/integrations/tracing/mongo/vendored/types.d.ts +0 -51
  558. package/build/types-ts3.8/integrations/tracing/mongoose/vendored/types.d.ts +0 -36
  559. package/build/types-ts3.8/integrations/tracing/mysql2/vendored/types.d.ts +0 -18
  560. package/build/types-ts3.8/integrations/tracing/tedious/vendored/types.d.ts +0 -10
  561. package/build/types-ts3.8/integrations/tracing/utils/sql-common.d.ts +0 -3
@@ -1,18 +1,33 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const api = require('@opentelemetry/api');
4
- const core = require('@sentry/core');
5
4
  const instrumentation = require('@opentelemetry/instrumentation');
5
+ const core = require('@sentry/core');
6
+ const debugBuild = require('../../../../debug-build.js');
6
7
  const InstrumentationNodeModuleFile = require('../../InstrumentationNodeModuleFile.js');
7
- const semanticConventions = require('@opentelemetry/semantic-conventions');
8
8
  const redisCommon = require('./redis-common.js');
9
9
  const semconv = require('./semconv.js');
10
10
 
11
- const PACKAGE_NAME = "@opentelemetry/instrumentation-redis";
12
- const PACKAGE_VERSION = "0.62.0";
11
+ const PACKAGE_NAME = "@sentry/instrumentation-redis";
12
+ const ORIGIN = "auto.db.otel.redis";
13
13
  const OTEL_OPEN_SPANS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.open_spans");
14
14
  const MULTI_COMMAND_OPTIONS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.multi_command_options");
15
- function removeCredentialsFromDBConnectionStringAttribute(diagLogger, url) {
15
+ function endSpan(span, err) {
16
+ if (err) {
17
+ span.setStatus({ code: core.SPAN_STATUS_ERROR, message: err.message });
18
+ }
19
+ span.end();
20
+ }
21
+ function runResponseHook(responseHook, span, commandName, commandArgs, response) {
22
+ if (!responseHook) {
23
+ return;
24
+ }
25
+ try {
26
+ responseHook(span, commandName, commandArgs, response);
27
+ } catch {
28
+ }
29
+ }
30
+ function removeCredentialsFromDBConnectionStringAttribute(url) {
16
31
  if (typeof url !== "string" || !url) {
17
32
  return void 0;
18
33
  }
@@ -23,68 +38,22 @@ function removeCredentialsFromDBConnectionStringAttribute(diagLogger, url) {
23
38
  u.password = "";
24
39
  return u.href;
25
40
  } catch (err) {
26
- diagLogger.error("failed to sanitize redis connection url", err);
41
+ debugBuild.DEBUG_BUILD && core.debug.error("failed to sanitize redis connection url", err);
27
42
  }
28
43
  return void 0;
29
44
  }
30
- function getClientAttributes(diagLogger, options, semconvStability) {
31
- const attributes = {};
32
- if (semconvStability & instrumentation.SemconvStability.OLD) {
33
- Object.assign(attributes, {
34
- [semconv.ATTR_DB_SYSTEM]: semconv.DB_SYSTEM_VALUE_REDIS,
35
- [semconv.ATTR_NET_PEER_NAME]: options?.socket?.host,
36
- [semconv.ATTR_NET_PEER_PORT]: options?.socket?.port,
37
- [semconv.ATTR_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(diagLogger, options?.url)
38
- });
39
- }
40
- if (semconvStability & instrumentation.SemconvStability.STABLE) {
41
- Object.assign(attributes, {
42
- [semanticConventions.ATTR_DB_SYSTEM_NAME]: semconv.DB_SYSTEM_NAME_VALUE_REDIS,
43
- [semanticConventions.ATTR_SERVER_ADDRESS]: options?.socket?.host,
44
- [semanticConventions.ATTR_SERVER_PORT]: options?.socket?.port
45
- });
46
- }
47
- return attributes;
48
- }
49
- function endSpanV2(span, err) {
50
- if (err) {
51
- span.setStatus({
52
- code: api.SpanStatusCode.ERROR,
53
- message: err.message
54
- });
55
- }
56
- span.end();
57
- }
58
- function getTracedCreateClient(original) {
59
- return function createClientTrace() {
60
- const client = original.apply(this, arguments);
61
- return api.context.bind(api.context.active(), client);
62
- };
63
- }
64
- function getTracedCreateStreamTrace(original) {
65
- return function create_stream_trace() {
66
- if (!Object.prototype.hasOwnProperty.call(this, "stream")) {
67
- Object.defineProperty(this, "stream", {
68
- get() {
69
- return this._patched_redis_stream;
70
- },
71
- set(val) {
72
- api.context.bind(api.context.active(), val);
73
- this._patched_redis_stream = val;
74
- }
75
- });
76
- }
77
- return original.apply(this, arguments);
45
+ function getClientAttributes(options) {
46
+ return {
47
+ [semconv.ATTR_DB_SYSTEM]: semconv.DB_SYSTEM_VALUE_REDIS,
48
+ [semconv.ATTR_NET_PEER_NAME]: options?.socket?.host,
49
+ [semconv.ATTR_NET_PEER_PORT]: options?.socket?.port,
50
+ [semconv.ATTR_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(options?.url),
51
+ [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
78
52
  };
79
53
  }
80
54
  const _RedisInstrumentationV2_V3 = class _RedisInstrumentationV2_V3 extends instrumentation.InstrumentationBase {
81
55
  constructor(config = {}) {
82
- super(PACKAGE_NAME, PACKAGE_VERSION, config);
83
- this._semconvStability = config.semconvStability ? config.semconvStability : instrumentation.semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
84
- }
85
- setConfig(config = {}) {
86
- super.setConfig(config);
87
- this._semconvStability = config.semconvStability ? config.semconvStability : instrumentation.semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
56
+ super(PACKAGE_NAME, core.SDK_VERSION, config);
88
57
  }
89
58
  init() {
90
59
  return [
@@ -96,128 +65,63 @@ const _RedisInstrumentationV2_V3 = class _RedisInstrumentationV2_V3 extends inst
96
65
  this._unwrap(moduleExports.RedisClient.prototype, "internal_send_command");
97
66
  }
98
67
  this._wrap(moduleExports.RedisClient.prototype, "internal_send_command", this._getPatchInternalSendCommand());
99
- if (instrumentation.isWrapped(moduleExports.RedisClient.prototype["create_stream"])) {
100
- this._unwrap(moduleExports.RedisClient.prototype, "create_stream");
101
- }
102
- this._wrap(moduleExports.RedisClient.prototype, "create_stream", this._getPatchCreateStream());
103
- if (instrumentation.isWrapped(moduleExports.createClient)) {
104
- this._unwrap(moduleExports, "createClient");
105
- }
106
- this._wrap(moduleExports, "createClient", this._getPatchCreateClient());
107
68
  return moduleExports;
108
69
  },
109
70
  (moduleExports) => {
110
71
  if (moduleExports === void 0) return;
111
72
  this._unwrap(moduleExports.RedisClient.prototype, "internal_send_command");
112
- this._unwrap(moduleExports.RedisClient.prototype, "create_stream");
113
- this._unwrap(moduleExports, "createClient");
114
73
  }
115
74
  )
116
75
  ];
117
76
  }
118
77
  _getPatchInternalSendCommand() {
119
- const instrumentation$1 = this;
78
+ const instrumentation = this;
120
79
  return function internal_send_command(original) {
121
80
  return function internal_send_command_trace(cmd) {
122
81
  if (arguments.length !== 1 || typeof cmd !== "object") {
123
82
  return original.apply(this, arguments);
124
83
  }
125
- const config = instrumentation$1.getConfig();
126
- const hasNoParentSpan = api.trace.getSpan(api.context.active()) === void 0;
127
- if (config.requireParentSpan === true && hasNoParentSpan) {
128
- return original.apply(this, arguments);
129
- }
130
- const dbStatementSerializer = config?.dbStatementSerializer || redisCommon.defaultDbStatementSerializer;
131
- const attributes = {};
132
- if (instrumentation$1._semconvStability & instrumentation.SemconvStability.OLD) {
133
- Object.assign(attributes, {
134
- [semconv.ATTR_DB_SYSTEM]: semconv.DB_SYSTEM_VALUE_REDIS,
135
- [semconv.ATTR_DB_STATEMENT]: dbStatementSerializer(cmd.command, cmd.args)
136
- });
84
+ const attributes = {
85
+ [semconv.ATTR_DB_SYSTEM]: semconv.DB_SYSTEM_VALUE_REDIS,
86
+ [semconv.ATTR_DB_STATEMENT]: redisCommon.defaultDbStatementSerializer(cmd.command, cmd.args),
87
+ [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
88
+ };
89
+ if (this.connection_options) {
90
+ attributes[semconv.ATTR_NET_PEER_NAME] = this.connection_options.host;
91
+ attributes[semconv.ATTR_NET_PEER_PORT] = this.connection_options.port;
137
92
  }
138
- if (instrumentation$1._semconvStability & instrumentation.SemconvStability.STABLE) {
139
- Object.assign(attributes, {
140
- [semanticConventions.ATTR_DB_SYSTEM_NAME]: semconv.DB_SYSTEM_NAME_VALUE_REDIS,
141
- [semanticConventions.ATTR_DB_OPERATION_NAME]: cmd.command,
142
- [semanticConventions.ATTR_DB_QUERY_TEXT]: dbStatementSerializer(cmd.command, cmd.args)
143
- });
93
+ if (this.address) {
94
+ attributes[semconv.ATTR_DB_CONNECTION_STRING] = `redis://${this.address}`;
144
95
  }
145
- attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = "auto.db.otel.redis";
146
- const span = instrumentation$1.tracer.startSpan(`${_RedisInstrumentationV2_V3.COMPONENT}-${cmd.command}`, {
96
+ const span = core.startInactiveSpan({
97
+ name: `${_RedisInstrumentationV2_V3.COMPONENT}-${cmd.command}`,
147
98
  kind: api.SpanKind.CLIENT,
148
99
  attributes
149
100
  });
150
- if (this.connection_options) {
151
- const connectionAttributes = {};
152
- if (instrumentation$1._semconvStability & instrumentation.SemconvStability.OLD) {
153
- Object.assign(connectionAttributes, {
154
- [semconv.ATTR_NET_PEER_NAME]: this.connection_options.host,
155
- [semconv.ATTR_NET_PEER_PORT]: this.connection_options.port
156
- });
157
- }
158
- if (instrumentation$1._semconvStability & instrumentation.SemconvStability.STABLE) {
159
- Object.assign(connectionAttributes, {
160
- [semanticConventions.ATTR_SERVER_ADDRESS]: this.connection_options.host,
161
- [semanticConventions.ATTR_SERVER_PORT]: this.connection_options.port
162
- });
163
- }
164
- span.setAttributes(connectionAttributes);
165
- }
166
- if (this.address && instrumentation$1._semconvStability & instrumentation.SemconvStability.OLD) {
167
- span.setAttribute(semconv.ATTR_DB_CONNECTION_STRING, `redis://${this.address}`);
168
- }
169
101
  const originalCallback = arguments[0].callback;
170
102
  if (originalCallback) {
171
- const originalContext = api.context.active();
103
+ const parentSpan = core.getActiveSpan();
172
104
  arguments[0].callback = function callback(err, reply) {
173
- if (config?.responseHook) {
174
- const responseHook = config.responseHook;
175
- instrumentation.safeExecuteInTheMiddle(
176
- () => {
177
- responseHook(span, cmd.command, cmd.args, reply);
178
- },
179
- (e) => {
180
- if (e) {
181
- instrumentation$1._diag.error("Error executing responseHook", e);
182
- }
183
- },
184
- true
185
- );
186
- }
187
- endSpanV2(span, err);
188
- return api.context.with(originalContext, originalCallback, this, ...arguments);
105
+ runResponseHook(instrumentation.getConfig().responseHook, span, cmd.command, cmd.args, reply);
106
+ endSpan(span, err);
107
+ return core.withActiveSpan(parentSpan ?? null, () => originalCallback.apply(this, arguments));
189
108
  };
190
109
  }
191
110
  try {
192
111
  return original.apply(this, arguments);
193
112
  } catch (rethrow) {
194
- endSpanV2(span, rethrow);
113
+ endSpan(span, rethrow);
195
114
  throw rethrow;
196
115
  }
197
116
  };
198
117
  };
199
118
  }
200
- _getPatchCreateClient() {
201
- return function createClient(original) {
202
- return getTracedCreateClient(original);
203
- };
204
- }
205
- _getPatchCreateStream() {
206
- return function createReadStream(original) {
207
- return getTracedCreateStreamTrace(original);
208
- };
209
- }
210
119
  };
211
120
  _RedisInstrumentationV2_V3.COMPONENT = "redis";
212
121
  let RedisInstrumentationV2_V3 = _RedisInstrumentationV2_V3;
213
122
  const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends instrumentation.InstrumentationBase {
214
123
  constructor(config = {}) {
215
- super(PACKAGE_NAME, PACKAGE_VERSION, config);
216
- this._semconvStability = config.semconvStability ? config.semconvStability : instrumentation.semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
217
- }
218
- setConfig(config = {}) {
219
- super.setConfig(config);
220
- this._semconvStability = config.semconvStability ? config.semconvStability : instrumentation.semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
124
+ super(PACKAGE_NAME, core.SDK_VERSION, config);
221
125
  }
222
126
  init() {
223
127
  return [
@@ -232,7 +136,7 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends inst
232
136
  (moduleExports, moduleVersion) => {
233
137
  const transformCommandArguments = moduleExports.transformCommandArguments;
234
138
  if (!transformCommandArguments) {
235
- this._diag.error("internal instrumentation error, missing transformCommandArguments function");
139
+ debugBuild.DEBUG_BUILD && core.debug.error("internal instrumentation error, missing transformCommandArguments function");
236
140
  return moduleExports;
237
141
  }
238
142
  const functionToPatch = moduleVersion?.startsWith("1.0.") ? "extendWithCommands" : "attachCommands";
@@ -259,11 +163,11 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends inst
259
163
  if (instrumentation.isWrapped(redisClientMultiCommandPrototype?.exec)) {
260
164
  this._unwrap(redisClientMultiCommandPrototype, "exec");
261
165
  }
262
- this._wrap(redisClientMultiCommandPrototype, "exec", this._getPatchMultiCommandsExec(false));
166
+ this._wrap(redisClientMultiCommandPrototype, "exec", this._getPatchMultiCommandsExec());
263
167
  if (instrumentation.isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {
264
168
  this._unwrap(redisClientMultiCommandPrototype, "execAsPipeline");
265
169
  }
266
- this._wrap(redisClientMultiCommandPrototype, "execAsPipeline", this._getPatchMultiCommandsExec(true));
170
+ this._wrap(redisClientMultiCommandPrototype, "execAsPipeline", this._getPatchMultiCommandsExec());
267
171
  if (instrumentation.isWrapped(redisClientMultiCommandPrototype?.addCommand)) {
268
172
  this._unwrap(redisClientMultiCommandPrototype, "addCommand");
269
173
  }
@@ -351,26 +255,26 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends inst
351
255
  };
352
256
  };
353
257
  }
354
- _getPatchMultiCommandsExec(isPipeline) {
258
+ _getPatchMultiCommandsExec() {
355
259
  const plugin = this;
356
260
  return function execPatchWrapper(original) {
357
261
  return function execPatch() {
358
262
  const execRes = original.apply(this, arguments);
359
263
  if (typeof execRes?.then !== "function") {
360
- plugin._diag.error("non-promise result when patching exec/execAsPipeline");
264
+ debugBuild.DEBUG_BUILD && core.debug.error("non-promise result when patching exec/execAsPipeline");
361
265
  return execRes;
362
266
  }
363
267
  return execRes.then((redisRes) => {
364
268
  const openSpans = this[OTEL_OPEN_SPANS];
365
- plugin._endSpansWithRedisReplies(openSpans, redisRes, isPipeline);
269
+ plugin._endSpansWithRedisReplies(openSpans, redisRes);
366
270
  return redisRes;
367
271
  }).catch((err) => {
368
272
  const openSpans = this[OTEL_OPEN_SPANS];
369
273
  if (!openSpans) {
370
- plugin._diag.error("cannot find open spans to end for multi/pipeline");
274
+ debugBuild.DEBUG_BUILD && core.debug.error("cannot find open spans to end for multi/pipeline");
371
275
  } else {
372
276
  const replies = err.constructor.name === "MultiErrorReply" ? err.replies : new Array(openSpans.length).fill(err);
373
- plugin._endSpansWithRedisReplies(openSpans, replies, isPipeline);
277
+ plugin._endSpansWithRedisReplies(openSpans, replies);
374
278
  }
375
279
  return Promise.reject(err);
376
280
  });
@@ -403,69 +307,44 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends inst
403
307
  };
404
308
  }
405
309
  _getPatchedClientConnect() {
406
- const plugin = this;
407
310
  return function connectWrapper(original) {
408
311
  return function patchedConnect() {
409
- const options = this.options;
410
- const attributes = getClientAttributes(plugin._diag, options, plugin._semconvStability);
411
- attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = "auto.db.otel.redis";
412
- const span = plugin.tracer.startSpan(`${_RedisInstrumentationV4_V5.COMPONENT}-connect`, {
312
+ const attributes = getClientAttributes(this.options);
313
+ const span = core.startInactiveSpan({
314
+ name: `${_RedisInstrumentationV4_V5.COMPONENT}-connect`,
413
315
  kind: api.SpanKind.CLIENT,
414
316
  attributes
415
317
  });
416
- const res = api.context.with(api.trace.setSpan(api.context.active(), span), () => {
417
- return original.apply(this);
418
- });
419
- return res.then((result) => {
420
- span.end();
421
- return result;
422
- }).catch((error) => {
423
- span.recordException(error);
424
- span.setStatus({
425
- code: api.SpanStatusCode.ERROR,
426
- message: error.message
427
- });
428
- span.end();
429
- return Promise.reject(error);
430
- });
318
+ const res = core.withActiveSpan(span, () => original.apply(this));
319
+ return res.then(
320
+ (result) => {
321
+ span.end();
322
+ return result;
323
+ },
324
+ (error) => {
325
+ endSpan(span, error);
326
+ return Promise.reject(error);
327
+ }
328
+ );
431
329
  };
432
330
  };
433
331
  }
434
332
  _traceClientCommand(origFunction, origThis, origArguments, redisCommandArguments) {
435
- const hasNoParentSpan = api.trace.getSpan(api.context.active()) === void 0;
436
- if (hasNoParentSpan && this.getConfig().requireParentSpan) {
437
- return origFunction.apply(origThis, origArguments);
438
- }
439
333
  const clientOptions = origThis.options || origThis[MULTI_COMMAND_OPTIONS];
440
334
  const commandName = redisCommandArguments[0];
441
335
  const commandArgs = redisCommandArguments.slice(1);
442
- const dbStatementSerializer = this.getConfig().dbStatementSerializer || redisCommon.defaultDbStatementSerializer;
443
- const attributes = getClientAttributes(this._diag, clientOptions, this._semconvStability);
444
- if (this._semconvStability & instrumentation.SemconvStability.STABLE) {
445
- attributes[semanticConventions.ATTR_DB_OPERATION_NAME] = commandName;
446
- }
447
- try {
448
- const dbStatement = dbStatementSerializer(commandName, commandArgs);
449
- if (dbStatement != null) {
450
- if (this._semconvStability & instrumentation.SemconvStability.OLD) {
451
- attributes[semconv.ATTR_DB_STATEMENT] = dbStatement;
452
- }
453
- if (this._semconvStability & instrumentation.SemconvStability.STABLE) {
454
- attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = dbStatement;
455
- }
456
- }
457
- } catch (e) {
458
- this._diag.error("dbStatementSerializer throw an exception", e, { commandName });
336
+ const attributes = getClientAttributes(clientOptions);
337
+ const dbStatement = redisCommon.defaultDbStatementSerializer(commandName, commandArgs);
338
+ if (dbStatement != null) {
339
+ attributes[semconv.ATTR_DB_STATEMENT] = dbStatement;
459
340
  }
460
- attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = "auto.db.otel.redis";
461
- const span = this.tracer.startSpan(`${_RedisInstrumentationV4_V5.COMPONENT}-${commandName}`, {
341
+ const span = core.startInactiveSpan({
342
+ name: `${_RedisInstrumentationV4_V5.COMPONENT}-${commandName}`,
462
343
  kind: api.SpanKind.CLIENT,
463
344
  attributes
464
345
  });
465
- const res = api.context.with(api.trace.setSpan(api.context.active(), span), () => {
466
- return origFunction.apply(origThis, origArguments);
467
- });
468
- if (typeof res?.then === "function") {
346
+ const res = core.withActiveSpan(span, () => origFunction.apply(origThis, origArguments));
347
+ if (res instanceof Promise) {
469
348
  res.then(
470
349
  (redisRes) => {
471
350
  this._endSpanWithResponse(span, commandName, commandArgs, redisRes, void 0);
@@ -485,64 +364,46 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends inst
485
364
  }
486
365
  return res;
487
366
  }
488
- _endSpansWithRedisReplies(openSpans, replies, isPipeline = false) {
367
+ _endSpansWithRedisReplies(openSpans, replies) {
489
368
  if (!openSpans) {
490
- return this._diag.error("cannot find open spans to end for redis multi/pipeline");
369
+ debugBuild.DEBUG_BUILD && core.debug.error("cannot find open spans to end for redis multi/pipeline");
370
+ return;
491
371
  }
492
372
  if (replies.length !== openSpans.length) {
493
- return this._diag.error("number of multi command spans does not match response from redis");
373
+ debugBuild.DEBUG_BUILD && core.debug.error("number of multi command spans does not match response from redis");
374
+ return;
494
375
  }
495
- const allCommands = openSpans.map((s) => s.commandName);
496
- const allSameCommand = allCommands.every((cmd) => cmd === allCommands[0]);
497
- const operationName = allSameCommand ? (isPipeline ? "PIPELINE " : "MULTI ") + allCommands[0] : isPipeline ? "PIPELINE" : "MULTI";
498
376
  for (let i = 0; i < openSpans.length; i++) {
499
- const { span, commandArgs } = openSpans[i];
377
+ const { span, commandName, commandArgs } = openSpans[i];
500
378
  const currCommandRes = replies[i];
501
379
  const [res, err] = currCommandRes instanceof Error ? [null, currCommandRes] : [currCommandRes, void 0];
502
- if (this._semconvStability & instrumentation.SemconvStability.STABLE) {
503
- span.setAttribute(semanticConventions.ATTR_DB_OPERATION_NAME, operationName);
504
- }
505
- this._endSpanWithResponse(span, allCommands[i], commandArgs, res, err);
380
+ this._endSpanWithResponse(span, commandName, commandArgs, res, err);
506
381
  }
507
382
  }
508
383
  _endSpanWithResponse(span, commandName, commandArgs, response, error) {
509
- const { responseHook } = this.getConfig();
510
- if (!error && responseHook) {
511
- try {
512
- responseHook(span, commandName, commandArgs, response);
513
- } catch (err) {
514
- this._diag.error("responseHook throw an exception", err);
515
- }
516
- }
517
- if (error) {
518
- span.recordException(error);
519
- span.setStatus({ code: api.SpanStatusCode.ERROR, message: error?.message });
384
+ if (!error) {
385
+ runResponseHook(this.getConfig().responseHook, span, commandName, commandArgs, response);
520
386
  }
521
- span.end();
387
+ endSpan(span, error);
522
388
  }
523
389
  };
524
390
  _RedisInstrumentationV4_V5.COMPONENT = "redis";
525
391
  let RedisInstrumentationV4_V5 = _RedisInstrumentationV4_V5;
526
- const DEFAULT_CONFIG = {
527
- requireParentSpan: false
528
- };
529
392
  class RedisInstrumentation extends instrumentation.InstrumentationBase {
530
393
  constructor(config = {}) {
531
- const resolvedConfig = { ...DEFAULT_CONFIG, ...config };
532
- super(PACKAGE_NAME, PACKAGE_VERSION, resolvedConfig);
394
+ super(PACKAGE_NAME, core.SDK_VERSION, config);
533
395
  this.initialized = false;
534
396
  this.instrumentationV2_V3 = new RedisInstrumentationV2_V3(this.getConfig());
535
397
  this.instrumentationV4_V5 = new RedisInstrumentationV4_V5(this.getConfig());
536
398
  this.initialized = true;
537
399
  }
538
400
  setConfig(config = {}) {
539
- const newConfig = { ...DEFAULT_CONFIG, ...config };
540
- super.setConfig(newConfig);
401
+ super.setConfig(config);
541
402
  if (!this.initialized) {
542
403
  return;
543
404
  }
544
- this.instrumentationV2_V3.setConfig(newConfig);
545
- this.instrumentationV4_V5.setConfig(newConfig);
405
+ this.instrumentationV2_V3.setConfig(config);
406
+ this.instrumentationV4_V5.setConfig(config);
546
407
  }
547
408
  init() {
548
409
  }