@sentry/node 9.34.0 → 9.36.0-alpha.1

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 (505) hide show
  1. package/build/cjs/index.js +48 -56
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/featureFlagShims/launchDarkly.js +43 -0
  4. package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -0
  5. package/build/cjs/integrations/featureFlagShims/openFeature.js +55 -0
  6. package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -0
  7. package/build/cjs/integrations/featureFlagShims/statsig.js +23 -0
  8. package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -0
  9. package/build/cjs/integrations/featureFlagShims/unleash.js +23 -0
  10. package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -0
  11. package/build/cjs/integrations/fs.js +2 -2
  12. package/build/cjs/integrations/fs.js.map +1 -1
  13. package/build/cjs/integrations/http/index.js +7 -11
  14. package/build/cjs/integrations/http/index.js.map +1 -1
  15. package/build/cjs/integrations/node-fetch/index.js +4 -5
  16. package/build/cjs/integrations/node-fetch/index.js.map +1 -1
  17. package/build/cjs/integrations/tracing/amqplib.js +4 -5
  18. package/build/cjs/integrations/tracing/amqplib.js.map +1 -1
  19. package/build/cjs/integrations/tracing/connect.js +3 -4
  20. package/build/cjs/integrations/tracing/connect.js.map +1 -1
  21. package/build/cjs/integrations/tracing/dataloader.js +3 -3
  22. package/build/cjs/integrations/tracing/dataloader.js.map +1 -1
  23. package/build/cjs/integrations/tracing/express.js +5 -7
  24. package/build/cjs/integrations/tracing/express.js.map +1 -1
  25. package/build/cjs/integrations/tracing/fastify/fastify-otel/index.js +5 -10
  26. package/build/cjs/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
  27. package/build/cjs/integrations/tracing/fastify/index.js +6 -6
  28. package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
  29. package/build/cjs/integrations/tracing/genericPool.js +3 -3
  30. package/build/cjs/integrations/tracing/genericPool.js.map +1 -1
  31. package/build/cjs/integrations/tracing/graphql.js +3 -4
  32. package/build/cjs/integrations/tracing/graphql.js.map +1 -1
  33. package/build/cjs/integrations/tracing/hapi/index.js +3 -4
  34. package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
  35. package/build/cjs/integrations/tracing/kafka.js +4 -5
  36. package/build/cjs/integrations/tracing/kafka.js.map +1 -1
  37. package/build/cjs/integrations/tracing/knex.js +3 -3
  38. package/build/cjs/integrations/tracing/knex.js.map +1 -1
  39. package/build/cjs/integrations/tracing/koa.js +4 -6
  40. package/build/cjs/integrations/tracing/koa.js.map +1 -1
  41. package/build/cjs/integrations/tracing/lrumemoizer.js +2 -2
  42. package/build/cjs/integrations/tracing/lrumemoizer.js.map +1 -1
  43. package/build/cjs/integrations/tracing/mongo.js +3 -4
  44. package/build/cjs/integrations/tracing/mongo.js.map +1 -1
  45. package/build/cjs/integrations/tracing/mongoose.js +3 -4
  46. package/build/cjs/integrations/tracing/mongoose.js.map +1 -1
  47. package/build/cjs/integrations/tracing/mysql.js +2 -2
  48. package/build/cjs/integrations/tracing/mysql.js.map +1 -1
  49. package/build/cjs/integrations/tracing/mysql2.js +3 -4
  50. package/build/cjs/integrations/tracing/mysql2.js.map +1 -1
  51. package/build/cjs/integrations/tracing/postgres.js +3 -4
  52. package/build/cjs/integrations/tracing/postgres.js.map +1 -1
  53. package/build/cjs/integrations/tracing/postgresjs.js +3 -4
  54. package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
  55. package/build/cjs/integrations/tracing/prisma.js +2 -2
  56. package/build/cjs/integrations/tracing/prisma.js.map +1 -1
  57. package/build/cjs/integrations/tracing/redis.js +3 -3
  58. package/build/cjs/integrations/tracing/redis.js.map +1 -1
  59. package/build/cjs/integrations/tracing/tedious.js +3 -3
  60. package/build/cjs/integrations/tracing/tedious.js.map +1 -1
  61. package/build/cjs/integrations/tracing/vercelai/index.js +2 -2
  62. package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
  63. package/build/cjs/preload.js +2 -2
  64. package/build/cjs/preload.js.map +1 -1
  65. package/build/cjs/sdk/index.js +22 -203
  66. package/build/cjs/sdk/index.js.map +1 -1
  67. package/build/cjs/sdk/initOtel.js +4 -22
  68. package/build/cjs/sdk/initOtel.js.map +1 -1
  69. package/build/esm/index.js +6 -21
  70. package/build/esm/index.js.map +1 -1
  71. package/build/esm/integrations/featureFlagShims/launchDarkly.js +40 -0
  72. package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -0
  73. package/build/esm/integrations/featureFlagShims/openFeature.js +52 -0
  74. package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -0
  75. package/build/esm/integrations/featureFlagShims/statsig.js +21 -0
  76. package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -0
  77. package/build/esm/integrations/featureFlagShims/unleash.js +21 -0
  78. package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -0
  79. package/build/esm/integrations/fs.js +1 -1
  80. package/build/esm/integrations/fs.js.map +1 -1
  81. package/build/esm/integrations/http/index.js +1 -5
  82. package/build/esm/integrations/http/index.js.map +1 -1
  83. package/build/esm/integrations/node-fetch/index.js +2 -3
  84. package/build/esm/integrations/node-fetch/index.js.map +1 -1
  85. package/build/esm/integrations/tracing/amqplib.js +1 -2
  86. package/build/esm/integrations/tracing/amqplib.js.map +1 -1
  87. package/build/esm/integrations/tracing/connect.js +1 -2
  88. package/build/esm/integrations/tracing/connect.js.map +1 -1
  89. package/build/esm/integrations/tracing/dataloader.js +1 -1
  90. package/build/esm/integrations/tracing/dataloader.js.map +1 -1
  91. package/build/esm/integrations/tracing/express.js +2 -4
  92. package/build/esm/integrations/tracing/express.js.map +1 -1
  93. package/build/esm/integrations/tracing/fastify/fastify-otel/index.js +5 -10
  94. package/build/esm/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
  95. package/build/esm/integrations/tracing/fastify/index.js +5 -5
  96. package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
  97. package/build/esm/integrations/tracing/genericPool.js +1 -1
  98. package/build/esm/integrations/tracing/genericPool.js.map +1 -1
  99. package/build/esm/integrations/tracing/graphql.js +2 -3
  100. package/build/esm/integrations/tracing/graphql.js.map +1 -1
  101. package/build/esm/integrations/tracing/hapi/index.js +1 -2
  102. package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
  103. package/build/esm/integrations/tracing/kafka.js +1 -2
  104. package/build/esm/integrations/tracing/kafka.js.map +1 -1
  105. package/build/esm/integrations/tracing/knex.js +1 -1
  106. package/build/esm/integrations/tracing/knex.js.map +1 -1
  107. package/build/esm/integrations/tracing/koa.js +2 -4
  108. package/build/esm/integrations/tracing/koa.js.map +1 -1
  109. package/build/esm/integrations/tracing/lrumemoizer.js +1 -1
  110. package/build/esm/integrations/tracing/lrumemoizer.js.map +1 -1
  111. package/build/esm/integrations/tracing/mongo.js +1 -2
  112. package/build/esm/integrations/tracing/mongo.js.map +1 -1
  113. package/build/esm/integrations/tracing/mongoose.js +1 -2
  114. package/build/esm/integrations/tracing/mongoose.js.map +1 -1
  115. package/build/esm/integrations/tracing/mysql.js +1 -1
  116. package/build/esm/integrations/tracing/mysql.js.map +1 -1
  117. package/build/esm/integrations/tracing/mysql2.js +1 -2
  118. package/build/esm/integrations/tracing/mysql2.js.map +1 -1
  119. package/build/esm/integrations/tracing/postgres.js +1 -2
  120. package/build/esm/integrations/tracing/postgres.js.map +1 -1
  121. package/build/esm/integrations/tracing/postgresjs.js +2 -3
  122. package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
  123. package/build/esm/integrations/tracing/prisma.js +1 -1
  124. package/build/esm/integrations/tracing/prisma.js.map +1 -1
  125. package/build/esm/integrations/tracing/redis.js +1 -1
  126. package/build/esm/integrations/tracing/redis.js.map +1 -1
  127. package/build/esm/integrations/tracing/tedious.js +1 -1
  128. package/build/esm/integrations/tracing/tedious.js.map +1 -1
  129. package/build/esm/integrations/tracing/vercelai/index.js +1 -1
  130. package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
  131. package/build/esm/package.json +1 -1
  132. package/build/esm/preload.js +1 -1
  133. package/build/esm/preload.js.map +1 -1
  134. package/build/esm/sdk/index.js +22 -202
  135. package/build/esm/sdk/index.js.map +1 -1
  136. package/build/esm/sdk/initOtel.js +3 -21
  137. package/build/esm/sdk/initOtel.js.map +1 -1
  138. package/build/types/index.d.ts +3 -21
  139. package/build/types/index.d.ts.map +1 -1
  140. package/build/types/integrations/featureFlagShims/index.d.ts +5 -0
  141. package/build/types/integrations/featureFlagShims/index.d.ts.map +1 -0
  142. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
  143. package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -0
  144. package/build/types/integrations/featureFlagShims/openFeature.d.ts +23 -0
  145. package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -0
  146. package/build/types/integrations/featureFlagShims/statsig.d.ts +6 -0
  147. package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -0
  148. package/build/types/integrations/featureFlagShims/unleash.d.ts +6 -0
  149. package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -0
  150. package/build/types/integrations/http/index.d.ts +1 -1
  151. package/build/types/integrations/http/index.d.ts.map +1 -1
  152. package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
  153. package/build/types/integrations/tracing/amqplib.d.ts.map +1 -1
  154. package/build/types/integrations/tracing/connect.d.ts.map +1 -1
  155. package/build/types/integrations/tracing/express.d.ts.map +1 -1
  156. package/build/types/integrations/tracing/graphql.d.ts.map +1 -1
  157. package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  158. package/build/types/integrations/tracing/kafka.d.ts.map +1 -1
  159. package/build/types/integrations/tracing/koa.d.ts.map +1 -1
  160. package/build/types/integrations/tracing/mongo.d.ts.map +1 -1
  161. package/build/types/integrations/tracing/mongoose.d.ts.map +1 -1
  162. package/build/types/integrations/tracing/mysql2.d.ts.map +1 -1
  163. package/build/types/integrations/tracing/postgres.d.ts.map +1 -1
  164. package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
  165. package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
  166. package/build/types/sdk/index.d.ts +2 -6
  167. package/build/types/sdk/index.d.ts.map +1 -1
  168. package/build/types/sdk/initOtel.d.ts +1 -1
  169. package/build/types/sdk/initOtel.d.ts.map +1 -1
  170. package/build/types/types.d.ts +1 -1
  171. package/build/types/types.d.ts.map +1 -1
  172. package/build/types-ts3.8/index.d.ts +3 -21
  173. package/build/types-ts3.8/integrations/featureFlagShims/index.d.ts +5 -0
  174. package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
  175. package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +23 -0
  176. package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +6 -0
  177. package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +6 -0
  178. package/build/types-ts3.8/integrations/http/index.d.ts +1 -1
  179. package/build/types-ts3.8/sdk/index.d.ts +2 -6
  180. package/build/types-ts3.8/sdk/initOtel.d.ts +1 -1
  181. package/build/types-ts3.8/types.d.ts +1 -1
  182. package/package.json +4 -3
  183. package/build/cjs/cron/common.js +0 -56
  184. package/build/cjs/cron/common.js.map +0 -1
  185. package/build/cjs/cron/cron.js +0 -112
  186. package/build/cjs/cron/cron.js.map +0 -1
  187. package/build/cjs/cron/index.js +0 -15
  188. package/build/cjs/cron/index.js.map +0 -1
  189. package/build/cjs/cron/node-cron.js +0 -71
  190. package/build/cjs/cron/node-cron.js.map +0 -1
  191. package/build/cjs/cron/node-schedule.js +0 -65
  192. package/build/cjs/cron/node-schedule.js.map +0 -1
  193. package/build/cjs/integrations/anr/index.js +0 -238
  194. package/build/cjs/integrations/anr/index.js.map +0 -1
  195. package/build/cjs/integrations/childProcess.js +0 -100
  196. package/build/cjs/integrations/childProcess.js.map +0 -1
  197. package/build/cjs/integrations/context.js +0 -457
  198. package/build/cjs/integrations/context.js.map +0 -1
  199. package/build/cjs/integrations/contextlines.js +0 -405
  200. package/build/cjs/integrations/contextlines.js.map +0 -1
  201. package/build/cjs/integrations/http/SentryHttpInstrumentation.js +0 -558
  202. package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +0 -1
  203. package/build/cjs/integrations/local-variables/common.js +0 -69
  204. package/build/cjs/integrations/local-variables/common.js.map +0 -1
  205. package/build/cjs/integrations/local-variables/index.js +0 -12
  206. package/build/cjs/integrations/local-variables/index.js.map +0 -1
  207. package/build/cjs/integrations/local-variables/local-variables-async.js +0 -143
  208. package/build/cjs/integrations/local-variables/local-variables-async.js.map +0 -1
  209. package/build/cjs/integrations/local-variables/local-variables-sync.js +0 -410
  210. package/build/cjs/integrations/local-variables/local-variables-sync.js.map +0 -1
  211. package/build/cjs/integrations/modules.js +0 -135
  212. package/build/cjs/integrations/modules.js.map +0 -1
  213. package/build/cjs/integrations/node-fetch/SentryNodeFetchInstrumentation.js +0 -291
  214. package/build/cjs/integrations/node-fetch/SentryNodeFetchInstrumentation.js.map +0 -1
  215. package/build/cjs/integrations/onuncaughtexception.js +0 -134
  216. package/build/cjs/integrations/onuncaughtexception.js.map +0 -1
  217. package/build/cjs/integrations/onunhandledrejection.js +0 -89
  218. package/build/cjs/integrations/onunhandledrejection.js.map +0 -1
  219. package/build/cjs/integrations/processSession.js +0 -36
  220. package/build/cjs/integrations/processSession.js.map +0 -1
  221. package/build/cjs/integrations/spotlight.js +0 -101
  222. package/build/cjs/integrations/spotlight.js.map +0 -1
  223. package/build/cjs/integrations/winston.js +0 -151
  224. package/build/cjs/integrations/winston.js.map +0 -1
  225. package/build/cjs/logs/capture.js +0 -29
  226. package/build/cjs/logs/capture.js.map +0 -1
  227. package/build/cjs/logs/exports.js +0 -178
  228. package/build/cjs/logs/exports.js.map +0 -1
  229. package/build/cjs/nodeVersion.js +0 -12
  230. package/build/cjs/nodeVersion.js.map +0 -1
  231. package/build/cjs/otel/contextManager.js +0 -16
  232. package/build/cjs/otel/contextManager.js.map +0 -1
  233. package/build/cjs/otel/instrument.js +0 -139
  234. package/build/cjs/otel/instrument.js.map +0 -1
  235. package/build/cjs/proxy/base.js +0 -122
  236. package/build/cjs/proxy/base.js.map +0 -1
  237. package/build/cjs/proxy/index.js +0 -173
  238. package/build/cjs/proxy/index.js.map +0 -1
  239. package/build/cjs/proxy/parse-proxy-response.js +0 -104
  240. package/build/cjs/proxy/parse-proxy-response.js.map +0 -1
  241. package/build/cjs/sdk/api.js +0 -117
  242. package/build/cjs/sdk/api.js.map +0 -1
  243. package/build/cjs/sdk/client.js +0 -156
  244. package/build/cjs/sdk/client.js.map +0 -1
  245. package/build/cjs/transports/http.js +0 -158
  246. package/build/cjs/transports/http.js.map +0 -1
  247. package/build/cjs/utils/addOriginToSpan.js +0 -11
  248. package/build/cjs/utils/addOriginToSpan.js.map +0 -1
  249. package/build/cjs/utils/baggage.js +0 -36
  250. package/build/cjs/utils/baggage.js.map +0 -1
  251. package/build/cjs/utils/commonjs.js +0 -13
  252. package/build/cjs/utils/commonjs.js.map +0 -1
  253. package/build/cjs/utils/createMissingInstrumentationContext.js +0 -11
  254. package/build/cjs/utils/createMissingInstrumentationContext.js.map +0 -1
  255. package/build/cjs/utils/debug.js +0 -23
  256. package/build/cjs/utils/debug.js.map +0 -1
  257. package/build/cjs/utils/ensureIsWrapped.js +0 -41
  258. package/build/cjs/utils/ensureIsWrapped.js.map +0 -1
  259. package/build/cjs/utils/envToBool.js +0 -32
  260. package/build/cjs/utils/envToBool.js.map +0 -1
  261. package/build/cjs/utils/errorhandling.js +0 -42
  262. package/build/cjs/utils/errorhandling.js.map +0 -1
  263. package/build/cjs/utils/getRequestUrl.js +0 -18
  264. package/build/cjs/utils/getRequestUrl.js.map +0 -1
  265. package/build/cjs/utils/module.js +0 -60
  266. package/build/cjs/utils/module.js.map +0 -1
  267. package/build/esm/cron/common.js +0 -54
  268. package/build/esm/cron/common.js.map +0 -1
  269. package/build/esm/cron/cron.js +0 -110
  270. package/build/esm/cron/cron.js.map +0 -1
  271. package/build/esm/cron/index.js +0 -13
  272. package/build/esm/cron/index.js.map +0 -1
  273. package/build/esm/cron/node-cron.js +0 -69
  274. package/build/esm/cron/node-cron.js.map +0 -1
  275. package/build/esm/cron/node-schedule.js +0 -63
  276. package/build/esm/cron/node-schedule.js.map +0 -1
  277. package/build/esm/integrations/anr/index.js +0 -234
  278. package/build/esm/integrations/anr/index.js.map +0 -1
  279. package/build/esm/integrations/anr/worker-script.js +0 -2
  280. package/build/esm/integrations/childProcess.js +0 -98
  281. package/build/esm/integrations/childProcess.js.map +0 -1
  282. package/build/esm/integrations/context.js +0 -451
  283. package/build/esm/integrations/context.js.map +0 -1
  284. package/build/esm/integrations/contextlines.js +0 -399
  285. package/build/esm/integrations/contextlines.js.map +0 -1
  286. package/build/esm/integrations/http/SentryHttpInstrumentation.js +0 -555
  287. package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +0 -1
  288. package/build/esm/integrations/local-variables/common.js +0 -64
  289. package/build/esm/integrations/local-variables/common.js.map +0 -1
  290. package/build/esm/integrations/local-variables/index.js +0 -10
  291. package/build/esm/integrations/local-variables/index.js.map +0 -1
  292. package/build/esm/integrations/local-variables/local-variables-async.js +0 -140
  293. package/build/esm/integrations/local-variables/local-variables-async.js.map +0 -1
  294. package/build/esm/integrations/local-variables/local-variables-sync.js +0 -405
  295. package/build/esm/integrations/local-variables/local-variables-sync.js.map +0 -1
  296. package/build/esm/integrations/local-variables/worker-script.js +0 -2
  297. package/build/esm/integrations/modules.js +0 -133
  298. package/build/esm/integrations/modules.js.map +0 -1
  299. package/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js +0 -289
  300. package/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js.map +0 -1
  301. package/build/esm/integrations/onuncaughtexception.js +0 -131
  302. package/build/esm/integrations/onuncaughtexception.js.map +0 -1
  303. package/build/esm/integrations/onunhandledrejection.js +0 -86
  304. package/build/esm/integrations/onunhandledrejection.js.map +0 -1
  305. package/build/esm/integrations/processSession.js +0 -34
  306. package/build/esm/integrations/processSession.js.map +0 -1
  307. package/build/esm/integrations/spotlight.js +0 -98
  308. package/build/esm/integrations/spotlight.js.map +0 -1
  309. package/build/esm/integrations/winston.js +0 -149
  310. package/build/esm/integrations/winston.js.map +0 -1
  311. package/build/esm/logs/capture.js +0 -27
  312. package/build/esm/logs/capture.js.map +0 -1
  313. package/build/esm/logs/exports.js +0 -170
  314. package/build/esm/logs/exports.js.map +0 -1
  315. package/build/esm/nodeVersion.js +0 -8
  316. package/build/esm/nodeVersion.js.map +0 -1
  317. package/build/esm/otel/contextManager.js +0 -14
  318. package/build/esm/otel/contextManager.js.map +0 -1
  319. package/build/esm/otel/instrument.js +0 -135
  320. package/build/esm/otel/instrument.js.map +0 -1
  321. package/build/esm/proxy/base.js +0 -120
  322. package/build/esm/proxy/base.js.map +0 -1
  323. package/build/esm/proxy/index.js +0 -171
  324. package/build/esm/proxy/index.js.map +0 -1
  325. package/build/esm/proxy/parse-proxy-response.js +0 -102
  326. package/build/esm/proxy/parse-proxy-response.js.map +0 -1
  327. package/build/esm/sdk/api.js +0 -114
  328. package/build/esm/sdk/api.js.map +0 -1
  329. package/build/esm/sdk/client.js +0 -154
  330. package/build/esm/sdk/client.js.map +0 -1
  331. package/build/esm/transports/http.js +0 -156
  332. package/build/esm/transports/http.js.map +0 -1
  333. package/build/esm/utils/addOriginToSpan.js +0 -9
  334. package/build/esm/utils/addOriginToSpan.js.map +0 -1
  335. package/build/esm/utils/baggage.js +0 -34
  336. package/build/esm/utils/baggage.js.map +0 -1
  337. package/build/esm/utils/commonjs.js +0 -11
  338. package/build/esm/utils/commonjs.js.map +0 -1
  339. package/build/esm/utils/createMissingInstrumentationContext.js +0 -9
  340. package/build/esm/utils/createMissingInstrumentationContext.js.map +0 -1
  341. package/build/esm/utils/debug.js +0 -21
  342. package/build/esm/utils/debug.js.map +0 -1
  343. package/build/esm/utils/ensureIsWrapped.js +0 -39
  344. package/build/esm/utils/ensureIsWrapped.js.map +0 -1
  345. package/build/esm/utils/envToBool.js +0 -28
  346. package/build/esm/utils/envToBool.js.map +0 -1
  347. package/build/esm/utils/errorhandling.js +0 -40
  348. package/build/esm/utils/errorhandling.js.map +0 -1
  349. package/build/esm/utils/getRequestUrl.js +0 -16
  350. package/build/esm/utils/getRequestUrl.js.map +0 -1
  351. package/build/esm/utils/module.js +0 -58
  352. package/build/esm/utils/module.js.map +0 -1
  353. package/build/types/cron/common.d.ts +0 -5
  354. package/build/types/cron/common.d.ts.map +0 -1
  355. package/build/types/cron/cron.d.ts +0 -43
  356. package/build/types/cron/cron.d.ts.map +0 -1
  357. package/build/types/cron/index.d.ts +0 -10
  358. package/build/types/cron/index.d.ts.map +0 -1
  359. package/build/types/cron/node-cron.d.ts +0 -27
  360. package/build/types/cron/node-cron.d.ts.map +0 -1
  361. package/build/types/cron/node-schedule.d.ts +0 -19
  362. package/build/types/cron/node-schedule.d.ts.map +0 -1
  363. package/build/types/integrations/anr/common.d.ts +0 -52
  364. package/build/types/integrations/anr/common.d.ts.map +0 -1
  365. package/build/types/integrations/anr/index.d.ts +0 -13
  366. package/build/types/integrations/anr/index.d.ts.map +0 -1
  367. package/build/types/integrations/anr/worker.d.ts +0 -2
  368. package/build/types/integrations/anr/worker.d.ts.map +0 -1
  369. package/build/types/integrations/childProcess.d.ts +0 -20
  370. package/build/types/integrations/childProcess.d.ts.map +0 -1
  371. package/build/types/integrations/context.d.ts +0 -30
  372. package/build/types/integrations/context.d.ts.map +0 -1
  373. package/build/types/integrations/contextlines.d.ts +0 -31
  374. package/build/types/integrations/contextlines.d.ts.map +0 -1
  375. package/build/types/integrations/http/SentryHttpInstrumentation.d.ts +0 -131
  376. package/build/types/integrations/http/SentryHttpInstrumentation.d.ts.map +0 -1
  377. package/build/types/integrations/local-variables/common.d.ts +0 -66
  378. package/build/types/integrations/local-variables/common.d.ts.map +0 -1
  379. package/build/types/integrations/local-variables/index.d.ts +0 -4
  380. package/build/types/integrations/local-variables/index.d.ts.map +0 -1
  381. package/build/types/integrations/local-variables/local-variables-async.d.ts +0 -7
  382. package/build/types/integrations/local-variables/local-variables-async.d.ts.map +0 -1
  383. package/build/types/integrations/local-variables/local-variables-sync.d.ts +0 -34
  384. package/build/types/integrations/local-variables/local-variables-sync.d.ts.map +0 -1
  385. package/build/types/integrations/local-variables/worker.d.ts +0 -2
  386. package/build/types/integrations/local-variables/worker.d.ts.map +0 -1
  387. package/build/types/integrations/modules.d.ts +0 -17
  388. package/build/types/integrations/modules.d.ts.map +0 -1
  389. package/build/types/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts +0 -56
  390. package/build/types/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts.map +0 -1
  391. package/build/types/integrations/onuncaughtexception.d.ts +0 -31
  392. package/build/types/integrations/onuncaughtexception.d.ts.map +0 -1
  393. package/build/types/integrations/onunhandledrejection.d.ts +0 -23
  394. package/build/types/integrations/onunhandledrejection.d.ts.map +0 -1
  395. package/build/types/integrations/processSession.d.ts +0 -5
  396. package/build/types/integrations/processSession.d.ts.map +0 -1
  397. package/build/types/integrations/spotlight.d.ts +0 -18
  398. package/build/types/integrations/spotlight.d.ts.map +0 -1
  399. package/build/types/integrations/winston.d.ts +0 -44
  400. package/build/types/integrations/winston.d.ts.map +0 -1
  401. package/build/types/logs/capture.d.ts +0 -11
  402. package/build/types/logs/capture.d.ts.map +0 -1
  403. package/build/types/logs/exports.d.ts +0 -150
  404. package/build/types/logs/exports.d.ts.map +0 -1
  405. package/build/types/nodeVersion.d.ts +0 -8
  406. package/build/types/nodeVersion.d.ts.map +0 -1
  407. package/build/types/otel/contextManager.d.ts +0 -10
  408. package/build/types/otel/contextManager.d.ts.map +0 -1
  409. package/build/types/otel/instrument.d.ts +0 -23
  410. package/build/types/otel/instrument.d.ts.map +0 -1
  411. package/build/types/proxy/base.d.ts +0 -65
  412. package/build/types/proxy/base.d.ts.map +0 -1
  413. package/build/types/proxy/helpers.d.ts +0 -42
  414. package/build/types/proxy/helpers.d.ts.map +0 -1
  415. package/build/types/proxy/index.d.ts +0 -73
  416. package/build/types/proxy/index.d.ts.map +0 -1
  417. package/build/types/proxy/parse-proxy-response.d.ts +0 -43
  418. package/build/types/proxy/parse-proxy-response.d.ts.map +0 -1
  419. package/build/types/sdk/api.d.ts +0 -8
  420. package/build/types/sdk/api.d.ts.map +0 -1
  421. package/build/types/sdk/client.d.ts +0 -29
  422. package/build/types/sdk/client.d.ts.map +0 -1
  423. package/build/types/sdk/scope.d.ts +0 -7
  424. package/build/types/sdk/scope.d.ts.map +0 -1
  425. package/build/types/transports/http-module.d.ts +0 -31
  426. package/build/types/transports/http-module.d.ts.map +0 -1
  427. package/build/types/transports/http.d.ts +0 -21
  428. package/build/types/transports/http.d.ts.map +0 -1
  429. package/build/types/transports/index.d.ts +0 -3
  430. package/build/types/transports/index.d.ts.map +0 -1
  431. package/build/types/utils/addOriginToSpan.d.ts +0 -5
  432. package/build/types/utils/addOriginToSpan.d.ts.map +0 -1
  433. package/build/types/utils/baggage.d.ts +0 -6
  434. package/build/types/utils/baggage.d.ts.map +0 -1
  435. package/build/types/utils/commonjs.d.ts +0 -3
  436. package/build/types/utils/commonjs.d.ts.map +0 -1
  437. package/build/types/utils/createMissingInstrumentationContext.d.ts +0 -3
  438. package/build/types/utils/createMissingInstrumentationContext.d.ts.map +0 -1
  439. package/build/types/utils/debug.d.ts +0 -5
  440. package/build/types/utils/debug.d.ts.map +0 -1
  441. package/build/types/utils/ensureIsWrapped.d.ts +0 -5
  442. package/build/types/utils/ensureIsWrapped.d.ts.map +0 -1
  443. package/build/types/utils/entry-point.d.ts +0 -24
  444. package/build/types/utils/entry-point.d.ts.map +0 -1
  445. package/build/types/utils/envToBool.d.ts +0 -13
  446. package/build/types/utils/envToBool.d.ts.map +0 -1
  447. package/build/types/utils/errorhandling.d.ts +0 -5
  448. package/build/types/utils/errorhandling.d.ts.map +0 -1
  449. package/build/types/utils/getRequestUrl.d.ts +0 -5
  450. package/build/types/utils/getRequestUrl.d.ts.map +0 -1
  451. package/build/types/utils/module.d.ts +0 -3
  452. package/build/types/utils/module.d.ts.map +0 -1
  453. package/build/types/utils/prepareEvent.d.ts +0 -17
  454. package/build/types/utils/prepareEvent.d.ts.map +0 -1
  455. package/build/types-ts3.8/cron/common.d.ts +0 -5
  456. package/build/types-ts3.8/cron/cron.d.ts +0 -43
  457. package/build/types-ts3.8/cron/index.d.ts +0 -10
  458. package/build/types-ts3.8/cron/node-cron.d.ts +0 -27
  459. package/build/types-ts3.8/cron/node-schedule.d.ts +0 -19
  460. package/build/types-ts3.8/integrations/anr/common.d.ts +0 -52
  461. package/build/types-ts3.8/integrations/anr/index.d.ts +0 -13
  462. package/build/types-ts3.8/integrations/anr/worker.d.ts +0 -2
  463. package/build/types-ts3.8/integrations/childProcess.d.ts +0 -20
  464. package/build/types-ts3.8/integrations/context.d.ts +0 -30
  465. package/build/types-ts3.8/integrations/contextlines.d.ts +0 -31
  466. package/build/types-ts3.8/integrations/http/SentryHttpInstrumentation.d.ts +0 -133
  467. package/build/types-ts3.8/integrations/local-variables/common.d.ts +0 -66
  468. package/build/types-ts3.8/integrations/local-variables/index.d.ts +0 -4
  469. package/build/types-ts3.8/integrations/local-variables/local-variables-async.d.ts +0 -7
  470. package/build/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +0 -34
  471. package/build/types-ts3.8/integrations/local-variables/worker.d.ts +0 -2
  472. package/build/types-ts3.8/integrations/modules.d.ts +0 -17
  473. package/build/types-ts3.8/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts +0 -56
  474. package/build/types-ts3.8/integrations/onuncaughtexception.d.ts +0 -31
  475. package/build/types-ts3.8/integrations/onunhandledrejection.d.ts +0 -23
  476. package/build/types-ts3.8/integrations/processSession.d.ts +0 -5
  477. package/build/types-ts3.8/integrations/spotlight.d.ts +0 -18
  478. package/build/types-ts3.8/integrations/winston.d.ts +0 -44
  479. package/build/types-ts3.8/logs/capture.d.ts +0 -18
  480. package/build/types-ts3.8/logs/exports.d.ts +0 -150
  481. package/build/types-ts3.8/nodeVersion.d.ts +0 -8
  482. package/build/types-ts3.8/otel/contextManager.d.ts +0 -10
  483. package/build/types-ts3.8/otel/instrument.d.ts +0 -23
  484. package/build/types-ts3.8/proxy/base.d.ts +0 -60
  485. package/build/types-ts3.8/proxy/helpers.d.ts +0 -38
  486. package/build/types-ts3.8/proxy/index.d.ts +0 -74
  487. package/build/types-ts3.8/proxy/parse-proxy-response.d.ts +0 -40
  488. package/build/types-ts3.8/sdk/api.d.ts +0 -8
  489. package/build/types-ts3.8/sdk/client.d.ts +0 -32
  490. package/build/types-ts3.8/sdk/scope.d.ts +0 -7
  491. package/build/types-ts3.8/transports/http-module.d.ts +0 -28
  492. package/build/types-ts3.8/transports/http.d.ts +0 -20
  493. package/build/types-ts3.8/transports/index.d.ts +0 -3
  494. package/build/types-ts3.8/utils/addOriginToSpan.d.ts +0 -5
  495. package/build/types-ts3.8/utils/baggage.d.ts +0 -6
  496. package/build/types-ts3.8/utils/commonjs.d.ts +0 -3
  497. package/build/types-ts3.8/utils/createMissingInstrumentationContext.d.ts +0 -3
  498. package/build/types-ts3.8/utils/debug.d.ts +0 -5
  499. package/build/types-ts3.8/utils/ensureIsWrapped.d.ts +0 -5
  500. package/build/types-ts3.8/utils/entry-point.d.ts +0 -24
  501. package/build/types-ts3.8/utils/envToBool.d.ts +0 -13
  502. package/build/types-ts3.8/utils/errorhandling.d.ts +0 -5
  503. package/build/types-ts3.8/utils/getRequestUrl.d.ts +0 -5
  504. package/build/types-ts3.8/utils/module.d.ts +0 -3
  505. package/build/types-ts3.8/utils/prepareEvent.d.ts +0 -17
