@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
@@ -0,0 +1,436 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const instrumentation = require('@opentelemetry/instrumentation');
4
+ const api = require('@opentelemetry/api');
5
+ const internalTypes = require('./internal-types.js');
6
+ const utils = require('./utils.js');
7
+ const sqlCommon = require('../../utils/sql-common.js');
8
+ const core = require('@sentry/core');
9
+ const SpanNames = require('./enums/SpanNames.js');
10
+ const core$1 = require('@opentelemetry/core');
11
+ const semanticConventions = require('@opentelemetry/semantic-conventions');
12
+ const semconv = require('./semconv.js');
13
+
14
+ const PACKAGE_NAME = "@sentry/instrumentation-pg";
15
+ function extractModuleExports(module) {
16
+ return module[Symbol.toStringTag] === "Module" ? module.default : module;
17
+ }
18
+ class PgInstrumentation extends instrumentation.InstrumentationBase {
19
+ constructor(config = {}) {
20
+ super(PACKAGE_NAME, core.SDK_VERSION, config);
21
+ // Pool events connect, acquire, release and remove can be called
22
+ // multiple times without changing the values of total, idle and waiting
23
+ // connections. The _connectionsCounter is used to keep track of latest
24
+ // values and only update the metrics _connectionsCount and _connectionPendingRequests
25
+ // when the value change.
26
+ this._connectionsCounter = {
27
+ used: 0,
28
+ idle: 0,
29
+ pending: 0
30
+ };
31
+ this._semconvStability = instrumentation.semconvStabilityFromStr("database", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
32
+ }
33
+ _updateMetricInstruments() {
34
+ this._operationDuration = this.meter.createHistogram(semanticConventions.METRIC_DB_CLIENT_OPERATION_DURATION, {
35
+ description: "Duration of database client operations.",
36
+ unit: "s",
37
+ valueType: api.ValueType.DOUBLE,
38
+ advice: {
39
+ explicitBucketBoundaries: [1e-3, 5e-3, 0.01, 0.05, 0.1, 0.5, 1, 5, 10]
40
+ }
41
+ });
42
+ this._connectionsCounter = {
43
+ idle: 0,
44
+ pending: 0,
45
+ used: 0
46
+ };
47
+ this._connectionsCount = this.meter.createUpDownCounter(semconv.METRIC_DB_CLIENT_CONNECTION_COUNT, {
48
+ description: "The number of connections that are currently in state described by the state attribute.",
49
+ unit: "{connection}"
50
+ });
51
+ this._connectionPendingRequests = this.meter.createUpDownCounter(semconv.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS, {
52
+ description: "The number of current pending requests for an open connection.",
53
+ unit: "{connection}"
54
+ });
55
+ }
56
+ init() {
57
+ const SUPPORTED_PG_VERSIONS = [">=8.0.3 <9"];
58
+ const SUPPORTED_PG_POOL_VERSIONS = [">=2.0.0 <4"];
59
+ const modulePgNativeClient = new instrumentation.InstrumentationNodeModuleFile(
60
+ "pg/lib/native/client.js",
61
+ SUPPORTED_PG_VERSIONS,
62
+ this._patchPgClient.bind(this),
63
+ this._unpatchPgClient.bind(this)
64
+ );
65
+ const modulePgClient = new instrumentation.InstrumentationNodeModuleFile(
66
+ "pg/lib/client.js",
67
+ SUPPORTED_PG_VERSIONS,
68
+ this._patchPgClient.bind(this),
69
+ this._unpatchPgClient.bind(this)
70
+ );
71
+ const modulePG = new instrumentation.InstrumentationNodeModuleDefinition(
72
+ "pg",
73
+ SUPPORTED_PG_VERSIONS,
74
+ (module) => {
75
+ const moduleExports = extractModuleExports(module);
76
+ this._patchPgClient(moduleExports.Client);
77
+ return module;
78
+ },
79
+ (module) => {
80
+ const moduleExports = extractModuleExports(module);
81
+ this._unpatchPgClient(moduleExports.Client);
82
+ return module;
83
+ },
84
+ [modulePgClient, modulePgNativeClient]
85
+ );
86
+ const modulePGPool = new instrumentation.InstrumentationNodeModuleDefinition(
87
+ "pg-pool",
88
+ SUPPORTED_PG_POOL_VERSIONS,
89
+ (module) => {
90
+ const moduleExports = extractModuleExports(module);
91
+ if (instrumentation.isWrapped(moduleExports.prototype.connect)) {
92
+ this._unwrap(moduleExports.prototype, "connect");
93
+ }
94
+ this._wrap(moduleExports.prototype, "connect", this._getPoolConnectPatch());
95
+ return moduleExports;
96
+ },
97
+ (module) => {
98
+ const moduleExports = extractModuleExports(module);
99
+ if (instrumentation.isWrapped(moduleExports.prototype.connect)) {
100
+ this._unwrap(moduleExports.prototype, "connect");
101
+ }
102
+ }
103
+ );
104
+ return [modulePG, modulePGPool];
105
+ }
106
+ _patchPgClient(module) {
107
+ if (!module) {
108
+ return;
109
+ }
110
+ const moduleExports = extractModuleExports(module);
111
+ if (instrumentation.isWrapped(moduleExports.prototype.query)) {
112
+ this._unwrap(moduleExports.prototype, "query");
113
+ }
114
+ if (instrumentation.isWrapped(moduleExports.prototype.connect)) {
115
+ this._unwrap(moduleExports.prototype, "connect");
116
+ }
117
+ this._wrap(moduleExports.prototype, "query", this._getClientQueryPatch());
118
+ this._wrap(moduleExports.prototype, "connect", this._getClientConnectPatch());
119
+ return module;
120
+ }
121
+ _unpatchPgClient(module) {
122
+ const moduleExports = extractModuleExports(module);
123
+ if (instrumentation.isWrapped(moduleExports.prototype.query)) {
124
+ this._unwrap(moduleExports.prototype, "query");
125
+ }
126
+ if (instrumentation.isWrapped(moduleExports.prototype.connect)) {
127
+ this._unwrap(moduleExports.prototype, "connect");
128
+ }
129
+ return module;
130
+ }
131
+ _getClientConnectPatch() {
132
+ const plugin = this;
133
+ return (original) => {
134
+ return function connect(callback) {
135
+ const config = plugin.getConfig();
136
+ if (utils.shouldSkipInstrumentation(config) || config.ignoreConnectSpans) {
137
+ return original.call(this, callback);
138
+ }
139
+ const span = plugin.tracer.startSpan(SpanNames.SpanNames.CONNECT, {
140
+ kind: api.SpanKind.CLIENT,
141
+ attributes: utils.getSemanticAttributesFromConnection(this, plugin._semconvStability)
142
+ });
143
+ if (callback) {
144
+ const parentSpan = api.trace.getSpan(api.context.active());
145
+ callback = utils.patchClientConnectCallback(span, callback);
146
+ if (parentSpan) {
147
+ callback = api.context.bind(api.context.active(), callback);
148
+ }
149
+ }
150
+ const connectResult = api.context.with(api.trace.setSpan(api.context.active(), span), () => {
151
+ return original.call(this, callback);
152
+ });
153
+ return handleConnectResult(span, connectResult);
154
+ };
155
+ };
156
+ }
157
+ recordOperationDuration(attributes, startTime) {
158
+ const metricsAttributes = {};
159
+ const keysToCopy = [
160
+ semanticConventions.ATTR_DB_NAMESPACE,
161
+ semanticConventions.ATTR_ERROR_TYPE,
162
+ semanticConventions.ATTR_SERVER_PORT,
163
+ semanticConventions.ATTR_SERVER_ADDRESS,
164
+ semanticConventions.ATTR_DB_OPERATION_NAME
165
+ ];
166
+ if (this._semconvStability & instrumentation.SemconvStability.OLD) {
167
+ keysToCopy.push(semconv.ATTR_DB_SYSTEM);
168
+ }
169
+ if (this._semconvStability & instrumentation.SemconvStability.STABLE) {
170
+ keysToCopy.push(semanticConventions.ATTR_DB_SYSTEM_NAME);
171
+ }
172
+ keysToCopy.forEach((key) => {
173
+ if (key in attributes) {
174
+ metricsAttributes[key] = attributes[key];
175
+ }
176
+ });
177
+ const durationSeconds = core$1.hrTimeToMilliseconds(core$1.hrTimeDuration(startTime, core$1.hrTime())) / 1e3;
178
+ this._operationDuration.record(durationSeconds, metricsAttributes);
179
+ }
180
+ _getClientQueryPatch() {
181
+ const plugin = this;
182
+ return (original) => {
183
+ this._diag.debug("Patching pg.Client.prototype.query");
184
+ return function query(...args) {
185
+ if (utils.shouldSkipInstrumentation(plugin.getConfig())) {
186
+ return original.apply(this, args);
187
+ }
188
+ const startTime = core$1.hrTime();
189
+ const arg0 = args[0];
190
+ const firstArgIsString = typeof arg0 === "string";
191
+ const firstArgIsQueryObjectWithText = utils.isObjectWithTextString(arg0);
192
+ const queryConfig = firstArgIsString ? {
193
+ text: arg0,
194
+ values: Array.isArray(args[1]) ? args[1] : void 0
195
+ } : firstArgIsQueryObjectWithText ? {
196
+ ...arg0,
197
+ name: arg0.name,
198
+ text: arg0.text,
199
+ values: arg0.values ?? (Array.isArray(args[1]) ? args[1] : void 0)
200
+ } : void 0;
201
+ const attributes = {
202
+ [semconv.ATTR_DB_SYSTEM]: semconv.DB_SYSTEM_VALUE_POSTGRESQL,
203
+ [semanticConventions.ATTR_DB_NAMESPACE]: this.database,
204
+ [semanticConventions.ATTR_SERVER_PORT]: this.connectionParameters.port,
205
+ [semanticConventions.ATTR_SERVER_ADDRESS]: this.connectionParameters.host
206
+ };
207
+ if (queryConfig?.text) {
208
+ attributes[semanticConventions.ATTR_DB_OPERATION_NAME] = utils.parseNormalizedOperationName(queryConfig?.text);
209
+ }
210
+ const recordDuration = () => {
211
+ plugin.recordOperationDuration(attributes, startTime);
212
+ };
213
+ const instrumentationConfig = plugin.getConfig();
214
+ const span = utils.handleConfigQuery.call(
215
+ this,
216
+ plugin.tracer,
217
+ instrumentationConfig,
218
+ plugin._semconvStability,
219
+ queryConfig
220
+ );
221
+ if (instrumentationConfig.addSqlCommenterCommentToQueries) {
222
+ if (firstArgIsString) {
223
+ args[0] = sqlCommon.addSqlCommenterComment(span, arg0);
224
+ } else if (firstArgIsQueryObjectWithText && !("name" in arg0)) {
225
+ args[0] = {
226
+ ...arg0,
227
+ text: sqlCommon.addSqlCommenterComment(span, arg0.text)
228
+ };
229
+ }
230
+ }
231
+ if (args.length > 0) {
232
+ const parentSpan = api.trace.getSpan(api.context.active());
233
+ if (typeof args[args.length - 1] === "function") {
234
+ args[args.length - 1] = utils.patchCallback(
235
+ instrumentationConfig,
236
+ span,
237
+ args[args.length - 1],
238
+ // nb: not type safe.
239
+ attributes,
240
+ recordDuration
241
+ );
242
+ if (parentSpan) {
243
+ args[args.length - 1] = api.context.bind(api.context.active(), args[args.length - 1]);
244
+ }
245
+ } else if (typeof queryConfig?.callback === "function") {
246
+ let callback = utils.patchCallback(
247
+ plugin.getConfig(),
248
+ span,
249
+ queryConfig.callback,
250
+ // nb: not type safe.
251
+ attributes,
252
+ recordDuration
253
+ );
254
+ if (parentSpan) {
255
+ callback = api.context.bind(api.context.active(), callback);
256
+ }
257
+ args[0].callback = callback;
258
+ }
259
+ }
260
+ const { requestHook } = instrumentationConfig;
261
+ if (typeof requestHook === "function" && queryConfig) {
262
+ instrumentation.safeExecuteInTheMiddle(
263
+ () => {
264
+ const { database, host, port, user } = this.connectionParameters;
265
+ const connection = { database, host, port, user };
266
+ requestHook(span, {
267
+ connection,
268
+ query: {
269
+ text: queryConfig.text,
270
+ // nb: if `client.query` is called with illegal arguments
271
+ // (e.g., if `queryConfig.values` is passed explicitly, but a
272
+ // non-array is given), then the type casts will be wrong. But
273
+ // we leave it up to the queryHook to handle that, and we
274
+ // catch and swallow any errors it throws. The other options
275
+ // are all worse. E.g., we could leave `queryConfig.values`
276
+ // and `queryConfig.name` as `unknown`, but then the hook body
277
+ // would be forced to validate (or cast) them before using
278
+ // them, which seems incredibly cumbersome given that these
279
+ // casts will be correct 99.9% of the time -- and pg.query
280
+ // will immediately throw during development in the other .1%
281
+ // of cases. Alternatively, we could simply skip calling the
282
+ // hook when `values` or `name` don't have the expected type,
283
+ // but that would add unnecessary validation overhead to every
284
+ // hook invocation and possibly be even more confusing/unexpected.
285
+ values: queryConfig.values,
286
+ name: queryConfig.name
287
+ }
288
+ });
289
+ },
290
+ (err) => {
291
+ if (err) {
292
+ plugin._diag.error("Error running query hook", err);
293
+ }
294
+ },
295
+ true
296
+ );
297
+ }
298
+ let result;
299
+ try {
300
+ result = original.apply(this, args);
301
+ } catch (e) {
302
+ if (e instanceof Error) {
303
+ span.recordException(utils.sanitizedErrorMessage(e));
304
+ }
305
+ span.setStatus({
306
+ code: api.SpanStatusCode.ERROR,
307
+ message: utils.getErrorMessage(e)
308
+ });
309
+ span.end();
310
+ throw e;
311
+ }
312
+ if (result instanceof Promise) {
313
+ return result.then((result2) => {
314
+ return new Promise((resolve) => {
315
+ utils.handleExecutionResult(plugin.getConfig(), span, result2);
316
+ recordDuration();
317
+ span.end();
318
+ resolve(result2);
319
+ });
320
+ }).catch((error) => {
321
+ return new Promise((_, reject) => {
322
+ if (error instanceof Error) {
323
+ span.recordException(utils.sanitizedErrorMessage(error));
324
+ }
325
+ span.setStatus({
326
+ code: api.SpanStatusCode.ERROR,
327
+ message: error.message
328
+ });
329
+ recordDuration();
330
+ span.end();
331
+ reject(error);
332
+ });
333
+ });
334
+ }
335
+ return result;
336
+ };
337
+ };
338
+ }
339
+ _setPoolConnectEventListeners(pgPool) {
340
+ if (pgPool[internalTypes.EVENT_LISTENERS_SET]) return;
341
+ const poolName = utils.getPoolName(pgPool.options);
342
+ pgPool.on("connect", () => {
343
+ this._connectionsCounter = utils.updateCounter(
344
+ poolName,
345
+ pgPool,
346
+ this._connectionsCount,
347
+ this._connectionPendingRequests,
348
+ this._connectionsCounter
349
+ );
350
+ });
351
+ pgPool.on("acquire", () => {
352
+ this._connectionsCounter = utils.updateCounter(
353
+ poolName,
354
+ pgPool,
355
+ this._connectionsCount,
356
+ this._connectionPendingRequests,
357
+ this._connectionsCounter
358
+ );
359
+ });
360
+ pgPool.on("remove", () => {
361
+ this._connectionsCounter = utils.updateCounter(
362
+ poolName,
363
+ pgPool,
364
+ this._connectionsCount,
365
+ this._connectionPendingRequests,
366
+ this._connectionsCounter
367
+ );
368
+ });
369
+ pgPool.on("release", () => {
370
+ this._connectionsCounter = utils.updateCounter(
371
+ poolName,
372
+ pgPool,
373
+ this._connectionsCount,
374
+ this._connectionPendingRequests,
375
+ this._connectionsCounter
376
+ );
377
+ });
378
+ pgPool[internalTypes.EVENT_LISTENERS_SET] = true;
379
+ }
380
+ _getPoolConnectPatch() {
381
+ const plugin = this;
382
+ return (originalConnect) => {
383
+ return function connect(callback) {
384
+ const config = plugin.getConfig();
385
+ if (utils.shouldSkipInstrumentation(config)) {
386
+ return originalConnect.call(this, callback);
387
+ }
388
+ plugin._setPoolConnectEventListeners(this);
389
+ if (config.ignoreConnectSpans) {
390
+ return originalConnect.call(this, callback);
391
+ }
392
+ const span = plugin.tracer.startSpan(SpanNames.SpanNames.POOL_CONNECT, {
393
+ kind: api.SpanKind.CLIENT,
394
+ attributes: utils.getSemanticAttributesFromPoolConnection(this.options, plugin._semconvStability)
395
+ });
396
+ if (callback) {
397
+ const parentSpan = api.trace.getSpan(api.context.active());
398
+ callback = utils.patchCallbackPGPool(span, callback);
399
+ if (parentSpan) {
400
+ callback = api.context.bind(api.context.active(), callback);
401
+ }
402
+ }
403
+ const connectResult = api.context.with(api.trace.setSpan(api.context.active(), span), () => {
404
+ return originalConnect.call(this, callback);
405
+ });
406
+ return handleConnectResult(span, connectResult);
407
+ };
408
+ };
409
+ }
410
+ }
411
+ function handleConnectResult(span, connectResult) {
412
+ if (!(connectResult instanceof Promise)) {
413
+ return connectResult;
414
+ }
415
+ const connectResultPromise = connectResult;
416
+ return api.context.bind(
417
+ api.context.active(),
418
+ connectResultPromise.then((result) => {
419
+ span.end();
420
+ return result;
421
+ }).catch((error) => {
422
+ if (error instanceof Error) {
423
+ span.recordException(utils.sanitizedErrorMessage(error));
424
+ }
425
+ span.setStatus({
426
+ code: api.SpanStatusCode.ERROR,
427
+ message: utils.getErrorMessage(error)
428
+ });
429
+ span.end();
430
+ return Promise.reject(error);
431
+ })
432
+ );
433
+ }
434
+
435
+ exports.PgInstrumentation = PgInstrumentation;
436
+ //# sourceMappingURL=instrumentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/postgres/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-pg\n * - Upstream version: @opentelemetry/instrumentation-pg@0.70.0\n * - Types from `pg` and `pg-pool` packages inlined as simplified interfaces\n * - Minor TypeScript strictness adjustments\n */\n/* eslint-disable */\n\nimport {\n isWrapped,\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n safeExecuteInTheMiddle,\n InstrumentationNodeModuleFile,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport {\n context,\n trace,\n Span,\n SpanStatusCode,\n SpanKind,\n Histogram,\n ValueType,\n Attributes,\n HrTime,\n UpDownCounter,\n} from '@opentelemetry/api';\nimport type { PgClient } from './pg-types';\nimport {\n PgClientConnect,\n PgClientExtended,\n PostgresCallback,\n PgPoolExtended,\n PgPoolCallback,\n EVENT_LISTENERS_SET,\n} from './internal-types';\nimport { PgInstrumentationConfig } from './types';\nimport * as utils from './utils';\nimport { addSqlCommenterComment } from '../../utils/sql-common';\nimport { SDK_VERSION } from '@sentry/core';\nconst PACKAGE_NAME = '@sentry/instrumentation-pg';\nimport { SpanNames } from './enums/SpanNames';\nimport { hrTime, hrTimeDuration, hrTimeToMilliseconds } from '@opentelemetry/core';\nimport {\n ATTR_ERROR_TYPE,\n ATTR_SERVER_PORT,\n ATTR_SERVER_ADDRESS,\n ATTR_DB_NAMESPACE,\n ATTR_DB_OPERATION_NAME,\n ATTR_DB_SYSTEM_NAME,\n METRIC_DB_CLIENT_OPERATION_DURATION,\n} from '@opentelemetry/semantic-conventions';\nimport {\n METRIC_DB_CLIENT_CONNECTION_COUNT,\n METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,\n ATTR_DB_SYSTEM,\n DB_SYSTEM_VALUE_POSTGRESQL,\n} from './semconv';\n\nfunction extractModuleExports(module: any) {\n return module[Symbol.toStringTag] === 'Module'\n ? module.default // ESM\n : module; // CommonJS\n}\n\nexport class PgInstrumentation extends InstrumentationBase<PgInstrumentationConfig> {\n declare private _operationDuration: Histogram;\n declare private _connectionsCount: UpDownCounter;\n declare private _connectionPendingRequests: UpDownCounter;\n // Pool events connect, acquire, release and remove can be called\n // multiple times without changing the values of total, idle and waiting\n // connections. The _connectionsCounter is used to keep track of latest\n // values and only update the metrics _connectionsCount and _connectionPendingRequests\n // when the value change.\n private _connectionsCounter: utils.poolConnectionsCounter = {\n used: 0,\n idle: 0,\n pending: 0,\n };\n private _semconvStability: SemconvStability;\n\n constructor(config: PgInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n this._semconvStability = semconvStabilityFromStr('database', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n }\n\n override _updateMetricInstruments() {\n this._operationDuration = this.meter.createHistogram(METRIC_DB_CLIENT_OPERATION_DURATION, {\n description: 'Duration of database client operations.',\n unit: 's',\n valueType: ValueType.DOUBLE,\n advice: {\n explicitBucketBoundaries: [0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5, 10],\n },\n });\n\n this._connectionsCounter = {\n idle: 0,\n pending: 0,\n used: 0,\n };\n this._connectionsCount = this.meter.createUpDownCounter(METRIC_DB_CLIENT_CONNECTION_COUNT, {\n description: 'The number of connections that are currently in state described by the state attribute.',\n unit: '{connection}',\n });\n this._connectionPendingRequests = this.meter.createUpDownCounter(METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS, {\n description: 'The number of current pending requests for an open connection.',\n unit: '{connection}',\n });\n }\n\n protected init() {\n const SUPPORTED_PG_VERSIONS = ['>=8.0.3 <9'];\n const SUPPORTED_PG_POOL_VERSIONS = ['>=2.0.0 <4'];\n\n const modulePgNativeClient = new InstrumentationNodeModuleFile(\n 'pg/lib/native/client.js',\n SUPPORTED_PG_VERSIONS,\n this._patchPgClient.bind(this),\n this._unpatchPgClient.bind(this),\n );\n\n const modulePgClient = new InstrumentationNodeModuleFile(\n 'pg/lib/client.js',\n SUPPORTED_PG_VERSIONS,\n this._patchPgClient.bind(this),\n this._unpatchPgClient.bind(this),\n );\n\n const modulePG = new InstrumentationNodeModuleDefinition(\n 'pg',\n SUPPORTED_PG_VERSIONS,\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n\n this._patchPgClient(moduleExports.Client);\n return module;\n },\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n\n this._unpatchPgClient(moduleExports.Client);\n return module;\n },\n [modulePgClient, modulePgNativeClient],\n );\n\n const modulePGPool = new InstrumentationNodeModuleDefinition(\n 'pg-pool',\n SUPPORTED_PG_POOL_VERSIONS,\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n this._wrap(moduleExports.prototype, 'connect', this._getPoolConnectPatch() as any);\n return moduleExports;\n },\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n },\n );\n\n return [modulePG, modulePGPool];\n }\n\n private _patchPgClient(module: any) {\n if (!module) {\n return;\n }\n\n const moduleExports = extractModuleExports(module);\n\n if (isWrapped(moduleExports.prototype.query)) {\n this._unwrap(moduleExports.prototype, 'query');\n }\n\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n\n this._wrap(moduleExports.prototype, 'query', this._getClientQueryPatch() as any);\n\n this._wrap(moduleExports.prototype, 'connect', this._getClientConnectPatch() as any);\n\n return module;\n }\n\n private _unpatchPgClient(module: any) {\n const moduleExports = extractModuleExports(module);\n\n if (isWrapped(moduleExports.prototype.query)) {\n this._unwrap(moduleExports.prototype, 'query');\n }\n\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n\n return module;\n }\n\n private _getClientConnectPatch() {\n const plugin = this;\n return (original: PgClientConnect) => {\n return function connect(this: PgClient, callback?: Function) {\n const config = plugin.getConfig();\n\n if (utils.shouldSkipInstrumentation(config) || config.ignoreConnectSpans) {\n return original.call(this, callback);\n }\n\n const span = plugin.tracer.startSpan(SpanNames.CONNECT, {\n kind: SpanKind.CLIENT,\n attributes: utils.getSemanticAttributesFromConnection(this, plugin._semconvStability),\n });\n\n if (callback) {\n const parentSpan = trace.getSpan(context.active());\n callback = utils.patchClientConnectCallback(span, callback);\n if (parentSpan) {\n callback = context.bind(context.active(), callback);\n }\n }\n\n const connectResult: unknown = context.with(trace.setSpan(context.active(), span), () => {\n return original.call(this, callback);\n });\n\n return handleConnectResult(span, connectResult);\n };\n };\n }\n\n private recordOperationDuration(attributes: Attributes, startTime: HrTime) {\n const metricsAttributes: Attributes = {};\n const keysToCopy: string[] = [\n ATTR_DB_NAMESPACE,\n ATTR_ERROR_TYPE,\n ATTR_SERVER_PORT,\n ATTR_SERVER_ADDRESS,\n ATTR_DB_OPERATION_NAME,\n ];\n if (this._semconvStability & SemconvStability.OLD) {\n keysToCopy.push(ATTR_DB_SYSTEM);\n }\n if (this._semconvStability & SemconvStability.STABLE) {\n keysToCopy.push(ATTR_DB_SYSTEM_NAME);\n }\n\n keysToCopy.forEach(key => {\n if (key in attributes) {\n metricsAttributes[key] = attributes[key];\n }\n });\n\n const durationSeconds = hrTimeToMilliseconds(hrTimeDuration(startTime, hrTime())) / 1000;\n this._operationDuration.record(durationSeconds, metricsAttributes);\n }\n\n private _getClientQueryPatch() {\n const plugin = this;\n return (original: (...args: any[]) => any) => {\n this._diag.debug('Patching pg.Client.prototype.query');\n return function query(this: PgClientExtended, ...args: unknown[]) {\n if (utils.shouldSkipInstrumentation(plugin.getConfig())) {\n return original.apply(this, args as never);\n }\n const startTime = hrTime();\n\n // client.query(text, cb?), client.query(text, values, cb?), and\n // client.query(configObj, cb?) are all valid signatures. We construct\n // a queryConfig obj from all (valid) signatures to build the span in a\n // unified way. We verify that we at least have query text, and code\n // defensively when dealing with `queryConfig` after that (to handle all\n // the other invalid cases, like a non-array for values being provided).\n // The type casts here reflect only what we've actually validated.\n const arg0 = args[0];\n const firstArgIsString = typeof arg0 === 'string';\n const firstArgIsQueryObjectWithText = utils.isObjectWithTextString(arg0);\n\n // TODO: remove the `as ...` casts below when the TS version is upgraded.\n // Newer TS versions will use the result of firstArgIsQueryObjectWithText\n // to properly narrow arg0, but TS 4.3.5 does not.\n const queryConfig = firstArgIsString\n ? {\n text: arg0 as string,\n values: Array.isArray(args[1]) ? args[1] : undefined,\n }\n : firstArgIsQueryObjectWithText\n ? {\n ...(arg0 as any),\n name: arg0.name,\n text: arg0.text,\n values: (arg0 as any).values ?? (Array.isArray(args[1]) ? args[1] : undefined),\n }\n : undefined;\n\n const attributes: Attributes = {\n [ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_POSTGRESQL,\n [ATTR_DB_NAMESPACE]: this.database,\n [ATTR_SERVER_PORT]: this.connectionParameters.port,\n [ATTR_SERVER_ADDRESS]: this.connectionParameters.host,\n };\n\n if (queryConfig?.text) {\n attributes[ATTR_DB_OPERATION_NAME] = utils.parseNormalizedOperationName(queryConfig?.text);\n }\n\n const recordDuration = () => {\n plugin.recordOperationDuration(attributes, startTime);\n };\n\n const instrumentationConfig = plugin.getConfig();\n\n const span = utils.handleConfigQuery.call(\n this,\n plugin.tracer,\n instrumentationConfig,\n plugin._semconvStability,\n queryConfig,\n );\n\n // Modify query text w/ a tracing comment before invoking original for\n // tracing, but only if args[0] has one of our expected shapes.\n if (instrumentationConfig.addSqlCommenterCommentToQueries) {\n if (firstArgIsString) {\n args[0] = addSqlCommenterComment(span, arg0);\n } else if (firstArgIsQueryObjectWithText && !('name' in arg0)) {\n // In the case of a query object, we need to ensure there's no name field\n // as this indicates a prepared query, where the comment would remain the same\n // for every invocation and contain an outdated trace context.\n args[0] = {\n ...arg0,\n text: addSqlCommenterComment(span, arg0.text),\n };\n }\n }\n\n // Bind callback (if any) to parent span (if any)\n if (args.length > 0) {\n const parentSpan = trace.getSpan(context.active());\n if (typeof args[args.length - 1] === 'function') {\n // Patch ParameterQuery callback\n args[args.length - 1] = utils.patchCallback(\n instrumentationConfig,\n span,\n args[args.length - 1] as PostgresCallback, // nb: not type safe.\n attributes,\n recordDuration,\n );\n\n // If a parent span exists, bind the callback\n if (parentSpan) {\n args[args.length - 1] = context.bind(context.active(), args[args.length - 1]);\n }\n } else if (typeof queryConfig?.callback === 'function') {\n // Patch ConfigQuery callback\n let callback = utils.patchCallback(\n plugin.getConfig(),\n span,\n queryConfig.callback as PostgresCallback, // nb: not type safe.\n attributes,\n recordDuration,\n );\n\n // If a parent span existed, bind the callback\n if (parentSpan) {\n callback = context.bind(context.active(), callback);\n }\n\n (args[0] as { callback?: PostgresCallback }).callback = callback;\n }\n }\n\n const { requestHook } = instrumentationConfig;\n if (typeof requestHook === 'function' && queryConfig) {\n safeExecuteInTheMiddle(\n () => {\n // pick keys to expose explicitly, so we're not leaking pg package\n // internals that are subject to change\n const { database, host, port, user } = this.connectionParameters;\n const connection = { database, host, port, user };\n\n requestHook(span, {\n connection,\n query: {\n text: queryConfig.text,\n // nb: if `client.query` is called with illegal arguments\n // (e.g., if `queryConfig.values` is passed explicitly, but a\n // non-array is given), then the type casts will be wrong. But\n // we leave it up to the queryHook to handle that, and we\n // catch and swallow any errors it throws. The other options\n // are all worse. E.g., we could leave `queryConfig.values`\n // and `queryConfig.name` as `unknown`, but then the hook body\n // would be forced to validate (or cast) them before using\n // them, which seems incredibly cumbersome given that these\n // casts will be correct 99.9% of the time -- and pg.query\n // will immediately throw during development in the other .1%\n // of cases. Alternatively, we could simply skip calling the\n // hook when `values` or `name` don't have the expected type,\n // but that would add unnecessary validation overhead to every\n // hook invocation and possibly be even more confusing/unexpected.\n values: queryConfig.values as unknown[],\n name: queryConfig.name as string | undefined,\n },\n });\n },\n err => {\n if (err) {\n plugin._diag.error('Error running query hook', err);\n }\n },\n true,\n );\n }\n\n let result: unknown;\n try {\n result = original.apply(this, args as never);\n } catch (e: unknown) {\n if (e instanceof Error) {\n span.recordException(utils.sanitizedErrorMessage(e));\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: utils.getErrorMessage(e),\n });\n span.end();\n throw e;\n }\n\n // Bind promise to parent span and end the span\n if (result instanceof Promise) {\n return result\n .then((result: unknown) => {\n // Return a pass-along promise which ends the span and then goes to user's orig resolvers\n return new Promise(resolve => {\n utils.handleExecutionResult(plugin.getConfig(), span, result);\n recordDuration();\n span.end();\n resolve(result);\n });\n })\n .catch((error: Error) => {\n return new Promise((_, reject) => {\n if (error instanceof Error) {\n span.recordException(utils.sanitizedErrorMessage(error));\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n recordDuration();\n span.end();\n reject(error);\n });\n });\n }\n\n // else returns void\n return result; // void\n };\n };\n }\n\n private _setPoolConnectEventListeners(pgPool: PgPoolExtended) {\n if (pgPool[EVENT_LISTENERS_SET]) return;\n const poolName = utils.getPoolName(pgPool.options);\n\n pgPool.on('connect', () => {\n this._connectionsCounter = utils.updateCounter(\n poolName,\n pgPool,\n this._connectionsCount,\n this._connectionPendingRequests,\n this._connectionsCounter,\n );\n });\n\n pgPool.on('acquire', () => {\n this._connectionsCounter = utils.updateCounter(\n poolName,\n pgPool,\n this._connectionsCount,\n this._connectionPendingRequests,\n this._connectionsCounter,\n );\n });\n\n pgPool.on('remove', () => {\n this._connectionsCounter = utils.updateCounter(\n poolName,\n pgPool,\n this._connectionsCount,\n this._connectionPendingRequests,\n this._connectionsCounter,\n );\n });\n\n pgPool.on('release' as any, () => {\n this._connectionsCounter = utils.updateCounter(\n poolName,\n pgPool,\n this._connectionsCount,\n this._connectionPendingRequests,\n this._connectionsCounter,\n );\n });\n pgPool[EVENT_LISTENERS_SET] = true;\n }\n\n private _getPoolConnectPatch() {\n const plugin = this;\n return (originalConnect: (...args: any[]) => any) => {\n return function connect(this: PgPoolExtended, callback?: PgPoolCallback) {\n const config = plugin.getConfig();\n\n if (utils.shouldSkipInstrumentation(config)) {\n return originalConnect.call(this, callback as any);\n }\n\n // Still set up event listeners for metrics even when skipping spans\n plugin._setPoolConnectEventListeners(this);\n\n if (config.ignoreConnectSpans) {\n return originalConnect.call(this, callback as any);\n }\n\n // setup span\n const span = plugin.tracer.startSpan(SpanNames.POOL_CONNECT, {\n kind: SpanKind.CLIENT,\n attributes: utils.getSemanticAttributesFromPoolConnection(this.options, plugin._semconvStability),\n });\n\n if (callback) {\n const parentSpan = trace.getSpan(context.active());\n callback = utils.patchCallbackPGPool(span, callback) as PgPoolCallback;\n // If a parent span exists, bind the callback\n if (parentSpan) {\n callback = context.bind(context.active(), callback);\n }\n }\n\n const connectResult: unknown = context.with(trace.setSpan(context.active(), span), () => {\n return originalConnect.call(this, callback as any);\n });\n\n return handleConnectResult(span, connectResult);\n };\n };\n }\n}\n\nfunction handleConnectResult(span: Span, connectResult: unknown) {\n if (!(connectResult instanceof Promise)) {\n return connectResult;\n }\n\n const connectResultPromise = connectResult as Promise<unknown>;\n return context.bind(\n context.active(),\n connectResultPromise\n .then(result => {\n span.end();\n return result;\n })\n .catch((error: unknown) => {\n if (error instanceof Error) {\n span.recordException(utils.sanitizedErrorMessage(error));\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: utils.getErrorMessage(error),\n });\n span.end();\n return Promise.reject(error);\n }),\n );\n}\n"],"names":["InstrumentationBase","SDK_VERSION","semconvStabilityFromStr","METRIC_DB_CLIENT_OPERATION_DURATION","ValueType","METRIC_DB_CLIENT_CONNECTION_COUNT","METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS","InstrumentationNodeModuleFile","InstrumentationNodeModuleDefinition","isWrapped","utils.shouldSkipInstrumentation","SpanNames","SpanKind","utils.getSemanticAttributesFromConnection","trace","context","utils.patchClientConnectCallback","ATTR_DB_NAMESPACE","ATTR_ERROR_TYPE","ATTR_SERVER_PORT","ATTR_SERVER_ADDRESS","ATTR_DB_OPERATION_NAME","SemconvStability","ATTR_DB_SYSTEM","ATTR_DB_SYSTEM_NAME","hrTimeToMilliseconds","hrTimeDuration","hrTime","utils.isObjectWithTextString","DB_SYSTEM_VALUE_POSTGRESQL","utils.parseNormalizedOperationName","utils.handleConfigQuery","addSqlCommenterComment","utils.patchCallback","safeExecuteInTheMiddle","utils.sanitizedErrorMessage","SpanStatusCode","utils.getErrorMessage","result","utils.handleExecutionResult","EVENT_LISTENERS_SET","utils.getPoolName","utils.updateCounter","utils.getSemanticAttributesFromPoolConnection","utils.patchCallbackPGPool"],"mappings":";;;;;;;;;;;;;AAyDA,MAAM,YAAA,GAAe,4BAAA;AAmBrB,SAAS,qBAAqB,MAAA,EAAa;AACzC,EAAA,OAAO,OAAO,MAAA,CAAO,WAAW,CAAA,KAAM,QAAA,GAClC,OAAO,OAAA,GACP,MAAA;AACN;AAEO,MAAM,0BAA0BA,mCAAA,CAA6C;AAAA,EAgBlF,WAAA,CAAY,MAAA,GAAkC,E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e,KAAA;AAAA,QACrB,OAAA,EAASC,qBAAM,CAAgB,KAAK;AAAA,OACrC,CAAA;AACD,MAAA,IAAA,CAAK,GAAA,EAAI;AACT,MAAA,OAAO,OAAA,CAAQ,OAAO,KAAK,CAAA;AAAA,IAC7B,CAAC;AAAA,GACL;AACF;;;;"}
@@ -0,0 +1,6 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const EVENT_LISTENERS_SET = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.pg.eventListenersSet");
4
+
5
+ exports.EVENT_LISTENERS_SET = EVENT_LISTENERS_SET;
6
+ //# sourceMappingURL=internal-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-types.js","sources":["../../../../../../src/integrations/tracing/postgres/vendored/internal-types.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-pg\n * - Upstream version: @opentelemetry/instrumentation-pg@0.70.0\n * - Types from `pg` and `pg-pool` packages inlined as simplified interfaces\n */\n/* eslint-disable */\n\nimport type { PgClient } from './pg-types';\nimport type { PgPool } from './pg-pool-types';\n\nexport type PostgresCallback = (err: Error, res: object) => unknown;\n\n// NB: this type describes the shape of a parsed, normalized form of the\n// connection information that's stored inside each pg.Client instance. It's\n// _not_ the same as the ConnectionConfig type exported from `@types/pg`. That\n// type defines how data must be _passed in_ when creating a new `pg.Client`,\n// which doesn't necessarily match the normalized internal form. E.g., a user\n// can call `new Client({ connectionString: '...' }), but `connectionString`\n// will never show up in the type below, because only the extracted host, port,\n// etc. are recorded in this normalized config. The keys listed below are also\n// incomplete, which is fine because the type is internal and these keys are the\n// only ones our code is reading. See https://github.com/brianc/node-postgres/blob/fde5ec586e49258dfc4a2fcd861fcdecb4794fc3/lib/client.js#L25\nexport interface PgParsedConnectionParams {\n database?: string;\n host?: string;\n namespace?: string;\n port?: number;\n user?: string;\n}\n\nexport interface PgClientExtended extends PgClient {\n connectionParameters: PgParsedConnectionParams;\n}\n\nexport type PgPoolCallback = (err: Error, client: any, done: (release?: any) => void) => void;\n\nexport interface PgPoolOptionsParams {\n allowExitOnIdle: boolean;\n connectionString?: string; // connection string if provided directly\n database: string;\n host: string;\n idleTimeoutMillis: number; // the minimum amount of time that an object may sit idle in the pool before it is eligible for eviction due to idle time\n max: number;\n maxClient: number; // maximum size of the pool\n maxLifetimeSeconds: number;\n maxUses: number;\n namespace: string;\n port: number;\n user: string;\n}\n\nexport const EVENT_LISTENERS_SET = Symbol('opentelemetry.instrumentation.pg.eventListenersSet');\n\nexport interface PgPoolExtended extends PgPool {\n options: PgPoolOptionsParams;\n [EVENT_LISTENERS_SET]?: boolean; // flag to identify if the event listeners for instrumentation have been set\n}\n\nexport type PgClientConnect = (callback?: Function) => Promise<void> | void;\n"],"names":[],"mappings":";;AAkEO,MAAM,mBAAA,0BAA6B,oDAAoD;;;;"}
@@ -0,0 +1,32 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const ATTR_DB_CLIENT_CONNECTION_POOL_NAME = "db.client.connection.pool.name";
4
+ const ATTR_DB_CLIENT_CONNECTION_STATE = "db.client.connection.state";
5
+ const ATTR_DB_CONNECTION_STRING = "db.connection_string";
6
+ const ATTR_DB_NAME = "db.name";
7
+ const ATTR_DB_STATEMENT = "db.statement";
8
+ const ATTR_DB_SYSTEM = "db.system";
9
+ const ATTR_DB_USER = "db.user";
10
+ const ATTR_NET_PEER_NAME = "net.peer.name";
11
+ const ATTR_NET_PEER_PORT = "net.peer.port";
12
+ const DB_CLIENT_CONNECTION_STATE_VALUE_IDLE = "idle";
13
+ const DB_CLIENT_CONNECTION_STATE_VALUE_USED = "used";
14
+ const DB_SYSTEM_VALUE_POSTGRESQL = "postgresql";
15
+ const METRIC_DB_CLIENT_CONNECTION_COUNT = "db.client.connection.count";
16
+ const METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS = "db.client.connection.pending_requests";
17
+
18
+ exports.ATTR_DB_CLIENT_CONNECTION_POOL_NAME = ATTR_DB_CLIENT_CONNECTION_POOL_NAME;
19
+ exports.ATTR_DB_CLIENT_CONNECTION_STATE = ATTR_DB_CLIENT_CONNECTION_STATE;
20
+ exports.ATTR_DB_CONNECTION_STRING = ATTR_DB_CONNECTION_STRING;
21
+ exports.ATTR_DB_NAME = ATTR_DB_NAME;
22
+ exports.ATTR_DB_STATEMENT = ATTR_DB_STATEMENT;
23
+ exports.ATTR_DB_SYSTEM = ATTR_DB_SYSTEM;
24
+ exports.ATTR_DB_USER = ATTR_DB_USER;
25
+ exports.ATTR_NET_PEER_NAME = ATTR_NET_PEER_NAME;
26
+ exports.ATTR_NET_PEER_PORT = ATTR_NET_PEER_PORT;
27
+ exports.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE = DB_CLIENT_CONNECTION_STATE_VALUE_IDLE;
28
+ exports.DB_CLIENT_CONNECTION_STATE_VALUE_USED = DB_CLIENT_CONNECTION_STATE_VALUE_USED;
29
+ exports.DB_SYSTEM_VALUE_POSTGRESQL = DB_SYSTEM_VALUE_POSTGRESQL;
30
+ exports.METRIC_DB_CLIENT_CONNECTION_COUNT = METRIC_DB_CLIENT_CONNECTION_COUNT;
31
+ exports.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS = METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS;
32
+ //# sourceMappingURL=semconv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/postgres/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-pg\n * - Upstream version: @opentelemetry/instrumentation-pg@0.70.0\n */\n/* eslint-disable */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation **SHOULD** use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns **SHOULD** document it.\n *\n * @example myDataSource\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_DB_CLIENT_CONNECTION_POOL_NAME = 'db.client.connection.pool.name' as const;\n\n/**\n * The state of a connection in the pool\n *\n * @example idle\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_DB_CLIENT_CONNECTION_STATE = 'db.client.connection.state' as const;\n\n/**\n * Deprecated, use `server.address`, `server.port` attributes instead.\n *\n * @example \"Server=(localdb)\\\\v11.0;Integrated Security=true;\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` and `server.port`.\n */\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\n\n/**\n * Deprecated, use `db.namespace` instead.\n *\n * @example customers\n * @example main\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.namespace`.\n */\nexport const ATTR_DB_NAME = 'db.name' as const;\n\n/**\n * The database statement being executed.\n *\n * @example SELECT * FROM wuser_table\n * @example SET mykey \"WuValue\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.query.text`.\n */\nexport const ATTR_DB_STATEMENT = 'db.statement' as const;\n\n/**\n * Deprecated, use `db.system.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.system.name`.\n */\nexport const ATTR_DB_SYSTEM = 'db.system' as const;\n\n/**\n * Deprecated, no replacement at this time.\n *\n * @example readonly_user\n * @example reporting_user\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Removed, no replacement at this time.\n */\nexport const ATTR_DB_USER = 'db.user' as const;\n\n/**\n * Deprecated, use `server.address` on client spans and `client.address` on server spans.\n *\n * @example example.com\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.\n */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/**\n * Deprecated, use `server.port` on client spans and `client.port` on server spans.\n *\n * @example 8080\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.\n */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\n\n/**\n * Enum value \"idle\" for attribute {@link ATTR_DB_CLIENT_CONNECTION_STATE}.\n */\nexport const DB_CLIENT_CONNECTION_STATE_VALUE_IDLE = 'idle' as const;\n\n/**\n * Enum value \"used\" for attribute {@link ATTR_DB_CLIENT_CONNECTION_STATE}.\n */\nexport const DB_CLIENT_CONNECTION_STATE_VALUE_USED = 'used' as const;\n\n/**\n * Enum value \"postgresql\" for attribute {@link ATTR_DB_SYSTEM}.\n */\nexport const DB_SYSTEM_VALUE_POSTGRESQL = 'postgresql' as const;\n\n/**\n * The number of connections that are currently in state described by the `state` attribute\n *\n * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const METRIC_DB_CLIENT_CONNECTION_COUNT = 'db.client.connection.count' as const;\n\n/**\n * The number of current pending requests for an open connection\n *\n * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS = 'db.client.connection.pending_requests' as const;\n"],"names":[],"mappings":";;AAkCO,MAAM,mCAAA,GAAsC;AAS5C,MAAM,+BAAA,GAAkC;AAWxC,MAAM,yBAAA,GAA4B;AAYlC,MAAM,YAAA,GAAe;AAYrB,MAAM,iBAAA,GAAoB;AAS1B,MAAM,cAAA,GAAiB;AAYvB,MAAM,YAAA,GAAe;AAWrB,MAAM,kBAAA,GAAqB;AAW3B,MAAM,kBAAA,GAAqB;AAK3B,MAAM,qCAAA,GAAwC;AAK9C,MAAM,qCAAA,GAAwC;AAK9C,MAAM,0BAAA,GAA6B;AAOnC,MAAM,iCAAA,GAAoC;AAO1C,MAAM,4CAAA,GAA+C;;;;;;;;;;;;;;;;;"}