start-slicemachine 0.12.62-beta.4 → 0.12.62-beta.6

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 (413) hide show
  1. package/dist/StartSliceMachineProcess.cjs +1 -4
  2. package/dist/StartSliceMachineProcess.cjs.map +1 -1
  3. package/dist/StartSliceMachineProcess.js +1 -4
  4. package/dist/StartSliceMachineProcess.js.map +1 -1
  5. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.cjs.map +1 -1
  6. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.js.map +1 -1
  7. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.cjs.map +1 -1
  8. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.js +1 -1
  9. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.js.map +1 -1
  10. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.cjs +1 -1
  11. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.cjs.map +1 -1
  12. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.js +1 -1
  13. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.js.map +1 -1
  14. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.cjs.map +1 -1
  15. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.js +1 -1
  16. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.js.map +1 -1
  17. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map +1 -1
  18. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js.map +1 -1
  19. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs.map +1 -1
  20. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js.map +1 -1
  21. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs +7 -13
  22. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs.map +1 -1
  23. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js +8 -14
  24. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js.map +1 -1
  25. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.cjs.map +1 -1
  26. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.js.map +1 -1
  27. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.cjs.map +1 -1
  28. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.js.map +1 -1
  29. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.cjs.map +1 -1
  30. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.js.map +1 -1
  31. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/linkederrors.cjs.map +1 -1
  32. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/linkederrors.js.map +1 -1
  33. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.cjs.map +1 -1
  34. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.js +1 -1
  35. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.js.map +1 -1
  36. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/aggregator.cjs.map +1 -1
  37. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/aggregator.js.map +1 -1
  38. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.cjs +1 -1
  39. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.cjs.map +1 -1
  40. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.js +1 -1
  41. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.js.map +1 -1
  42. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.cjs.map +1 -1
  43. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.js +1 -1
  44. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.js.map +1 -1
  45. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.cjs.map +1 -1
  46. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.js.map +1 -1
  47. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.cjs.map +1 -1
  48. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.js.map +1 -1
  49. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs.map +1 -1
  50. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js.map +1 -1
  51. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.cjs.map +1 -1
  52. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.js +1 -1
  53. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.js.map +1 -1
  54. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/server-runtime-client.cjs.map +1 -1
  55. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/server-runtime-client.js.map +1 -1
  56. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs +1 -3
  57. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs.map +1 -1
  58. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js +1 -3
  59. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js.map +1 -1
  60. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sessionflusher.cjs.map +1 -1
  61. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sessionflusher.js.map +1 -1
  62. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs.map +1 -1
  63. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js.map +1 -1
  64. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.cjs.map +1 -1
  65. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.js.map +1 -1
  66. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.cjs.map +1 -1
  67. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.js.map +1 -1
  68. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.cjs.map +1 -1
  69. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.js.map +1 -1
  70. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.cjs.map +1 -1
  71. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.js +1 -1
  72. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.js.map +1 -1
  73. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/spanstatus.cjs.map +1 -1
  74. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/spanstatus.js.map +1 -1
  75. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/trace.cjs.map +1 -1
  76. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/trace.js.map +1 -1
  77. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.cjs.map +1 -1
  78. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.js +1 -1
  79. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.js.map +1 -1
  80. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.cjs +1 -1
  81. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.cjs.map +1 -1
  82. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.js +1 -1
  83. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.js.map +1 -1
  84. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.cjs.map +1 -1
  85. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.js +2 -2
  86. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.js.map +1 -1
  87. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs.map +1 -1
  88. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js.map +1 -1
  89. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/hasTracingEnabled.cjs.map +1 -1
  90. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/hasTracingEnabled.js.map +1 -1
  91. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/isSentryRequestUrl.cjs.map +1 -1
  92. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js.map +1 -1
  93. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs +1 -1
  94. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs.map +1 -1
  95. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js +2 -2
  96. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map +1 -1
  97. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.cjs.map +1 -1
  98. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.js.map +1 -1
  99. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs.map +1 -1
  100. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js.map +1 -1
  101. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.cjs.map +1 -1
  102. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.js.map +1 -1
  103. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.cjs.map +1 -1
  104. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.js.map +1 -1
  105. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.cjs.map +1 -1
  106. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.js.map +1 -1
  107. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.cjs.map +1 -1
  108. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js.map +1 -1
  109. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.cjs.map +1 -1
  110. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.js.map +1 -1
  111. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.cjs.map +1 -1
  112. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.js.map +1 -1
  113. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.cjs.map +1 -1
  114. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.js.map +1 -1
  115. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/error.cjs.map +1 -1
  116. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/error.js.map +1 -1
  117. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.cjs +1 -1
  118. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.cjs.map +1 -1
  119. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.js +1 -1
  120. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.js.map +1 -1
  121. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.cjs.map +1 -1
  122. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.js.map +1 -1
  123. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/console.cjs.map +1 -1
  124. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/console.js.map +1 -1
  125. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalError.cjs.map +1 -1
  126. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalError.js.map +1 -1
  127. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.cjs.map +1 -1
  128. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js.map +1 -1
  129. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs.map +1 -1
  130. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js.map +1 -1
  131. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs.map +1 -1
  132. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js.map +1 -1
  133. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/lru.cjs.map +1 -1
  134. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/lru.js.map +1 -1
  135. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/memo.cjs.map +1 -1
  136. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/memo.js.map +1 -1
  137. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs +3 -3
  138. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs.map +1 -1
  139. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js +3 -3
  140. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js.map +1 -1
  141. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.cjs.map +1 -1
  142. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.js.map +1 -1
  143. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.cjs.map +1 -1
  144. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.js.map +1 -1
  145. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs.map +1 -1
  146. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js.map +1 -1
  147. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.cjs.map +1 -1
  148. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.js.map +1 -1
  149. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.cjs.map +1 -1
  150. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.js +1 -1
  151. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.js.map +1 -1
  152. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.cjs.map +1 -1
  153. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.js.map +1 -1
  154. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.cjs.map +1 -1
  155. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.js.map +1 -1
  156. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.cjs.map +1 -1
  157. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.js.map +1 -1
  158. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.cjs.map +1 -1
  159. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.js.map +1 -1
  160. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs.map +1 -1
  161. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js.map +1 -1
  162. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs.map +1 -1
  163. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js.map +1 -1
  164. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.cjs.map +1 -1
  165. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.js.map +1 -1
  166. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.cjs.map +1 -1
  167. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.js.map +1 -1
  168. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs +1 -1
  169. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs.map +1 -1
  170. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js +1 -1
  171. package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js.map +1 -1
  172. package/dist/_node_modules/@sentry/node/esm/async/domain.cjs.map +1 -1
  173. package/dist/_node_modules/@sentry/node/esm/async/domain.js +1 -1
  174. package/dist/_node_modules/@sentry/node/esm/async/domain.js.map +1 -1
  175. package/dist/_node_modules/@sentry/node/esm/async/hooks.cjs.map +1 -1
  176. package/dist/_node_modules/@sentry/node/esm/async/hooks.js.map +1 -1
  177. package/dist/_node_modules/@sentry/node/esm/async/index.cjs.map +1 -1
  178. package/dist/_node_modules/@sentry/node/esm/async/index.js.map +1 -1
  179. package/dist/_node_modules/@sentry/node/esm/client.cjs.map +1 -1
  180. package/dist/_node_modules/@sentry/node/esm/client.js.map +1 -1
  181. package/dist/_node_modules/@sentry/node/esm/integrations/console.cjs.map +1 -1
  182. package/dist/_node_modules/@sentry/node/esm/integrations/console.js.map +1 -1
  183. package/dist/_node_modules/@sentry/node/esm/integrations/context.cjs.map +1 -1
  184. package/dist/_node_modules/@sentry/node/esm/integrations/context.js +1 -1
  185. package/dist/_node_modules/@sentry/node/esm/integrations/context.js.map +1 -1
  186. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.cjs +3 -5
  187. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.cjs.map +1 -1
  188. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.js +3 -5
  189. package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.js.map +1 -1
  190. package/dist/_node_modules/@sentry/node/esm/integrations/http.cjs +3 -3
  191. package/dist/_node_modules/@sentry/node/esm/integrations/http.cjs.map +1 -1
  192. package/dist/_node_modules/@sentry/node/esm/integrations/http.js +3 -3
  193. package/dist/_node_modules/@sentry/node/esm/integrations/http.js.map +1 -1
  194. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.cjs.map +1 -1
  195. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.js.map +1 -1
  196. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.cjs +1 -1
  197. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.cjs.map +1 -1
  198. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js +1 -1
  199. package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
  200. package/dist/_node_modules/@sentry/node/esm/integrations/modules.cjs.map +1 -1
  201. package/dist/_node_modules/@sentry/node/esm/integrations/modules.js.map +1 -1
  202. package/dist/_node_modules/@sentry/node/esm/integrations/onuncaughtexception.cjs.map +1 -1
  203. package/dist/_node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map +1 -1
  204. package/dist/_node_modules/@sentry/node/esm/integrations/onunhandledrejection.cjs.map +1 -1
  205. package/dist/_node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map +1 -1
  206. package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.cjs.map +1 -1
  207. package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.js.map +1 -1
  208. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.cjs +1 -1
  209. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.cjs.map +1 -1
  210. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.js +1 -1
  211. package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.js.map +1 -1
  212. package/dist/_node_modules/@sentry/node/esm/integrations/utils/errorhandling.cjs.map +1 -1
  213. package/dist/_node_modules/@sentry/node/esm/integrations/utils/errorhandling.js.map +1 -1
  214. package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.cjs.map +1 -1
  215. package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.js.map +1 -1
  216. package/dist/_node_modules/@sentry/node/esm/module.cjs +4 -4
  217. package/dist/_node_modules/@sentry/node/esm/module.cjs.map +1 -1
  218. package/dist/_node_modules/@sentry/node/esm/module.js.map +1 -1
  219. package/dist/_node_modules/@sentry/node/esm/nodeVersion.cjs.map +1 -1
  220. package/dist/_node_modules/@sentry/node/esm/proxy/base.cjs +1 -2
  221. package/dist/_node_modules/@sentry/node/esm/proxy/base.cjs.map +1 -1
  222. package/dist/_node_modules/@sentry/node/esm/proxy/base.js +1 -2
  223. package/dist/_node_modules/@sentry/node/esm/proxy/base.js.map +1 -1
  224. package/dist/_node_modules/@sentry/node/esm/proxy/index.cjs.map +1 -1
  225. package/dist/_node_modules/@sentry/node/esm/proxy/index.js.map +1 -1
  226. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.cjs +3 -6
  227. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.cjs.map +1 -1
  228. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.js +3 -6
  229. package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.js.map +1 -1
  230. package/dist/_node_modules/@sentry/node/esm/sdk.cjs +16 -16
  231. package/dist/_node_modules/@sentry/node/esm/sdk.cjs.map +1 -1
  232. package/dist/_node_modules/@sentry/node/esm/sdk.js +6 -6
  233. package/dist/_node_modules/@sentry/node/esm/sdk.js.map +1 -1
  234. package/dist/_node_modules/@sentry/node/esm/transports/http.cjs.map +1 -1
  235. package/dist/_node_modules/@sentry/node/esm/transports/http.js.map +1 -1
  236. package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -1
  237. package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -1
  238. package/dist/_node_modules/fetch-blob/file.cjs +9 -21
  239. package/dist/_node_modules/fetch-blob/file.cjs.map +1 -1
  240. package/dist/_node_modules/fetch-blob/file.js +8 -20
  241. package/dist/_node_modules/fetch-blob/file.js.map +1 -1
  242. package/dist/_node_modules/fetch-blob/from.cjs +9 -0
  243. package/dist/_node_modules/fetch-blob/from.cjs.map +1 -0
  244. package/dist/_node_modules/fetch-blob/from.js +9 -0
  245. package/dist/_node_modules/fetch-blob/from.js.map +1 -0
  246. package/dist/_node_modules/fetch-blob/index.cjs +8 -21
  247. package/dist/_node_modules/fetch-blob/index.cjs.map +1 -1
  248. package/dist/_node_modules/fetch-blob/index.js +8 -21
  249. package/dist/_node_modules/fetch-blob/index.js.map +1 -1
  250. package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -1
  251. package/dist/_node_modules/fetch-blob/streams.js.map +1 -1
  252. package/dist/_node_modules/formdata-polyfill/esm.min.cjs +12 -29
  253. package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -1
  254. package/dist/_node_modules/formdata-polyfill/esm.min.js +12 -29
  255. package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -1
  256. package/dist/_node_modules/lru-cache/index.cjs +1 -2
  257. package/dist/_node_modules/lru-cache/index.cjs.map +1 -1
  258. package/dist/_node_modules/lru-cache/index.js +1 -2
  259. package/dist/_node_modules/lru-cache/index.js.map +1 -1
  260. package/dist/_node_modules/node-domexception/index.cjs.map +1 -1
  261. package/dist/_node_modules/node-domexception/index.js.map +1 -1
  262. package/dist/_node_modules/node-fetch/src/body.cjs +4 -7
  263. package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -1
  264. package/dist/_node_modules/node-fetch/src/body.js +5 -8
  265. package/dist/_node_modules/node-fetch/src/body.js.map +1 -1
  266. package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -1
  267. package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -1
  268. package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -1
  269. package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -1
  270. package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -1
  271. package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -1
  272. package/dist/_node_modules/node-fetch/src/headers.cjs +1 -2
  273. package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -1
  274. package/dist/_node_modules/node-fetch/src/headers.js +1 -2
  275. package/dist/_node_modules/node-fetch/src/headers.js.map +1 -1
  276. package/dist/_node_modules/node-fetch/src/index.cjs +2 -4
  277. package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -1
  278. package/dist/_node_modules/node-fetch/src/index.js +3 -5
  279. package/dist/_node_modules/node-fetch/src/index.js.map +1 -1
  280. package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -1
  281. package/dist/_node_modules/node-fetch/src/request.js.map +1 -1
  282. package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -1
  283. package/dist/_node_modules/node-fetch/src/response.js.map +1 -1
  284. package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -1
  285. package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -1
  286. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +2 -5
  287. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -1
  288. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +2 -5
  289. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -1
  290. package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -1
  291. package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -1
  292. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +5 -10
  293. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -1
  294. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +5 -10
  295. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -1
  296. package/dist/_node_modules/yallist/iterator.cjs +1 -2
  297. package/dist/_node_modules/yallist/iterator.cjs.map +1 -1
  298. package/dist/_node_modules/yallist/iterator.js +1 -2
  299. package/dist/_node_modules/yallist/iterator.js.map +1 -1
  300. package/dist/_node_modules/yallist/yallist.cjs.map +1 -1
  301. package/dist/_node_modules/yallist/yallist.js.map +1 -1
  302. package/dist/cli.cjs.map +1 -1
  303. package/dist/cli.js.map +1 -1
  304. package/dist/constants.cjs +1 -1
  305. package/dist/constants.cjs.map +1 -1
  306. package/dist/constants.js +1 -1
  307. package/dist/constants.js.map +1 -1
  308. package/dist/legacyMigrations/detectFramework.cjs.map +1 -1
  309. package/dist/legacyMigrations/detectFramework.js.map +1 -1
  310. package/dist/legacyMigrations/migrateAssets.cjs.map +1 -1
  311. package/dist/legacyMigrations/migrateAssets.js.map +1 -1
  312. package/dist/legacyMigrations/migrateSMJSON.cjs.map +1 -1
  313. package/dist/legacyMigrations/migrateSMJSON.js.map +1 -1
  314. package/dist/lib/castArray.cjs.map +1 -1
  315. package/dist/lib/castArray.js.map +1 -1
  316. package/dist/lib/createSliceMachineExpressApp.cjs +1 -2
  317. package/dist/lib/createSliceMachineExpressApp.cjs.map +1 -1
  318. package/dist/lib/createSliceMachineExpressApp.js +1 -2
  319. package/dist/lib/createSliceMachineExpressApp.js.map +1 -1
  320. package/dist/lib/locateFileUpward.cjs.map +1 -1
  321. package/dist/lib/locateFileUpward.js.map +1 -1
  322. package/dist/lib/safelyExecute.cjs.map +1 -1
  323. package/dist/lib/safelyExecute.js.map +1 -1
  324. package/dist/lib/sentryErrorHandlers.cjs +2 -4
  325. package/dist/lib/sentryErrorHandlers.cjs.map +1 -1
  326. package/dist/lib/sentryErrorHandlers.js +2 -4
  327. package/dist/lib/sentryErrorHandlers.js.map +1 -1
  328. package/dist/lib/sentryFrontendTunnel.cjs.map +1 -1
  329. package/dist/lib/sentryFrontendTunnel.js.map +1 -1
  330. package/dist/lib/setupSentry.cjs +0 -4
  331. package/dist/lib/setupSentry.cjs.map +1 -1
  332. package/dist/lib/setupSentry.js +0 -4
  333. package/dist/lib/setupSentry.js.map +1 -1
  334. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.cjs +1 -2
  335. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.cjs.map +1 -1
  336. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.js +1 -2
  337. package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.js.map +1 -1
  338. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.cjs +1 -2
  339. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.cjs.map +1 -1
  340. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.js +1 -2
  341. package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.js.map +1 -1
  342. package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.cjs.map +1 -1
  343. package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.js.map +1 -1
  344. package/dist/packages/start-slicemachine/_node_modules/semver/functions/clean.cjs.map +1 -1
  345. package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.cjs.map +1 -1
  346. package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.js.map +1 -1
  347. package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.cjs.map +1 -1
  348. package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.js.map +1 -1
  349. package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare-build.cjs.map +1 -1
  350. package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare-loose.cjs.map +1 -1
  351. package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare.cjs.map +1 -1
  352. package/dist/packages/start-slicemachine/_node_modules/semver/functions/diff.cjs.map +1 -1
  353. package/dist/packages/start-slicemachine/_node_modules/semver/functions/diff.js.map +1 -1
  354. package/dist/packages/start-slicemachine/_node_modules/semver/functions/eq.cjs.map +1 -1
  355. package/dist/packages/start-slicemachine/_node_modules/semver/functions/gt.cjs.map +1 -1
  356. package/dist/packages/start-slicemachine/_node_modules/semver/functions/gte.cjs.map +1 -1
  357. package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.cjs.map +1 -1
  358. package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.js.map +1 -1
  359. package/dist/packages/start-slicemachine/_node_modules/semver/functions/lt.cjs.map +1 -1
  360. package/dist/packages/start-slicemachine/_node_modules/semver/functions/lte.cjs.map +1 -1
  361. package/dist/packages/start-slicemachine/_node_modules/semver/functions/major.cjs.map +1 -1
  362. package/dist/packages/start-slicemachine/_node_modules/semver/functions/minor.cjs.map +1 -1
  363. package/dist/packages/start-slicemachine/_node_modules/semver/functions/neq.cjs.map +1 -1
  364. package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.cjs.map +1 -1
  365. package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.js.map +1 -1
  366. package/dist/packages/start-slicemachine/_node_modules/semver/functions/patch.cjs.map +1 -1
  367. package/dist/packages/start-slicemachine/_node_modules/semver/functions/prerelease.cjs.map +1 -1
  368. package/dist/packages/start-slicemachine/_node_modules/semver/functions/rcompare.cjs.map +1 -1
  369. package/dist/packages/start-slicemachine/_node_modules/semver/functions/rsort.cjs.map +1 -1
  370. package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.cjs.map +1 -1
  371. package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.js.map +1 -1
  372. package/dist/packages/start-slicemachine/_node_modules/semver/functions/sort.cjs.map +1 -1
  373. package/dist/packages/start-slicemachine/_node_modules/semver/functions/valid.cjs.map +1 -1
  374. package/dist/packages/start-slicemachine/_node_modules/semver/index.cjs +4 -4
  375. package/dist/packages/start-slicemachine/_node_modules/semver/index.cjs.map +1 -1
  376. package/dist/packages/start-slicemachine/_node_modules/semver/index.js.map +1 -1
  377. package/dist/packages/start-slicemachine/_node_modules/semver/internal/debug.cjs.map +1 -1
  378. package/dist/packages/start-slicemachine/_node_modules/semver/internal/debug.js.map +1 -1
  379. package/dist/packages/start-slicemachine/_node_modules/semver/internal/identifiers.cjs.map +1 -1
  380. package/dist/packages/start-slicemachine/_node_modules/semver/internal/identifiers.js.map +1 -1
  381. package/dist/packages/start-slicemachine/_node_modules/semver/internal/parse-options.cjs.map +1 -1
  382. package/dist/packages/start-slicemachine/_node_modules/semver/internal/parse-options.js.map +1 -1
  383. package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.cjs.map +1 -1
  384. package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.js.map +1 -1
  385. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/gtr.cjs.map +1 -1
  386. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/intersects.cjs.map +1 -1
  387. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/intersects.js.map +1 -1
  388. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/ltr.cjs.map +1 -1
  389. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.cjs.map +1 -1
  390. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.js.map +1 -1
  391. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.cjs.map +1 -1
  392. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.js.map +1 -1
  393. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.cjs.map +1 -1
  394. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.js.map +1 -1
  395. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/outside.cjs.map +1 -1
  396. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/outside.js.map +1 -1
  397. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.cjs.map +1 -1
  398. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.js.map +1 -1
  399. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.cjs +10 -11
  400. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.cjs.map +1 -1
  401. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.js +10 -11
  402. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.js.map +1 -1
  403. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/to-comparators.cjs.map +1 -1
  404. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/to-comparators.js.map +1 -1
  405. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.cjs.map +1 -1
  406. package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.js.map +1 -1
  407. package/dist/packages/start-slicemachine/package.json.cjs +1 -1
  408. package/dist/packages/start-slicemachine/package.json.js +1 -1
  409. package/package.json +3 -3
  410. package/dist/lib/checkIsSentryEnabled.cjs +0 -5
  411. package/dist/lib/checkIsSentryEnabled.cjs.map +0 -1
  412. package/dist/lib/checkIsSentryEnabled.js +0 -5
  413. package/dist/lib/checkIsSentryEnabled.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"requestdata.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/integrations/requestdata.js"],"sourcesContent":["import { extractPathForTransaction, addRequestDataToEvent } from '@sentry/utils';\nimport { convertIntegrationFnToClass, defineIntegration } from '../integration.js';\nimport { spanToJSON } from '../utils/spanUtils.js';\n\nconst DEFAULT_OPTIONS = {\n include: {\n cookies: true,\n data: true,\n headers: true,\n ip: false,\n query_string: true,\n url: true,\n user: {\n id: true,\n username: true,\n email: true,\n },\n },\n transactionNamingScheme: 'methodPath',\n};\n\nconst INTEGRATION_NAME = 'RequestData';\n\nconst _requestDataIntegration = ((options = {}) => {\n const _addRequestData = addRequestDataToEvent;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n include: {\n // @ts-expect-error It's mad because `method` isn't a known `include` key. (It's only here and not set by default in\n // `addRequestDataToEvent` for legacy reasons. TODO (v8): Change that.)\n method: true,\n ...DEFAULT_OPTIONS.include,\n ...options.include,\n user:\n options.include && typeof options.include.user === 'boolean'\n ? options.include.user\n : {\n ...DEFAULT_OPTIONS.include.user,\n // Unclear why TS still thinks `options.include.user` could be a boolean at this point\n ...((options.include || {}).user ),\n },\n },\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event, _hint, client) {\n // Note: In the long run, most of the logic here should probably move into the request data utility functions. For\n // the moment it lives here, though, until https://github.com/getsentry/sentry-javascript/issues/5718 is addressed.\n // (TL;DR: Those functions touch many parts of the repo in many different ways, and need to be clened up. Once\n // that's happened, it will be easier to add this logic in without worrying about unexpected side effects.)\n const { transactionNamingScheme } = _options;\n\n const { sdkProcessingMetadata = {} } = event;\n const req = sdkProcessingMetadata.request;\n\n if (!req) {\n return event;\n }\n\n // The Express request handler takes a similar `include` option to that which can be passed to this integration.\n // If passed there, we store it in `sdkProcessingMetadata`. TODO(v8): Force express and GCP people to use this\n // integration, so that all of this passing and conversion isn't necessary\n const addRequestDataOptions =\n sdkProcessingMetadata.requestDataOptionsFromExpressHandler ||\n sdkProcessingMetadata.requestDataOptionsFromGCPWrapper ||\n convertReqDataIntegrationOptsToAddReqDataOpts(_options);\n\n const processedEvent = _addRequestData(event, req, addRequestDataOptions);\n\n // Transaction events already have the right `transaction` value\n if (event.type === 'transaction' || transactionNamingScheme === 'handler') {\n return processedEvent;\n }\n\n // In all other cases, use the request's associated transaction (if any) to overwrite the event's `transaction`\n // value with a high-quality one\n const reqWithTransaction = req ;\n const transaction = reqWithTransaction._sentryTransaction;\n if (transaction) {\n const name = spanToJSON(transaction).description || '';\n\n // TODO (v8): Remove the nextjs check and just base it on `transactionNamingScheme` for all SDKs. (We have to\n // keep it the way it is for the moment, because changing the names of transactions in Sentry has the potential\n // to break things like alert rules.)\n const shouldIncludeMethodInTransactionName =\n getSDKName(client) === 'sentry.javascript.nextjs'\n ? name.startsWith('/api')\n : transactionNamingScheme !== 'path';\n\n const [transactionValue] = extractPathForTransaction(req, {\n path: true,\n method: shouldIncludeMethodInTransactionName,\n customRoute: name,\n });\n\n processedEvent.transaction = transactionValue;\n }\n\n return processedEvent;\n },\n };\n}) ;\n\nconst requestDataIntegration = defineIntegration(_requestDataIntegration);\n\n/**\n * Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/integrations`\n * so it can be used in cross-platform SDKs like `@sentry/nextjs`.\n * @deprecated Use `requestDataIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst RequestData = convertIntegrationFnToClass(INTEGRATION_NAME, requestDataIntegration)\n\n;\n\n/** Convert this integration's options to match what `addRequestDataToEvent` expects */\n/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */\nfunction convertReqDataIntegrationOptsToAddReqDataOpts(\n integrationOptions,\n) {\n const {\n transactionNamingScheme,\n include: { ip, user, ...requestOptions },\n } = integrationOptions;\n\n const requestIncludeKeys = [];\n for (const [key, value] of Object.entries(requestOptions)) {\n if (value) {\n requestIncludeKeys.push(key);\n }\n }\n\n let addReqDataUserOpt;\n if (user === undefined) {\n addReqDataUserOpt = true;\n } else if (typeof user === 'boolean') {\n addReqDataUserOpt = user;\n } else {\n const userIncludeKeys = [];\n for (const [key, value] of Object.entries(user)) {\n if (value) {\n userIncludeKeys.push(key);\n }\n }\n addReqDataUserOpt = userIncludeKeys;\n }\n\n return {\n include: {\n ip,\n user: addReqDataUserOpt,\n request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : undefined,\n transaction: transactionNamingScheme,\n },\n };\n}\n\nfunction getSDKName(client) {\n try {\n // For a long chain like this, it's fewer bytes to combine a try-catch with assuming everything is there than to\n // write out a long chain of `a && a.b && a.b.c && ...`\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return client.getOptions()._metadata.sdk.name;\n } catch (err) {\n // In theory we should never get here\n return undefined;\n }\n}\n\nexport { RequestData, requestDataIntegration };\n//# sourceMappingURL=requestdata.js.map\n"],"names":[],"mappings":";;;AAIA,MAAM,kBAAkB;AAAA,EACtB,SAAS;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,cAAc;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,OAAO;AAAA,IACR;AAAA,EACF;AAAA,EACD,yBAAyB;AAC3B;AAEA,MAAM,mBAAmB;AAEzB,MAAM,0BAA2B,CAAC,UAAU,OAAO;AACjD,QAAM,kBAAkB;AACxB,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,GAAG;AAAA,IACH,SAAS;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,MACR,GAAG,gBAAgB;AAAA,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qB,CAAA;AAC3B,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,cAAc,GAAG;AACzD,QAAI,OAAO;AACT,yBAAmB,KAAK,GAAG;AAAA,IAC5B;AAAA,EACF;AAED,MAAI;AACJ,MAAI,SAAS,QAAW;AACtB,wBAAoB;AAAA,EACxB,WAAa,OAAO,SAAS,WAAW;AACpC,wBAAoB;AAAA,EACxB,OAAS;AACL,UAAM,kBAAkB,CAAA;AACxB,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC/C,UAAI,OAAO;AACT,wBAAgB,KAAK,GAAG;AAAA,MACzB;AAAA,IACF;AACD,wBAAoB;AAAA,EACrB;AAED,SAAO;AAAA,IACL,SAAS;AAAA,MACP;AAAA,MACA,MAAM;AAAA,MACN,SAAS,mBAAmB,WAAW,IAAI,qBAAqB;AAAA,MAChE,aAAa;AAAA,IACd;AAAA,EACL;AACA;AAEA,SAAS,WAAW,QAAQ;AAC1B,MAAI;AAIF,WAAO,OAAO,WAAU,EAAG,UAAU,IAAI;AAAA,EAC1C,SAAQ,KAAK;AAEZ,WAAO;AAAA,EACR;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"requestdata.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/integrations/requestdata.js"],"sourcesContent":["import { extractPathForTransaction, addRequestDataToEvent } from '@sentry/utils';\nimport { convertIntegrationFnToClass, defineIntegration } from '../integration.js';\nimport { spanToJSON } from '../utils/spanUtils.js';\n\nconst DEFAULT_OPTIONS = {\n include: {\n cookies: true,\n data: true,\n headers: true,\n ip: false,\n query_string: true,\n url: true,\n user: {\n id: true,\n username: true,\n email: true,\n },\n },\n transactionNamingScheme: 'methodPath',\n};\n\nconst INTEGRATION_NAME = 'RequestData';\n\nconst _requestDataIntegration = ((options = {}) => {\n const _addRequestData = addRequestDataToEvent;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n include: {\n // @ts-expect-error It's mad because `method` isn't a known `include` key. (It's only here and not set by default in\n // `addRequestDataToEvent` for legacy reasons. TODO (v8): Change that.)\n method: true,\n ...DEFAULT_OPTIONS.include,\n ...options.include,\n user:\n options.include && typeof options.include.user === 'boolean'\n ? options.include.user\n : {\n ...DEFAULT_OPTIONS.include.user,\n // Unclear why TS still thinks `options.include.user` could be a boolean at this point\n ...((options.include || {}).user ),\n },\n },\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO v8: Remove this\n setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n processEvent(event, _hint, client) {\n // Note: In the long run, most of the logic here should probably move into the request data utility functions. For\n // the moment it lives here, though, until https://github.com/getsentry/sentry-javascript/issues/5718 is addressed.\n // (TL;DR: Those functions touch many parts of the repo in many different ways, and need to be clened up. Once\n // that's happened, it will be easier to add this logic in without worrying about unexpected side effects.)\n const { transactionNamingScheme } = _options;\n\n const { sdkProcessingMetadata = {} } = event;\n const req = sdkProcessingMetadata.request;\n\n if (!req) {\n return event;\n }\n\n // The Express request handler takes a similar `include` option to that which can be passed to this integration.\n // If passed there, we store it in `sdkProcessingMetadata`. TODO(v8): Force express and GCP people to use this\n // integration, so that all of this passing and conversion isn't necessary\n const addRequestDataOptions =\n sdkProcessingMetadata.requestDataOptionsFromExpressHandler ||\n sdkProcessingMetadata.requestDataOptionsFromGCPWrapper ||\n convertReqDataIntegrationOptsToAddReqDataOpts(_options);\n\n const processedEvent = _addRequestData(event, req, addRequestDataOptions);\n\n // Transaction events already have the right `transaction` value\n if (event.type === 'transaction' || transactionNamingScheme === 'handler') {\n return processedEvent;\n }\n\n // In all other cases, use the request's associated transaction (if any) to overwrite the event's `transaction`\n // value with a high-quality one\n const reqWithTransaction = req ;\n const transaction = reqWithTransaction._sentryTransaction;\n if (transaction) {\n const name = spanToJSON(transaction).description || '';\n\n // TODO (v8): Remove the nextjs check and just base it on `transactionNamingScheme` for all SDKs. (We have to\n // keep it the way it is for the moment, because changing the names of transactions in Sentry has the potential\n // to break things like alert rules.)\n const shouldIncludeMethodInTransactionName =\n getSDKName(client) === 'sentry.javascript.nextjs'\n ? name.startsWith('/api')\n : transactionNamingScheme !== 'path';\n\n const [transactionValue] = extractPathForTransaction(req, {\n path: true,\n method: shouldIncludeMethodInTransactionName,\n customRoute: name,\n });\n\n processedEvent.transaction = transactionValue;\n }\n\n return processedEvent;\n },\n };\n}) ;\n\nconst requestDataIntegration = defineIntegration(_requestDataIntegration);\n\n/**\n * Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/integrations`\n * so it can be used in cross-platform SDKs like `@sentry/nextjs`.\n * @deprecated Use `requestDataIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nconst RequestData = convertIntegrationFnToClass(INTEGRATION_NAME, requestDataIntegration)\n\n;\n\n/** Convert this integration's options to match what `addRequestDataToEvent` expects */\n/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */\nfunction convertReqDataIntegrationOptsToAddReqDataOpts(\n integrationOptions,\n) {\n const {\n transactionNamingScheme,\n include: { ip, user, ...requestOptions },\n } = integrationOptions;\n\n const requestIncludeKeys = [];\n for (const [key, value] of Object.entries(requestOptions)) {\n if (value) {\n requestIncludeKeys.push(key);\n }\n }\n\n let addReqDataUserOpt;\n if (user === undefined) {\n addReqDataUserOpt = true;\n } else if (typeof user === 'boolean') {\n addReqDataUserOpt = user;\n } else {\n const userIncludeKeys = [];\n for (const [key, value] of Object.entries(user)) {\n if (value) {\n userIncludeKeys.push(key);\n }\n }\n addReqDataUserOpt = userIncludeKeys;\n }\n\n return {\n include: {\n ip,\n user: addReqDataUserOpt,\n request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : undefined,\n transaction: transactionNamingScheme,\n },\n };\n}\n\nfunction getSDKName(client) {\n try {\n // For a long chain like this, it's fewer bytes to combine a try-catch with assuming everything is there than to\n // write out a long chain of `a && a.b && a.b.c && ...`\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return client.getOptions()._metadata.sdk.name;\n } catch (err) {\n // In theory we should never get here\n return undefined;\n }\n}\n\nexport { RequestData, requestDataIntegration };\n//# sourceMappingURL=requestdata.js.map\n"],"names":[],"mappings":";;;AAIA,MAAM,kBAAkB;AAAA,EACtB,SAAS;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,cAAc;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,OAAO;AAAA,IACb;AAAA,EACA;AAAA,EACE,yBAAyB;AAC3B;AAEA,MAAM,mBAAmB;AAEzB,MAAM,0BAA2B,CAAC,UAAU,OAAO;AACjD,QAAM,kBAAkB;AACxB,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH,GAAG;AAAA,IACH,SAAS;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,MACR,GAAG,gBAAgB;AAAA,MACnB,GAAG,QAAQ;AAAA,MACX,MACE,QAAQ,WAAW,OAAO,QAAQ,QAAQ,SAAS,YAC/C,QAAQ,QAAQ,OAChB;AAAA,QACE,GAAG,gBAAgB,QAAQ;AAAA;AAAA,QAE3B,IAAK,QAAQ,WAAW,CAAA,GAAI;AAAA,MAC1C;AAAA,IACA;AAAA,EACA;AAEE,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,YAAY;AAAA,IAAC;AAAA;AAAA,IACb,aAAa,OAAO,OAAO,QAAQ;AAKjC,YAAM,EAAE,wBAAuB,IAAK;AAEpC,YAAM,EAAE,wBAAwB,CAAA,EAAE,IAAK;AACvC,YAAM,MAAM,sBAAsB;AAElC,UAAI,CAAC,KAAK;AACR,eAAO;AAAA,MACT;AAKA,YAAM,wBACJ,sBAAsB,wCACtB,sBAAsB,oCACtB,8CAA8C,QAAQ;AAExD,YAAM,iBAAiB,gBAAgB,OAAO,KAAK,qBAAqB;AAGxE,UAAI,MAAM,SAAS,iBAAi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1B,MAAI;AAIF,WAAO,OAAO,WAAU,EAAG,UAAU,IAAI;AAAA,EAC3C,SAAS,KAAK;AAEZ,WAAO;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregator.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/aggregator.js"],"sourcesContent":["import { timestampInSeconds } from '@sentry/utils';\nimport { DEFAULT_FLUSH_INTERVAL, SET_METRIC_TYPE, MAX_WEIGHT } from './constants.js';\nimport { METRIC_MAP } from './instance.js';\nimport { updateMetricSummaryOnActiveSpan } from './metric-summary.js';\nimport { sanitizeMetricKey, sanitizeTags, sanitizeUnit, getBucketKey } from './utils.js';\n\n/**\n * A metrics aggregator that aggregates metrics in memory and flushes them periodically.\n */\nclass MetricsAggregator {\n // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets\n // when the aggregator is garbage collected.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n\n // Different metrics have different weights. We use this to limit the number of metrics\n // that we store in memory.\n\n // Cast to any so that it can use Node.js timeout\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n // SDKs are required to shift the flush interval by random() * rollup_in_seconds.\n // That shift is determined once per startup to create jittering.\n\n // An SDK is required to perform force flushing ahead of scheduled time if the memory\n // pressure is too high. There is no rule for this other than that SDKs should be tracking\n // abstract aggregation complexity (eg: a counter only carries a single float, whereas a\n // distribution is a float per emission).\n //\n // Force flush is used on either shutdown, flush() or when we exceed the max weight.\n\n constructor( _client) {this._client = _client;\n this._buckets = new Map();\n this._bucketsTotalWeight = 0;\n\n this._interval = setInterval(() => this._flush(), DEFAULT_FLUSH_INTERVAL) ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (this._interval.unref) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._interval.unref();\n }\n\n this._flushShift = Math.floor((Math.random() * DEFAULT_FLUSH_INTERVAL) / 1000);\n this._forceFlush = false;\n }\n\n /**\n * @inheritDoc\n */\n add(\n metricType,\n unsanitizedName,\n value,\n unsanitizedUnit = 'none',\n unsanitizedTags = {},\n maybeFloatTimestamp = timestampInSeconds(),\n ) {\n const timestamp = Math.floor(maybeFloatTimestamp);\n const name = sanitizeMetricKey(unsanitizedName);\n const tags = sanitizeTags(unsanitizedTags);\n const unit = sanitizeUnit(unsanitizedUnit );\n\n const bucketKey = getBucketKey(metricType, name, unit, tags);\n\n let bucketItem = this._buckets.get(bucketKey);\n // If this is a set metric, we need to calculate the delta from the previous weight.\n const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0;\n\n if (bucketItem) {\n bucketItem.metric.add(value);\n // TODO(abhi): Do we need this check?\n if (bucketItem.timestamp < timestamp) {\n bucketItem.timestamp = timestamp;\n }\n } else {\n bucketItem = {\n // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size.\n metric: new METRIC_MAP[metricType](value),\n timestamp,\n metricType,\n name,\n unit,\n tags,\n };\n this._buckets.set(bucketKey, bucketItem);\n }\n\n // If value is a string, it's a set metric so calculate the delta from the previous weight.\n const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value;\n updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey);\n\n // We need to keep track of the total weight of the buckets so that we can\n // flush them when we exceed the max weight.\n this._bucketsTotalWeight += bucketItem.metric.weight;\n\n if (this._bucketsTotalWeight >= MAX_WEIGHT) {\n this.flush();\n }\n }\n\n /**\n * Flushes the current metrics to the transport via the transport.\n */\n flush() {\n this._forceFlush = true;\n this._flush();\n }\n\n /**\n * Shuts down metrics aggregator and clears all metrics.\n */\n close() {\n this._forceFlush = true;\n clearInterval(this._interval);\n this._flush();\n }\n\n /**\n * Flushes the buckets according to the internal state of the aggregator.\n * If it is a force flush, which happens on shutdown, it will flush all buckets.\n * Otherwise, it will only flush buckets that are older than the flush interval,\n * and according to the flush shift.\n *\n * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties.\n */\n _flush() {\n // TODO(@anonrig): Add Atomics for locking to avoid having force flush and regular flush\n // running at the same time.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics\n\n // This path eliminates the need for checking for timestamps since we're forcing a flush.\n // Remember to reset the flag, or it will always flush all metrics.\n if (this._forceFlush) {\n this._forceFlush = false;\n this._bucketsTotalWeight = 0;\n this._captureMetrics(this._buckets);\n this._buckets.clear();\n return;\n }\n const cutoffSeconds = Math.floor(timestampInSeconds()) - DEFAULT_FLUSH_INTERVAL / 1000 - this._flushShift;\n // TODO(@anonrig): Optimization opportunity.\n // Convert this map to an array and store key in the bucketItem.\n const flushedBuckets = new Map();\n for (const [key, bucket] of this._buckets) {\n if (bucket.timestamp <= cutoffSeconds) {\n flushedBuckets.set(key, bucket);\n this._bucketsTotalWeight -= bucket.metric.weight;\n }\n }\n\n for (const [key] of flushedBuckets) {\n this._buckets.delete(key);\n }\n\n this._captureMetrics(flushedBuckets);\n }\n\n /**\n * Only captures a subset of the buckets passed to this function.\n * @param flushedBuckets\n */\n _captureMetrics(flushedBuckets) {\n if (flushedBuckets.size > 0 && this._client.captureAggregateMetrics) {\n // TODO(@anonrig): Optimization opportunity.\n // This copy operation can be avoided if we store the key in the bucketItem.\n const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem);\n this._client.captureAggregateMetrics(buckets);\n }\n }\n}\n\nexport { MetricsAggregator };\n//# sourceMappingURL=aggregator.js.map\n"],"names":["DEFAULT_FLUSH_INTERVAL","timestampInSeconds","sanitizeMetricKey","sanitizeTags","sanitizeUnit","getBucketKey","SET_METRIC_TYPE","METRIC_MAP","updateMetricSummaryOnActiveSpan","MAX_WEIGHT"],"mappings":";;;;;;;AASA,MAAM,kBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AuBC,sBAAY;AAC1C,WAAK,MAAK;AAAA,IACX;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,QAAQ;AACP,SAAK,cAAc;AACnB,SAAK,OAAM;AAAA,EACZ;AAAA;AAAA;AAAA;AAAA,EAKA,QAAQ;AACP,SAAK,cAAc;AACnB,kBAAc,KAAK,SAAS;AAC5B,SAAK,OAAM;AAAA,EACZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,SAAS;AAOR,QAAI,KAAK,aAAa;AACpB,WAAK,cAAc;AACnB,WAAK,sBAAsB;AAC3B,WAAK,gBAAgB,KAAK,QAAQ;AAClC,WAAK,SAAS;AACd;AAAA,IACD;AACD,UAAM,gBAAgB,KAAK,MAAMR,KAAkB,mBAAA,CAAE,IAAID,mCAAyB,MAAO,KAAK;AAG9F,UAAM,iBAAiB,oBAAI;AAC3B,eAAW,CAAC,KAAK,MAAM,KAAK,KAAK,UAAU;AACzC,UAAI,OAAO,aAAa,eAAe;AACrC,uBAAe,IAAI,KAAK,MAAM;AAC9B,aAAK,uBAAuB,OAAO,OAAO;AAAA,MAC3C;AAAA,IACF;AAED,eAAW,CAAC,GAAG,KAAK,gBAAgB;AAClC,WAAK,SAAS,OAAO,GAAG;AAAA,IACzB;AAED,SAAK,gBAAgB,cAAc;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAgB,gBAAgB;AAC/B,QAAI,eAAe,OAAO,KAAK,KAAK,QAAQ,yBAAyB;AAGnE,YAAM,UAAU,MAAM,KAAK,cAAc,EAAE,IAAI,CAAC,CAAG,EAAA,UAAU,MAAM,UAAU;AAC7E,WAAK,QAAQ,wBAAwB,OAAO;AAAA,IAC7C;AAAA,EACF;AACH;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"aggregator.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/aggregator.js"],"sourcesContent":["import { timestampInSeconds } from '@sentry/utils';\nimport { DEFAULT_FLUSH_INTERVAL, SET_METRIC_TYPE, MAX_WEIGHT } from './constants.js';\nimport { METRIC_MAP } from './instance.js';\nimport { updateMetricSummaryOnActiveSpan } from './metric-summary.js';\nimport { sanitizeMetricKey, sanitizeTags, sanitizeUnit, getBucketKey } from './utils.js';\n\n/**\n * A metrics aggregator that aggregates metrics in memory and flushes them periodically.\n */\nclass MetricsAggregator {\n // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets\n // when the aggregator is garbage collected.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n\n // Different metrics have different weights. We use this to limit the number of metrics\n // that we store in memory.\n\n // Cast to any so that it can use Node.js timeout\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n // SDKs are required to shift the flush interval by random() * rollup_in_seconds.\n // That shift is determined once per startup to create jittering.\n\n // An SDK is required to perform force flushing ahead of scheduled time if the memory\n // pressure is too high. There is no rule for this other than that SDKs should be tracking\n // abstract aggregation complexity (eg: a counter only carries a single float, whereas a\n // distribution is a float per emission).\n //\n // Force flush is used on either shutdown, flush() or when we exceed the max weight.\n\n constructor( _client) {this._client = _client;\n this._buckets = new Map();\n this._bucketsTotalWeight = 0;\n\n this._interval = setInterval(() => this._flush(), DEFAULT_FLUSH_INTERVAL) ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (this._interval.unref) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._interval.unref();\n }\n\n this._flushShift = Math.floor((Math.random() * DEFAULT_FLUSH_INTERVAL) / 1000);\n this._forceFlush = false;\n }\n\n /**\n * @inheritDoc\n */\n add(\n metricType,\n unsanitizedName,\n value,\n unsanitizedUnit = 'none',\n unsanitizedTags = {},\n maybeFloatTimestamp = timestampInSeconds(),\n ) {\n const timestamp = Math.floor(maybeFloatTimestamp);\n const name = sanitizeMetricKey(unsanitizedName);\n const tags = sanitizeTags(unsanitizedTags);\n const unit = sanitizeUnit(unsanitizedUnit );\n\n const bucketKey = getBucketKey(metricType, name, unit, tags);\n\n let bucketItem = this._buckets.get(bucketKey);\n // If this is a set metric, we need to calculate the delta from the previous weight.\n const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0;\n\n if (bucketItem) {\n bucketItem.metric.add(value);\n // TODO(abhi): Do we need this check?\n if (bucketItem.timestamp < timestamp) {\n bucketItem.timestamp = timestamp;\n }\n } else {\n bucketItem = {\n // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size.\n metric: new METRIC_MAP[metricType](value),\n timestamp,\n metricType,\n name,\n unit,\n tags,\n };\n this._buckets.set(bucketKey, bucketItem);\n }\n\n // If value is a string, it's a set metric so calculate the delta from the previous weight.\n const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value;\n updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey);\n\n // We need to keep track of the total weight of the buckets so that we can\n // flush them when we exceed the max weight.\n this._bucketsTotalWeight += bucketItem.metric.weight;\n\n if (this._bucketsTotalWeight >= MAX_WEIGHT) {\n this.flush();\n }\n }\n\n /**\n * Flushes the current metrics to the transport via the transport.\n */\n flush() {\n this._forceFlush = true;\n this._flush();\n }\n\n /**\n * Shuts down metrics aggregator and clears all metrics.\n */\n close() {\n this._forceFlush = true;\n clearInterval(this._interval);\n this._flush();\n }\n\n /**\n * Flushes the buckets according to the internal state of the aggregator.\n * If it is a force flush, which happens on shutdown, it will flush all buckets.\n * Otherwise, it will only flush buckets that are older than the flush interval,\n * and according to the flush shift.\n *\n * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties.\n */\n _flush() {\n // TODO(@anonrig): Add Atomics for locking to avoid having force flush and regular flush\n // running at the same time.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics\n\n // This path eliminates the need for checking for timestamps since we're forcing a flush.\n // Remember to reset the flag, or it will always flush all metrics.\n if (this._forceFlush) {\n this._forceFlush = false;\n this._bucketsTotalWeight = 0;\n this._captureMetrics(this._buckets);\n this._buckets.clear();\n return;\n }\n const cutoffSeconds = Math.floor(timestampInSeconds()) - DEFAULT_FLUSH_INTERVAL / 1000 - this._flushShift;\n // TODO(@anonrig): Optimization opportunity.\n // Convert this map to an array and store key in the bucketItem.\n const flushedBuckets = new Map();\n for (const [key, bucket] of this._buckets) {\n if (bucket.timestamp <= cutoffSeconds) {\n flushedBuckets.set(key, bucket);\n this._bucketsTotalWeight -= bucket.metric.weight;\n }\n }\n\n for (const [key] of flushedBuckets) {\n this._buckets.delete(key);\n }\n\n this._captureMetrics(flushedBuckets);\n }\n\n /**\n * Only captures a subset of the buckets passed to this function.\n * @param flushedBuckets\n */\n _captureMetrics(flushedBuckets) {\n if (flushedBuckets.size > 0 && this._client.captureAggregateMetrics) {\n // TODO(@anonrig): Optimization opportunity.\n // This copy operation can be avoided if we store the key in the bucketItem.\n const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem);\n this._client.captureAggregateMetrics(buckets);\n }\n }\n}\n\nexport { MetricsAggregator };\n//# sourceMappingURL=aggregator.js.map\n"],"names":["DEFAULT_FLUSH_INTERVAL","timestampInSeconds","sanitizeMetricKey","sanitizeTags","sanitizeUnit","getBucketKey","SET_METRIC_TYPE","METRIC_MAP","updateMetricSummaryOnActiveSpan","MAX_WEIGHT"],"mappings":";;;;;;;AASA,MAAM,kBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBtB,YAAc,SAAS;AAAC,SAAK,UAAU;AACtC,SAAK,WAAW,oBAAI,IAAG;AACvB,SAAK,sBAAsB;AAE3B,SAAK,YAAY,YAAY,MAAM,KAAK,OAAM,GAAIA,gCAAsB;AAExE,QAAI,KAAK,UAAU,OAAO;AAExB,WAAK,UAAU,MAAK;AAAA,IACtB;AAEA,SAAK,cAAc,KAAK,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SAAS;AAC5B,SAAK,OAAM;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUC,SAAS;AAOR,QAAI,KAAK,aAAa;AACpB,WAAK,cAAc;AACnB,WAAK,sBAAsB;AAC3B,WAAK,gBAAgB,KAAK,QAAQ;AAClC,WAAK,SAAS,MAAK;AACnB;AAAA,IACF;AACA,UAAM,gBAAgB,KAAK,MAAMR,KAAAA,mBAAkB,CAAE,IAAID,UAAAA,yBAAyB,MAAO,KAAK;AAG9F,UAAM,iBAAiB,oBAAI,IAAG;AAC9B,eAAW,CAAC,KAAK,MAAM,KAAK,KAAK,UAAU;AACzC,UAAI,OAAO,aAAa,eAAe;AACrC,uBAAe,IAAI,KAAK,MAAM;AAC9B,aAAK,uBAAuB,OAAO,OAAO;AAAA,MAC5C;AAAA,IACF;AAEA,eAAW,CAAC,GAAG,KAAK,gBAAgB;AAClC,WAAK,SAAS,OAAO,GAAG;AAAA,IAC1B;AAEA,SAAK,gBAAgB,cAAc;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMC,gBAAgB,gBAAgB;AAC/B,QAAI,eAAe,OAAO,KAAK,KAAK,QAAQ,yBAAyB;AAGnE,YAAM,UAAU,MAAM,KAAK,cAAc,EAAE,IAAI,CAAC,CAAA,EAAG,UAAU,MAAM,UAAU;AAC7E,WAAK,QAAQ,wBAAwB,OAAO;AAAA,IAC9C;AAAA,EACF;AACF;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"aggregator.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/aggregator.js"],"sourcesContent":["import { timestampInSeconds } from '@sentry/utils';\nimport { DEFAULT_FLUSH_INTERVAL, SET_METRIC_TYPE, MAX_WEIGHT } from './constants.js';\nimport { METRIC_MAP } from './instance.js';\nimport { updateMetricSummaryOnActiveSpan } from './metric-summary.js';\nimport { sanitizeMetricKey, sanitizeTags, sanitizeUnit, getBucketKey } from './utils.js';\n\n/**\n * A metrics aggregator that aggregates metrics in memory and flushes them periodically.\n */\nclass MetricsAggregator {\n // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets\n // when the aggregator is garbage collected.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n\n // Different metrics have different weights. We use this to limit the number of metrics\n // that we store in memory.\n\n // Cast to any so that it can use Node.js timeout\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n // SDKs are required to shift the flush interval by random() * rollup_in_seconds.\n // That shift is determined once per startup to create jittering.\n\n // An SDK is required to perform force flushing ahead of scheduled time if the memory\n // pressure is too high. There is no rule for this other than that SDKs should be tracking\n // abstract aggregation complexity (eg: a counter only carries a single float, whereas a\n // distribution is a float per emission).\n //\n // Force flush is used on either shutdown, flush() or when we exceed the max weight.\n\n constructor( _client) {this._client = _client;\n this._buckets = new Map();\n this._bucketsTotalWeight = 0;\n\n this._interval = setInterval(() => this._flush(), DEFAULT_FLUSH_INTERVAL) ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (this._interval.unref) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._interval.unref();\n }\n\n this._flushShift = Math.floor((Math.random() * DEFAULT_FLUSH_INTERVAL) / 1000);\n this._forceFlush = false;\n }\n\n /**\n * @inheritDoc\n */\n add(\n metricType,\n unsanitizedName,\n value,\n unsanitizedUnit = 'none',\n unsanitizedTags = {},\n maybeFloatTimestamp = timestampInSeconds(),\n ) {\n const timestamp = Math.floor(maybeFloatTimestamp);\n const name = sanitizeMetricKey(unsanitizedName);\n const tags = sanitizeTags(unsanitizedTags);\n const unit = sanitizeUnit(unsanitizedUnit );\n\n const bucketKey = getBucketKey(metricType, name, unit, tags);\n\n let bucketItem = this._buckets.get(bucketKey);\n // If this is a set metric, we need to calculate the delta from the previous weight.\n const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0;\n\n if (bucketItem) {\n bucketItem.metric.add(value);\n // TODO(abhi): Do we need this check?\n if (bucketItem.timestamp < timestamp) {\n bucketItem.timestamp = timestamp;\n }\n } else {\n bucketItem = {\n // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size.\n metric: new METRIC_MAP[metricType](value),\n timestamp,\n metricType,\n name,\n unit,\n tags,\n };\n this._buckets.set(bucketKey, bucketItem);\n }\n\n // If value is a string, it's a set metric so calculate the delta from the previous weight.\n const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value;\n updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey);\n\n // We need to keep track of the total weight of the buckets so that we can\n // flush them when we exceed the max weight.\n this._bucketsTotalWeight += bucketItem.metric.weight;\n\n if (this._bucketsTotalWeight >= MAX_WEIGHT) {\n this.flush();\n }\n }\n\n /**\n * Flushes the current metrics to the transport via the transport.\n */\n flush() {\n this._forceFlush = true;\n this._flush();\n }\n\n /**\n * Shuts down metrics aggregator and clears all metrics.\n */\n close() {\n this._forceFlush = true;\n clearInterval(this._interval);\n this._flush();\n }\n\n /**\n * Flushes the buckets according to the internal state of the aggregator.\n * If it is a force flush, which happens on shutdown, it will flush all buckets.\n * Otherwise, it will only flush buckets that are older than the flush interval,\n * and according to the flush shift.\n *\n * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties.\n */\n _flush() {\n // TODO(@anonrig): Add Atomics for locking to avoid having force flush and regular flush\n // running at the same time.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics\n\n // This path eliminates the need for checking for timestamps since we're forcing a flush.\n // Remember to reset the flag, or it will always flush all metrics.\n if (this._forceFlush) {\n this._forceFlush = false;\n this._bucketsTotalWeight = 0;\n this._captureMetrics(this._buckets);\n this._buckets.clear();\n return;\n }\n const cutoffSeconds = Math.floor(timestampInSeconds()) - DEFAULT_FLUSH_INTERVAL / 1000 - this._flushShift;\n // TODO(@anonrig): Optimization opportunity.\n // Convert this map to an array and store key in the bucketItem.\n const flushedBuckets = new Map();\n for (const [key, bucket] of this._buckets) {\n if (bucket.timestamp <= cutoffSeconds) {\n flushedBuckets.set(key, bucket);\n this._bucketsTotalWeight -= bucket.metric.weight;\n }\n }\n\n for (const [key] of flushedBuckets) {\n this._buckets.delete(key);\n }\n\n this._captureMetrics(flushedBuckets);\n }\n\n /**\n * Only captures a subset of the buckets passed to this function.\n * @param flushedBuckets\n */\n _captureMetrics(flushedBuckets) {\n if (flushedBuckets.size > 0 && this._client.captureAggregateMetrics) {\n // TODO(@anonrig): Optimization opportunity.\n // This copy operation can be avoided if we store the key in the bucketItem.\n const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem);\n this._client.captureAggregateMetrics(buckets);\n }\n }\n}\n\nexport { MetricsAggregator };\n//# sourceMappingURL=aggregator.js.map\n"],"names":[],"mappings":";;;;;AASA,MAAM,kBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBtB,YAAc,SAAS;AAAC,SAAK,UAAU;AACtC,SAAK,WAAW,oBAAI;AACpB,SAAK,sBAAsB;AAE3B,SAAK,YAAY,YAAY,MAAM,KAAK,OAAM,GAAI,sBAAsB;AAExE,QAAI,KAAK,UAAU,OAAO;AAExB,WAAK,UAAU;IAChB;AAED,SAAK,cAAc,KAAK,MAAO,KAAK,OAAQ,IAAG,yBAA0B,GAAI;AAC7E,SAAK,cAAc;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IACC,YACA,iBACA,OACA,kBAAkB,QAClB,kBAAkB,CAAE,GACpB,sBAAsB,mBAAoB,GAC1C;AACA,UAAM,YAAY,KAAK,MAAM,mBAAmB;AAChD,UAAM,OAAO,kBAAkB,eAAe;AAC9C,UAAM,OAAO,aAAa,eAAe;AACzC,UAAM,OAAO,aAAa;AAE1B,UAAM,YAAY,aAAa,YAAY,M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uBAAe,IAAI,KAAK,MAAM;AAC9B,aAAK,uBAAuB,OAAO,OAAO;AAAA,MAC3C;AAAA,IACF;AAED,eAAW,CAAC,GAAG,KAAK,gBAAgB;AAClC,WAAK,SAAS,OAAO,GAAG;AAAA,IACzB;AAED,SAAK,gBAAgB,cAAc;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAgB,gBAAgB;AAC/B,QAAI,eAAe,OAAO,KAAK,KAAK,QAAQ,yBAAyB;AAGnE,YAAM,UAAU,MAAM,KAAK,cAAc,EAAE,IAAI,CAAC,CAAG,EAAA,UAAU,MAAM,UAAU;AAC7E,WAAK,QAAQ,wBAAwB,OAAO;AAAA,IAC7C;AAAA,EACF;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"aggregator.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/aggregator.js"],"sourcesContent":["import { timestampInSeconds } from '@sentry/utils';\nimport { DEFAULT_FLUSH_INTERVAL, SET_METRIC_TYPE, MAX_WEIGHT } from './constants.js';\nimport { METRIC_MAP } from './instance.js';\nimport { updateMetricSummaryOnActiveSpan } from './metric-summary.js';\nimport { sanitizeMetricKey, sanitizeTags, sanitizeUnit, getBucketKey } from './utils.js';\n\n/**\n * A metrics aggregator that aggregates metrics in memory and flushes them periodically.\n */\nclass MetricsAggregator {\n // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets\n // when the aggregator is garbage collected.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n\n // Different metrics have different weights. We use this to limit the number of metrics\n // that we store in memory.\n\n // Cast to any so that it can use Node.js timeout\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n // SDKs are required to shift the flush interval by random() * rollup_in_seconds.\n // That shift is determined once per startup to create jittering.\n\n // An SDK is required to perform force flushing ahead of scheduled time if the memory\n // pressure is too high. There is no rule for this other than that SDKs should be tracking\n // abstract aggregation complexity (eg: a counter only carries a single float, whereas a\n // distribution is a float per emission).\n //\n // Force flush is used on either shutdown, flush() or when we exceed the max weight.\n\n constructor( _client) {this._client = _client;\n this._buckets = new Map();\n this._bucketsTotalWeight = 0;\n\n this._interval = setInterval(() => this._flush(), DEFAULT_FLUSH_INTERVAL) ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (this._interval.unref) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._interval.unref();\n }\n\n this._flushShift = Math.floor((Math.random() * DEFAULT_FLUSH_INTERVAL) / 1000);\n this._forceFlush = false;\n }\n\n /**\n * @inheritDoc\n */\n add(\n metricType,\n unsanitizedName,\n value,\n unsanitizedUnit = 'none',\n unsanitizedTags = {},\n maybeFloatTimestamp = timestampInSeconds(),\n ) {\n const timestamp = Math.floor(maybeFloatTimestamp);\n const name = sanitizeMetricKey(unsanitizedName);\n const tags = sanitizeTags(unsanitizedTags);\n const unit = sanitizeUnit(unsanitizedUnit );\n\n const bucketKey = getBucketKey(metricType, name, unit, tags);\n\n let bucketItem = this._buckets.get(bucketKey);\n // If this is a set metric, we need to calculate the delta from the previous weight.\n const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0;\n\n if (bucketItem) {\n bucketItem.metric.add(value);\n // TODO(abhi): Do we need this check?\n if (bucketItem.timestamp < timestamp) {\n bucketItem.timestamp = timestamp;\n }\n } else {\n bucketItem = {\n // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size.\n metric: new METRIC_MAP[metricType](value),\n timestamp,\n metricType,\n name,\n unit,\n tags,\n };\n this._buckets.set(bucketKey, bucketItem);\n }\n\n // If value is a string, it's a set metric so calculate the delta from the previous weight.\n const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value;\n updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey);\n\n // We need to keep track of the total weight of the buckets so that we can\n // flush them when we exceed the max weight.\n this._bucketsTotalWeight += bucketItem.metric.weight;\n\n if (this._bucketsTotalWeight >= MAX_WEIGHT) {\n this.flush();\n }\n }\n\n /**\n * Flushes the current metrics to the transport via the transport.\n */\n flush() {\n this._forceFlush = true;\n this._flush();\n }\n\n /**\n * Shuts down metrics aggregator and clears all metrics.\n */\n close() {\n this._forceFlush = true;\n clearInterval(this._interval);\n this._flush();\n }\n\n /**\n * Flushes the buckets according to the internal state of the aggregator.\n * If it is a force flush, which happens on shutdown, it will flush all buckets.\n * Otherwise, it will only flush buckets that are older than the flush interval,\n * and according to the flush shift.\n *\n * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties.\n */\n _flush() {\n // TODO(@anonrig): Add Atomics for locking to avoid having force flush and regular flush\n // running at the same time.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics\n\n // This path eliminates the need for checking for timestamps since we're forcing a flush.\n // Remember to reset the flag, or it will always flush all metrics.\n if (this._forceFlush) {\n this._forceFlush = false;\n this._bucketsTotalWeight = 0;\n this._captureMetrics(this._buckets);\n this._buckets.clear();\n return;\n }\n const cutoffSeconds = Math.floor(timestampInSeconds()) - DEFAULT_FLUSH_INTERVAL / 1000 - this._flushShift;\n // TODO(@anonrig): Optimization opportunity.\n // Convert this map to an array and store key in the bucketItem.\n const flushedBuckets = new Map();\n for (const [key, bucket] of this._buckets) {\n if (bucket.timestamp <= cutoffSeconds) {\n flushedBuckets.set(key, bucket);\n this._bucketsTotalWeight -= bucket.metric.weight;\n }\n }\n\n for (const [key] of flushedBuckets) {\n this._buckets.delete(key);\n }\n\n this._captureMetrics(flushedBuckets);\n }\n\n /**\n * Only captures a subset of the buckets passed to this function.\n * @param flushedBuckets\n */\n _captureMetrics(flushedBuckets) {\n if (flushedBuckets.size > 0 && this._client.captureAggregateMetrics) {\n // TODO(@anonrig): Optimization opportunity.\n // This copy operation can be avoided if we store the key in the bucketItem.\n const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem);\n this._client.captureA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AA,IAC9C;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const utils = require("./utils.cjs");
4
- const envelope = require("../../../utils/esm/envelope.cjs");
5
4
  const dsn = require("../../../utils/esm/dsn.cjs");
5
+ const envelope = require("../../../utils/esm/envelope.cjs");
6
6
  function createMetricEnvelope(metricBucketItems, dsn$1, metadata, tunnel) {
7
7
  const headers = {
8
8
  sent_at: (/* @__PURE__ */ new Date()).toISOString()
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/envelope.js"],"sourcesContent":["import { dsnToString, createEnvelope } from '@sentry/utils';\nimport { serializeMetricBuckets } from './utils.js';\n\n/**\n * Create envelope from a metric aggregate.\n */\nfunction createMetricEnvelope(\n metricBucketItems,\n dsn,\n metadata,\n tunnel,\n) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n };\n }\n\n if (!!tunnel && dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n const item = createMetricEnvelopeItem(metricBucketItems);\n return createEnvelope(headers, [item]);\n}\n\nfunction createMetricEnvelopeItem(metricBucketItems) {\n const payload = serializeMetricBuckets(metricBucketItems);\n const metricHeaders = {\n type: 'statsd',\n length: payload.length,\n };\n return [metricHeaders, payload];\n}\n\nexport { createMetricEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":["dsn","dsnToString","createEnvelope","serializeMetricBuckets"],"mappings":";;;;;AAMA,SAAS,qBACP,mBACAA,OACA,UACA,QACA;AACA,QAAM,UAAU;AAAA,IACd,UAAS,oBAAI,KAAM,GAAC,YAAa;AAAA,EACrC;AAEE,MAAI,YAAY,SAAS,KAAK;AAC5B,YAAQ,MAAM;AAAA,MACZ,MAAM,SAAS,IAAI;AAAA,MACnB,SAAS,SAAS,IAAI;AAAA,IAC5B;AAAA,EACG;AAED,MAAI,CAAC,CAAC,UAAUA,OAAK;AACnB,YAAQ,MAAMC,gBAAYD,KAAG;AAAA,EAC9B;AAED,QAAM,OAAO,yBAAyB,iBAAiB;AACvD,SAAOE,wBAAe,SAAS,CAAC,IAAI,CAAC;AACvC;AAEA,SAAS,yBAAyB,mBAAmB;AACnD,QAAM,UAAUC,6BAAuB,iBAAiB;AACxD,QAAM,gBAAgB;AAAA,IACpB,MAAM;AAAA,IACN,QAAQ,QAAQ;AAAA,EACpB;AACE,SAAO,CAAC,eAAe,OAAO;AAChC;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"envelope.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/envelope.js"],"sourcesContent":["import { dsnToString, createEnvelope } from '@sentry/utils';\nimport { serializeMetricBuckets } from './utils.js';\n\n/**\n * Create envelope from a metric aggregate.\n */\nfunction createMetricEnvelope(\n metricBucketItems,\n dsn,\n metadata,\n tunnel,\n) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n };\n }\n\n if (!!tunnel && dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n const item = createMetricEnvelopeItem(metricBucketItems);\n return createEnvelope(headers, [item]);\n}\n\nfunction createMetricEnvelopeItem(metricBucketItems) {\n const payload = serializeMetricBuckets(metricBucketItems);\n const metricHeaders = {\n type: 'statsd',\n length: payload.length,\n };\n return [metricHeaders, payload];\n}\n\nexport { createMetricEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":["dsn","dsnToString","createEnvelope","serializeMetricBuckets"],"mappings":";;;;;AAMA,SAAS,qBACP,mBACAA,OACA,UACA,QACA;AACA,QAAM,UAAU;AAAA,IACd,UAAS,oBAAI,KAAI,GAAG,YAAW;AAAA,EACnC;AAEE,MAAI,YAAY,SAAS,KAAK;AAC5B,YAAQ,MAAM;AAAA,MACZ,MAAM,SAAS,IAAI;AAAA,MACnB,SAAS,SAAS,IAAI;AAAA,IAC5B;AAAA,EACE;AAEA,MAAI,CAAC,CAAC,UAAUA,OAAK;AACnB,YAAQ,MAAMC,IAAAA,YAAYD,KAAG;AAAA,EAC/B;AAEA,QAAM,OAAO,yBAAyB,iBAAiB;AACvD,SAAOE,wBAAe,SAAS,CAAC,IAAI,CAAC;AACvC;AAEA,SAAS,yBAAyB,mBAAmB;AACnD,QAAM,UAAUC,MAAAA,uBAAuB,iBAAiB;AACxD,QAAM,gBAAgB;AAAA,IACpB,MAAM;AAAA,IACN,QAAQ,QAAQ;AAAA,EACpB;AACE,SAAO,CAAC,eAAe,OAAO;AAChC;;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
1
  import { serializeMetricBuckets } from "./utils.js";
2
- import { createEnvelope } from "../../../utils/esm/envelope.js";
3
2
  import { dsnToString } from "../../../utils/esm/dsn.js";
3
+ import { createEnvelope } from "../../../utils/esm/envelope.js";
4
4
  function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) {
5
5
  const headers = {
6
6
  sent_at: (/* @__PURE__ */ new Date()).toISOString()
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/envelope.js"],"sourcesContent":["import { dsnToString, createEnvelope } from '@sentry/utils';\nimport { serializeMetricBuckets } from './utils.js';\n\n/**\n * Create envelope from a metric aggregate.\n */\nfunction createMetricEnvelope(\n metricBucketItems,\n dsn,\n metadata,\n tunnel,\n) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n };\n }\n\n if (!!tunnel && dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n const item = createMetricEnvelopeItem(metricBucketItems);\n return createEnvelope(headers, [item]);\n}\n\nfunction createMetricEnvelopeItem(metricBucketItems) {\n const payload = serializeMetricBuckets(metricBucketItems);\n const metricHeaders = {\n type: 'statsd',\n length: payload.length,\n };\n return [metricHeaders, payload];\n}\n\nexport { createMetricEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":[],"mappings":";;;AAMA,SAAS,qBACP,mBACA,KACA,UACA,QACA;AACA,QAAM,UAAU;AAAA,IACd,UAAS,oBAAI,KAAM,GAAC,YAAa;AAAA,EACrC;AAEE,MAAI,YAAY,SAAS,KAAK;AAC5B,YAAQ,MAAM;AAAA,MACZ,MAAM,SAAS,IAAI;AAAA,MACnB,SAAS,SAAS,IAAI;AAAA,IAC5B;AAAA,EACG;AAED,MAAI,CAAC,CAAC,UAAU,KAAK;AACnB,YAAQ,MAAM,YAAY,GAAG;AAAA,EAC9B;AAED,QAAM,OAAO,yBAAyB,iBAAiB;AACvD,SAAO,eAAe,SAAS,CAAC,IAAI,CAAC;AACvC;AAEA,SAAS,yBAAyB,mBAAmB;AACnD,QAAM,UAAU,uBAAuB,iBAAiB;AACxD,QAAM,gBAAgB;AAAA,IACpB,MAAM;AAAA,IACN,QAAQ,QAAQ;AAAA,EACpB;AACE,SAAO,CAAC,eAAe,OAAO;AAChC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"envelope.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/envelope.js"],"sourcesContent":["import { dsnToString, createEnvelope } from '@sentry/utils';\nimport { serializeMetricBuckets } from './utils.js';\n\n/**\n * Create envelope from a metric aggregate.\n */\nfunction createMetricEnvelope(\n metricBucketItems,\n dsn,\n metadata,\n tunnel,\n) {\n const headers = {\n sent_at: new Date().toISOString(),\n };\n\n if (metadata && metadata.sdk) {\n headers.sdk = {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n };\n }\n\n if (!!tunnel && dsn) {\n headers.dsn = dsnToString(dsn);\n }\n\n const item = createMetricEnvelopeItem(metricBucketItems);\n return createEnvelope(headers, [item]);\n}\n\nfunction createMetricEnvelopeItem(metricBucketItems) {\n const payload = serializeMetricBuckets(metricBucketItems);\n const metricHeaders = {\n type: 'statsd',\n length: payload.length,\n };\n return [metricHeaders, payload];\n}\n\nexport { createMetricEnvelope };\n//# sourceMappingURL=envelope.js.map\n"],"names":[],"mappings":";;;AAMA,SAAS,qBACP,mBACA,KACA,UACA,QACA;AACA,QAAM,UAAU;AAAA,IACd,UAAS,oBAAI,KAAI,GAAG,YAAW;AAAA,EACnC;AAEE,MAAI,YAAY,SAAS,KAAK;AAC5B,YAAQ,MAAM;AAAA,MACZ,MAAM,SAAS,IAAI;AAAA,MACnB,SAAS,SAAS,IAAI;AAAA,IAC5B;AAAA,EACE;AAEA,MAAI,CAAC,CAAC,UAAU,KAAK;AACnB,YAAQ,MAAM,YAAY,GAAG;AAAA,EAC/B;AAEA,QAAM,OAAO,yBAAyB,iBAAiB;AACvD,SAAO,eAAe,SAAS,CAAC,IAAI,CAAC;AACvC;AAEA,SAAS,yBAAyB,mBAAmB;AACnD,QAAM,UAAU,uBAAuB,iBAAiB;AACxD,QAAM,gBAAgB;AAAA,IACpB,MAAM;AAAA,IACN,QAAQ,QAAQ;AAAA,EACpB;AACE,SAAO,CAAC,eAAe,OAAO;AAChC;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"instance.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/instance.js"],"sourcesContent":["import { COUNTER_METRIC_TYPE, GAUGE_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, SET_METRIC_TYPE } from './constants.js';\nimport { simpleHash } from './utils.js';\n\n/**\n * A metric instance representing a counter.\n */\nclass CounterMetric {\n constructor( _value) {this._value = _value;}\n\n /** @inheritDoc */\n get weight() {\n return 1;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value += value;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._value}`;\n }\n}\n\n/**\n * A metric instance representing a gauge.\n */\nclass GaugeMetric {\n\n constructor(value) {\n this._last = value;\n this._min = value;\n this._max = value;\n this._sum = value;\n this._count = 1;\n }\n\n /** @inheritDoc */\n get weight() {\n return 5;\n }\n\n /** @inheritdoc */\n add(value) {\n this._last = value;\n if (value < this._min) {\n this._min = value;\n }\n if (value > this._max) {\n this._max = value;\n }\n this._sum += value;\n this._count++;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`;\n }\n}\n\n/**\n * A metric instance representing a distribution.\n */\nclass DistributionMetric {\n\n constructor(first) {\n this._value = [first];\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.length;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.push(value);\n }\n\n /** @inheritdoc */\n toString() {\n return this._value.join(':');\n }\n}\n\n/**\n * A metric instance representing a set.\n */\nclass SetMetric {\n\n constructor( first) {this.first = first;\n this._value = new Set([first]);\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.size;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.add(value);\n }\n\n /** @inheritdoc */\n toString() {\n return Array.from(this._value)\n .map(val => (typeof val === 'string' ? simpleHash(val) : val))\n .join(':');\n }\n}\n\nconst METRIC_MAP = {\n [COUNTER_METRIC_TYPE]: CounterMetric,\n [GAUGE_METRIC_TYPE]: GaugeMetric,\n [DISTRIBUTION_METRIC_TYPE]: DistributionMetric,\n [SET_METRIC_TYPE]: SetMetric,\n};\n\nexport { CounterMetric, DistributionMetric, GaugeMetric, METRIC_MAP, SetMetric };\n//# sourceMappingURL=instance.js.map\n"],"names":["simpleHash","COUNTER_METRIC_TYPE","GAUGE_METRIC_TYPE","DISTRIBUTION_METRIC_TYPE","SET_METRIC_TYPE"],"mappings":";;;;AAMA,MAAM,cAAe;AAAA,EAClB,YAAa,QAAQ;AAAC,SAAK,SAAS;AAAA,EAAO;AAAA;AAAA,EAG3C,IAAI,SAAS;AACZ,WAAO;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AAK;AAAA,EACtB;AAAA;AAAA,EAGA,WAAW;AACV,WAAO,MAAM,KAAK,KAAK,MAAM,EAC1B,IAAI,SAAQ,OAAO,QAAQ,WAAWA,MAAAA,WAAW,GAAG,IAAI,GAAI,EAC5D,KAAK,GAAG;AAAA,EACZ;AACH;AAEK,MAAC,aAAa;AAAA,EACjB,CAACC,UAAmB,mBAAA,GAAG;AAAA,EACvB,CAACC,UAAiB,iBAAA,GAAG;AAAA,EACrB,CAACC,UAAwB,wBAAA,GAAG;AAAA,EAC5B,CAACC,UAAe,eAAA,GAAG;AACrB;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"instance.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/instance.js"],"sourcesContent":["import { COUNTER_METRIC_TYPE, GAUGE_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, SET_METRIC_TYPE } from './constants.js';\nimport { simpleHash } from './utils.js';\n\n/**\n * A metric instance representing a counter.\n */\nclass CounterMetric {\n constructor( _value) {this._value = _value;}\n\n /** @inheritDoc */\n get weight() {\n return 1;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value += value;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._value}`;\n }\n}\n\n/**\n * A metric instance representing a gauge.\n */\nclass GaugeMetric {\n\n constructor(value) {\n this._last = value;\n this._min = value;\n this._max = value;\n this._sum = value;\n this._count = 1;\n }\n\n /** @inheritDoc */\n get weight() {\n return 5;\n }\n\n /** @inheritdoc */\n add(value) {\n this._last = value;\n if (value < this._min) {\n this._min = value;\n }\n if (value > this._max) {\n this._max = value;\n }\n this._sum += value;\n this._count++;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`;\n }\n}\n\n/**\n * A metric instance representing a distribution.\n */\nclass DistributionMetric {\n\n constructor(first) {\n this._value = [first];\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.length;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.push(value);\n }\n\n /** @inheritdoc */\n toString() {\n return this._value.join(':');\n }\n}\n\n/**\n * A metric instance representing a set.\n */\nclass SetMetric {\n\n constructor( first) {this.first = first;\n this._value = new Set([first]);\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.size;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.add(value);\n }\n\n /** @inheritdoc */\n toString() {\n return Array.from(this._value)\n .map(val => (typeof val === 'string' ? simpleHash(val) : val))\n .join(':');\n }\n}\n\nconst METRIC_MAP = {\n [COUNTER_METRIC_TYPE]: CounterMetric,\n [GAUGE_METRIC_TYPE]: GaugeMetric,\n [DISTRIBUTION_METRIC_TYPE]: DistributionMetric,\n [SET_METRIC_TYPE]: SetMetric,\n};\n\nexport { CounterMetric, DistributionMetric, GaugeMetric, METRIC_MAP, SetMetric };\n//# sourceMappingURL=instance.js.map\n"],"names":["simpleHash","COUNTER_METRIC_TYPE","GAUGE_METRIC_TYPE","DISTRIBUTION_METRIC_TYPE","SET_METRIC_TYPE"],"mappings":";;;;AAMA,MAAM,cAAe;AAAA,EAClB,YAAa,QAAQ;AAAC,SAAK,SAAS;AAAA,EAAO;AAAA;AAAA,EAG3C,IAAI,SAAS;AACZ,WAAO;AAAA,EACT;AAAA;AAAA,EAGC,IAAI,OAAO;AACV,SAAK,UAAU;AAAA,EACjB;AAAA;AAAA,EAGC,WAAW;AACV,WAAO,GAAG,KAAK,MAAM;AAAA,EACvB;AACF;AAKA,MAAM,YAAa;AAAA,EAEhB,YAAY,OAAO;AAClB,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA,EAGC,IAAI,SAAS;AACZ,WAAO;AAAA,EACT;AAAA;AAAA,EAGC,IAAI,OAAO;AACV,SAAK,QAAQ;AACb,QAAI,QAAQ,KAAK,MAAM;AACrB,WAAK,OAAO;AAAA,IACd;AACA,QAA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IBUTION_METRIC_TYPE, SET_METRIC_TYPE } from "./constants.js";
1
+ import { SET_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, GAUGE_METRIC_TYPE, COUNTER_METRIC_TYPE } from "./constants.js";
2
2
  import { simpleHash } from "./utils.js";
3
3
  class CounterMetric {
4
4
  constructor(_value) {
@@ -1 +1 @@
1
- {"version":3,"file":"instance.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/instance.js"],"sourcesContent":["import { COUNTER_METRIC_TYPE, GAUGE_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, SET_METRIC_TYPE } from './constants.js';\nimport { simpleHash } from './utils.js';\n\n/**\n * A metric instance representing a counter.\n */\nclass CounterMetric {\n constructor( _value) {this._value = _value;}\n\n /** @inheritDoc */\n get weight() {\n return 1;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value += value;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._value}`;\n }\n}\n\n/**\n * A metric instance representing a gauge.\n */\nclass GaugeMetric {\n\n constructor(value) {\n this._last = value;\n this._min = value;\n this._max = value;\n this._sum = value;\n this._count = 1;\n }\n\n /** @inheritDoc */\n get weight() {\n return 5;\n }\n\n /** @inheritdoc */\n add(value) {\n this._last = value;\n if (value < this._min) {\n this._min = value;\n }\n if (value > this._max) {\n this._max = value;\n }\n this._sum += value;\n this._count++;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`;\n }\n}\n\n/**\n * A metric instance representing a distribution.\n */\nclass DistributionMetric {\n\n constructor(first) {\n this._value = [first];\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.length;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.push(value);\n }\n\n /** @inheritdoc */\n toString() {\n return this._value.join(':');\n }\n}\n\n/**\n * A metric instance representing a set.\n */\nclass SetMetric {\n\n constructor( first) {this.first = first;\n this._value = new Set([first]);\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.size;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.add(value);\n }\n\n /** @inheritdoc */\n toString() {\n return Array.from(this._value)\n .map(val => (typeof val === 'string' ? simpleHash(val) : val))\n .join(':');\n }\n}\n\nconst METRIC_MAP = {\n [COUNTER_METRIC_TYPE]: CounterMetric,\n [GAUGE_METRIC_TYPE]: GaugeMetric,\n [DISTRIBUTION_METRIC_TYPE]: DistributionMetric,\n [SET_METRIC_TYPE]: SetMetric,\n};\n\nexport { CounterMetric, DistributionMetric, GaugeMetric, METRIC_MAP, SetMetric };\n//# sourceMappingURL=instance.js.map\n"],"names":[],"mappings":";;AAMA,MAAM,cAAe;AAAA,EAClB,YAAa,QAAQ;AAAC,SAAK,SAAS;AAAA,EAAO;AAAA;AAAA,EAG3C,IAAI,SAAS;AACZ,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,IAAI,OAAO;AACV,SAAK,UAAU;AAAA,EAChB;AAAA;AAAA,EAGA,WAAW;AACV,WAAO,GAAG,KAAK,MAAM;AAAA,EACtB;AACH;AAKA,MAAM,YAAa;AAAA,EAEhB,YAAY,OAAO;AAClB,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EACf;AAAA;AAAA,EAGA,IAAI,SAAS;AACZ,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,IAAI,OAAO;AACV,SAAK,QAAQ;AACb,QAAI,QAAQ,KAAK,MAAM;AACrB,WAAK,OAAO;AAAA,IACb;AACD,QAAI,QAAQ,KAAK,MAAM;AACrB,WAAK,OAAO;AAAA,IACb;AACD,SAAK,QAAQ;AACb,SAAK;AAAA,EACN;AAAA;AAAA,EAGA,WAAW;AACV,WAAO,GAAG,KAAK,KAAK,IAAI,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,MAAM;AAAA,EAC3E;AACH;AAKA,MAAM,mBAAoB;AAAA,EAEvB,YAAY,OAAO;AAClB,SAAK,SAAS,CAAC,KAAK;AAAA,EACrB;AAAA;AAAA,EAGA,IAAI,SAAS;AACZ,WAAO,KAAK,OAAO;AAAA,EACpB;AAAA;AAAA,EAGA,IAAI,OAAO;AACV,SAAK,OAAO,KAAK,KAAK;AAAA,EACvB;AAAA;AAAA,EAGA,WAAW;AACV,WAAO,KAAK,OAAO,KAAK,GAAG;AAAA,EAC5B;AACH;AAKA,MAAM,UAAW;AAAA,EAEd,YAAa,OAAO;AAAC,SAAK,QAAQ;AACjC,SAAK,SAAS,oBAAI,IAAI,CAAC,KAAK,CAAC;AAAA,EAC9B;AAAA;AAAA,EAGA,IAAI,SAAS;AACZ,WAAO,KAAK,OAAO;AAAA,EACpB;AAAA;AAAA,EAGA,IAAI,OAAO;AACV,SAAK,OAAO,IAAI,KAAK;AAAA,EACtB;AAAA;AAAA,EAGA,WAAW;AACV,WAAO,MAAM,KAAK,KAAK,MAAM,EAC1B,IAAI,SAAQ,OAAO,QAAQ,WAAW,WAAW,GAAG,IAAI,GAAI,EAC5D,KAAK,GAAG;AAAA,EACZ;AACH;AAEK,MAAC,aAAa;AAAA,EACjB,CAAC,mBAAmB,GAAG;AAAA,EACvB,CAAC,iBAAiB,GAAG;AAAA,EACrB,CAAC,wBAAwB,GAAG;AAAA,EAC5B,CAAC,eAAe,GAAG;AACrB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"instance.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/instance.js"],"sourcesContent":["import { COUNTER_METRIC_TYPE, GAUGE_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, SET_METRIC_TYPE } from './constants.js';\nimport { simpleHash } from './utils.js';\n\n/**\n * A metric instance representing a counter.\n */\nclass CounterMetric {\n constructor( _value) {this._value = _value;}\n\n /** @inheritDoc */\n get weight() {\n return 1;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value += value;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._value}`;\n }\n}\n\n/**\n * A metric instance representing a gauge.\n */\nclass GaugeMetric {\n\n constructor(value) {\n this._last = value;\n this._min = value;\n this._max = value;\n this._sum = value;\n this._count = 1;\n }\n\n /** @inheritDoc */\n get weight() {\n return 5;\n }\n\n /** @inheritdoc */\n add(value) {\n this._last = value;\n if (value < this._min) {\n this._min = value;\n }\n if (value > this._max) {\n this._max = value;\n }\n this._sum += value;\n this._count++;\n }\n\n /** @inheritdoc */\n toString() {\n return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`;\n }\n}\n\n/**\n * A metric instance representing a distribution.\n */\nclass DistributionMetric {\n\n constructor(first) {\n this._value = [first];\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.length;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.push(value);\n }\n\n /** @inheritdoc */\n toString() {\n return this._value.join(':');\n }\n}\n\n/**\n * A metric instance representing a set.\n */\nclass SetMetric {\n\n constructor( first) {this.first = first;\n this._value = new Set([first]);\n }\n\n /** @inheritDoc */\n get weight() {\n return this._value.size;\n }\n\n /** @inheritdoc */\n add(value) {\n this._value.add(value);\n }\n\n /** @inheritdoc */\n toString() {\n return Array.from(this._value)\n .map(val => (typeof val === 'string' ? simpleHash(val) : val))\n .join(':');\n }\n}\n\nconst METRIC_MAP = {\n [COUNTER_METRIC_TYPE]: CounterMetric,\n [GAUGE_METRIC_TYPE]: GaugeMetric,\n [DISTRIBUTION_METRIC_TYPE]: DistributionMetric,\n [SET_METRIC_TYPE]: SetMetric,\n};\n\nexport { CounterMetric, DistributionMetric, GaugeMetric, METRIC_MAP, SetMetric };\n//# sourceMappingURL=instance.js.map\n"],"names":[],"mappings":";;AAMA,MAAM,cAAe;AAAA,EAClB,YAAa,QAAQ;AAAC,SAAK,SAAS;AAAA,EAAO;AAAA;AAAA,EAG3C,IAAI,SAAS;AACZ,WAAO;AAAA,EACT;AAAA;AAAA,EAGC,IAAI,OAAO;AACV,SAAK,UAAU;AAAA,E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KAAK,MAAM,EAC1B,IAAI,SAAQ,OAAO,QAAQ,WAAW,WAAW,GAAG,IAAI,GAAI,EAC5D,KAAK,GAAG;AAAA,EACb;AACF;AAEK,MAAC,aAAa;AAAA,EACjB,CAAC,mBAAmB,GAAG;AAAA,EACvB,CAAC,iBAAiB,GAAG;AAAA,EACrB,CAAC,wBAAwB,GAAG;AAAA,EAC5B,CAAC,eAAe,GAAG;AACrB;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"metric-summary.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/metric-summary.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\nimport '../debug-build.js';\nimport '../tracing/errors.js';\nimport '../tracing/spanstatus.js';\nimport { getActiveSpan } from '../tracing/trace.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nlet SPAN_METRIC_SUMMARY;\n\nfunction getMetricStorageForSpan(span) {\n return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined;\n}\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n const storage = getMetricStorageForSpan(span);\n\n if (!storage) {\n return undefined;\n }\n const output = {};\n\n for (const [, [exportKey, summary]] of storage) {\n if (!output[exportKey]) {\n output[exportKey] = [];\n }\n\n output[exportKey].push(dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const span = getActiveSpan();\n if (span) {\n const storage = getMetricStorageForSpan(span) || new Map();\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n\n if (!SPAN_METRIC_SUMMARY) {\n SPAN_METRIC_SUMMARY = new WeakMap();\n }\n\n SPAN_METRIC_SUMMARY.set(span, storage);\n }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnActiveSpan };\n//# sourceMappingURL=metric-summary.js.map\n"],"names":["dropUndefinedKeys","getActiveSpan"],"mappings":";;;;AAWA,IAAI;AAEJ,SAAS,wBAAwB,MAAM;AACrC,SAAO,sBAAsB,oBAAoB,IAAI,IAAI,IAAI;AAC/D;AAKA,SAAS,4BAA4B,MAAM;AACzC,QAAM,UAAU,wBAAwB,IAAI;AAE5C,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACR;AACD,QAAM,SAAS,CAAA;AAEf,aAAW,CAAA,EAAG,CAAC,WAAW,OAAO,CAAC,KAAK,SAAS;AAC9C,QAAI,CAAC,OAAO,SAAS,GAAG;AACtB,aAAO,SAAS,IAAI;IACrB;AAED,WAAO,SAAS,EAAE,KAAKA,OAAAA,kBAAkB,OAAO,CAAC;AAAA,EAClD;AAED,SAAO;AACT;AAKA,SAAS,gCACP,YACA,eACA,OACA,MACA,MACA,WACA;AACA,QAAM,OAAOC,MAAAA;AACb,MAAI,MAAM;AACR,UAAM,UAAU,wBAAwB,IAAI,KAAK,oBAAI,IAAG;AAExD,UAAM,YAAY,GAAG,UAAU,IAAI,aAAa,IAAI,IAAI;AACxD,UAAM,aAAa,QAAQ,IAAI,SAAS;AAExC,QAAI,YAAY;AACd,YAAM,CAAG,EAAA,OAAO,IAAI;AACpB,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,OAAQ,QAAQ,SAAS;AAAA,UACzB,KAAM,QAAQ,OAAO;AAAA,UACrB,MAAM,QAAQ;AAAA,QACf;AAAA,MACT,CAAO;AAAA,IACP,OAAW;AACL,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK;AAAA,UACL,KAAK;AAAA,UACL,OAAO;AAAA,UACP,KAAK;AAAA,UACL;AAAA,QACD;AAAA,MACT,CAAO;AAAA,IACF;AAED,QAAI,CAAC,qBAAqB;AACxB,4BAAsB,oBAAI;IAC3B;AAED,wBAAoB,IAAI,MAAM,OAAO;AAAA,EACtC;AACH;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"metric-summary.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/metric-summary.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\nimport '../debug-build.js';\nimport '../tracing/errors.js';\nimport '../tracing/spanstatus.js';\nimport { getActiveSpan } from '../tracing/trace.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nlet SPAN_METRIC_SUMMARY;\n\nfunction getMetricStorageForSpan(span) {\n return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined;\n}\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n const storage = getMetricStorageForSpan(span);\n\n if (!storage) {\n return undefined;\n }\n const output = {};\n\n for (const [, [exportKey, summary]] of storage) {\n if (!output[exportKey]) {\n output[exportKey] = [];\n }\n\n output[exportKey].push(dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const span = getActiveSpan();\n if (span) {\n const storage = getMetricStorageForSpan(span) || new Map();\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n\n if (!SPAN_METRIC_SUMMARY) {\n SPAN_METRIC_SUMMARY = new WeakMap();\n }\n\n SPAN_METRIC_SUMMARY.set(span, storage);\n }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnActiveSpan };\n//# sourceMappingURL=metric-summary.js.map\n"],"names":["dropUndefinedKeys","getActiveSpan"],"mappings":";;;;AAWA,IAAI;AAEJ,SAAS,wBAAwB,MAAM;AACrC,SAAO,sBAAsB,oBAAoB,IAAI,IAAI,IAAI;AAC/D;AAKA,SAAS,4BAA4B,MAAM;AACzC,QAAM,UAAU,wBAAwB,IAAI;AAE5C,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AACA,QAAM,SAAS,CAAA;AAEf,aAAW,CAAA,EAAG,CAAC,WAAW,OAAO,CAAC,KAAK,SAAS;AAC9C,QAAI,CAAC,OAAO,SAAS,GAAG;AACtB,aAAO,SAAS,IAAI,CAAA;AAAA,IACtB;AAEA,WAAO,SAAS,EAAE,KAAKA,OAAAA,kBAAkB,OAAO,CAAC;AAAA,EACnD;AAEA,SAAO;AACT;AAKA,SAAS,gCACP,YACA,eACA,OACA,MACA,MACA,WACA;AACA,QAAM,OAAOC,MAAAA,cAAa;AAC1B,MAAI,MAAM;AACR,UAAM,UAAU,wBAAwB,IAAI,KAAK,oBAAI,IAAG;AAExD,UAAM,YAAY,GAAG,UAAU,IAAI,aAAa,IAAI,IAAI;AACxD,UAAM,aAAa,QAAQ,IAAI,SAAS;AAExC,QAAI,YAAY;AACd,YAAM,CAAA,EAAG,OAAO,IAAI;AACpB,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,OAAQ,QAAQ,SAAS;AAAA,UACzB,KAAM,QAAQ,OAAO;AAAA,UACrB,MAAM,QAAQ;AAAA,QACxB;AAAA,MACA,CAAO;AAAA,IACH,OAAO;AACL,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK;AAAA,UACL,KAAK;AAAA,UACL,OAAO;AAAA,UACP,KAAK;AAAA,UACL;AAAA,QACV;AAAA,MACA,CAAO;AAAA,IACH;AAEA,QAAI,CAAC,qBAAqB;AACxB,4BAAsB,oBAAI,QAAO;AAAA,IACnC;AAEA,wBAAoB,IAAI,MAAM,OAAO;AAAA,EACvC;AACF;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"metric-summary.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/metric-summary.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\nimport '../debug-build.js';\nimport '../tracing/errors.js';\nimport '../tracing/spanstatus.js';\nimport { getActiveSpan } from '../tracing/trace.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nlet SPAN_METRIC_SUMMARY;\n\nfunction getMetricStorageForSpan(span) {\n return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined;\n}\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n const storage = getMetricStorageForSpan(span);\n\n if (!storage) {\n return undefined;\n }\n const output = {};\n\n for (const [, [exportKey, summary]] of storage) {\n if (!output[exportKey]) {\n output[exportKey] = [];\n }\n\n output[exportKey].push(dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const span = getActiveSpan();\n if (span) {\n const storage = getMetricStorageForSpan(span) || new Map();\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n\n if (!SPAN_METRIC_SUMMARY) {\n SPAN_METRIC_SUMMARY = new WeakMap();\n }\n\n SPAN_METRIC_SUMMARY.set(span, storage);\n }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnActiveSpan };\n//# sourceMappingURL=metric-summary.js.map\n"],"names":[],"mappings":";;AAWA,IAAI;AAEJ,SAAS,wBAAwB,MAAM;AACrC,SAAO,sBAAsB,oBAAoB,IAAI,IAAI,IAAI;AAC/D;AAKA,SAAS,4BAA4B,MAAM;AACzC,QAAM,UAAU,wBAAwB,IAAI;AAE5C,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACR;AACD,QAAM,SAAS,CAAA;AAEf,aAAW,CAAA,EAAG,CAAC,WAAW,OAAO,CAAC,KAAK,SAAS;AAC9C,QAAI,CAAC,OAAO,SAAS,GAAG;AACtB,aAAO,SAAS,IAAI;IACrB;AAED,WAAO,SAAS,EAAE,KAAK,kBAAkB,OAAO,CAAC;AAAA,EAClD;AAED,SAAO;AACT;AAKA,SAAS,gCACP,YACA,eACA,OACA,MACA,MACA,WACA;AACA,QAAM,OAAO;AACb,MAAI,MAAM;AACR,UAAM,UAAU,wBAAwB,IAAI,KAAK,oBAAI,IAAG;AAExD,UAAM,YAAY,GAAG,UAAU,IAAI,aAAa,IAAI,IAAI;AACxD,UAAM,aAAa,QAAQ,IAAI,SAAS;AAExC,QAAI,YAAY;AACd,YAAM,CAAG,EAAA,OAAO,IAAI;AACpB,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,OAAQ,QAAQ,SAAS;AAAA,UACzB,KAAM,QAAQ,OAAO;AAAA,UACrB,MAAM,QAAQ;AAAA,QACf;AAAA,MACT,CAAO;AAAA,IACP,OAAW;AACL,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK;AAAA,UACL,KAAK;AAAA,UACL,OAAO;AAAA,UACP,KAAK;AAAA,UACL;AAAA,QACD;AAAA,MACT,CAAO;AAAA,IACF;AAED,QAAI,CAAC,qBAAqB;AACxB,4BAAsB,oBAAI;IAC3B;AAED,wBAAoB,IAAI,MAAM,OAAO;AAAA,EACtC;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"metric-summary.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/metric-summary.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\nimport '../debug-build.js';\nimport '../tracing/errors.js';\nimport '../tracing/spanstatus.js';\nimport { getActiveSpan } from '../tracing/trace.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nlet SPAN_METRIC_SUMMARY;\n\nfunction getMetricStorageForSpan(span) {\n return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined;\n}\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n const storage = getMetricStorageForSpan(span);\n\n if (!storage) {\n return undefined;\n }\n const output = {};\n\n for (const [, [exportKey, summary]] of storage) {\n if (!output[exportKey]) {\n output[exportKey] = [];\n }\n\n output[exportKey].push(dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n metricType,\n sanitizedName,\n value,\n unit,\n tags,\n bucketKey,\n) {\n const span = getActiveSpan();\n if (span) {\n const storage = getMetricStorageForSpan(span) || new Map();\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n\n if (!SPAN_METRIC_SUMMARY) {\n SPAN_METRIC_SUMMARY = new WeakMap();\n }\n\n SPAN_METRIC_SUMMARY.set(span, storage);\n }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnActiveSpan };\n//# sourceMappingURL=metric-summary.js.map\n"],"names":[],"mappings":";;AAWA,IAAI;AAEJ,SAAS,wBAAwB,MAAM;AACrC,SAAO,sBAAsB,oBAAoB,IAAI,IAAI,IAAI;AAC/D;AAKA,SAAS,4BAA4B,MAAM;AACzC,QAAM,UAAU,wBAAwB,IAAI;AAE5C,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AACA,QAAM,SAAS,CAAA;AAEf,aAAW,CAAA,EAAG,CAAC,WAAW,OAAO,CAAC,KAAK,SAAS;AAC9C,QAAI,CAAC,OAAO,SAAS,GAAG;AACtB,aAAO,SAAS,IAAI,CAAA;AAAA,IACtB;AAEA,WAAO,SAAS,EAAE,KAAK,kBAAkB,OAAO,CAAC;AAAA,EACnD;AAEA,SAAO;AACT;AAKA,SAAS,gCACP,YACA,eACA,OACA,MACA,MACA,WACA;AACA,QAAM,OAAO,cAAa;AAC1B,MAAI,MAAM;AACR,UAAM,UAAU,wBAAwB,IAAI,KAAK,oBAAI,IAAG;AAExD,UAAM,YAAY,GAAG,UAAU,IAAI,aAAa,IAAI,IAAI;AACxD,UAAM,aAAa,QAAQ,IAAI,SAAS;AAExC,QAAI,YAAY;AACd,YAAM,CAAA,EAAG,OAAO,IAAI;AACpB,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,KAAK,KAAK,IAAI,QAAQ,KAAK,KAAK;AAAA,UAChC,OAAQ,QAAQ,SAAS;AAAA,UACzB,KAAM,QAAQ,OAAO;AAAA,UACrB,MAAM,QAAQ;AAAA,QACxB;AAAA,MACA,CAAO;AAAA,IACH,OAAO;AACL,cAAQ,IAAI,WAAW;AAAA,QACrB;AAAA,QACA;AAAA,UACE,KAAK;AAAA,UACL,KAAK;AAAA,UACL,OAAO;AAAA,UACP,KAAK;AAAA,UACL;AAAA,QACV;AAAA,MACA,CAAO;AAAA,IACH;AAEA,QAAI,CAAC,qBAAqB;AACxB,4BAAsB,oBAAI,QAAO;AAAA,IACnC;AAEA,wBAAoB,IAAI,MAAM,OAAO;AAAA,EACvC;AACF;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/utils.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Generate bucket key from metric properties.\n */\nfunction getBucketKey(\n metricType,\n name,\n unit,\n tags,\n) {\n const stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0]));\n return `${metricType}${name}${unit}${stringifiedTags}`;\n}\n\n/* eslint-disable no-bitwise */\n/**\n * Simple hash function for strings.\n */\nfunction simpleHash(s) {\n let rv = 0;\n for (let i = 0; i < s.length; i++) {\n const c = s.charCodeAt(i);\n rv = (rv << 5) - rv + c;\n rv &= rv;\n }\n return rv >>> 0;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Serialize metrics buckets into a string based on statsd format.\n *\n * Example of format:\n * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677\n * Segments:\n * name: metric.name\n * unit: second\n * value: [1, 1.2]\n * type of metric: d (distribution)\n * tags: { a: value, b: anothervalue }\n * timestamp: 12345677\n */\nfunction serializeMetricBuckets(metricBucketItems) {\n let out = '';\n for (const item of metricBucketItems) {\n const tagEntries = Object.entries(item.tags);\n const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(',')}` : '';\n out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}\\n`;\n }\n return out;\n}\n\n/** Sanitizes units */\nfunction sanitizeUnit(unit) {\n return unit.replace(/[^\\w]+/gi, '_');\n}\n\n/** Sanitizes metric keys */\nfunction sanitizeMetricKey(key) {\n return key.replace(/[^\\w\\-.]+/gi, '_');\n}\n\nfunction sanitizeTagKey(key) {\n return key.replace(/[^\\w\\-./]+/gi, '');\n}\n\nconst tagValueReplacements = [\n ['\\n', '\\\\n'],\n ['\\r', '\\\\r'],\n ['\\t', '\\\\t'],\n ['\\\\', '\\\\\\\\'],\n ['|', '\\\\u{7c}'],\n [',', '\\\\u{2c}'],\n];\n\nfunction getCharOrReplacement(input) {\n for (const [search, replacement] of tagValueReplacements) {\n if (input === search) {\n return replacement;\n }\n }\n\n return input;\n}\n\nfunction sanitizeTagValue(value) {\n return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), '');\n}\n\n/**\n * Sanitizes tags.\n */\nfunction sanitizeTags(unsanitizedTags) {\n const tags = {};\n for (const key in unsanitizedTags) {\n if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) {\n const sanitizedKey = sanitizeTagKey(key);\n tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key]));\n }\n }\n return tags;\n}\n\nexport { getBucketKey, sanitizeMetricKey, sanitizeTags, sanitizeUnit, serializeMetricBuckets, simpleHash };\n//# sourceMappingURL=utils.js.map\n"],"names":["dropUndefinedKeys"],"mappings":";;;AAKA,SAAS,aACP,YACA,MACA,MACA,MACA;AACA,QAAM,kBAAkB,OAAO,QAAQA,OAAiB,kBAAC,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;AACvG,SAAO,GAAG,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,eAAe;AACtD;AAMA,SAAS,WAAW,GAAG;AACrB,MAAI,KAAK;AACT,WAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;AACjC,UAAM,IAAI,EAAE,WAAW,CAAC;AACxB,UAAM,MAAM,KAAK,KAAK;AACtB,UAAM;AAAA,EACP;AACD,SAAO,OAAO;AAChB;AAgBA,SAAS,uBAAuB,mBAAmB;AACjD,MAAI,MAAM;AACV,aAAW,QAAQ,mBAAmB;AACpC,UAAM,aAAa,OAAO,QAAQ,KAAK,IAAI;AAC3C,UAAM,YAAY,WAAW,SAAS,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,EAAE,KAAK,GAAG,CAAC,KAAK;AACjH,WAAO,GAAG,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,MAAM,IAAI,KAAK,UAAU,GAAG,SAAS,KAAK,KAAK,SAAS;AAAA;AAAA,EAClG;AACD,SAAO;AACT;AAGA,SAAS,aAAa,MAAM;AAC1B,SAAO,KAAK,QAAQ,YAAY,GAAG;AACrC;AAGA,SAAS,kBAAkB,KAAK;AAC9B,SAAO,IAAI,QAAQ,eAAe,GAAG;AACvC;AAEA,SAAS,eAAe,KAAK;AAC3B,SAAO,IAAI,QAAQ,gBAAgB,EAAE;AACvC;AAEA,MAAM,uBAAuB;AAAA,EAC3B,CAAC,MAAM,KAAK;AAAA,EACZ,CAAC,MAAM,KAAK;AAAA,EACZ,CAAC,KAAM,KAAK;AAAA,EACZ,CAAC,MAAM,MAAM;AAAA,EACb,CAAC,KAAK,SAAS;AAAA,EACf,CAAC,KAAK,SAAS;AACjB;AAEA,SAAS,qBAAqB,OAAO;AACnC,aAAW,CAAC,QAAQ,WAAW,KAAK,sBAAsB;AACxD,QAAI,UAAU,QAAQ;AACpB,aAAO;AAAA,IACR;AAAA,EACF;AAED,SAAO;AACT;AAEA,SAAS,iBAAiB,OAAO;AAC/B,SAAO,CAAC,GAAG,KAAK,EAAE,OAAO,CAAC,KAAK,SAAS,MAAM,qBAAqB,IAAI,GAAG,EAAE;AAC9E;AAKA,SAAS,aAAa,iBAAiB;AACrC,QAAM,OAAO,CAAA;AACb,aAAW,OAAO,iBAAiB;AACjC,QAAI,OAAO,UAAU,eAAe,KAAK,iBAAiB,GAAG,GAAG;AAC9D,YAAM,eAAe,eAAe,GAAG;AACvC,WAAK,YAAY,IAAI,iBAAiB,OAAO,gBAAgB,GAAG,CAAC,CAAC;AAAA,IACnE;AAAA,EACF;AACD,SAAO;AACT;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"utils.cjs","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/utils.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Generate bucket key from metric properties.\n */\nfunction getBucketKey(\n metricType,\n name,\n unit,\n tags,\n) {\n const stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0]));\n return `${metricType}${name}${unit}${stringifiedTags}`;\n}\n\n/* eslint-disable no-bitwise */\n/**\n * Simple hash function for strings.\n */\nfunction simpleHash(s) {\n let rv = 0;\n for (let i = 0; i < s.length; i++) {\n const c = s.charCodeAt(i);\n rv = (rv << 5) - rv + c;\n rv &= rv;\n }\n return rv >>> 0;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Serialize metrics buckets into a string based on statsd format.\n *\n * Example of format:\n * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677\n * Segments:\n * name: metric.name\n * unit: second\n * value: [1, 1.2]\n * type of metric: d (distribution)\n * tags: { a: value, b: anothervalue }\n * timestamp: 12345677\n */\nfunction serializeMetricBuckets(metricBucketItems) {\n let out = '';\n for (const item of metricBucketItems) {\n const tagEntries = Object.entries(item.tags);\n const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(',')}` : '';\n out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}\\n`;\n }\n return out;\n}\n\n/** Sanitizes units */\nfunction sanitizeUnit(unit) {\n return unit.replace(/[^\\w]+/gi, '_');\n}\n\n/** Sanitizes metric keys */\nfunction sanitizeMetricKey(key) {\n return key.replace(/[^\\w\\-.]+/gi, '_');\n}\n\nfunction sanitizeTagKey(key) {\n return key.replace(/[^\\w\\-./]+/gi, '');\n}\n\nconst tagValueReplacements = [\n ['\\n', '\\\\n'],\n ['\\r', '\\\\r'],\n ['\\t', '\\\\t'],\n ['\\\\', '\\\\\\\\'],\n ['|', '\\\\u{7c}'],\n [',', '\\\\u{2c}'],\n];\n\nfunction getCharOrReplacement(input) {\n for (const [search, replacement] of tagValueReplacements) {\n if (input === search) {\n return replacement;\n }\n }\n\n return input;\n}\n\nfunction sanitizeTagValue(value) {\n return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), '');\n}\n\n/**\n * Sanitizes tags.\n */\nfunction sanitizeTags(unsanitizedTags) {\n const tags = {};\n for (const key in unsanitizedTags) {\n if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) {\n const sanitizedKey = sanitizeTagKey(key);\n tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key]));\n }\n }\n return tags;\n}\n\nexport { getBucketKey, sanitizeMetricKey, sanitizeTags, sanitizeUnit, serializeMetricBuckets, simpleHash };\n//# sourceM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Z,CAAC,MAAM,MAAM;AAAA,EACb,CAAC,KAAK,SAAS;AAAA,EACf,CAAC,KAAK,SAAS;AACjB;AAEA,SAAS,qBAAqB,OAAO;AACnC,aAAW,CAAC,QAAQ,WAAW,KAAK,sBAAsB;AACxD,QAAI,UAAU,QAAQ;AACpB,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,iBAAiB,OAAO;AAC/B,SAAO,CAAC,GAAG,KAAK,EAAE,OAAO,CAAC,KAAK,SAAS,MAAM,qBAAqB,IAAI,GAAG,EAAE;AAC9E;AAKA,SAAS,aAAa,iBAAiB;AACrC,QAAM,OAAO,CAAA;AACb,aAAW,OAAO,iBAAiB;AACjC,QAAI,OAAO,UAAU,eAAe,KAAK,iBAAiB,GAAG,GAAG;AAC9D,YAAM,eAAe,eAAe,GAAG;AACvC,WAAK,YAAY,IAAI,iBAAiB,OAAO,gBAAgB,GAAG,CAAC,CAAC;AAAA,IACpE;AAAA,EACF;AACA,SAAO;AACT;;;;;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/utils.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Generate bucket key from metric properties.\n */\nfunction getBucketKey(\n metricType,\n name,\n unit,\n tags,\n) {\n const stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0]));\n return `${metricType}${name}${unit}${stringifiedTags}`;\n}\n\n/* eslint-disable no-bitwise */\n/**\n * Simple hash function for strings.\n */\nfunction simpleHash(s) {\n let rv = 0;\n for (let i = 0; i < s.length; i++) {\n const c = s.charCodeAt(i);\n rv = (rv << 5) - rv + c;\n rv &= rv;\n }\n return rv >>> 0;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Serialize metrics buckets into a string based on statsd format.\n *\n * Example of format:\n * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677\n * Segments:\n * name: metric.name\n * unit: second\n * value: [1, 1.2]\n * type of metric: d (distribution)\n * tags: { a: value, b: anothervalue }\n * timestamp: 12345677\n */\nfunction serializeMetricBuckets(metricBucketItems) {\n let out = '';\n for (const item of metricBucketItems) {\n const tagEntries = Object.entries(item.tags);\n const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(',')}` : '';\n out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}\\n`;\n }\n return out;\n}\n\n/** Sanitizes units */\nfunction sanitizeUnit(unit) {\n return unit.replace(/[^\\w]+/gi, '_');\n}\n\n/** Sanitizes metric keys */\nfunction sanitizeMetricKey(key) {\n return key.replace(/[^\\w\\-.]+/gi, '_');\n}\n\nfunction sanitizeTagKey(key) {\n return key.replace(/[^\\w\\-./]+/gi, '');\n}\n\nconst tagValueReplacements = [\n ['\\n', '\\\\n'],\n ['\\r', '\\\\r'],\n ['\\t', '\\\\t'],\n ['\\\\', '\\\\\\\\'],\n ['|', '\\\\u{7c}'],\n [',', '\\\\u{2c}'],\n];\n\nfunction getCharOrReplacement(input) {\n for (const [search, replacement] of tagValueReplacements) {\n if (input === search) {\n return replacement;\n }\n }\n\n return input;\n}\n\nfunction sanitizeTagValue(value) {\n return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), '');\n}\n\n/**\n * Sanitizes tags.\n */\nfunction sanitizeTags(unsanitizedTags) {\n const tags = {};\n for (const key in unsanitizedTags) {\n if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) {\n const sanitizedKey = sanitizeTagKey(key);\n tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key]));\n }\n }\n return tags;\n}\n\nexport { getBucketKey, sanitizeMetricKey, sanitizeTags, sanitizeUnit, serializeMetricBuckets, simpleHash };\n//# sourceMappingURL=utils.js.map\n"],"names":[],"mappings":";AAKA,SAAS,aACP,YACA,MACA,MACA,MACA;AAC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AAS,qBAAqB,OAAO;AACnC,aAAW,CAAC,QAAQ,WAAW,KAAK,sBAAsB;AACxD,QAAI,UAAU,QAAQ;AACpB,aAAO;AAAA,IACR;AAAA,EACF;AAED,SAAO;AACT;AAEA,SAAS,iBAAiB,OAAO;AAC/B,SAAO,CAAC,GAAG,KAAK,EAAE,OAAO,CAAC,KAAK,SAAS,MAAM,qBAAqB,IAAI,GAAG,EAAE;AAC9E;AAKA,SAAS,aAAa,iBAAiB;AACrC,QAAM,OAAO,CAAA;AACb,aAAW,OAAO,iBAAiB;AACjC,QAAI,OAAO,UAAU,eAAe,KAAK,iBAAiB,GAAG,GAAG;AAC9D,YAAM,eAAe,eAAe,GAAG;AACvC,WAAK,YAAY,IAAI,iBAAiB,OAAO,gBAAgB,GAAG,CAAC,CAAC;AAAA,IACnE;AAAA,EACF;AACD,SAAO;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/metrics/utils.js"],"sourcesContent":["import { dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Generate bucket key from metric properties.\n */\nfunction getBucketKey(\n metricType,\n name,\n unit,\n tags,\n) {\n const stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0]));\n return `${metricType}${name}${unit}${stringifiedTags}`;\n}\n\n/* eslint-disable no-bitwise */\n/**\n * Simple hash function for strings.\n */\nfunction simpleHash(s) {\n let rv = 0;\n for (let i = 0; i < s.length; i++) {\n const c = s.charCodeAt(i);\n rv = (rv << 5) - rv + c;\n rv &= rv;\n }\n return rv >>> 0;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Serialize metrics buckets into a string based on statsd format.\n *\n * Example of format:\n * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677\n * Segments:\n * name: metric.name\n * unit: second\n * value: [1, 1.2]\n * type of metric: d (distribution)\n * tags: { a: value, b: anothervalue }\n * timestamp: 12345677\n */\nfunction serializeMetricBuckets(metricBucketItems) {\n let out = '';\n for (const item of metricBucketItems) {\n const tagEntries = Object.entries(item.tags);\n const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(',')}` : '';\n out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}\\n`;\n }\n return out;\n}\n\n/** Sanitizes units */\nfunction sanitizeUnit(unit) {\n return unit.replace(/[^\\w]+/gi, '_');\n}\n\n/** Sanitizes metric keys */\nfunction sanitizeMetricKey(key) {\n return key.replace(/[^\\w\\-.]+/gi, '_');\n}\n\nfunction sanitizeTagKey(key) {\n return key.replace(/[^\\w\\-./]+/gi, '');\n}\n\nconst tagValueReplacements = [\n ['\\n', '\\\\n'],\n ['\\r', '\\\\r'],\n ['\\t', '\\\\t'],\n ['\\\\', '\\\\\\\\'],\n ['|', '\\\\u{7c}'],\n [',', '\\\\u{2c}'],\n];\n\nfunction getCharOrReplacement(input) {\n for (const [search, replacement] of tagValueReplacements) {\n if (input === search) {\n return replacement;\n }\n }\n\n return input;\n}\n\nfunction sanitizeTagValue(value) {\n return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), '');\n}\n\n/**\n * Sanitizes tags.\n */\nfunction sanitizeTags(unsanitizedTags) {\n const tags = {};\n for (const key in unsanitizedTags) {\n if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) {\n const sanitizedKey = sanitizeTagKey(key);\n tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key]));\n }\n }\n return tags;\n}\n\nexport { getBucketKey, sanitizeMetricKey, sanitizeTags, sanitizeUnit, serializeMetricBuckets, simpleHash };\n//# sourceMappingURL=utils.js.map\n"],"names":[],"mappings":";AAKA,SAAS,aACP,YACA,MACA,MACA,MACA;AACA,QAAM,kBAAkB,OAAO,QAAQ,kBAAkB,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,CAA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AAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,iBAAiB,OAAO;AAC/B,SAAO,CAAC,GAAG,KAAK,EAAE,OAAO,CAAC,KAAK,SAAS,MAAM,qBAAqB,IAAI,GAAG,EAAE;AAC9E;AAKA,SAAS,aAAa,iBAAiB;AACrC,QAAM,OAAO,CAAA;AACb,aAAW,OAAO,iBAAiB;AACjC,QAAI,OAAO,UAAU,eAAe,KAAK,iBAAiB,GAAG,GAAG;AAC9D,YAAM,eAAe,eAAe,GAAG;AACvC,WAAK,YAAY,IAAI,iBAAiB,OAAO,gBAAgB,GAAG,CAAC,CAAC;AAAA,IACpE;AAAA,EACF;AACA,SAAO;AACT;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"scope.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/scope.js"],"sourcesContent":["import { isPlainObject, dateTimestampInSeconds, uuid4, logger } from '@sentry/utils';\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\nimport { applyScopeDataToEvent } from './utils/applyScopeDataToEvent.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * The global scope is kept in this module.\n * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present.\n */\nlet globalScope;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /**\n * Transaction Name\n */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n /** The client on this scope */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @deprecated Use `scope.clone()` and `new Scope()` instead.\n */\n static clone(scope) {\n return scope ? scope.clone() : new Scope();\n }\n\n /**\n * Clone this scope instance.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._span = this._span;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n\n return newScope;\n }\n\n /** Update the client on the scope. */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Get the client assigned to this scope.\n *\n * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.\n */\n getClient() {\n return this._client;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n segment: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Returns the `Span` if there is one.\n * @deprecated Use `getActiveSpan()` instead.\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one).\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this._span;\n // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction\n // Also, this method will be removed anyway.\n // eslint-disable-next-line deprecation/deprecation\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n if (scopeToMerge instanceof Scope) {\n const scopeData = scopeToMerge.getScopeData();\n\n this._tags = { ...this._tags, ...scopeData.tags };\n this._extra = { ...this._extra, ...scopeData.extra };\n this._contexts = { ...this._contexts, ...scopeData.contexts };\n if (scopeData.user && Object.keys(scopeData.user).length) {\n this._user = scopeData.user;\n }\n if (scopeData.level) {\n this._level = scopeData.level;\n }\n if (scopeData.fingerprint.length) {\n this._fingerprint = scopeData.fingerprint;\n }\n if (scopeToMerge.getRequestSession()) {\n this._requestSession = scopeToMerge.getRequestSession();\n }\n if (scopeData.propagationContext) {\n this._propagationContext = scopeData.propagationContext;\n }\n } else if (isPlainObject(scopeToMerge)) {\n const scopeContext = captureContext ;\n this._tags = { ...this._tags, ...scopeContext.tags };\n this._extra = { ...this._extra, ...scopeContext.extra };\n this._contexts = { ...this._contexts, ...scopeContext.contexts };\n if (scopeContext.user) {\n this._user = scopeContext.user;\n }\n if (scopeContext.level) {\n this._level = scopeContext.level;\n }\n if (scopeContext.fingerprint) {\n this._fingerprint = scopeContext.fingerprint;\n }\n if (scopeContext.requestSession) {\n this._requestSession = scopeContext.requestSession;\n }\n if (scopeContext.propagationContext) {\n this._propagationContext = scopeContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `getScopeData()` instead.\n */\n getAttachments() {\n const data = this.getScopeData();\n\n return data.attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n getScopeData() {\n const {\n _breadcrumbs,\n _attachments,\n _contexts,\n _tags,\n _extra,\n _user,\n _level,\n _fingerprint,\n _eventProcessors,\n _propagationContext,\n _sdkProcessingMetadata,\n _transactionName,\n _span,\n } = this;\n\n return {\n breadcrumbs: _breadcrumbs,\n attachments: _attachments,\n contexts: _contexts,\n tags: _tags,\n extra: _extra,\n user: _user,\n level: _level,\n fingerprint: _fingerprint || [],\n eventProcessors: _eventProcessors,\n propagationContext: _propagationContext,\n sdkProcessingMetadata: _sdkProcessingMetadata,\n transactionName: _transactionName,\n span: _span,\n };\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n * @deprecated Use `applyScopeDataToEvent()` directly\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors = [],\n ) {\n applyScopeDataToEvent(event, this.getScopeData());\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...additionalEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n ...this._eventProcessors,\n ];\n\n return notifyEventProcessors(eventProcessors, event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @param exception The exception to capture.\n * @param hint Optinal additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @param message The message to capture.\n * @param level An optional severity level to report the message with.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Captures a manually created event for this scope and sends it to Sentry.\n *\n * @param exception The event to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n if (!globalScope) {\n globalScope = new Scope();\n }\n\n return globalScope;\n}\n\n/**\n * This is mainly needed for tests.\n * DO NOT USE this, as this is an internal API and subject to change.\n * @hidden\n */\nfunction setGlobalScope(scope) {\n globalScope = scope;\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope, getGlobalScope, setGlobalScope };\n//# sourceMappingURL=scope.js.map\n"],"names":["updateSession","session","isPlainObject","dateTimestampInSeconds","applyScopeDataToEvent","eventProcessors","getGlobalEventProcessors","notifyEventProc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rB,CAAO;AACD,WAAK,sBAAsB;AAAA,IAC5B;AAAA,EACF;AACH;AAMA,SAAS,iBAAiB;AACxB,MAAI,CAAC,aAAa;AAChB,kBAAc,IAAI;EACnB;AAED,SAAO;AACT;AAWA,SAAS,6BAA6B;AACpC,SAAO;AAAA,IACL,SAASD,KAAAA,MAAO;AAAA,IAChB,QAAQA,KAAK,MAAA,EAAG,UAAU,EAAE;AAAA,EAChC;AACA;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"scope.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/scope.js"],"sourcesContent":["import { isPlainObject, dateTimestampInSeconds, uuid4, logger } from '@sentry/utils';\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\nimport { applyScopeDataToEvent } from './utils/applyScopeDataToEvent.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * The global scope is kept in this module.\n * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present.\n */\nlet globalScope;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /**\n * Transaction Name\n */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n /** The client on this scope */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @deprecated Use `scope.clone()` and `new Scope()` instead.\n */\n static clone(scope) {\n return scope ? scope.clone() : new Scope();\n }\n\n /**\n * Clone this scope instance.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._span = this._span;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n\n return newScope;\n }\n\n /** Update the client on the scope. */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Get the client assigned to this scope.\n *\n * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.\n */\n getClient() {\n return this._client;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n segment: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Returns the `Span` if there is one.\n * @deprecated Use `getActiveSpan()` instead.\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one).\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this._span;\n // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction\n // Also, this method will be removed anyway.\n // eslint-disable-next-line deprecation/deprecation\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n if (scopeToMerge instanceof Scope) {\n const scopeData = scopeToMerge.getScopeData();\n\n this._tags = { ...this._tags, ...scopeData.tags };\n this._extra = { ...this._extra, ...scopeData.extra };\n this._contexts = { ...this._contexts, ...scopeData.contexts };\n if (scopeData.user && Object.keys(scopeData.user).length) {\n this._user = scopeData.user;\n }\n if (scopeData.level) {\n this._level = scopeData.level;\n }\n if (scopeData.fingerprint.length) {\n this._fingerprint = scopeData.fingerprint;\n }\n if (scopeToMerge.getRequestSession()) {\n this._requestSession = scopeToMerge.getRequestSession();\n }\n if (scopeData.propagationContext) {\n this._propagationContext = scopeData.propagationContext;\n }\n } else if (isPlainObject(scopeToMerge)) {\n const scopeContext = captureContext ;\n this._tags = { ...this._tags, ...scopeContext.tags };\n this._extra = { ...this._extra, ...scopeContext.extra };\n this._contexts = { ...this._contexts, ...scopeContext.contexts };\n if (scopeContext.user) {\n this._user = scopeContext.user;\n }\n if (scopeContext.level) {\n this._level = scopeContext.level;\n }\n if (scopeContext.fingerprint) {\n this._fingerprint = scopeContext.fingerprint;\n }\n if (scopeContext.requestSession) {\n this._requestSession = scopeContext.requestSession;\n }\n if (scopeContext.propagationContext) {\n this._propagationContext = scopeContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `getScopeData()` instead.\n */\n getAttachments() {\n const data = this.getScopeData();\n\n return data.attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n getScopeData() {\n const {\n _breadcrumbs,\n _attachments,\n _contexts,\n _tags,\n _extra,\n _user,\n _level,\n _fingerprint,\n _eventProcessors,\n _propagationContext,\n _sdkProcessingMetadata,\n _transactionName,\n _span,\n } = this;\n\n return {\n breadcrumbs: _breadcrumbs,\n attachments: _attachments,\n contexts: _contexts,\n tags: _tags,\n extra: _extra,\n user: _user,\n level: _level,\n fingerprint: _fingerprint || [],\n eventProcessors: _eventProcessors,\n propagationContext: _propagationContext,\n sdkProcessingMetadata: _sdkProcessingMetadata,\n transactionName: _transactionName,\n span: _span,\n };\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n * @deprecated Use `applyScopeDataToEvent()` directly\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors = [],\n ) {\n applyScopeDataToEvent(event, this.getScopeData());\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...additionalEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n ...this._eventProcessors,\n ];\n\n return notifyEventProcessors(eventProcessors, event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @param exception The exception to capture.\n * @param hint Optinal additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @param message The message to capture.\n * @param level An optional severity level to report the message with.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Captures a manually created event for this scope and sends it to Sentry.\n *\n * @param exception The event to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n if (!globalScope) {\n globalScope = new Scope();\n }\n\n return globalScope;\n}\n\n/**\n * This is mainly needed for tests.\n * DO NOT USE this, as this is an internal API and subject to change.\n * @hidden\n */\nfunction setGlobalScope(scope) {\n globalScope = scope;\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope, getGlobalScope, setGlobalScope };\n//# sourceMappingURL=scope.js.map\n"],"names":["updateSession","session","isPlainObject","dateTimestampInSeconds","applyScopeDataToEvent","eventProcessors","getGlobalEventProcessors","notifyEventProcessors","uuid4","logger"],"mappings":";;;;;;;;;AAQA,MAAM,0BAA0B;AAMhC,IAAI;AAMJ,MAAM,MAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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