@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
@@ -3,73 +3,27 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const api = require('@opentelemetry/api');
4
4
  const constants = require('./constants.js');
5
5
 
6
- // Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/407f61591ba69a39a6908264379d4d98a48dbec4/plugins/node/opentelemetry-instrumentation-fastify/src/utils.ts
7
- /* eslint-disable jsdoc/require-jsdoc */
8
- /* eslint-disable @typescript-eslint/no-dynamic-delete */
9
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
10
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
11
- /* eslint-disable @typescript-eslint/no-explicit-any */
12
- /*
13
- * Copyright The OpenTelemetry Authors
14
- *
15
- * Licensed under the Apache License, Version 2.0 (the "License");
16
- * you may not use this file except in compliance with the License.
17
- * You may obtain a copy of the License at
18
- *
19
- * https://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software
22
- * distributed under the License is distributed on an "AS IS" BASIS,
23
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
- * See the License for the specific language governing permissions and
25
- * limitations under the License.
26
- */
27
-
28
-
29
- /**
30
- * Starts Span
31
- * @param reply - reply function
32
- * @param tracer - tracer
33
- * @param spanName - span name
34
- * @param spanAttributes - span attributes
35
- */
36
- function startSpan(
37
- reply,
38
- tracer,
39
- spanName,
40
- spanAttributes = {},
41
- ) {
6
+ function startSpan(reply, tracer, spanName, spanAttributes = {}) {
42
7
  const span = tracer.startSpan(spanName, { attributes: spanAttributes });
43
-
44
8
  const spans = reply[constants.spanRequestSymbol] || [];
45
9
  spans.push(span);
46
-
47
10
  Object.defineProperty(reply, constants.spanRequestSymbol, {
48
11
  enumerable: false,
49
12
  configurable: true,
50
- value: spans,
13
+ value: spans
51
14
  });
52
-
53
15
  return span;
54
16
  }
55
-
56
- /**
57
- * Ends span
58
- * @param reply - reply function
59
- * @param err - error
60
- */
61
17
  function endSpan(reply, err) {
62
18
  const spans = reply[constants.spanRequestSymbol] || [];
63
- // there is no active span, or it has already ended
64
19
  if (!spans.length) {
65
20
  return;
66
21
  }
67
- // biome-ignore lint/complexity/noForEach: <explanation>
68
22
  spans.forEach((span) => {
69
23
  if (err) {
70
24
  span.setStatus({
71
25
  code: api.SpanStatusCode.ERROR,
72
- message: err.message,
26
+ message: err.message
73
27
  });
74
28
  span.recordException(err);
75
29
  }
@@ -77,34 +31,15 @@ function endSpan(reply, err) {
77
31
  });
78
32
  delete reply[constants.spanRequestSymbol];
79
33
  }
80
-
81
- // @TODO after approve add this to instrumentation package and replace usage
82
- // when it will be released
83
-
84
- /**
85
- * This function handles the missing case from instrumentation package when
86
- * execute can either return a promise or void. And using async is not an
87
- * option as it is producing unwanted side effects.
88
- * @param execute - function to be executed
89
- * @param onFinish - function called when function executed
90
- * @param preventThrowingError - prevent to throw error when execute
91
- * function fails
92
- */
93
-
94
- function safeExecuteInTheMiddleMaybePromise(
95
- execute,
96
- onFinish,
97
- preventThrowingError,
98
- ) {
34
+ function safeExecuteInTheMiddleMaybePromise(execute, onFinish, preventThrowingError) {
99
35
  let error;
100
- let result = undefined;
36
+ let result = void 0;
101
37
  try {
102
38
  result = execute();
103
-
104
39
  if (isPromise(result)) {
105
40
  result.then(
106
- res => onFinish(undefined, res),
107
- err => onFinish(err),
41
+ (res) => onFinish(void 0, res),
42
+ (err) => onFinish(err)
108
43
  );
109
44
  }
110
45
  } catch (e) {
@@ -113,20 +48,14 @@ function safeExecuteInTheMiddleMaybePromise(
113
48
  if (!isPromise(result)) {
114
49
  onFinish(error, result);
115
50
  if (error && true) {
116
- // eslint-disable-next-line no-unsafe-finally
117
51
  throw error;
118
52
  }
119
53
  }
120
- // eslint-disable-next-line no-unsafe-finally
121
54
  return result;
122
55
  }
123
56
  }
124
-
125
57
  function isPromise(val) {
126
- return (
127
- (typeof val === 'object' && val && typeof Object.getOwnPropertyDescriptor(val, 'then')?.value === 'function') ||
128
- false
129
- );
58
+ return typeof val === "object" && val && typeof Object.getOwnPropertyDescriptor(val, "then")?.value === "function" || false;
130
59
  }
131
60
 
132
61
  exports.endSpan = endSpan;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/fastify/v3/utils.ts"],"sourcesContent":["// Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/407f61591ba69a39a6908264379d4d98a48dbec4/plugins/node/opentelemetry-instrumentation-fastify/src/utils.ts\n/* eslint-disable jsdoc/require-jsdoc */\n/* eslint-disable @typescript-eslint/no-dynamic-delete */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/*\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\nimport { type Attributes, type Span, SpanStatusCode, type Tracer } from '@opentelemetry/api';\nimport { spanRequestSymbol } from './constants';\nimport type { PluginFastifyReply } from './internal-types';\n\n/**\n * Starts Span\n * @param reply - reply function\n * @param tracer - tracer\n * @param spanName - span name\n * @param spanAttributes - span attributes\n */\nexport function startSpan(\n reply: PluginFastifyReply,\n tracer: Tracer,\n spanName: string,\n spanAttributes: Attributes = {},\n) {\n const span = tracer.startSpan(spanName, { attributes: spanAttributes });\n\n const spans: Span[] = reply[spanRequestSymbol] || [];\n spans.push(span);\n\n Object.defineProperty(reply, spanRequestSymbol, {\n enumerable: false,\n configurable: true,\n value: spans,\n });\n\n return span;\n}\n\n/**\n * Ends span\n * @param reply - reply function\n * @param err - error\n */\nexport function endSpan(reply: PluginFastifyReply, err?: any) {\n const spans = reply[spanRequestSymbol] || [];\n // there is no active span, or it has already ended\n if (!spans.length) {\n return;\n }\n // biome-ignore lint/complexity/noForEach: <explanation>\n spans.forEach((span: Span) => {\n if (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n span.recordException(err);\n }\n span.end();\n });\n delete reply[spanRequestSymbol];\n}\n\n// @TODO after approve add this to instrumentation package and replace usage\n// when it will be released\n\n/**\n * This function handles the missing case from instrumentation package when\n * execute can either return a promise or void. And using async is not an\n * option as it is producing unwanted side effects.\n * @param execute - function to be executed\n * @param onFinish - function called when function executed\n * @param preventThrowingError - prevent to throw error when execute\n * function fails\n */\nexport function safeExecuteInTheMiddleMaybePromise<T>(\n execute: () => Promise<T>,\n onFinish: (e: unknown, result?: T) => void,\n preventThrowingError?: boolean,\n): Promise<T>;\nexport function safeExecuteInTheMiddleMaybePromise<T>(\n execute: () => T,\n onFinish: (e: unknown, result?: T) => void,\n preventThrowingError?: boolean,\n): T;\nexport function safeExecuteInTheMiddleMaybePromise<T>(\n execute: () => T | Promise<T>,\n onFinish: (e: unknown, result?: T) => void,\n preventThrowingError?: boolean,\n): T | Promise<T> | undefined {\n let error: unknown;\n let result: T | Promise<T> | undefined = undefined;\n try {\n result = execute();\n\n if (isPromise(result)) {\n result.then(\n res => onFinish(undefined, res),\n err => onFinish(err),\n );\n }\n } catch (e) {\n error = e;\n } finally {\n if (!isPromise(result)) {\n onFinish(error, result);\n if (error && !preventThrowingError) {\n // eslint-disable-next-line no-unsafe-finally\n throw error;\n }\n }\n // eslint-disable-next-line no-unsafe-finally\n return result;\n }\n}\n\nfunction isPromise<T>(val: T | Promise<T>): val is Promise<T> {\n return (\n (typeof val === 'object' && val && typeof Object.getOwnPropertyDescriptor(val, 'then')?.value === 'function') ||\n false\n );\n}\n"],"names":["spanRequestSymbol","SpanStatusCode"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS;AACzB,EAAE,KAAK;AACP,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,cAAc,GAAe,EAAE;AACjC,EAAE;AACF,EAAE,MAAM,IAAA,GAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,cAAA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I,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE;AAC3B,MAAM,MAAM,CAAC,IAAI;AACjB,QAAQ,OAAO,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC;AACvC,QAAQ,GAAA,IAAO,QAAQ,CAAC,GAAG,CAAC;AAC5B,OAAO;AACP,IAAI;AACJ,EAAE,CAAA,CAAE,OAAO,CAAC,EAAE;AACd,IAAI,KAAA,GAAQ,CAAC;AACb,EAAE,UAAU;AACZ,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;AAC5B,MAAM,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;AAC7B,MAAM,IAAI,KAAA,IAAS,IAAqB,EAAE;AAC1C;AACA,QAAQ,MAAM,KAAK;AACnB,MAAM;AACN,IAAI;AACJ;AACA,IAAI,OAAO,MAAM;AACjB,EAAE;AACF;;AAEA,SAAS,SAAS,CAAI,GAAG,EAAqC;AAC9D,EAAE;AACF,IAAI,CAAC,OAAO,GAAA,KAAQ,YAAY,GAAA,IAAO,OAAO,MAAM,CAAC,wBAAwB,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,KAAA,KAAU,UAAU;AAChH,IAAI;AACJ;AACA;;;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/fastify/v3/utils.ts"],"sourcesContent":["// Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/407f61591ba69a39a6908264379d4d98a48dbec4/plugins/node/opentelemetry-instrumentation-fastify/src/utils.ts\n/* eslint-disable jsdoc/require-jsdoc */\n/* eslint-disable @typescript-eslint/no-dynamic-delete */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/*\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\nimport { type Attributes, type Span, SpanStatusCode, type Tracer } from '@opentelemetry/api';\nimport { spanRequestSymbol } from './constants';\nimport type { PluginFastifyReply } from './internal-types';\n\n/**\n * Starts Span\n * @param reply - reply function\n * @param tracer - tracer\n * @param spanName - span name\n * @param spanAttributes - span attributes\n */\nexport function startSpan(\n reply: PluginFastifyReply,\n tracer: Tracer,\n spanName: string,\n spanAttributes: Attributes = {},\n) {\n const span = tracer.startSpan(spanName, { attributes: spanAttributes });\n\n const spans: Span[] = reply[spanRequestSymbol] || [];\n spans.push(span);\n\n Object.defineProperty(reply, spanRequestSymbol, {\n enumerable: false,\n configurable: true,\n value: spans,\n });\n\n return span;\n}\n\n/**\n * Ends span\n * @param reply - reply function\n * @param err - error\n */\nexport function endSpan(reply: PluginFastifyReply, err?: any) {\n const spans = reply[spanRequestSymbol] || [];\n // there is no active span, or it has already ended\n if (!spans.length) {\n return;\n }\n // biome-ignore lint/complexity/noForEach: <explanation>\n spans.forEach((span: Span) => {\n if (err) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n span.recordException(err);\n }\n span.end();\n });\n delete reply[spanRequestSymbol];\n}\n\n// @TODO after approve add this to instrumentation package and replace usage\n// when it will be released\n\n/**\n * This function handles the missing case from instrumentation package when\n * execute can either return a promise or void. And using async is not an\n * option as it is producing unwanted side effects.\n * @param execute - function to be executed\n * @param onFinish - function called when function executed\n * @param preventThrowingError - prevent to throw error when execute\n * function fails\n */\nexport function safeExecuteInTheMiddleMaybePromise<T>(\n execute: () => Promise<T>,\n onFinish: (e: unknown, result?: T) => void,\n preventThrowingError?: boolean,\n): Promise<T>;\nexport function safeExecuteInTheMiddleMaybePromise<T>(\n execute: () => T,\n onFinish: (e: unknown, result?: T) => void,\n preventThrowingError?: boolean,\n): T;\nexport function safeExecuteInTheMiddleMaybePromise<T>(\n execute: () => T | Promise<T>,\n onFinish: (e: unknown, result?: T) => void,\n preventThrowingError?: boolean,\n): T | Promise<T> | undefined {\n let error: unknown;\n let result: T | Promise<T> | undefined = undefined;\n try {\n result = execute();\n\n if (isPromise(result)) {\n result.then(\n res => onFinish(undefined, res),\n err => onFinish(err),\n );\n }\n } catch (e) {\n error = e;\n } finally {\n if (!isPromise(result)) {\n onFinish(error, result);\n if (error && !preventThrowingError) {\n // eslint-disable-next-line no-unsafe-finally\n throw error;\n }\n }\n // eslint-disable-next-line no-unsafe-finally\n return result;\n }\n}\n\nfunction isPromise<T>(val: T | Promise<T>): val is Promise<T> {\n return (\n (typeof val === 'object' && val && typeof Object.getOwnPropertyDescriptor(val, 'then')?.value === 'function') ||\n false\n );\n}\n"],"names":["spanRequestSymbol","SpanStatusCode"],"mappings":";;;;;AAiCO,SAAS,UACd,KAAA,EACA,MAAA,EACA,QAAA,EACA,cAAA,GAA6B,EAAC,EAC9B;AACA,EAAA,MAAM,OAAO,MAAA,CAAO,SAAA,CAAU,UAAU,EAAE,UAAA,EAAY,gBAAgB,CAAA;AAEtE,EAAA,MAAM,KAAA,GAAgB,KAAA,CAAMA,2BAAiB,CAAA,IAAK,EAAC;AACnD,EAAA,KAAA,CAAM,KAAK,IAAI,CAAA;AAEf,EAAA,MAAA,CAAO,cAAA,CAAe,OAAOA,2BAAA,EAAmB;AAAA,IAC9C,UAAA,EAAY,KAAA;AAAA,IACZ,YAAA,EAAc,IAAA;AAAA,IACd,KAAA,EAAO;AAAA,GACR,CAAA;AAED,EAAA,OAAO,IAAA;AACT;AAOO,SAAS,OAAA,CAAQ,OAA2B,GAAA,EAAW;AAC5D,EAAA,MAAM,KAAA,GAAQ,KAAA,CAAMA,2BAAiB,CAAA,IAAK,EAAC;AAE3C,EAAA,IAAI,CAAC,MAAM,MAAA,EAAQ;AACjB,IAAA;AA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A,KAAU,UAAA,IAClG,KAAA;AAEJ;;;;;;"}
@@ -0,0 +1,388 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const dc = require('node:diagnostics_channel');
4
+ const api = require('@opentelemetry/api');
5
+ const core$1 = require('@opentelemetry/core');
6
+ const semanticConventions = require('@opentelemetry/semantic-conventions');
7
+ const instrumentation = require('@opentelemetry/instrumentation');
8
+ const core = require('@sentry/core');
9
+
10
+ var _a, _b;
11
+ const PACKAGE_VERSION = core.SDK_VERSION;
12
+ const PACKAGE_NAME = "@sentry/instrumentation-fastify";
13
+ const SUPPORTED_VERSIONS = ">=4.0.0 <6";
14
+ const FASTIFY_HOOKS = [
15
+ "onRequest",
16
+ "preParsing",
17
+ "preValidation",
18
+ "preHandler",
19
+ "preSerialization",
20
+ "onSend",
21
+ "onResponse",
22
+ "onError"
23
+ ];
24
+ const ATTRIBUTE_NAMES = {
25
+ HOOK_NAME: "hook.name",
26
+ FASTIFY_TYPE: "fastify.type",
27
+ HOOK_CALLBACK_NAME: "hook.callback.name",
28
+ ROOT: "fastify.root"
29
+ };
30
+ const HOOK_TYPES = {
31
+ ROUTE: "route-hook",
32
+ INSTANCE: "hook",
33
+ HANDLER: "request-handler"
34
+ };
35
+ const ANONYMOUS_FUNCTION_NAME = "anonymous";
36
+ const kInstrumentation = /* @__PURE__ */ Symbol("fastify otel instance");
37
+ const kRequestSpan = /* @__PURE__ */ Symbol("fastify otel request spans");
38
+ const kRequestContext = /* @__PURE__ */ Symbol("fastify otel request context");
39
+ const kAddHookOriginal = /* @__PURE__ */ Symbol("fastify otel addhook original");
40
+ const kSetNotFoundOriginal = /* @__PURE__ */ Symbol("fastify otel setnotfound original");
41
+ const kRecordExceptions = /* @__PURE__ */ Symbol("fastify otel record exceptions");
42
+ class FastifyOtelInstrumentation extends (_b = instrumentation.InstrumentationBase, _a = kRecordExceptions, _b) {
43
+ constructor(config = {}) {
44
+ super(PACKAGE_NAME, PACKAGE_VERSION, config);
45
+ this._otelLogger = null;
46
+ this._requestHook = null;
47
+ this._lifecycleHook = null;
48
+ this._handleInitialization = void 0;
49
+ this[_a] = true;
50
+ this._otelLogger = api.diag.createComponentLogger({ namespace: PACKAGE_NAME });
51
+ this[kRecordExceptions] = true;
52
+ if (config?.recordExceptions != null) {
53
+ if (typeof config.recordExceptions !== "boolean") {
54
+ throw new TypeError("recordExceptions must be a boolean");
55
+ }
56
+ this[kRecordExceptions] = config.recordExceptions;
57
+ }
58
+ if (typeof config?.requestHook === "function") {
59
+ this._requestHook = config.requestHook;
60
+ }
61
+ if (typeof config?.lifecycleHook === "function") {
62
+ this._lifecycleHook = config.lifecycleHook;
63
+ }
64
+ }
65
+ enable() {
66
+ if (this._handleInitialization === void 0 && this.getConfig().registerOnInitialization) {
67
+ this._handleInitialization = (message) => {
68
+ this.plugin()(message.fastify, void 0, () => {
69
+ });
70
+ const emptyPlugin = (_, __, done) => {
71
+ done();
72
+ };
73
+ emptyPlugin[/* @__PURE__ */ Symbol.for("skip-override")] = true;
74
+ emptyPlugin[/* @__PURE__ */ Symbol.for("fastify.display-name")] = PACKAGE_NAME;
75
+ message.fastify.register(emptyPlugin);
76
+ };
77
+ dc.subscribe("fastify.initialization", this._handleInitialization);
78
+ }
79
+ return super.enable();
80
+ }
81
+ disable() {
82
+ if (this._handleInitialization) {
83
+ dc.unsubscribe("fastify.initialization", this._handleInitialization);
84
+ this._handleInitialization = void 0;
85
+ }
86
+ return super.disable();
87
+ }
88
+ init() {
89
+ return [];
90
+ }
91
+ plugin() {
92
+ const instrumentation = this;
93
+ const pluginAny = FastifyInstrumentationPlugin;
94
+ pluginAny[/* @__PURE__ */ Symbol.for("skip-override")] = true;
95
+ pluginAny[/* @__PURE__ */ Symbol.for("fastify.display-name")] = PACKAGE_NAME;
96
+ pluginAny[/* @__PURE__ */ Symbol.for("plugin-meta")] = {
97
+ fastify: SUPPORTED_VERSIONS,
98
+ name: PACKAGE_NAME
99
+ };
100
+ return FastifyInstrumentationPlugin;
101
+ function FastifyInstrumentationPlugin(instance, _opts, done) {
102
+ instance.decorate(kInstrumentation, instrumentation);
103
+ instance.decorate(kAddHookOriginal, instance.addHook);
104
+ instance.decorate(kSetNotFoundOriginal, instance.setNotFoundHandler);
105
+ instance.decorateRequest("opentelemetry", function opentelemetry() {
106
+ const ctx = this[kRequestContext];
107
+ const span = this[kRequestSpan];
108
+ return {
109
+ enabled: this.routeOptions.config?.otel !== false,
110
+ span,
111
+ tracer: instrumentation.tracer,
112
+ context: ctx,
113
+ inject: (carrier, setter) => {
114
+ return api.propagation.inject(ctx, carrier, setter);
115
+ },
116
+ extract: (carrier, getter) => {
117
+ return api.propagation.extract(ctx, carrier, getter);
118
+ }
119
+ };
120
+ });
121
+ instance.decorateRequest(kRequestSpan, null);
122
+ instance.decorateRequest(kRequestContext, null);
123
+ instance.addHook("onRoute", function otelWireRoute(routeOptions) {
124
+ if (routeOptions.config?.otel === false) {
125
+ instrumentation._otelLogger.debug(
126
+ `Ignoring route instrumentation ${routeOptions.method} ${routeOptions.url} because it is disabled`
127
+ );
128
+ return;
129
+ }
130
+ for (const hook of FASTIFY_HOOKS) {
131
+ if (routeOptions[hook] != null) {
132
+ const handlerLike = routeOptions[hook];
133
+ if (typeof handlerLike === "function") {
134
+ routeOptions[hook] = handlerWrapper(handlerLike, hook, {
135
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,
136
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,
137
+ [semanticConventions.ATTR_HTTP_ROUTE]: routeOptions.url,
138
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handlerLike.name?.length > 0 ? handlerLike.name : ANONYMOUS_FUNCTION_NAME
139
+ });
140
+ } else if (Array.isArray(handlerLike)) {
141
+ const wrappedHandlers = [];
142
+ for (const handler of handlerLike) {
143
+ wrappedHandlers.push(
144
+ handlerWrapper(handler, hook, {
145
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,
146
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,
147
+ [semanticConventions.ATTR_HTTP_ROUTE]: routeOptions.url,
148
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME
149
+ })
150
+ );
151
+ }
152
+ routeOptions[hook] = wrappedHandlers;
153
+ }
154
+ }
155
+ }
156
+ if (routeOptions.onSend != null) {
157
+ routeOptions.onSend = Array.isArray(routeOptions.onSend) ? [...routeOptions.onSend, finalizeResponseSpanHook] : [routeOptions.onSend, finalizeResponseSpanHook];
158
+ } else {
159
+ routeOptions.onSend = finalizeResponseSpanHook;
160
+ }
161
+ if (routeOptions.onError != null) {
162
+ routeOptions.onError = Array.isArray(routeOptions.onError) ? [...routeOptions.onError, recordErrorInSpanHook] : [routeOptions.onError, recordErrorInSpanHook];
163
+ } else {
164
+ routeOptions.onError = recordErrorInSpanHook;
165
+ }
166
+ routeOptions.handler = handlerWrapper(routeOptions.handler, "handler", {
167
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route-handler`,
168
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.HANDLER,
169
+ [semanticConventions.ATTR_HTTP_ROUTE]: routeOptions.url,
170
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: routeOptions.handler.name.length > 0 ? routeOptions.handler.name : ANONYMOUS_FUNCTION_NAME
171
+ });
172
+ });
173
+ instance.addHook(
174
+ "onRequest",
175
+ function startRequestSpanHook(request, _reply, hookDone) {
176
+ if (this[kInstrumentation].isEnabled() === false || request.routeOptions.config?.otel === false) {
177
+ return hookDone();
178
+ }
179
+ let ctx = api.context.active();
180
+ if (api.trace.getSpan(ctx) == null) {
181
+ ctx = api.propagation.extract(ctx, request.headers);
182
+ }
183
+ const rpcMetadata = core$1.getRPCMetadata(ctx);
184
+ if (request.routeOptions.url != null && rpcMetadata?.type === core$1.RPCType.HTTP) {
185
+ rpcMetadata.route = request.routeOptions.url;
186
+ }
187
+ const attributes = {
188
+ [ATTRIBUTE_NAMES.ROOT]: PACKAGE_NAME,
189
+ [semanticConventions.ATTR_HTTP_REQUEST_METHOD]: request.method,
190
+ [semanticConventions.ATTR_URL_PATH]: request.url
191
+ };
192
+ if (request.routeOptions.url != null) {
193
+ attributes[semanticConventions.ATTR_HTTP_ROUTE] = request.routeOptions.url;
194
+ }
195
+ const span = this[kInstrumentation].tracer.startSpan("request", { attributes }, ctx);
196
+ try {
197
+ this[kInstrumentation]._requestHook?.(span, request);
198
+ } catch (err) {
199
+ this[kInstrumentation]._otelLogger.error({ err }, "requestHook threw");
200
+ }
201
+ request[kRequestContext] = api.trace.setSpan(ctx, span);
202
+ request[kRequestSpan] = span;
203
+ api.context.with(request[kRequestContext], () => {
204
+ hookDone();
205
+ });
206
+ }
207
+ );
208
+ instance.addHook("onResponse", function finalizeNotFoundSpanHook(request, reply, hookDone) {
209
+ const span = request[kRequestSpan];
210
+ if (span != null) {
211
+ span.setAttributes({
212
+ [semanticConventions.ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode
213
+ });
214
+ span.end();
215
+ }
216
+ request[kRequestSpan] = null;
217
+ hookDone();
218
+ });
219
+ instance.addHook = addHookPatched;
220
+ instance.setNotFoundHandler = setNotFoundHandlerPatched;
221
+ done();
222
+ function finalizeResponseSpanHook(request, reply, payload, hookDone) {
223
+ const span = request[kRequestSpan];
224
+ if (span != null) {
225
+ if (reply.statusCode >= 500) {
226
+ span.setStatus({ code: api.SpanStatusCode.ERROR });
227
+ }
228
+ span.setAttributes({
229
+ [semanticConventions.ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode
230
+ });
231
+ span.end();
232
+ }
233
+ request[kRequestSpan] = null;
234
+ hookDone(null, payload);
235
+ }
236
+ function recordErrorInSpanHook(request, _reply, error, hookDone) {
237
+ const span = request[kRequestSpan];
238
+ if (span != null) {
239
+ span.setStatus({
240
+ code: api.SpanStatusCode.ERROR,
241
+ message: error.message
242
+ });
243
+ if (instrumentation[kRecordExceptions] !== false) {
244
+ span.recordException(error);
245
+ }
246
+ }
247
+ hookDone();
248
+ }
249
+ function addHookPatched(name, hook) {
250
+ const addHookOriginal = this[kAddHookOriginal];
251
+ if (FASTIFY_HOOKS.includes(name)) {
252
+ return addHookOriginal.call(
253
+ this,
254
+ name,
255
+ handlerWrapper(hook, name, {
256
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - ${name}`,
257
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
258
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hook.name?.length > 0 ? hook.name : ANONYMOUS_FUNCTION_NAME
259
+ })
260
+ );
261
+ } else {
262
+ return addHookOriginal.call(this, name, hook);
263
+ }
264
+ }
265
+ function setNotFoundHandlerPatched(hooks, handler) {
266
+ const setNotFoundHandlerOriginal = this[kSetNotFoundOriginal];
267
+ if (typeof hooks === "function") {
268
+ handler = handlerWrapper(hooks, "notFoundHandler", {
269
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,
270
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
271
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.name?.length > 0 ? hooks.name : ANONYMOUS_FUNCTION_NAME
272
+ });
273
+ setNotFoundHandlerOriginal.call(this, handler);
274
+ } else {
275
+ if (hooks.preValidation != null) {
276
+ hooks.preValidation = handlerWrapper(hooks.preValidation, "notFoundHandler - preValidation", {
277
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preValidation`,
278
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
279
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.preValidation.name?.length > 0 ? hooks.preValidation.name : ANONYMOUS_FUNCTION_NAME
280
+ });
281
+ }
282
+ if (hooks.preHandler != null) {
283
+ hooks.preHandler = handlerWrapper(hooks.preHandler, "notFoundHandler - preHandler", {
284
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preHandler`,
285
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
286
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.preHandler.name?.length > 0 ? hooks.preHandler.name : ANONYMOUS_FUNCTION_NAME
287
+ });
288
+ }
289
+ handler = handlerWrapper(handler, "notFoundHandler", {
290
+ [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,
291
+ [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,
292
+ [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME
293
+ });
294
+ setNotFoundHandlerOriginal.call(this, hooks, handler);
295
+ }
296
+ }
297
+ function getRequestFromArgs(args) {
298
+ for (const arg of args) {
299
+ if (arg?.routeOptions && arg.url && arg.method) {
300
+ return arg;
301
+ }
302
+ }
303
+ return null;
304
+ }
305
+ function handlerWrapper(handler, hookName, spanAttributes = {}) {
306
+ return function handlerWrapped(...args) {
307
+ const instrumentation2 = this[kInstrumentation];
308
+ const request = getRequestFromArgs(args);
309
+ if (request === null) {
310
+ instrumentation2._otelLogger.debug(
311
+ `Ignoring route instrumentation because ${hookName} was called without a Fastify request argument`
312
+ );
313
+ return handler.call(this, ...args);
314
+ }
315
+ if (instrumentation2.isEnabled() === false || request.routeOptions.config?.otel === false) {
316
+ instrumentation2._otelLogger.debug(
317
+ `Ignoring route instrumentation ${request.routeOptions.method} ${request.routeOptions.url} because it is disabled`
318
+ );
319
+ return handler.call(this, ...args);
320
+ }
321
+ const ctx = request[kRequestContext] ?? api.context.active();
322
+ const handlerName = handler.name?.length > 0 ? handler.name : this.pluginName ?? ANONYMOUS_FUNCTION_NAME;
323
+ const span = instrumentation2.tracer.startSpan(
324
+ `${hookName} - ${handlerName}`,
325
+ {
326
+ attributes: spanAttributes
327
+ },
328
+ ctx
329
+ );
330
+ if (instrumentation2._lifecycleHook != null) {
331
+ try {
332
+ instrumentation2._lifecycleHook(span, {
333
+ hookName,
334
+ request,
335
+ handler: handlerName
336
+ });
337
+ } catch (err) {
338
+ instrumentation2._otelLogger.error({ err }, "Execution of lifecycleHook failed");
339
+ }
340
+ }
341
+ return api.context.with(
342
+ api.trace.setSpan(ctx, span),
343
+ function() {
344
+ try {
345
+ const res = handler.call(this, ...args);
346
+ if (typeof res?.then === "function") {
347
+ return res.then(
348
+ (result) => {
349
+ span.end();
350
+ return result;
351
+ },
352
+ (error) => {
353
+ span.setStatus({
354
+ code: api.SpanStatusCode.ERROR,
355
+ message: error.message
356
+ });
357
+ if (instrumentation2[kRecordExceptions] !== false) {
358
+ span.recordException(error);
359
+ }
360
+ span.end();
361
+ return Promise.reject(error);
362
+ }
363
+ );
364
+ }
365
+ span.end();
366
+ return res;
367
+ } catch (error) {
368
+ span.setStatus({
369
+ code: api.SpanStatusCode.ERROR,
370
+ message: error.message
371
+ });
372
+ if (instrumentation2[kRecordExceptions] !== false) {
373
+ span.recordException(error);
374
+ }
375
+ span.end();
376
+ throw error;
377
+ }
378
+ },
379
+ this
380
+ );
381
+ };
382
+ }
383
+ }
384
+ }
385
+ }
386
+
387
+ exports.FastifyOtelInstrumentation = FastifyOtelInstrumentation;
388
+ //# sourceMappingURL=instrumentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/fastify/vendored/instrumentation.ts"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2024-present The Fastify team <https://github.com/fastify/fastify#team>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/fastify/otel/tree/bae80d6caef4287e7f01ff3c8dc753243706ea86\n * - Upstream version: @fastify/otel@0.18.1\n * - Converted from JavaScript to TypeScript with minimal type annotations\n * - Removed `ignorePaths` / `minimatch` support (not used by the Sentry integration)\n */\n/* eslint-disable */\n\nimport * as dc from 'node:diagnostics_channel';\nimport { context, trace, SpanStatusCode, propagation, diag, type Span } from '@opentelemetry/api';\nimport { getRPCMetadata, RPCType } from '@opentelemetry/core';\nimport {\n ATTR_HTTP_ROUTE,\n ATTR_HTTP_RESPONSE_STATUS_CODE,\n ATTR_HTTP_REQUEST_METHOD,\n ATTR_URL_PATH,\n} from '@opentelemetry/semantic-conventions';\nimport { InstrumentationBase, type InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { SDK_VERSION } from '@sentry/core';\n\nconst PACKAGE_VERSION = SDK_VERSION;\nconst PACKAGE_NAME = '@sentry/instrumentation-fastify';\n\nconst SUPPORTED_VERSIONS = '>=4.0.0 <6';\nconst FASTIFY_HOOKS = [\n 'onRequest',\n 'preParsing',\n 'preValidation',\n 'preHandler',\n 'preSerialization',\n 'onSend',\n 'onResponse',\n 'onError',\n];\nconst ATTRIBUTE_NAMES = {\n HOOK_NAME: 'hook.name',\n FASTIFY_TYPE: 'fastify.type',\n HOOK_CALLBACK_NAME: 'hook.callback.name',\n ROOT: 'fastify.root',\n};\nconst HOOK_TYPES = {\n ROUTE: 'route-hook',\n INSTANCE: 'hook',\n HANDLER: 'request-handler',\n};\nconst ANONYMOUS_FUNCTION_NAME = 'anonymous';\n\nconst kInstrumentation = Symbol('fastify otel instance');\nconst kRequestSpan = Symbol('fastify otel request spans');\nconst kRequestContext = Symbol('fastify otel request context');\nconst kAddHookOriginal = Symbol('fastify otel addhook original');\nconst kSetNotFoundOriginal = Symbol('fastify otel setnotfound original');\nconst kRecordExceptions = Symbol('fastify otel record exceptions');\n\nexport interface FastifyOtelInstrumentationOpts extends InstrumentationConfig {\n registerOnInitialization?: boolean;\n requestHook?: (span: Span, request: any) => void;\n lifecycleHook?: (span: Span, info: { hookName: string; request: any; handler?: string }) => void;\n recordExceptions?: boolean;\n}\n\nexport class FastifyOtelInstrumentation extends InstrumentationBase<FastifyOtelInstrumentationOpts> {\n _otelLogger: any = null;\n _requestHook: ((span: Span, request: any) => void) | null = null;\n _lifecycleHook: ((span: Span, info: any) => void) | null = null;\n _handleInitialization: ((message: any) => void) | undefined = undefined;\n\n [kRecordExceptions]: boolean = true;\n\n constructor(config: FastifyOtelInstrumentationOpts = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n this._otelLogger = diag.createComponentLogger({ namespace: PACKAGE_NAME });\n this[kRecordExceptions] = true;\n\n if (config?.recordExceptions != null) {\n if (typeof config.recordExceptions !== 'boolean') {\n throw new TypeError('recordExceptions must be a boolean');\n }\n\n this[kRecordExceptions] = config.recordExceptions;\n }\n if (typeof config?.requestHook === 'function') {\n this._requestHook = config.requestHook;\n }\n if (typeof config?.lifecycleHook === 'function') {\n this._lifecycleHook = config.lifecycleHook;\n }\n }\n\n enable(): any {\n if (this._handleInitialization === undefined && this.getConfig().registerOnInitialization) {\n this._handleInitialization = (message: any) => {\n this.plugin()(message.fastify, undefined, () => {});\n const emptyPlugin: any = (_: any, __: any, done: () => void) => {\n done();\n };\n emptyPlugin[Symbol.for('skip-override')] = true;\n emptyPlugin[Symbol.for('fastify.display-name')] = PACKAGE_NAME;\n message.fastify.register(emptyPlugin);\n };\n dc.subscribe('fastify.initialization', this._handleInitialization);\n }\n return super.enable();\n }\n\n disable(): any {\n if (this._handleInitialization) {\n dc.unsubscribe('fastify.initialization', this._handleInitialization);\n this._handleInitialization = undefined;\n }\n return super.disable();\n }\n\n init() {\n return [];\n }\n\n plugin(): any {\n const instrumentation = this;\n\n const pluginAny = FastifyInstrumentationPlugin as any;\n pluginAny[Symbol.for('skip-override')] = true;\n pluginAny[Symbol.for('fastify.display-name')] = PACKAGE_NAME;\n pluginAny[Symbol.for('plugin-meta')] = {\n fastify: SUPPORTED_VERSIONS,\n name: PACKAGE_NAME,\n };\n\n return FastifyInstrumentationPlugin;\n\n function FastifyInstrumentationPlugin(instance: any, _opts: any, done: () => void) {\n instance.decorate(kInstrumentation, instrumentation);\n instance.decorate(kAddHookOriginal, instance.addHook);\n instance.decorate(kSetNotFoundOriginal, instance.setNotFoundHandler);\n instance.decorateRequest('opentelemetry', function opentelemetry(this: any) {\n const ctx = this[kRequestContext];\n const span = this[kRequestSpan];\n\n return {\n enabled: this.routeOptions.config?.otel !== false,\n span,\n tracer: instrumentation.tracer,\n context: ctx,\n inject: (carrier: any, setter?: any) => {\n return propagation.inject(ctx, carrier, setter);\n },\n extract: (carrier: any, getter?: any) => {\n return propagation.extract(ctx, carrier, getter);\n },\n };\n });\n instance.decorateRequest(kRequestSpan, null);\n instance.decorateRequest(kRequestContext, null);\n\n instance.addHook('onRoute', function otelWireRoute(this: any, routeOptions: any) {\n if (routeOptions.config?.otel === false) {\n instrumentation._otelLogger.debug(\n `Ignoring route instrumentation ${routeOptions.method} ${routeOptions.url} because it is disabled`,\n );\n\n return;\n }\n\n for (const hook of FASTIFY_HOOKS) {\n if (routeOptions[hook] != null) {\n const handlerLike = routeOptions[hook];\n\n if (typeof handlerLike === 'function') {\n routeOptions[hook] = handlerWrapper(handlerLike, hook, {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,\n [ATTR_HTTP_ROUTE]: routeOptions.url,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n handlerLike.name?.length > 0 ? handlerLike.name : ANONYMOUS_FUNCTION_NAME,\n });\n } else if (Array.isArray(handlerLike)) {\n const wrappedHandlers: any[] = [];\n\n for (const handler of handlerLike) {\n wrappedHandlers.push(\n handlerWrapper(handler, hook, {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route -> ${hook}`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.ROUTE,\n [ATTR_HTTP_ROUTE]: routeOptions.url,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME,\n }),\n );\n }\n\n routeOptions[hook] = wrappedHandlers;\n }\n }\n }\n\n if (routeOptions.onSend != null) {\n routeOptions.onSend = Array.isArray(routeOptions.onSend)\n ? [...routeOptions.onSend, finalizeResponseSpanHook]\n : [routeOptions.onSend, finalizeResponseSpanHook];\n } else {\n routeOptions.onSend = finalizeResponseSpanHook;\n }\n\n if (routeOptions.onError != null) {\n routeOptions.onError = Array.isArray(routeOptions.onError)\n ? [...routeOptions.onError, recordErrorInSpanHook]\n : [routeOptions.onError, recordErrorInSpanHook];\n } else {\n routeOptions.onError = recordErrorInSpanHook;\n }\n\n routeOptions.handler = handlerWrapper(routeOptions.handler, 'handler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - route-handler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.HANDLER,\n [ATTR_HTTP_ROUTE]: routeOptions.url,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n routeOptions.handler.name.length > 0 ? routeOptions.handler.name : ANONYMOUS_FUNCTION_NAME,\n });\n });\n\n instance.addHook(\n 'onRequest',\n function startRequestSpanHook(this: any, request: any, _reply: any, hookDone: () => void) {\n if (this[kInstrumentation].isEnabled() === false || request.routeOptions.config?.otel === false) {\n return hookDone();\n }\n\n let ctx = context.active();\n\n if (trace.getSpan(ctx) == null) {\n ctx = propagation.extract(ctx, request.headers);\n }\n\n const rpcMetadata = getRPCMetadata(ctx);\n\n if (request.routeOptions.url != null && rpcMetadata?.type === RPCType.HTTP) {\n rpcMetadata.route = request.routeOptions.url;\n }\n\n const attributes: Record<string, string> = {\n [ATTRIBUTE_NAMES.ROOT]: PACKAGE_NAME,\n [ATTR_HTTP_REQUEST_METHOD]: request.method,\n [ATTR_URL_PATH]: request.url,\n };\n\n if (request.routeOptions.url != null) {\n attributes[ATTR_HTTP_ROUTE] = request.routeOptions.url;\n }\n\n const span = this[kInstrumentation].tracer.startSpan('request', { attributes }, ctx);\n\n try {\n this[kInstrumentation]._requestHook?.(span, request);\n } catch (err) {\n this[kInstrumentation]._otelLogger.error({ err }, 'requestHook threw');\n }\n\n request[kRequestContext] = trace.setSpan(ctx, span);\n request[kRequestSpan] = span;\n\n context.with(request[kRequestContext], () => {\n hookDone();\n });\n },\n );\n\n instance.addHook('onResponse', function finalizeNotFoundSpanHook(request: any, reply: any, hookDone: () => void) {\n const span = request[kRequestSpan];\n\n if (span != null) {\n span.setAttributes({\n [ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode,\n });\n span.end();\n }\n\n request[kRequestSpan] = null;\n\n hookDone();\n });\n\n instance.addHook = addHookPatched;\n instance.setNotFoundHandler = setNotFoundHandlerPatched;\n\n done();\n\n function finalizeResponseSpanHook(\n request: any,\n reply: any,\n payload: any,\n hookDone: (err: null, payload: any) => void,\n ) {\n const span = request[kRequestSpan];\n\n if (span != null) {\n if (reply.statusCode >= 500) {\n span.setStatus({ code: SpanStatusCode.ERROR });\n }\n\n span.setAttributes({\n [ATTR_HTTP_RESPONSE_STATUS_CODE]: reply.statusCode,\n });\n span.end();\n }\n\n request[kRequestSpan] = null;\n\n hookDone(null, payload);\n }\n\n function recordErrorInSpanHook(request: any, _reply: any, error: any, hookDone: () => void) {\n const span = request[kRequestSpan];\n\n if (span != null) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n if (instrumentation[kRecordExceptions] !== false) {\n span.recordException(error);\n }\n }\n\n hookDone();\n }\n\n function addHookPatched(this: any, name: string, hook: (...args: any[]) => any) {\n const addHookOriginal = this[kAddHookOriginal];\n\n if (FASTIFY_HOOKS.includes(name)) {\n return addHookOriginal.call(\n this,\n name,\n handlerWrapper(hook, name, {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - ${name}`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hook.name?.length > 0 ? hook.name : ANONYMOUS_FUNCTION_NAME,\n }),\n );\n } else {\n return addHookOriginal.call(this, name, hook);\n }\n }\n\n function setNotFoundHandlerPatched(this: any, hooks: any, handler?: any) {\n const setNotFoundHandlerOriginal = this[kSetNotFoundOriginal];\n if (typeof hooks === 'function') {\n handler = handlerWrapper(hooks, 'notFoundHandler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: hooks.name?.length > 0 ? hooks.name : ANONYMOUS_FUNCTION_NAME,\n });\n setNotFoundHandlerOriginal.call(this, handler);\n } else {\n if (hooks.preValidation != null) {\n hooks.preValidation = handlerWrapper(hooks.preValidation, 'notFoundHandler - preValidation', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preValidation`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n hooks.preValidation.name?.length > 0 ? hooks.preValidation.name : ANONYMOUS_FUNCTION_NAME,\n });\n }\n\n if (hooks.preHandler != null) {\n hooks.preHandler = handlerWrapper(hooks.preHandler, 'notFoundHandler - preHandler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler - preHandler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]:\n hooks.preHandler.name?.length > 0 ? hooks.preHandler.name : ANONYMOUS_FUNCTION_NAME,\n });\n }\n\n handler = handlerWrapper(handler, 'notFoundHandler', {\n [ATTRIBUTE_NAMES.HOOK_NAME]: `${this.pluginName} - not-found-handler`,\n [ATTRIBUTE_NAMES.FASTIFY_TYPE]: HOOK_TYPES.INSTANCE,\n [ATTRIBUTE_NAMES.HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME,\n });\n setNotFoundHandlerOriginal.call(this, hooks, handler);\n }\n }\n\n function getRequestFromArgs(args: any[]) {\n for (const arg of args) {\n if (arg?.routeOptions && arg.url && arg.method) {\n return arg;\n }\n }\n return null;\n }\n\n function handlerWrapper(\n handler: (...args: any[]) => any,\n hookName: string,\n spanAttributes: Record<string, string> = {},\n ) {\n return function handlerWrapped(this: any, ...args: any[]) {\n const instrumentation: FastifyOtelInstrumentation = this[kInstrumentation];\n\n const request = getRequestFromArgs(args);\n if (request === null) {\n instrumentation._otelLogger.debug(\n `Ignoring route instrumentation because ${hookName} was called without a Fastify request argument`,\n );\n return handler.call(this, ...args);\n }\n\n if (instrumentation.isEnabled() === false || request.routeOptions.config?.otel === false) {\n instrumentation._otelLogger.debug(\n `Ignoring route instrumentation ${request.routeOptions.method} ${request.routeOptions.url} because it is disabled`,\n );\n return handler.call(this, ...args);\n }\n\n const ctx = request[kRequestContext] ?? context.active();\n const handlerName = handler.name?.length > 0 ? handler.name : (this.pluginName ?? ANONYMOUS_FUNCTION_NAME);\n\n const span = instrumentation.tracer.startSpan(\n `${hookName} - ${handlerName}`,\n {\n attributes: spanAttributes,\n },\n ctx,\n );\n\n if (instrumentation._lifecycleHook != null) {\n try {\n instrumentation._lifecycleHook(span, {\n hookName,\n request,\n handler: handlerName,\n });\n } catch (err) {\n instrumentation._otelLogger.error({ err }, 'Execution of lifecycleHook failed');\n }\n }\n\n return context.with(\n trace.setSpan(ctx, span),\n function (this: any) {\n try {\n const res = handler.call(this, ...args);\n\n if (typeof res?.then === 'function') {\n return res.then(\n (result: any) => {\n span.end();\n return result;\n },\n (error: any) => {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n if (instrumentation[kRecordExceptions] !== false) {\n span.recordException(error);\n }\n span.end();\n return Promise.reject(error);\n },\n );\n }\n\n span.end();\n return res;\n } catch (error: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n if (instrumentation[kRecordExceptions] !== false) {\n span.recordException(error);\n }\n span.end();\n throw error;\n }\n },\n this,\n );\n };\n }\n }\n }\n}\n"],"names":["SDK_VERSION","InstrumentationBase","diag","propagation","ATTR_HTTP_ROUTE","context","trace","getRPCMetadata","RPCType","ATTR_HTTP_REQUEST_METHOD","ATTR_URL_PATH","ATTR_HTTP_RESPONSE_STATUS_CODE","SpanStatusCode","instrumentation"],"mappings":";;;;;;;;;AAAA,IAAA,EAAA,EAAA,EAAA;AA2CA,MAAM,eAAA,GAAkBA,gBAAA;AACxB,MAAM,YAAA,GAAe,iCAAA;AAErB,MAAM,kBAAA,GAAqB,YAAA;AAC3B,M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