@@ -1,457 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const node_child_process = require('node:child_process');
4
- const node_fs = require('node:fs');
5
- const os = require('node:os');
6
- const node_path = require('node:path');
7
- const node_util = require('node:util');
8
- const core = require('@sentry/core');
9
-
10
- /* eslint-disable max-lines */
11
-
12
-
13
- const readFileAsync = node_util.promisify(node_fs.readFile);
14
- const readDirAsync = node_util.promisify(node_fs.readdir);
15
-
16
- // Process enhanced with methods from Node 18, 20, 22 as @types/node
17
- // is on `14.18.0` to match minimum version requirements of the SDK
18
-
19
- const INTEGRATION_NAME = 'Context';
20
-
21
- const _nodeContextIntegration = ((options = {}) => {
22
- let cachedContext;
23
-
24
- const _options = {
25
- app: true,
26
- os: true,
27
- device: true,
28
- culture: true,
29
- cloudResource: true,
30
- ...options,
31
- };
32
-
33
- /** Add contexts to the event. Caches the context so we only look it up once. */
34
- async function addContext(event) {
35
- if (cachedContext === undefined) {
36
- cachedContext = _getContexts();
37
- }
38
-
39
- const updatedContext = _updateContext(await cachedContext);
40
-
41
- // TODO(v10): conditional with `sendDefaultPii` here?
42
- event.contexts = {
43
- ...event.contexts,
44
- app: { ...updatedContext.app, ...event.contexts?.app },
45
- os: { ...updatedContext.os, ...event.contexts?.os },
46
- device: { ...updatedContext.device, ...event.contexts?.device },
47
- culture: { ...updatedContext.culture, ...event.contexts?.culture },
48
- cloud_resource: { ...updatedContext.cloud_resource, ...event.contexts?.cloud_resource },
49
- };
50
-
51
- return event;
52
- }
53
-
54
- /** Get the contexts from node. */
55
- async function _getContexts() {
56
- const contexts = {};
57
-
58
- if (_options.os) {
59
- contexts.os = await getOsContext();
60
- }
61
-
62
- if (_options.app) {
63
- contexts.app = getAppContext();
64
- }
65
-
66
- if (_options.device) {
67
- contexts.device = getDeviceContext(_options.device);
68
- }
69
-
70
- if (_options.culture) {
71
- const culture = getCultureContext();
72
-
73
- if (culture) {
74
- contexts.culture = culture;
75
- }
76
- }
77
-
78
- if (_options.cloudResource) {
79
- contexts.cloud_resource = getCloudResourceContext();
80
- }
81
-
82
- return contexts;
83
- }
84
-
85
- return {
86
- name: INTEGRATION_NAME,
87
- processEvent(event) {
88
- return addContext(event);
89
- },
90
- };
91
- }) ;
92
-
93
- /**
94
- * Capture context about the environment and the device that the client is running on, to events.
95
- */
96
- const nodeContextIntegration = core.defineIntegration(_nodeContextIntegration);
97
-
98
- /**
99
- * Updates the context with dynamic values that can change
100
- */
101
- function _updateContext(contexts) {
102
- // Only update properties if they exist
103
-
104
- if (contexts.app?.app_memory) {
105
- contexts.app.app_memory = process.memoryUsage().rss;
106
- }
107
-
108
- if (contexts.app?.free_memory && typeof (process ).availableMemory === 'function') {
109
- const freeMemory = (process ).availableMemory?.();
110
- if (freeMemory != null) {
111
- contexts.app.free_memory = freeMemory;
112
- }
113
- }
114
-
115
- if (contexts.device?.free_memory) {
116
- contexts.device.free_memory = os.freemem();
117
- }
118
-
119
- return contexts;
120
- }
121
-
122
- /**
123
- * Returns the operating system context.
124
- *
125
- * Based on the current platform, this uses a different strategy to provide the
126
- * most accurate OS information. Since this might involve spawning subprocesses
127
- * or accessing the file system, this should only be executed lazily and cached.
128
- *
129
- * - On macOS (Darwin), this will execute the `sw_vers` utility. The context
130
- * has a `name`, `version`, `build` and `kernel_version` set.
131
- * - On Linux, this will try to load a distribution release from `/etc` and set
132
- * the `name`, `version` and `kernel_version` fields.
133
- * - On all other platforms, only a `name` and `version` will be returned. Note
134
- * that `version` might actually be the kernel version.
135
- */
136
- async function getOsContext() {
137
- const platformId = os.platform();
138
- switch (platformId) {
139
- case 'darwin':
140
- return getDarwinInfo();
141
- case 'linux':
142
- return getLinuxInfo();
143
- default:
144
- return {
145
- name: PLATFORM_NAMES[platformId] || platformId,
146
- version: os.release(),
147
- };
148
- }
149
- }
150
-
151
- function getCultureContext() {
152
- try {
153
- if (typeof process.versions.icu !== 'string') {
154
- // Node was built without ICU support
155
- return;
156
- }
157
-
158
- // Check that node was built with full Intl support. Its possible it was built without support for non-English
159
- // locales which will make resolvedOptions inaccurate
160
- //
161
- // https://nodejs.org/api/intl.html#detecting-internationalization-support
162
- const january = new Date(9e8);
163
- const spanish = new Intl.DateTimeFormat('es', { month: 'long' });
164
- if (spanish.format(january) === 'enero') {
165
- const options = Intl.DateTimeFormat().resolvedOptions();
166
-
167
- return {
168
- locale: options.locale,
169
- timezone: options.timeZone,
170
- };
171
- }
172
- } catch (err) {
173
- //
174
- }
175
-
176
- return;
177
- }
178
-
179
- /**
180
- * Get app context information from process
181
- */
182
- function getAppContext() {
183
- const app_memory = process.memoryUsage().rss;
184
- const app_start_time = new Date(Date.now() - process.uptime() * 1000).toISOString();
185
- // https://nodejs.org/api/process.html#processavailablememory
186
- const appContext = { app_start_time, app_memory };
187
-
188
- if (typeof (process ).availableMemory === 'function') {
189
- const freeMemory = (process ).availableMemory?.();
190
- if (freeMemory != null) {
191
- appContext.free_memory = freeMemory;
192
- }
193
- }
194
-
195
- return appContext;
196
- }
197
-
198
- /**
199
- * Gets device information from os
200
- */
201
- function getDeviceContext(deviceOpt) {
202
- const device = {};
203
-
204
- // Sometimes os.uptime() throws due to lacking permissions: https://github.com/getsentry/sentry-javascript/issues/8202
205
- let uptime;
206
- try {
207
- uptime = os.uptime();
208
- } catch (e) {
209
- // noop
210
- }
211
-
212
- // os.uptime or its return value seem to be undefined in certain environments (e.g. Azure functions).
213
- // Hence, we only set boot time, if we get a valid uptime value.
214
- // @see https://github.com/getsentry/sentry-javascript/issues/5856
215
- if (typeof uptime === 'number') {
216
- device.boot_time = new Date(Date.now() - uptime * 1000).toISOString();
217
- }
218
-
219
- device.arch = os.arch();
220
-
221
- if (deviceOpt === true || deviceOpt.memory) {
222
- device.memory_size = os.totalmem();
223
- device.free_memory = os.freemem();
224
- }
225
-
226
- if (deviceOpt === true || deviceOpt.cpu) {
227
- const cpuInfo = os.cpus() ;
228
- const firstCpu = cpuInfo?.[0];
229
- if (firstCpu) {
230
- device.processor_count = cpuInfo.length;
231
- device.cpu_description = firstCpu.model;
232
- device.processor_frequency = firstCpu.speed;
233
- }
234
- }
235
-
236
- return device;
237
- }
238
-
239
- /** Mapping of Node's platform names to actual OS names. */
240
- const PLATFORM_NAMES = {
241
- aix: 'IBM AIX',
242
- freebsd: 'FreeBSD',
243
- openbsd: 'OpenBSD',
244
- sunos: 'SunOS',
245
- win32: 'Windows',
246
- };
247
-
248
- /** Linux version file to check for a distribution. */
249
-
250
- /** Mapping of linux release files located in /etc to distributions. */
251
- const LINUX_DISTROS = [
252
- { name: 'fedora-release', distros: ['Fedora'] },
253
- { name: 'redhat-release', distros: ['Red Hat Linux', 'Centos'] },
254
- { name: 'redhat_version', distros: ['Red Hat Linux'] },
255
- { name: 'SuSE-release', distros: ['SUSE Linux'] },
256
- { name: 'lsb-release', distros: ['Ubuntu Linux', 'Arch Linux'] },
257
- { name: 'debian_version', distros: ['Debian'] },
258
- { name: 'debian_release', distros: ['Debian'] },
259
- { name: 'arch-release', distros: ['Arch Linux'] },
260
- { name: 'gentoo-release', distros: ['Gentoo Linux'] },
261
- { name: 'novell-release', distros: ['SUSE Linux'] },
262
- { name: 'alpine-release', distros: ['Alpine Linux'] },
263
- ];
264
-
265
- /** Functions to extract the OS version from Linux release files. */
266
- const LINUX_VERSIONS
267
-
268
- = {
269
- alpine: content => content,
270
- arch: content => matchFirst(/distrib_release=(.*)/, content),
271
- centos: content => matchFirst(/release ([^ ]+)/, content),
272
- debian: content => content,
273
- fedora: content => matchFirst(/release (..)/, content),
274
- mint: content => matchFirst(/distrib_release=(.*)/, content),
275
- red: content => matchFirst(/release ([^ ]+)/, content),
276
- suse: content => matchFirst(/VERSION = (.*)\n/, content),
277
- ubuntu: content => matchFirst(/distrib_release=(.*)/, content),
278
- };
279
-
280
- /**
281
- * Executes a regular expression with one capture group.
282
- *
283
- * @param regex A regular expression to execute.
284
- * @param text Content to execute the RegEx on.
285
- * @returns The captured string if matched; otherwise undefined.
286
- */
287
- function matchFirst(regex, text) {
288
- const match = regex.exec(text);
289
- return match ? match[1] : undefined;
290
- }
291
-
292
- /** Loads the macOS operating system context. */
293
- async function getDarwinInfo() {
294
- // Default values that will be used in case no operating system information
295
- // can be loaded. The default version is computed via heuristics from the
296
- // kernel version, but the build ID is missing.
297
- const darwinInfo = {
298
- kernel_version: os.release(),
299
- name: 'Mac OS X',
300
- version: `10.${Number(os.release().split('.')[0]) - 4}`,
301
- };
302
-
303
- try {
304
- // We try to load the actual macOS version by executing the `sw_vers` tool.
305
- // This tool should be available on every standard macOS installation. In
306
- // case this fails, we stick with the values computed above.
307
-
308
- const output = await new Promise((resolve, reject) => {
309
- node_child_process.execFile('/usr/bin/sw_vers', (error, stdout) => {
310
- if (error) {
311
- reject(error);
312
- return;
313
- }
314
- resolve(stdout);
315
- });
316
- });
317
-
318
- darwinInfo.name = matchFirst(/^ProductName:\s+(.*)$/m, output);
319
- darwinInfo.version = matchFirst(/^ProductVersion:\s+(.*)$/m, output);
320
- darwinInfo.build = matchFirst(/^BuildVersion:\s+(.*)$/m, output);
321
- } catch (e) {
322
- // ignore
323
- }
324
-
325
- return darwinInfo;
326
- }
327
-
328
- /** Returns a distribution identifier to look up version callbacks. */
329
- function getLinuxDistroId(name) {
330
- return (name.split(' ') )[0].toLowerCase();
331
- }
332
-
333
- /** Loads the Linux operating system context. */
334
- async function getLinuxInfo() {
335
- // By default, we cannot assume anything about the distribution or Linux
336
- // version. `os.release()` returns the kernel version and we assume a generic
337
- // "Linux" name, which will be replaced down below.
338
- const linuxInfo = {
339
- kernel_version: os.release(),
340
- name: 'Linux',
341
- };
342
-
343
- try {
344
- // We start guessing the distribution by listing files in the /etc
345
- // directory. This is were most Linux distributions (except Knoppix) store
346
- // release files with certain distribution-dependent meta data. We search
347
- // for exactly one known file defined in `LINUX_DISTROS` and exit if none
348
- // are found. In case there are more than one file, we just stick with the
349
- // first one.
350
- const etcFiles = await readDirAsync('/etc');
351
- const distroFile = LINUX_DISTROS.find(file => etcFiles.includes(file.name));
352
- if (!distroFile) {
353
- return linuxInfo;
354
- }
355
-
356
- // Once that file is known, load its contents. To make searching in those
357
- // files easier, we lowercase the file contents. Since these files are
358
- // usually quite small, this should not allocate too much memory and we only
359
- // hold on to it for a very short amount of time.
360
- const distroPath = node_path.join('/etc', distroFile.name);
361
- const contents = ((await readFileAsync(distroPath, { encoding: 'utf-8' })) ).toLowerCase();
362
-
363
- // Some Linux distributions store their release information in the same file
364
- // (e.g. RHEL and Centos). In those cases, we scan the file for an
365
- // identifier, that basically consists of the first word of the linux
366
- // distribution name (e.g. "red" for Red Hat). In case there is no match, we
367
- // just assume the first distribution in our list.
368
- const { distros } = distroFile;
369
- linuxInfo.name = distros.find(d => contents.indexOf(getLinuxDistroId(d)) >= 0) || distros[0];
370
-
371
- // Based on the found distribution, we can now compute the actual version
372
- // number. This is different for every distribution, so several strategies
373
- // are computed in `LINUX_VERSIONS`.
374
- const id = getLinuxDistroId(linuxInfo.name);
375
- linuxInfo.version = LINUX_VERSIONS[id]?.(contents);
376
- } catch (e) {
377
- // ignore
378
- }
379
-
380
- return linuxInfo;
381
- }
382
-
383
- /**
384
- * Grabs some information about hosting provider based on best effort.
385
- */
386
- function getCloudResourceContext() {
387
- if (process.env.VERCEL) {
388
- // https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#system-environment-variables
389
- return {
390
- 'cloud.provider': 'vercel',
391
- 'cloud.region': process.env.VERCEL_REGION,
392
- };
393
- } else if (process.env.AWS_REGION) {
394
- // https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
395
- return {
396
- 'cloud.provider': 'aws',
397
- 'cloud.region': process.env.AWS_REGION,
398
- 'cloud.platform': process.env.AWS_EXECUTION_ENV,
399
- };
400
- } else if (process.env.GCP_PROJECT) {
401
- // https://cloud.google.com/composer/docs/how-to/managing/environment-variables#reserved_variables
402
- return {
403
- 'cloud.provider': 'gcp',
404
- };
405
- } else if (process.env.ALIYUN_REGION_ID) {
406
- // TODO: find where I found these environment variables - at least gc.github.com returns something
407
- return {
408
- 'cloud.provider': 'alibaba_cloud',
409
- 'cloud.region': process.env.ALIYUN_REGION_ID,
410
- };
411
- } else if (process.env.WEBSITE_SITE_NAME && process.env.REGION_NAME) {
412
- // https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet#app-environment
413
- return {
414
- 'cloud.provider': 'azure',
415
- 'cloud.region': process.env.REGION_NAME,
416
- };
417
- } else if (process.env.IBM_CLOUD_REGION) {
418
- // TODO: find where I found these environment variables - at least gc.github.com returns something
419
- return {
420
- 'cloud.provider': 'ibm_cloud',
421
- 'cloud.region': process.env.IBM_CLOUD_REGION,
422
- };
423
- } else if (process.env.TENCENTCLOUD_REGION) {
424
- // https://www.tencentcloud.com/document/product/583/32748
425
- return {
426
- 'cloud.provider': 'tencent_cloud',
427
- 'cloud.region': process.env.TENCENTCLOUD_REGION,
428
- 'cloud.account.id': process.env.TENCENTCLOUD_APPID,
429
- 'cloud.availability_zone': process.env.TENCENTCLOUD_ZONE,
430
- };
431
- } else if (process.env.NETLIFY) {
432
- // https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables
433
- return {
434
- 'cloud.provider': 'netlify',
435
- };
436
- } else if (process.env.FLY_REGION) {
437
- // https://fly.io/docs/reference/runtime-environment/
438
- return {
439
- 'cloud.provider': 'fly.io',
440
- 'cloud.region': process.env.FLY_REGION,
441
- };
442
- } else if (process.env.DYNO) {
443
- // https://devcenter.heroku.com/articles/dynos#local-environment-variables
444
- return {
445
- 'cloud.provider': 'heroku',
446
- };
447
- } else {
448
- return undefined;
449
- }
450
- }
451
-
452
- exports.getAppContext = getAppContext;
453
- exports.getDeviceContext = getDeviceContext;
454
- exports.nodeContextIntegration = nodeContextIntegration;
455
- exports.readDirAsync = readDirAsync;
456
- exports.readFileAsync = readFileAsync;
457
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sources":["../../../src/integrations/context.ts"],"sourcesContent":["/* eslint-disable max-lines */\n\nimport { execFile } from 'node:child_process';\nimport { readdir, readFile } from 'node:fs';\nimport * as os from 'node:os';\nimport { join } from 'node:path';\nimport { promisify } from 'node:util';\nimport type {\n AppContext,\n CloudResourceContext,\n Contexts,\n CultureContext,\n DeviceContext,\n Event,\n IntegrationFn,\n OsContext,\n} from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\n\nexport const readFileAsync = promisify(readFile);\nexport const readDirAsync = promisify(readdir);\n\n// Process enhanced with methods from Node 18, 20, 22 as @types/node\n// is on `14.18.0` to match minimum version requirements of the SDK\ninterface ProcessWithCurrentValues extends NodeJS.Process {\n availableMemory?(): number;\n}\n\nconst INTEGRATION_NAME = 'Context';\n\ninterface DeviceContextOptions {\n cpu?: boolean;\n memory?: boolean;\n}\n\ninterface ContextOptions {\n app?: boolean;\n os?: boolean;\n device?: DeviceContextOptions | boolean;\n culture?: boolean;\n cloudResource?: boolean;\n}\n\nconst _nodeContextIntegration = ((options: ContextOptions = {}) => {\n let cachedContext: Promise<Contexts> | undefined;\n\n const _options = {\n app: true,\n os: true,\n device: true,\n culture: true,\n cloudResource: true,\n ...options,\n };\n\n /** Add contexts to the event. Caches the context so we only look it up once. */\n async function addContext(event: Event): Promise<Event> {\n if (cachedContext === undefined) {\n cachedContext = _getContexts();\n }\n\n const updatedContext = _updateContext(await cachedContext);\n\n // TODO(v10): conditional with `sendDefaultPii` here?\n event.contexts = {\n ...event.contexts,\n app: { ...updatedContext.app, ...event.contexts?.app },\n os: { ...updatedContext.os, ...event.contexts?.os },\n device: { ...updatedContext.device, ...event.contexts?.device },\n culture: { ...updatedContext.culture, ...event.contexts?.culture },\n cloud_resource: { ...updatedContext.cloud_resource, ...event.contexts?.cloud_resource },\n };\n\n return event;\n }\n\n /** Get the contexts from node. */\n async function _getContexts(): Promise<Contexts> {\n const contexts: Contexts = {};\n\n if (_options.os) {\n contexts.os = await getOsContext();\n }\n\n if (_options.app) {\n contexts.app = getAppContext();\n }\n\n if (_options.device) {\n contexts.device = getDeviceContext(_options.device);\n }\n\n if (_options.culture) {\n const culture = getCultureContext();\n\n if (culture) {\n contexts.culture = culture;\n }\n }\n\n if (_options.cloudResource) {\n contexts.cloud_resource = getCloudResourceContext();\n }\n\n return contexts;\n }\n\n return {\n name: INTEGRATION_NAME,\n processEvent(event) {\n return addContext(event);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Capture context about the environment and the device that the client is running on, to events.\n */\nexport const nodeContextIntegration = defineIntegration(_nodeContextIntegration);\n\n/**\n * Updates the context with dynamic values that can change\n */\nfunction _updateContext(contexts: Contexts): Contexts {\n // Only update properties if they exist\n\n if (contexts.app?.app_memory) {\n contexts.app.app_memory = process.memoryUsage().rss;\n }\n\n if (contexts.app?.free_memory && typeof (process as ProcessWithCurrentValues).availableMemory === 'function') {\n const freeMemory = (process as ProcessWithCurrentValues).availableMemory?.();\n if (freeMemory != null) {\n contexts.app.free_memory = freeMemory;\n }\n }\n\n if (contexts.device?.free_memory) {\n contexts.device.free_memory = os.freemem();\n }\n\n return contexts;\n}\n\n/**\n * Returns the operating system context.\n *\n * Based on the current platform, this uses a different strategy to provide the\n * most accurate OS information. Since this might involve spawning subprocesses\n * or accessing the file system, this should only be executed lazily and cached.\n *\n * - On macOS (Darwin), this will execute the `sw_vers` utility. The context\n * has a `name`, `version`, `build` and `kernel_version` set.\n * - On Linux, this will try to load a distribution release from `/etc` and set\n * the `name`, `version` and `kernel_version` fields.\n * - On all other platforms, only a `name` and `version` will be returned. Note\n * that `version` might actually be the kernel version.\n */\nasync function getOsContext(): Promise<OsContext> {\n const platformId = os.platform();\n switch (platformId) {\n case 'darwin':\n return getDarwinInfo();\n case 'linux':\n return getLinuxInfo();\n default:\n return {\n name: PLATFORM_NAMES[platformId] || platformId,\n version: os.release(),\n };\n }\n}\n\nfunction getCultureContext(): CultureContext | undefined {\n try {\n if (typeof process.versions.icu !== 'string') {\n // Node was built without ICU support\n return;\n }\n\n // Check that node was built with full Intl support. Its possible it was built without support for non-English\n // locales which will make resolvedOptions inaccurate\n //\n // https://nodejs.org/api/intl.html#detecting-internationalization-support\n const january = new Date(9e8);\n const spanish = new Intl.DateTimeFormat('es', { month: 'long' });\n if (spanish.format(january) === 'enero') {\n const options = Intl.DateTimeFormat().resolvedOptions();\n\n return {\n locale: options.locale,\n timezone: options.timeZone,\n };\n }\n } catch (err) {\n //\n }\n\n return;\n}\n\n/**\n * Get app context information from process\n */\nexport function getAppContext(): AppContext {\n const app_memory = process.memoryUsage().rss;\n const app_start_time = new Date(Date.now() - process.uptime() * 1000).toISOString();\n // https://nodejs.org/api/process.html#processavailablememory\n const appContext: AppContext = { app_start_time, app_memory };\n\n if (typeof (process as ProcessWithCurrentValues).availableMemory === 'function') {\n const freeMemory = (process as ProcessWithCurrentValues).availableMemory?.();\n if (freeMemory != null) {\n appContext.free_memory = freeMemory;\n }\n }\n\n return appContext;\n}\n\n/**\n * Gets device information from os\n */\nexport function getDeviceContext(deviceOpt: DeviceContextOptions | true): DeviceContext {\n const device: DeviceContext = {};\n\n // Sometimes os.uptime() throws due to lacking permissions: https://github.com/getsentry/sentry-javascript/issues/8202\n let uptime;\n try {\n uptime = os.uptime();\n } catch (e) {\n // noop\n }\n\n // os.uptime or its return value seem to be undefined in certain environments (e.g. Azure functions).\n // Hence, we only set boot time, if we get a valid uptime value.\n // @see https://github.com/getsentry/sentry-javascript/issues/5856\n if (typeof uptime === 'number') {\n device.boot_time = new Date(Date.now() - uptime * 1000).toISOString();\n }\n\n device.arch = os.arch();\n\n if (deviceOpt === true || deviceOpt.memory) {\n device.memory_size = os.totalmem();\n device.free_memory = os.freemem();\n }\n\n if (deviceOpt === true || deviceOpt.cpu) {\n const cpuInfo = os.cpus() as os.CpuInfo[] | undefined;\n const firstCpu = cpuInfo?.[0];\n if (firstCpu) {\n device.processor_count = cpuInfo.length;\n device.cpu_description = firstCpu.model;\n device.processor_frequency = firstCpu.speed;\n }\n }\n\n return device;\n}\n\n/** Mapping of Node's platform names to actual OS names. */\nconst PLATFORM_NAMES: { [platform: string]: string } = {\n aix: 'IBM AIX',\n freebsd: 'FreeBSD',\n openbsd: 'OpenBSD',\n sunos: 'SunOS',\n win32: 'Windows',\n};\n\n/** Linux version file to check for a distribution. */\ninterface DistroFile {\n /** The file name, located in `/etc`. */\n name: string;\n /** Potential distributions to check. */\n distros: [string, ...string[]];\n}\n\n/** Mapping of linux release files located in /etc to distributions. */\nconst LINUX_DISTROS: DistroFile[] = [\n { name: 'fedora-release', distros: ['Fedora'] },\n { name: 'redhat-release', distros: ['Red Hat Linux', 'Centos'] },\n { name: 'redhat_version', distros: ['Red Hat Linux'] },\n { name: 'SuSE-release', distros: ['SUSE Linux'] },\n { name: 'lsb-release', distros: ['Ubuntu Linux', 'Arch Linux'] },\n { name: 'debian_version', distros: ['Debian'] },\n { name: 'debian_release', distros: ['Debian'] },\n { name: 'arch-release', distros: ['Arch Linux'] },\n { name: 'gentoo-release', distros: ['Gentoo Linux'] },\n { name: 'novell-release', distros: ['SUSE Linux'] },\n { name: 'alpine-release', distros: ['Alpine Linux'] },\n];\n\n/** Functions to extract the OS version from Linux release files. */\nconst LINUX_VERSIONS: {\n [identifier: string]: (content: string) => string | undefined;\n} = {\n alpine: content => content,\n arch: content => matchFirst(/distrib_release=(.*)/, content),\n centos: content => matchFirst(/release ([^ ]+)/, content),\n debian: content => content,\n fedora: content => matchFirst(/release (..)/, content),\n mint: content => matchFirst(/distrib_release=(.*)/, content),\n red: content => matchFirst(/release ([^ ]+)/, content),\n suse: content => matchFirst(/VERSION = (.*)\\n/, content),\n ubuntu: content => matchFirst(/distrib_release=(.*)/, content),\n};\n\n/**\n * Executes a regular expression with one capture group.\n *\n * @param regex A regular expression to execute.\n * @param text Content to execute the RegEx on.\n * @returns The captured string if matched; otherwise undefined.\n */\nfunction matchFirst(regex: RegExp, text: string): string | undefined {\n const match = regex.exec(text);\n return match ? match[1] : undefined;\n}\n\n/** Loads the macOS operating system context. */\nasync function getDarwinInfo(): Promise<OsContext> {\n // Default values that will be used in case no operating system information\n // can be loaded. The default version is computed via heuristics from the\n // kernel version, but the build ID is missing.\n const darwinInfo: OsContext = {\n kernel_version: os.release(),\n name: 'Mac OS X',\n version: `10.${Number(os.release().split('.')[0]) - 4}`,\n };\n\n try {\n // We try to load the actual macOS version by executing the `sw_vers` tool.\n // This tool should be available on every standard macOS installation. In\n // case this fails, we stick with the values computed above.\n\n const output = await new Promise<string>((resolve, reject) => {\n execFile('/usr/bin/sw_vers', (error: Error | null, stdout: string) => {\n if (error) {\n reject(error);\n return;\n }\n resolve(stdout);\n });\n });\n\n darwinInfo.name = matchFirst(/^ProductName:\\s+(.*)$/m, output);\n darwinInfo.version = matchFirst(/^ProductVersion:\\s+(.*)$/m, output);\n darwinInfo.build = matchFirst(/^BuildVersion:\\s+(.*)$/m, output);\n } catch (e) {\n // ignore\n }\n\n return darwinInfo;\n}\n\n/** Returns a distribution identifier to look up version callbacks. */\nfunction getLinuxDistroId(name: string): string {\n return (name.split(' ') as [string])[0].toLowerCase();\n}\n\n/** Loads the Linux operating system context. */\nasync function getLinuxInfo(): Promise<OsContext> {\n // By default, we cannot assume anything about the distribution or Linux\n // version. `os.release()` returns the kernel version and we assume a generic\n // \"Linux\" name, which will be replaced down below.\n const linuxInfo: OsContext = {\n kernel_version: os.release(),\n name: 'Linux',\n };\n\n try {\n // We start guessing the distribution by listing files in the /etc\n // directory. This is were most Linux distributions (except Knoppix) store\n // release files with certain distribution-dependent meta data. We search\n // for exactly one known file defined in `LINUX_DISTROS` and exit if none\n // are found. In case there are more than one file, we just stick with the\n // first one.\n const etcFiles = await readDirAsync('/etc');\n const distroFile = LINUX_DISTROS.find(file => etcFiles.includes(file.name));\n if (!distroFile) {\n return linuxInfo;\n }\n\n // Once that file is known, load its contents. To make searching in those\n // files easier, we lowercase the file contents. Since these files are\n // usually quite small, this should not allocate too much memory and we only\n // hold on to it for a very short amount of time.\n const distroPath = join('/etc', distroFile.name);\n const contents = ((await readFileAsync(distroPath, { encoding: 'utf-8' })) as string).toLowerCase();\n\n // Some Linux distributions store their release information in the same file\n // (e.g. RHEL and Centos). In those cases, we scan the file for an\n // identifier, that basically consists of the first word of the linux\n // distribution name (e.g. \"red\" for Red Hat). In case there is no match, we\n // just assume the first distribution in our list.\n const { distros } = distroFile;\n linuxInfo.name = distros.find(d => contents.indexOf(getLinuxDistroId(d)) >= 0) || distros[0];\n\n // Based on the found distribution, we can now compute the actual version\n // number. This is different for every distribution, so several strategies\n // are computed in `LINUX_VERSIONS`.\n const id = getLinuxDistroId(linuxInfo.name);\n linuxInfo.version = LINUX_VERSIONS[id]?.(contents);\n } catch (e) {\n // ignore\n }\n\n return linuxInfo;\n}\n\n/**\n * Grabs some information about hosting provider based on best effort.\n */\nfunction getCloudResourceContext(): CloudResourceContext | undefined {\n if (process.env.VERCEL) {\n // https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#system-environment-variables\n return {\n 'cloud.provider': 'vercel',\n 'cloud.region': process.env.VERCEL_REGION,\n };\n } else if (process.env.AWS_REGION) {\n // https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html\n return {\n 'cloud.provider': 'aws',\n 'cloud.region': process.env.AWS_REGION,\n 'cloud.platform': process.env.AWS_EXECUTION_ENV,\n };\n } else if (process.env.GCP_PROJECT) {\n // https://cloud.google.com/composer/docs/how-to/managing/environment-variables#reserved_variables\n return {\n 'cloud.provider': 'gcp',\n };\n } else if (process.env.ALIYUN_REGION_ID) {\n // TODO: find where I found these environment variables - at least gc.github.com returns something\n return {\n 'cloud.provider': 'alibaba_cloud',\n 'cloud.region': process.env.ALIYUN_REGION_ID,\n };\n } else if (process.env.WEBSITE_SITE_NAME && process.env.REGION_NAME) {\n // https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet#app-environment\n return {\n 'cloud.provider': 'azure',\n 'cloud.region': process.env.REGION_NAME,\n };\n } else if (process.env.IBM_CLOUD_REGION) {\n // TODO: find where I found these environment variables - at least gc.github.com returns something\n return {\n 'cloud.provider': 'ibm_cloud',\n 'cloud.region': process.env.IBM_CLOUD_REGION,\n };\n } else if (process.env.TENCENTCLOUD_REGION) {\n // https://www.tencentcloud.com/document/product/583/32748\n return {\n 'cloud.provider': 'tencent_cloud',\n 'cloud.region': process.env.TENCENTCLOUD_REGION,\n 'cloud.account.id': process.env.TENCENTCLOUD_APPID,\n 'cloud.availability_zone': process.env.TENCENTCLOUD_ZONE,\n };\n } else if (process.env.NETLIFY) {\n // https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables\n return {\n 'cloud.provider': 'netlify',\n };\n } else if (process.env.FLY_REGION) {\n // https://fly.io/docs/reference/runtime-environment/\n return {\n 'cloud.provider': 'fly.io',\n 'cloud.region': process.env.FLY_REGION,\n };\n } else if (process.env.DYNO) {\n // https://devcenter.heroku.com/articles/dynos#local-environment-variables\n return {\n 'cloud.provider': 'heroku',\n };\n } else {\n return undefined;\n }\n}\n"],"names":["promisify","readFile","readdir","defineIntegration","execFile","join"],"mappings":";;;;;;;;;AAAA;;;MAmBa,aAAc,GAAEA,mBAAS,CAACC,gBAAQ;MAClC,YAAa,GAAED,mBAAS,CAACE,eAAO;;AAE7C;AACA;;AAKA,MAAM,gBAAA,GAAmB,SAAS;;AAelC,MAAM,uBAAA,IAA2B,CAAC,OAAO,GAAmB,EAAE,KAAK;AACnE,EAAE,IAAI,aAAa;;AAEnB,EAAE,MAAM,WAAW;AACnB,IAAI,GAAG,EAAE,IAAI;AACb,IAAI,EAAE,EAAE,IAAI;AACZ,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,IAAI,aAAa,EAAE,IAAI;AACvB,IAAI,GAAG,OAAO;AACd,GAAG;;AAEH;AACA,EAAE,eAAe,UAAU,CAAC,KAAK,EAAyB;AAC1D,IAAI,IAAI,aAAc,KAAI,SAAS,EAAE;AACrC,MAAM,aAAc,GAAE,YAAY,EAAE;AACpC;;AAEA,IAAI,MAAM,cAAe,GAAE,cAAc,CAAC,MAAM,aAAa,CAAC;;AAE9D;AACA,IAAI,KAAK,CAAC,QAAA,GAAW;AACrB,MAAM,GAAG,KAAK,CAAC,QAAQ;AACvB,MAAM,GAAG,EAAE,EAAE,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG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